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

fix missing export modular #319

Merged
merged 2 commits into from
Jun 24, 2024
Merged

fix missing export modular #319

merged 2 commits into from
Jun 24, 2024

Conversation

jiqiang90
Copy link

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

Copy link

github-actions bot commented Jun 23, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements 54.17% 3497/6456
🟡 Branches 69.73% 410/588
🔴 Functions 54.9% 157/286
🔴 Lines 54.17% 3497/6456

Test suite run failed

Failed tests: 6/90. Failed suites: 3/14.
  ● rawBlockToEthBlock › can fetch receipts

    expect(received).resolves.not.toThrow()

    Received promise rejected instead of resolved
    Rejected to value: [TypeError: Cannot read properties of null (reading 'from')]

      110 |     const block = rawBlockToEthBlock(raw, api);
      111 |
    > 112 |     await expect(block.block.transactions[0].receipt()).resolves.not.toThrow();
          |           ^
      113 |   });
      114 | });
      115 |

      at expect (node_modules/expect/build/index.js:105:15)
      at Object.<anonymous> (packages/node/src/indexer/dictionary/v2/utils.spec.ts:112:11)


  ● ApiService › can fetch blocks

    All endpoints failed to initialize. Please add healthier endpoints

      69 |     }
      70 |
    > 71 |     await this.createConnections(network, (endpoint) =>
         |     ^
      72 |       EthereumApiConnection.create(
      73 |         endpoint,
      74 |         this.nodeConfig.blockConfirmations,

      at EthereumApiService.createConnections (node_modules/@subql/node-core/src/api.service.ts:116:13)
      at EthereumApiService.init (packages/node/src/ethereum/api.service.ethereum.ts:71:5)
      at prepareApiService (packages/node/src/ethereum/api.service.ethereum.test.ts:58:3)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:68:25)


  ● Api.ethereum › should have the ability to get receipts via transactions from all types

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Mon, 24 Jun 2024 03:16:45 GMT","etag":"W/\"63-+APJIAewJuhLyp69RiuupW9o98A\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"295","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1021,\\\"error\\\":\\\"Service exception\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":43,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":44,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

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

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Mon, 24 Jun 2024 03:16:58 GMT","etag":"W/\"63-+APJIAewJuhLyp69RiuupW9o98A\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"287","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1021,\\\"error\\\":\\\"Service exception\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":43,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":44,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › If transaction is undefined, with null filter, should be supported

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Mon, 24 Jun 2024 03:17:08 GMT","etag":"W/\"63-+APJIAewJuhLyp69RiuupW9o98A\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"290","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1021,\\\"error\\\":\\\"Service exception\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":45,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":46,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Resolves the correct tags for finalization

    no response

      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

Report generated by 🧪jest coverage report action from 7466998

@jiqiang90 jiqiang90 merged commit a81dc1e into main Jun 24, 2024
1 of 2 checks passed
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