From eb977733051c8e9214f070407ddff33f3bdbfacf Mon Sep 17 00:00:00 2001 From: Ford Date: Tue, 12 Dec 2023 10:33:10 -0800 Subject: [PATCH] cli, common: Update tests No longer use localhost Use Sepolia testnet --- .../indexer-agent/src/__tests__/indexer.ts | 2 +- .../indexer-cli/src/__tests__/cli.test.ts | 14 +- .../src/__tests__/indexer/actions.test.ts | 38 ++---- .../src/__tests__/indexer/cost.test.ts | 17 ++- .../src/__tests__/indexer/rules.test.ts | 126 +++++++++--------- .../indexer-actions-get-fields.stdout | 4 +- .../indexer-actions-get-first-fields.stdout | 2 +- .../indexer-actions-get-first.stdout | 2 +- .../references/indexer-actions-get.stdout | 4 +- .../indexer-cost-model-deployment.stdout | 2 +- .../indexer-rule-deployment-always.stdout | 2 +- ...deployment-deleted-offchain-success.stdout | 2 +- ...xer-rule-deployment-deleted-success.stdout | 2 +- .../indexer-rule-deployment-lifetime.stdout | 2 +- .../indexer-rule-deployment-never.stdout | 2 +- .../indexer-rule-deployment-offchain.stdout | 2 +- .../indexer-rule-deployment-rules.stdout | 2 +- .../indexer-rule-deployment-safety.stdout | 2 +- .../indexer-rule-deployment-supported.stdout | 2 +- .../indexer-rule-deployment-yaml.stdout | 4 +- .../indexer-rule-global-rules.stdout | 2 +- .../indexer-rule-subgraph-offchain.stdout | 2 +- .../indexer-rule-subgraph-options.stdout | 2 +- .../indexer-rule-subgraph-rules.stdout | 2 +- .../indexer-rules-command-no-args.stdout | 6 +- packages/indexer-cli/src/__tests__/util.ts | 67 ++++++++-- .../__tests__/helpers.test.ts | 2 +- .../src/indexer-management/__tests__/util.ts | 4 +- .../src/server/__tests__/server.test.ts | 6 +- 29 files changed, 168 insertions(+), 158 deletions(-) diff --git a/packages/indexer-agent/src/__tests__/indexer.ts b/packages/indexer-agent/src/__tests__/indexer.ts index fcb2ad7fe..c449f04c6 100644 --- a/packages/indexer-agent/src/__tests__/indexer.ts +++ b/packages/indexer-agent/src/__tests__/indexer.ts @@ -151,7 +151,7 @@ const setup = async () => { const networkSpecification = specification.NetworkSpecification.parse({ networkIdentifier: 'eip155:5', gateway: { - url: 'http://localhost:8030/', + url: 'http://127.0.0.1:8030/', }, networkProvider: { url: testProviderUrl, diff --git a/packages/indexer-cli/src/__tests__/cli.test.ts b/packages/indexer-cli/src/__tests__/cli.test.ts index cf7a28a17..8c3b8c1c8 100644 --- a/packages/indexer-cli/src/__tests__/cli.test.ts +++ b/packages/indexer-cli/src/__tests__/cli.test.ts @@ -21,18 +21,7 @@ describe('Indexer cli tests', () => { }) cliTest( 'Indexer connect - success', - ['indexer', 'connect', 'http://localhost:18000'], - 'references/indexer-connect', - { - expectedExitCode: 0, - cwd: baseDir, - timeout: 10000, - }, - ) - // TODO: Connect should fail with helpful error message if incorrect port is provided or server isn't live - cliTest( - 'Indexer connect - success with incorrect port', - ['indexer', 'connect', 'http://localhost:18003'], + ['indexer', 'connect', 'http://127.0.0.1:18000'], 'references/indexer-connect', { expectedExitCode: 0, @@ -40,5 +29,6 @@ describe('Indexer cli tests', () => { timeout: 10000, }, ) + // TODO: Test that connect should fail with helpful error message if incorrect port is provided or server isn't live }) }) diff --git a/packages/indexer-cli/src/__tests__/indexer/actions.test.ts b/packages/indexer-cli/src/__tests__/indexer/actions.test.ts index e18627697..ac6a22ee6 100644 --- a/packages/indexer-cli/src/__tests__/indexer/actions.test.ts +++ b/packages/indexer-cli/src/__tests__/indexer/actions.test.ts @@ -1,6 +1,5 @@ import { cliTest, setup, teardown } from '../util' import path from 'path' -import { Action, ActionType, ActionStatus } from '@graphprotocol/indexer-common' const baseDir = path.join(__dirname, '..') describe('Indexer actions tests', () => { @@ -23,10 +22,18 @@ describe('Indexer actions tests', () => { timeout: 10000, }, ) + cliTest( + 'Indexer actions get', + ['indexer', 'actions', 'get', 'all'], + 'references/indexer-actions-get', + { + expectedExitCode: 0, + cwd: baseDir, + timeout: 10000, + }, + ) }) describe('Actions queue', () => { - beforeAll(createTestAction) - afterAll(truncateActions) cliTest( 'Indexer actions get', ['indexer', 'actions', 'get', 'all'], @@ -78,28 +85,3 @@ describe('Indexer actions tests', () => { }) }) }) - -async function createTestAction() { - await Action.create({ - type: ActionType.ALLOCATE, - status: ActionStatus.SUCCESS, - deploymentID: 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', - source: 'test', - reason: 'test', - protocolNetwork: 'eip155:5', - }) - await Action.create({ - type: ActionType.UNALLOCATE, - status: ActionStatus.FAILED, - deploymentID: 'QmfWRZCjT8pri4Amey3e3mb2Bga75Vuh2fPYyNVnmPYL66', - source: 'test', - reason: 'test', - protocolNetwork: 'eip155:5', - }) -} - -async function truncateActions() { - await Action.destroy({ - truncate: true, - }) -} diff --git a/packages/indexer-cli/src/__tests__/indexer/cost.test.ts b/packages/indexer-cli/src/__tests__/indexer/cost.test.ts index 9899de81d..2c41cd3bf 100644 --- a/packages/indexer-cli/src/__tests__/indexer/cost.test.ts +++ b/packages/indexer-cli/src/__tests__/indexer/cost.test.ts @@ -1,15 +1,14 @@ -import { cliTest, setup, seed, teardown, connect } from '../util' +import {cliTest, setup, seed, teardown, connect, deleteFromAllTables} from '../util' import path from 'path' const baseDir = path.join(__dirname, '..') describe('Indexer cost tests', () => { describe('With indexer management server', () => { - beforeEach(async () => { - await setup() - await seed() - }) - afterEach(teardown) + beforeAll(setup) + afterAll(teardown) + beforeEach(seed) + afterEach(deleteFromAllTables) describe('Cost help', () => { cliTest('Indexer cost', ['indexer', 'cost'], 'references/indexer-cost', { expectedExitCode: 255, @@ -36,7 +35,7 @@ describe('Indexer cost tests', () => { 'cost', 'set', 'model', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'QmXRpJW3qBuYaiBYHdhv8DF4bHDZhXBmh91MtrnhJfQ5Lk', 'references/basic.agora', ], 'references/indexer-cost-model-deployment', @@ -195,7 +194,7 @@ describe('Indexer cost tests', () => { 'cost', 'set', 'model', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'QmXRpJW3qBuYaiBYHdhv8DF4bHDZhXBmh91MtrnhJfQ5Lk', 'references/basic.agora', ], 'references/indexer-not-connected', @@ -217,7 +216,7 @@ describe('Indexer cost tests', () => { ) cliTest( 'Indexer cost get - not connected', - ['indexer', 'cost', 'get', 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr'], + ['indexer', 'cost', 'get', 'QmXRpJW3qBuYaiBYHdhv8DF4bHDZhXBmh91MtrnhJfQ5Lk'], 'references/indexer-not-connected', { expectedExitCode: 1, diff --git a/packages/indexer-cli/src/__tests__/indexer/rules.test.ts b/packages/indexer-cli/src/__tests__/indexer/rules.test.ts index 8fff8ba8c..ae96dc864 100644 --- a/packages/indexer-cli/src/__tests__/indexer/rules.test.ts +++ b/packages/indexer-cli/src/__tests__/indexer/rules.test.ts @@ -6,15 +6,13 @@ const baseDir = path.join(__dirname, '..') describe('Indexer rules tests', () => { describe('With indexer management server', () => { beforeAll(setup) - beforeEach(async () => { - await deleteFromAllTables() - await seed() - }) afterAll(teardown) + beforeEach(seed) + afterEach(deleteFromAllTables) describe('Rules help', () => { cliTest( 'Indexer rules', - ['indexer', 'rules', '--network', 'goerli'], + ['indexer', 'rules', '--network', 'sepolia'], 'references/indexer-rules', { expectedExitCode: 255, @@ -42,8 +40,8 @@ describe('Indexer rules tests', () => { 'rules', 'start', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-always', { @@ -64,7 +62,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules start - no identifier', - ['indexer', 'rules', 'start', '--network', 'goerli'], + ['indexer', 'rules', 'start', '--network', 'sepolia'], 'references/indexer-rules-no-identifier', { expectedExitCode: 1, @@ -74,7 +72,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules start - invalid deployment ID ', - ['indexer', 'rules', 'start', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'start', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -92,7 +90,7 @@ describe('Indexer rules tests', () => { 'rules', 'prepare', '--network', - 'goerli', + 'sepolia', 'QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK', ], 'references/indexer-rule-deployment-offchain', @@ -109,7 +107,7 @@ describe('Indexer rules tests', () => { 'rules', 'offchain', '--network', - 'goerli', + 'sepolia', 'QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK', ], 'references/indexer-rule-deployment-offchain', @@ -131,7 +129,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules prepare - no identifier', - ['indexer', 'rules', 'prepare', '--network', 'goerli'], + ['indexer', 'rules', 'prepare', '--network', 'sepolia'], 'references/indexer-rules-no-identifier', { expectedExitCode: 1, @@ -141,7 +139,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules prepare - invalid deployment ID ', - ['indexer', 'rules', 'prepare', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'prepare', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -159,8 +157,8 @@ describe('Indexer rules tests', () => { 'rules', 'stop', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-never', { @@ -181,7 +179,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules stop - no identifier', - ['indexer', 'rules', 'stop', '--network', 'goerli'], + ['indexer', 'rules', 'stop', '--network', 'sepolia'], 'references/indexer-rules-no-identifier', { expectedExitCode: 1, @@ -191,7 +189,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules stop - invalid deployment ID', - ['indexer', 'rules', 'stop', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'stop', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -209,8 +207,8 @@ describe('Indexer rules tests', () => { 'rules', 'maybe', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-rules', { @@ -231,7 +229,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules maybe - no identifier', - ['indexer', 'rules', 'maybe', '--network', 'goerli'], + ['indexer', 'rules', 'maybe', '--network', 'sepolia'], 'references/indexer-rules-no-identifier', { expectedExitCode: 1, @@ -241,7 +239,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules maybe - invalid deployment ID ', - ['indexer', 'rules', 'maybe', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'maybe', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -259,8 +257,8 @@ describe('Indexer rules tests', () => { 'rules', 'clear', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-rules', { @@ -281,7 +279,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules clear - no identifier', - ['indexer', 'rules', 'clear', '--network', 'goerli'], + ['indexer', 'rules', 'clear', '--network', 'sepolia'], 'references/indexer-rules-no-identifier', { expectedExitCode: 1, @@ -291,7 +289,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules clear - invalid deployment ID ', - ['indexer', 'rules', 'clear', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'clear', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -309,8 +307,8 @@ describe('Indexer rules tests', () => { 'rules', 'delete', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-deleted-success', { @@ -326,7 +324,7 @@ describe('Indexer rules tests', () => { 'rules', 'delete', '--network', - 'goerli', + 'sepolia', 'QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK', ], 'references/indexer-rule-deployment-deleted-offchain-success', @@ -348,7 +346,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules delete - no identifier', - ['indexer', 'rules', 'delete', '--network', 'goerli'], + ['indexer', 'rules', 'delete', '--network', 'sepolia'], 'references/indexer-rules-no-identifier', { expectedExitCode: 1, @@ -358,7 +356,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules delete - invalid deployment ID ', - ['indexer', 'rules', 'delete', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'delete', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -376,7 +374,7 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-0', 'allocationAmount', '1000', @@ -395,7 +393,7 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-1', 'allocationAmount', '1000', @@ -418,8 +416,8 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-rules', { @@ -435,7 +433,7 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', 'QmVEV7RA2U6BJT9Ssjxcfyrk4YQUnVqSRNX4TvYagjzh9h', 'requireSupported', 'false', @@ -454,10 +452,12 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', 'QmVEV7RA2U6BJT9Ssjxcfyrk4YQUnVqSRNX4TvYagjzh9h', 'safety', 'false', + 'requireSupported', + 'true' ], 'references/indexer-rule-deployment-safety', { @@ -473,7 +473,7 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', 'QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK', 'decisionBasis', 'offchain', @@ -496,7 +496,7 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', 'global', 'minSignal', '500', @@ -522,7 +522,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules set - invalid deployment ID ', - ['indexer', 'rules', 'set', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'set', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -537,7 +537,7 @@ describe('Indexer rules tests', () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-0', 'allocationAmoewt', '1000', @@ -569,8 +569,8 @@ describe('Indexer rules tests', () => { 'rules', 'get', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-rule-deployment-rules', { @@ -586,7 +586,7 @@ describe('Indexer rules tests', () => { 'rules', 'get', '--network', - 'goerli', + 'sepolia', 'QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK', ], 'references/indexer-rule-deployment-offchain', @@ -603,7 +603,7 @@ describe('Indexer rules tests', () => { 'rules', 'get', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-0', ], 'references/indexer-rule-subgraph-rules', @@ -620,7 +620,7 @@ describe('Indexer rules tests', () => { 'rules', 'get', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-2', ], 'references/indexer-rule-subgraph-options', @@ -637,8 +637,8 @@ describe('Indexer rules tests', () => { 'rules', 'get', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', '--output', 'yaml', ], @@ -651,7 +651,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules get global - success', - ['indexer', 'rules', 'get', '--network', 'goerli', 'global'], + ['indexer', 'rules', 'get', '--network', 'sepolia', 'global'], 'references/indexer-rule-global-rules', { expectedExitCode: 0, @@ -671,7 +671,7 @@ describe('Indexer rules tests', () => { ) cliTest( 'Indexer rules get - invalid deployment ID ', - ['indexer', 'rules', 'get', '--network', 'goerli', 'Qmemememememe'], + ['indexer', 'rules', 'get', '--network', 'sepolia', 'Qmemememememe'], 'references/indexer-rules-invalid-identifier-arg', { expectedExitCode: 1, @@ -683,9 +683,7 @@ describe('Indexer rules tests', () => { }) describe('Without indexer management server', () => { - beforeAll(async () => { - await connect() - }) + beforeAll(connect) cliTest( 'Indexer rules start - not connected', [ @@ -693,8 +691,8 @@ describe('Indexer rules tests', () => { 'rules', 'start', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-not-connected', { @@ -710,8 +708,8 @@ describe('Indexer rules tests', () => { 'rules', 'stop', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-not-connected', { @@ -727,8 +725,8 @@ describe('Indexer rules tests', () => { 'rules', 'maybe', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-not-connected', { @@ -744,8 +742,8 @@ describe('Indexer rules tests', () => { 'rules', 'get', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-not-connected', { @@ -761,8 +759,8 @@ describe('Indexer rules tests', () => { 'rules', 'delete', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-not-connected', { @@ -778,8 +776,8 @@ describe('Indexer rules tests', () => { 'rules', 'clear', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], 'references/indexer-not-connected', { diff --git a/packages/indexer-cli/src/__tests__/references/indexer-actions-get-fields.stdout b/packages/indexer-cli/src/__tests__/references/indexer-actions-get-fields.stdout index 6629b7e40..db06d4a2b 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-actions-get-fields.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-actions-get-fields.stdout @@ -1,7 +1,7 @@ ┌────┬────────────┬────────────────────────────────────────────────┬─────────┐ │ id │ type │ deploymentID │ status │ ├────┼────────────┼────────────────────────────────────────────────┼─────────┤ -│ 2 │ unallocate │ QmfWRZCjT8pri4Amey3e3mb2Bga75Vuh2fPYyNVnmPYL66 │ failed │ +│ 2 │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ failed │ ├────┼────────────┼────────────────────────────────────────────────┼─────────┤ -│ 1 │ allocate │ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ success │ +│ 1 │ allocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ success │ └────┴────────────┴────────────────────────────────────────────────┴─────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first-fields.stdout b/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first-fields.stdout index d11ed69d4..ef274ea06 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first-fields.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first-fields.stdout @@ -1,5 +1,5 @@ ┌────┬────────────┬────────────────────────────────────────────────┬────────┐ │ id │ type │ deploymentID │ status │ ├────┼────────────┼────────────────────────────────────────────────┼────────┤ -│ 2 │ unallocate │ QmfWRZCjT8pri4Amey3e3mb2Bga75Vuh2fPYyNVnmPYL66 │ failed │ +│ 2 │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ failed │ └────┴────────────┴────────────────────────────────────────────────┴────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first.stdout b/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first.stdout index 508c1a86b..47e3d3007 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-actions-get-first.stdout @@ -1,5 +1,5 @@ ┌────┬─────────────────┬────────────┬────────────────────────────────────────────────┬──────────────┬────────┬──────┬───────┬──────────┬────────┬────────┬───────────────┬─────────────┬────────┐ │ id │ protocolNetwork │ type │ deploymentID │ allocationID │ amount │ poi │ force │ priority │ status │ source │ failureReason │ transaction │ reason │ ├────┼─────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────┼──────────┼────────┼────────┼───────────────┼─────────────┼────────┤ -│ 2 │ goerli │ unallocate │ QmfWRZCjT8pri4Amey3e3mb2Bga75Vuh2fPYyNVnmPYL66 │ null │ null │ null │ null │ 0 │ failed │ test │ null │ null │ test │ +│ 2 │ sepolia │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null │ 0 │ failed │ test │ null │ null │ test │ └────┴─────────────────┴────────────┴────────────────────────────────────────────────┴──────────────┴────────┴──────┴───────┴──────────┴────────┴────────┴───────────────┴─────────────┴────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-actions-get.stdout b/packages/indexer-cli/src/__tests__/references/indexer-actions-get.stdout index 6b00ddbbc..c40f02bbd 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-actions-get.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-actions-get.stdout @@ -1,7 +1,7 @@ ┌────┬─────────────────┬────────────┬────────────────────────────────────────────────┬──────────────┬────────┬──────┬───────┬──────────┬─────────┬────────┬───────────────┬─────────────┬────────┐ │ id │ protocolNetwork │ type │ deploymentID │ allocationID │ amount │ poi │ force │ priority │ status │ source │ failureReason │ transaction │ reason │ ├────┼─────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────┼──────────┼─────────┼────────┼───────────────┼─────────────┼────────┤ -│ 2 │ goerli │ unallocate │ QmfWRZCjT8pri4Amey3e3mb2Bga75Vuh2fPYyNVnmPYL66 │ null │ null │ null │ null │ 0 │ failed │ test │ null │ null │ test │ +│ 2 │ sepolia │ unallocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null │ 0 │ failed │ test │ null │ null │ test │ ├────┼─────────────────┼────────────┼────────────────────────────────────────────────┼──────────────┼────────┼──────┼───────┼──────────┼─────────┼────────┼───────────────┼─────────────┼────────┤ -│ 1 │ goerli │ allocate │ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ null │ null │ null │ null │ 0 │ success │ test │ null │ null │ test │ +│ 1 │ sepolia │ allocate │ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ null │ null │ null │ null │ 0 │ success │ test │ null │ null │ test │ └────┴─────────────────┴────────────┴────────────────────────────────────────────────┴──────────────┴────────┴──────┴───────┴──────────┴─────────┴────────┴───────────────┴─────────────┴────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-cost-model-deployment.stdout b/packages/indexer-cli/src/__tests__/references/indexer-cost-model-deployment.stdout index eca41ded8..71c0151ac 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-cost-model-deployment.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-cost-model-deployment.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬─────────────────────┬───────────┐ │ deployment │ model │ variables │ ├────────────────────────────────────────────────┼─────────────────────┼───────────┤ -│ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ default => 0.00025; │ null │ +│ QmXRpJW3qBuYaiBYHdhv8DF4bHDZhXBmh91MtrnhJfQ5Lk │ default => 0.00025; │ null │ └────────────────────────────────────────────────┴─────────────────────┴───────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-always.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-always.stdout index f1adb22f6..eb3affb1c 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-always.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-always.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ always │ true │ true │ goerli │ +│ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ always │ true │ true │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-offchain-success.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-offchain-success.stdout index 01b15a29d..aaf07eee9 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-offchain-success.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-offchain-success.stdout @@ -1 +1 @@ -Deleted indexing rules for "QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK" (deployment) on network: 'goerli' +Deleted indexing rules for "QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK" (deployment) on network: 'sepolia' diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-success.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-success.stdout index 062a6ba5c..d4dbd7045 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-success.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-deleted-success.stdout @@ -1 +1 @@ -Deleted indexing rules for "QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr" (deployment) on network: 'goerli' +Deleted indexing rules for "QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q" (deployment) on network: 'sepolia' diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-lifetime.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-lifetime.stdout index 0eb184ed9..20c0b2dca 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-lifetime.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-lifetime.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK │ deployment │ null │ 21 │ false │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ goerli │ +│ QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK │ deployment │ null │ 21 │ false │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-never.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-never.stdout index 813c5736a..ab1c34065 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-never.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-never.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ never │ true │ true │ goerli │ +│ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ never │ true │ true │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-offchain.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-offchain.stdout index d44a372dc..d2cdc3c5b 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-offchain.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-offchain.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ goerli │ +│ QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-rules.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-rules.stdout index 3ea675fbb..ed9f5a890 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-rules.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-rules.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ goerli │ +│ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-safety.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-safety.stdout index 390ad6605..aec3cb3d1 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-safety.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-safety.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmVEV7RA2U6BJT9Ssjxcfyrk4YQUnVqSRNX4TvYagjzh9h │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ false │ goerli │ +│ QmVEV7RA2U6BJT9Ssjxcfyrk4YQUnVqSRNX4TvYagjzh9h │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ false │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-supported.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-supported.stdout index 8f8dc475a..3d1174af0 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-supported.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-supported.stdout @@ -1,5 +1,5 @@ ┌────────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ QmVEV7RA2U6BJT9Ssjxcfyrk4YQUnVqSRNX4TvYagjzh9h │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ false │ true │ goerli │ +│ QmVEV7RA2U6BJT9Ssjxcfyrk4YQUnVqSRNX4TvYagjzh9h │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ false │ true │ sepolia │ └────────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-yaml.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-yaml.stdout index bb4efe2aa..b8a91b26d 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-yaml.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-deployment-yaml.stdout @@ -1,4 +1,4 @@ -identifier: QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr +identifier: QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q identifierType: deployment allocationAmount: null allocationLifetime: null @@ -13,4 +13,4 @@ custom: null decisionBasis: rules requireSupported: true safety: true -protocolNetwork: goerli +protocolNetwork: sepolia diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-global-rules.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-global-rules.stdout index bfc937631..eb2dd64ae 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-global-rules.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-global-rules.stdout @@ -1,5 +1,5 @@ ┌────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ global │ group │ 0.01 │ null │ true │ null │ null │ 500.0 │ null │ null │ null │ null │ rules │ true │ true │ goerli │ +│ global │ group │ 0.01 │ null │ true │ null │ null │ 500.0 │ null │ null │ null │ null │ rules │ true │ true │ sepolia │ └────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-offchain.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-offchain.stdout index fff19583a..1457ee199 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-offchain.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-offchain.stdout @@ -1,5 +1,5 @@ ┌──────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├──────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ 0x0000000000000000000000000000000000000000-1 │ subgraph │ 1,000.0 │ 12 │ true │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ goerli │ +│ 0x0000000000000000000000000000000000000000-1 │ subgraph │ 1,000.0 │ 12 │ true │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ sepolia │ └──────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-options.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-options.stdout index 0defef731..d2d5dafda 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-options.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-options.stdout @@ -1,5 +1,5 @@ ┌──────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├──────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ 0x0000000000000000000000000000000000000000-2 │ subgraph │ 1,000.0 │ 12 │ true │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ goerli │ +│ 0x0000000000000000000000000000000000000000-2 │ subgraph │ 1,000.0 │ 12 │ true │ null │ null │ null │ null │ null │ null │ null │ offchain │ true │ true │ sepolia │ └──────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-rules.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-rules.stdout index e5339693d..6cc28167d 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-rules.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rule-subgraph-rules.stdout @@ -1,5 +1,5 @@ ┌──────────────────────────────────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┬─────────────────┐ │ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ protocolNetwork │ ├──────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┼─────────────────┤ -│ 0x0000000000000000000000000000000000000000-0 │ subgraph │ 1,000.0 │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ goerli │ +│ 0x0000000000000000000000000000000000000000-0 │ subgraph │ 1,000.0 │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ sepolia │ └──────────────────────────────────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┴─────────────────┘ diff --git a/packages/indexer-cli/src/__tests__/references/indexer-rules-command-no-args.stdout b/packages/indexer-cli/src/__tests__/references/indexer-rules-command-no-args.stdout index 75048306b..f3eb3c7c7 100644 --- a/packages/indexer-cli/src/__tests__/references/indexer-rules-command-no-args.stdout +++ b/packages/indexer-cli/src/__tests__/references/indexer-rules-command-no-args.stdout @@ -1,11 +1,11 @@ ┌────────────────────────────────────────────────┬─────────────────┬────────────────┬──────────────────┬────────────────────┬─────────────┬─────────────────────┬─────────────────────────┬───────────┬───────────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┬────────┐ │ identifier │ protocolNetwork │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │ safety │ ├────────────────────────────────────────────────┼─────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┤ -│ global │ goerli │ group │ 0.01 │ null │ true │ null │ null │ 500.0 │ null │ null │ null │ null │ rules │ true │ true │ +│ global │ sepolia │ group │ 0.01 │ null │ true │ null │ null │ 500.0 │ null │ null │ null │ null │ rules │ true │ true │ ├────────────────────────────────────────────────┼─────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┤ -│ 0x0000000000000000000000000000000000000000-0 │ goerli │ subgraph │ 1,000.0 │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ +│ 0x0000000000000000000000000000000000000000-0 │ sepolia │ subgraph │ 1,000.0 │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ ├────────────────────────────────────────────────┼─────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┼────────┤ -│ QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr │ goerli │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ +│ QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q │ sepolia │ deployment │ null │ null │ true │ null │ null │ null │ null │ null │ null │ null │ rules │ true │ true │ └────────────────────────────────────────────────┴─────────────────┴────────────────┴──────────────────┴────────────────────┴─────────────┴─────────────────────┴─────────────────────────┴───────────┴───────────┴──────────┴─────────────────────┴────────┴───────────────┴──────────────────┴────────┘ Offchain sync list 0x0000000000000000000000000000000000000000-1,0x0000000000000000000000000000000000000000-2,QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK diff --git a/packages/indexer-cli/src/__tests__/util.ts b/packages/indexer-cli/src/__tests__/util.ts index 7fdf68006..1d7b30a55 100644 --- a/packages/indexer-cli/src/__tests__/util.ts +++ b/packages/indexer-cli/src/__tests__/util.ts @@ -19,6 +19,8 @@ import { MultiNetworks, QueryFeeModels, defineQueryFeeModels, + ActionType, + ActionStatus, } from '@graphprotocol/indexer-common' import { createMetrics, @@ -47,15 +49,15 @@ let server: http.Server let sockets: Socket[] = [] let metrics: Metrics -const PUBLIC_JSON_RPC_ENDPOINT = 'https://ethereum-goerli.publicnode.com' +const PUBLIC_JSON_RPC_ENDPOINT = 'https://ethereum-sepolia.publicnode.com' const testProviderUrl = process.env.INDEXER_TEST_JRPC_PROVIDER_URL ?? PUBLIC_JSON_RPC_ENDPOINT export const testNetworkSpecification = specification.NetworkSpecification.parse({ - networkIdentifier: 'goerli', + networkIdentifier: 'sepolia', gateway: { - url: 'http://localhost:8030/', + url: 'http://127.0.0.1:8030/', }, networkProvider: { url: testProviderUrl, @@ -67,8 +69,9 @@ export const testNetworkSpecification = specification.NetworkSpecification.parse url: 'http://test-indexer.xyz', }, subgraphs: { + maxBlockDistance: 10000, networkSubgraph: { - url: 'https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli', + url: 'https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-sepolia', }, epochSubgraph: { url: 'http://test-url.xyz', @@ -102,7 +105,7 @@ export const setup = async () => { sequelize = await sequelize.sync({ force: true }) - const statusEndpoint = 'http://localhost:8030/graphql' + const statusEndpoint = 'http://127.0.0.1:8030/graphql' const indexNodeIDs = ['node_1'] const graphNode = new GraphNode( logger, @@ -161,6 +164,23 @@ export const setup = async () => { process.setMaxListeners(100) process.on('SIGTERM', shutdownIndexerManagementServer) process.on('SIGINT', shutdownIndexerManagementServer) + + await models.Action.create({ + type: ActionType.ALLOCATE, + status: ActionStatus.SUCCESS, + deploymentID: 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', + source: 'test', + reason: 'test', + protocolNetwork: 'eip155:11155111', + }) + await models.Action.create({ + type: ActionType.UNALLOCATE, + status: ActionStatus.FAILED, + deploymentID: 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', + source: 'test', + reason: 'test', + protocolNetwork: 'eip155:11155111', + }) } // Simply setup connection config @@ -177,13 +197,13 @@ export const connect = async () => { // Set global, deployment, and subgraph based test rules and cost model export const seed = async () => { const commands: string[][] = [ - ['indexer', 'connect', 'http://localhost:18000'], + ['indexer', 'connect', 'http://127.0.0.1:18000'], [ 'indexer', 'rules', 'set', '--network', - 'goerli', + 'sepolia', 'global', 'minSignal', '500', @@ -195,15 +215,15 @@ export const seed = async () => { 'rules', 'set', '--network', - 'goerli', - 'QmZZtzZkfzCWMNrajxBf22q7BC9HzoT5iJUK3S8qA6zNZr', + 'sepolia', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', ], [ 'indexer', 'rules', 'prepare', '--network', - 'goerli', + 'sepolia', 'QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK', ], [ @@ -211,7 +231,7 @@ export const seed = async () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-0', 'allocationAmount', '1000', @@ -221,7 +241,7 @@ export const seed = async () => { 'rules', 'offchain', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-1', ], [ @@ -229,7 +249,7 @@ export const seed = async () => { 'rules', 'set', '--network', - 'goerli', + 'sepolia', '0x0000000000000000000000000000000000000000-2', 'allocationAmount', '1000', @@ -255,11 +275,32 @@ export const seed = async () => { 'QmQ44hgrWWt3Qf2X9XEX2fPyTbmQbChxwNm5c1t4mhKpGt', `'{"DAI": "0.5"}'`, ], + [ + 'indexer', + 'actions', + 'queue', + 'allocate', + 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', + '4847', + '--network', + 'sepolia', + ], + // [ + // 'indexer', + // 'actions', + // 'queue', + // 'unallocate', + // 'QmSrf6VVPyg9NGdS1xhLmoosk3qZQaWhfoSTHE2H7sht6Q', + // '0x1076cd5003bacfe167cb5a23d23a29397a32bf8c', + // '--network', + // 'sepolia', + // ], ] for (const command of commands) { const { exitCode, stderr, stdout } = await runIndexerCli(command, process.cwd()) if (exitCode == 1) { console.error(stderr) + console.error(command) console.log(stdout) throw Error(`Setup failed: indexer rules or cost set command failed: ${command}`) } diff --git a/packages/indexer-common/src/indexer-management/__tests__/helpers.test.ts b/packages/indexer-common/src/indexer-management/__tests__/helpers.test.ts index 36f86539f..3c01a44d1 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/helpers.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/helpers.test.ts @@ -65,7 +65,7 @@ const setupModels = async () => { const setupMonitor = async () => { mockAllocation = createMockAllocation() - const statusEndpoint = 'http://localhost:8030/graphql' + const statusEndpoint = 'http://127.0.0.1:8030/graphql' logger = createLogger({ name: 'IndexerManagement.Monitor tests', async: false, diff --git a/packages/indexer-common/src/indexer-management/__tests__/util.ts b/packages/indexer-common/src/indexer-management/__tests__/util.ts index b697558d8..53bb06f4c 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/util.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/util.ts @@ -23,7 +23,7 @@ export const testNetworkSpecification: specification.NetworkSpecification = specification.NetworkSpecification.parse({ networkIdentifier: 'goerli', gateway: { - url: 'http://localhost:8030/', + url: 'http://127.0.0.1:8030/', }, networkProvider: { url: testProviderUrl, @@ -70,7 +70,7 @@ export const createTestManagementClient = async ( const queryFeeModels = defineQueryFeeModels(sequelize) const managementModels = defineIndexerManagementModels(sequelize) sequelize = await sequelize.sync({ force: true }) - const statusEndpoint = 'http://localhost:8030/graphql' + const statusEndpoint = 'http://127.0.0.1:8030/graphql' const graphNode = new GraphNode( logger, 'http://test-admin-endpoint.xyz', diff --git a/packages/indexer-service/src/server/__tests__/server.test.ts b/packages/indexer-service/src/server/__tests__/server.test.ts index 293397070..392374d43 100644 --- a/packages/indexer-service/src/server/__tests__/server.test.ts +++ b/packages/indexer-service/src/server/__tests__/server.test.ts @@ -63,7 +63,7 @@ const setup = async () => { address = '0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1' contracts = await connectContracts(getTestProvider('goerli'), 5, undefined) sequelize = await sequelize.sync({ force: true }) - const statusEndpoint = 'http://localhost:8030/graphql' + const statusEndpoint = 'http://127.0.0.1:8030/graphql' indexingStatusResolver = new IndexingStatusResolver({ logger: logger, statusEndpoint, @@ -132,7 +132,7 @@ const setup = async () => { const queryProcessor = new QueryProcessor({ logger: logger.child({ component: 'QueryProcessor' }), - graphNode: 'http://localhost:8000/', + graphNode: 'http://127.0.0.1:8000/', metrics, receiptManager, queryTimingLogs: false, @@ -143,7 +143,7 @@ const setup = async () => { logger, port: 9600, queryProcessor, - graphNodeStatusEndpoint: 'http://localhost:8030/graphql', + graphNodeStatusEndpoint: 'http://127.0.0.1:8030/graphql', metrics, freeQueryAuthToken: '', indexerManagementClient: client,