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 #195

Merged
merged 6 commits into from
Oct 31, 2023
Merged

Sync @subql dependencies #195

merged 6 commits into from
Oct 31, 2023

Conversation

stwiname
Copy link

Automated changes by create-pull-request GitHub action

@github-actions
Copy link

github-actions bot commented Oct 31, 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.35% 3110/6177
🟡 Branches 65.38% 255/390
🔴 Functions 36.4% 87/239
🔴 Lines 50.35% 3110/6177

Test suite run failed

Failed tests: 13/53. Failed suites: 5/10.
  ● Api.ethereum › Decode nested logs in transactions

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

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

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

  ● Api.ethereum › Null filter support

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

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

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

  ● Api.ethereum › Null filter support, for undefined transaction.to

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

  ● Api.ethereum › Should return all tx if filter.to is not defined

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

  ● Api.ethereum › filter.to Should support only null not undefined

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

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

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)

  ● Api.ethereum › Resolves the correct tags for finalization

    Failed to fetch block 16258633

      260 |
      261 |     if (!rawBlock) {
    > 262 |       throw new Error(`Failed to fetch block ${num}`);
          |             ^
      263 |     }
      264 |
      265 |     const block = formatBlock(rawBlock);

      at EthereumApi.getBlockPromise (packages/node/src/ethereum/api.ethereum.ts:262:13)
      at EthereumApi.fetchBlock (packages/node/src/ethereum/api.ethereum.ts:282:21)
      at fetchBlock (packages/node/src/ethereum/api.ethereum.test.ts:50:19)
      at Object.<anonymous> (packages/node/src/ethereum/api.ethereum.test.ts:58:17)


  ● ApiService › can fetch blocks

    expect(received).resolves.toHaveLength()

    Received promise rejected instead of resolved
    Rejected to value: [Error: Failed to fetch block 12369623]

      79 |
      80 |   it('can fetch blocks', async () => {
    > 81 |     await expect(
         |           ^
      82 |       apiService.api.fetchBlocks(range(12369621, 12369625)),
      83 |     ).resolves.toHaveLength(4);
      84 |   });

      at expect (node_modules/expect/build/index.js:105:15)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:81:11)


  ● 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)

Report generated by 🧪jest coverage report action from 31c6443

@jiqiang90 jiqiang90 merged commit 48a3777 into main Oct 31, 2023
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