Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Conversation

danforbes
Copy link
Contributor

Closes #7314

Copy link

github-actions bot commented Dec 9, 2024

Bundle Stats

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
10 646.32 kB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
web3.min.js 627.37 kB 0%
../lib/commonjs/index.d.ts 8.72 kB 0%
../lib/commonjs/accounts.d.ts 3.19 kB 0%
../lib/commonjs/types.d.ts 2.73 kB 0%
../lib/commonjs/web3.d.ts 1.38 kB 0%
../lib/commonjs/web3_eip6963.d.ts 1.27 kB 0%
../lib/commonjs/abi.d.ts 1.14 kB 0%
../lib/commonjs/eth.exports.d.ts 280 B 0%
../lib/commonjs/providers.exports.d.ts 183 B 0%
../lib/commonjs/version.d.ts 60 B 0%

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: ebfdcd1 Previous: 594f83a Ratio
processingTx 22641 ops/sec (±6.43%) 23821 ops/sec (±6.52%) 1.05
processingContractDeploy 37494 ops/sec (±7.92%) 38684 ops/sec (±8.01%) 1.03
processingContractMethodSend 14637 ops/sec (±10.01%) 15406 ops/sec (±8.61%) 1.05
processingContractMethodCall 26595 ops/sec (±6.93%) 27007 ops/sec (±7.65%) 1.02
abiEncode 41664 ops/sec (±7.73%) 43472 ops/sec (±7.00%) 1.04
abiDecode 28200 ops/sec (±8.34%) 30982 ops/sec (±6.75%) 1.10
sign 1487 ops/sec (±0.93%) 1524 ops/sec (±3.52%) 1.02
verify 357 ops/sec (±0.89%) 365 ops/sec (±0.65%) 1.02

This comment was automatically generated by workflow using github-action-benchmark.

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.54%. Comparing base (594f83a) to head (ebfdcd1).
Report is 2 commits behind head on 4.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              4.x    #7419   +/-   ##
=======================================
  Coverage   94.54%   94.54%           
=======================================
  Files         218      218           
  Lines        8637     8637           
  Branches     2364     2364           
=======================================
  Hits         8166     8166           
  Misses        471      471           
Flag Coverage Δ
UnitTests 94.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


### TypeError: Cannot read property 'prototype' of undefined, js engine: hermes

This error occurs when trying to use Web3.js with React Native. To solve this error, use [the `react-native-quick-crypto` package](https://www.npmjs.com/package/react-native-quick-crypto).
Copy link
Contributor

Choose a reason for hiding this comment

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

@danforbes thanks, this is great! maybe also add mention that web3 has to be imported as a default import, as named import doesn't work. I tried to explain it here #7313 (comment)

import Web3 from 'web3';

@danforbes danforbes force-pushed the feat/docs/react-native branch from 862baa9 to ebfdcd1 Compare December 10, 2024 15:57
@danforbes danforbes merged commit fa5ce5b into 4.x Dec 10, 2024
53 of 54 checks passed
@danforbes danforbes deleted the feat/docs/react-native branch December 10, 2024 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create documentation "How to use web3js with react-native (expo)"
3 participants