Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync @subql dependencies #210

Merged
merged 4 commits into from
Nov 13, 2023
Merged

Sync @subql dependencies #210

merged 4 commits into from
Nov 13, 2023

Conversation

stwiname
Copy link

Automated changes by create-pull-request GitHub action

Copy link

github-actions bot commented Nov 12, 2023

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/usr/local/bin/yarn' failed with exit code 1
St.
Category Percentage Covered / Total
🔴 Statements 50.24% 2969/5910
🟡 Branches 65.39% 291/445
🔴 Functions 39.5% 94/238
🔴 Lines 50.24% 2969/5910

Test suite run failed

Failed tests: 9/56. Failed suites: 7/10.
  ● Dictionary queries › Correct dictionary query with dynamic ds › Builds a groupded query for multiple dynamic ds

    expect(received).toEqual(expected) // deep equality

    - Expected  - 8
    + Received  + 0

    @@ -10,18 +10,10 @@
          "entity": "evmLogs",
        },
        Object {
          "conditions": Array [
            Object {
    -         "field": "address",
    -         "matcher": "in",
    -         "value": Array [
    -           "address1",
    -           "address2",
    -         ],
    -       },
    -       Object {
              "field": "topics0",
              "matcher": "equalTo",
              "value": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
            },
          ],

      408 |       );
      409 |
    > 410 |       expect(queryEntry).toEqual([
          |                          ^
      411 |         {
      412 |           entity: 'evmLogs',
      413 |           conditions: [

      at Object.<anonymous> (packages/node/src/indexer/fetch.service.spec.ts:410:26)


  ● CeloJsonRpcProvider › should not set gasLimit to zero for blocks after the hard fork

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Object {
    -   "hex": "0x01e84800",
    +   "hex": "0x02faf080",
        "type": "BigNumber",
      }

      31 |       await provider.send('eth_getBlockByNumber', ['latest', true]),
      32 |     );
    > 33 |     expect(BigNumber.from(block.gasLimit)).toEqual(BigNumber.from(0x01e84800));
         |                                            ^
      34 |   });
      35 | });
      36 |

      at Object.<anonymous> (packages/node/src/ethereum/ethers/celo/celo-json-rpc-batch-provider.spec.ts:33:44)


  ● CeloJsonRpcProvider › should not set gasLimit to zero for blocks after the hard fork

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Object {
    -   "hex": "0x01e84800",
    +   "hex": "0x02faf080",
        "type": "BigNumber",
      }

      29 |       await provider.send('eth_getBlockByNumber', ['latest', true]),
      30 |     );
    > 31 |     expect(BigNumber.from(block.gasLimit)).toEqual(BigNumber.from(0x01e84800));
         |                                            ^
      32 |   });
      33 | });
      34 |

      at Object.<anonymous> (packages/node/src/ethereum/ethers/celo/celo-json-rpc-provider.spec.ts:31:44)


  ● CeloJsonRpcProvider › should not set gasLimit to zero for blocks after the hard fork

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Object {
    -   "hex": "0x01e84800",
    +   "hex": "0x02faf080",
        "type": "BigNumber",
      }

      29 |       await provider.send('eth_getBlockByNumber', ['latest', true]),
      30 |     );
    > 31 |     expect(BigNumber.from(block.gasLimit)).toEqual(BigNumber.from(0x01e84800));
         |                                            ^
      32 |   });
      33 | });
      34 |

      at Object.<anonymous> (packages/node/src/ethereum/ethers/celo/celo-ws-provider.spec.ts:31:44)


  ● ProjectService › can get a block timestamps

    thrown: "Exceeded timeout of 5000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      40 |   });
      41 |
    > 42 |   it('can get a block timestamps', async () => {
         |   ^
      43 |     const timestamp = await (projectService as any).getBlockTimestamp(
      44 |       4_000_000,
      45 |     );

      at packages/node/src/indexer/project.service.test.ts:42:3
      at Object.<anonymous> (packages/node/src/indexer/project.service.test.ts:20:1)


  ● ApiService › can get the finalized height

    expect(received).toBeGreaterThan(expected)

    Expected: > 16000000
    Received:   0

      88 |
      89 |     console.log('Finalized height', height);
    > 90 |     expect(height).toBeGreaterThan(16_000_000);
         |                    ^
      91 |   });
      92 |
      93 |   it('ensure api errorCode is exposed when throwing', async () => {

      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:90:20)


  ● Api.ethereum › Should return raw logs, if decode fails

    thrown: "Exceeded timeout of 90000 ms for a hook.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      53 |   };
      54 |
    > 55 |   beforeEach(async () => {
         |   ^
      56 |     ethApi = new EthereumApi(HTTP_ENDPOINT, BLOCK_CONFIRMATIONS, eventEmitter);
      57 |     await ethApi.init();
      58 |     blockData = await fetchBlock(16258633);

      at packages/node/src/ethereum/api.ethereum.test.ts:55:3
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:44:1)

  ● Api.ethereum › !null filter support for logs, expect to filter out

    unknown block

      173 |             );
      174 |           } else if (payload.error) {
    > 175 |             const error = new Error(payload.error.message);
          |                           ^
      176 |             (<any>error).code = payload.error.code;
      177 |             (<any>error).data = payload.error.data;
      178 |             if (

      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:175:27
          at Array.forEach (<anonymous>)
      at packages/node/src/ethereum/ethers/json-rpc-batch-provider.ts:166:15

  ● Api.ethereum › Resolves the correct tags for finalization

    expect(received).toBeTruthy()

    Received: false

      271 |   it('Resolves the correct tags for finalization', async () => {
      272 |     // Ethereum
    > 273 |     expect((ethApi as any).supportsFinalization).toBeTruthy();
          |                                                  ^
      274 |
      275 |     // Moonbeam
      276 |     ethApi = new EthereumApi(

      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:273:50)

Report generated by 🧪jest coverage report action from ef26262

project.network.dictionary ??
(await CoreDictionaryService.resolveDictionary(
NETWORK_FAMILY.ethereum,
project.network.chainId,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be chainAlias

@jiqiang90 jiqiang90 merged commit 1e17d9d into main Nov 13, 2023
1 of 2 checks passed
stwiname added a commit that referenced this pull request Nov 17, 2023
* Bring back block confirmations arg that was removed in #210

* Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants