Skip to content

Enhancement - Add viem support and remove ethers (NOT hw-wallets) #2190

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

Closed
wants to merge 104 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e8b7fb5
Replaced isAddress check from ethers
Adamj1232 Apr 4, 2023
a279c87
Replace Ethers BigNumber usage with browser native BigInt
Adamj1232 Apr 4, 2023
c220378
Remove ethers from common
Adamj1232 Apr 4, 2023
6f2d769
Merge in latest dev and handle conflicts
Adamj1232 Apr 4, 2023
097eea6
Viem working for ens
Adamj1232 Apr 6, 2023
6841f91
Testing package size
Adamj1232 Apr 6, 2023
5a30b36
Working as expected!
Adamj1232 Apr 6, 2023
744ea48
Disable ums
Adamj1232 Apr 6, 2023
cd712b4
Cleanup chain usage
Adamj1232 Apr 6, 2023
01a6c14
More cleanup
Adamj1232 Apr 6, 2023
56775ba
Ens avatar testing
Adamj1232 Apr 7, 2023
55714f2
Some ethers swapped out for viem in Trezor and import map expanded
Adamj1232 Apr 7, 2023
0d25611
Alittle cleanup in Trezor
Adamj1232 Apr 7, 2023
fbf338b
revert Trezor changes
Adamj1232 Apr 10, 2023
c7c1a99
merge dev and handle conflicts
Adamj1232 Apr 10, 2023
a24a12a
All is working from old commit
Adamj1232 Apr 10, 2023
7857acd
Merge branch 'remove_ethers_test_branch' into enhancement/replace_ethers
Adamj1232 Apr 10, 2023
df7d22a
Fix conflict
Adamj1232 Apr 10, 2023
8f50c05
Remove logs
Adamj1232 Apr 10, 2023
8a6f44f
Return Address type to official check
Adamj1232 Apr 10, 2023
7907611
Update versions and handle type issues
Adamj1232 Apr 10, 2023
0f36179
Bump Viem to latest
Adamj1232 Apr 10, 2023
6594aa8
Add node version check and min set to 16.15.1
Adamj1232 Apr 11, 2023
6cb8b91
Add npmrc files with engine-strict set to true to core, react and vue…
Adamj1232 Apr 11, 2023
be24886
Added function for converting wei in both hex and string to eth, upda…
Adamj1232 Apr 12, 2023
54fc1c3
Handle conflicts from develop merge
Adamj1232 Apr 18, 2023
1a026a6
Return bignumber to core for now
Adamj1232 Apr 18, 2023
7454a99
cleanup and testing, removing unused code, refactor and rename to pro…
Adamj1232 Apr 18, 2023
43fac75
Remove bignumber from core again
Adamj1232 Apr 18, 2023
eb8d50e
Fix merge issue with unstoppable resolution
Adamj1232 Apr 18, 2023
4216c12
Return getText function for ens and update to viem
Adamj1232 Apr 18, 2023
af2986e
Refine ci changes scope to core and related packages
Adamj1232 Apr 19, 2023
003e2bf
Final pass of PR for cleanup and refactor
Adamj1232 Apr 19, 2023
749e2ec
Remove ethers from tp
Adamj1232 Apr 19, 2023
ad1741d
Update to latest viem
Adamj1232 Apr 21, 2023
1331af3
Update cede and WC docs
Adamj1232 May 4, 2023
6501187
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 May 4, 2023
8a4e611
Merged in develop and updated versions out of alpha flow
Adamj1232 May 4, 2023
9a71ef6
resolve conflict
Adamj1232 May 4, 2023
b0bafc3
Handle getting token symbol
Adamj1232 May 8, 2023
8d9400e
Update Viem usage and refactor for handling multiple promises
Adamj1232 May 16, 2023
1f7f565
Update config to publish viem test branches
Adamj1232 May 16, 2023
6c2f986
Update tsconfig and types
Adamj1232 May 17, 2023
131676d
Update node version in core
Adamj1232 May 17, 2023
9dd3a56
Bump versions for release and Remove console.log
Adamj1232 Mar 20, 2024
50c6dd5
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Mar 25, 2024
6407e04
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Mar 26, 2024
781e792
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 1, 2024
6f09e2c
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 4, 2024
5a34b64
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 5, 2024
cd21151
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 5, 2024
7bcedf0
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 9, 2024
1df7db3
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
14bc7bf
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
6923d85
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
6f303ca
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
6193944
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
e35c6d8
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
2b8d610
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
33b4dd9
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 12, 2024
b974a3d
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 15, 2024
b73822d
Merge branch 'develop' of github.com:blocknative/web3-onboard into de…
Adamj1232 Apr 15, 2024
6871663
Merge in develop and handle conflicts
Adamj1232 Apr 30, 2024
0a1018f
ENS working again
Adamj1232 Apr 30, 2024
52c7233
Progress within hw wallets
Adamj1232 May 1, 2024
fcf7281
Progress on chain imports
Adamj1232 May 1, 2024
385dc9a
Further refinement on viem usage of public client
Adamj1232 May 1, 2024
37b55f0
refine ledger, deprecate v1
Adamj1232 May 2, 2024
c061907
Update TS, revert viem changes to HW-wallets
Adamj1232 May 2, 2024
88b2af3
Handle ts errors
Adamj1232 May 2, 2024
6f8c4b1
Down to 7 ts errors
Adamj1232 May 3, 2024
1f8b9ce
Update packages for test release
Adamj1232 May 3, 2024
6244663
Handle all ts errors!
Adamj1232 May 6, 2024
48f5374
Cleanup
Adamj1232 May 6, 2024
8cfd535
Refine imports and test a whole bunch
Adamj1232 May 8, 2024
1504254
Fix build errors
Adamj1232 May 8, 2024
c3ec2f7
Try later version of node in CI
Adamj1232 May 8, 2024
a1071e6
Add sass types to common
Adamj1232 May 8, 2024
d3a911e
Update tsconfig
Adamj1232 May 8, 2024
ddc2a0e
Update imports from common
Adamj1232 May 8, 2024
8246406
Refine types
Adamj1232 May 8, 2024
285ebd2
Update core imports
Adamj1232 May 8, 2024
65d5ea0
Update svelte preprocess
Adamj1232 May 8, 2024
9e107d2
Bump common version
Adamj1232 May 8, 2024
47f1f04
More refinements to core
Adamj1232 May 8, 2024
3560fd3
Remove log
Adamj1232 May 8, 2024
8f71df3
Update tsconfig for hw-common to resolve build error
Adamj1232 May 8, 2024
12bbaee
Ensure new utils file is part of commit
Adamj1232 May 8, 2024
51c60b5
Remove unnecessary commonjs as the issue was fixed by viem team
Adamj1232 May 9, 2024
eeafdd9
Use viem utils in common
Adamj1232 May 9, 2024
98c6c6d
Changes to versioning and ready for testing
Adamj1232 May 9, 2024
ffcb312
Bump version
Adamj1232 May 9, 2024
7b6a1d8
Update viem versions
Adamj1232 May 13, 2024
b4fa077
Yarn it
Adamj1232 May 13, 2024
4461904
Update publish workflow to publish all packages
Adamj1232 May 13, 2024
e87131e
Fix issue and redeploy
Adamj1232 May 13, 2024
1714b3d
Update solid node build version
Adamj1232 May 13, 2024
6b8f291
Handle build errors
Adamj1232 May 13, 2024
df37418
Update configs for build
Adamj1232 May 13, 2024
0ce505c
Update ci build config
Adamj1232 May 13, 2024
dda0f14
Bump arcana node version in CI
Adamj1232 May 13, 2024
5c6d017
Fix arcana
Adamj1232 May 13, 2024
dc91af0
Fix venly
Adamj1232 May 13, 2024
4f50dc3
Update gnosis pakcage.json
Adamj1232 May 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 88 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,31 @@ aliases:
- &deploy_staging_filters
filters:
branches:
only: develop
only: enhancement/replace_ethers
# only: develop

- &deploy_testing_filters
filters:
branches:
only: enhancement/replace_ethers


- &test_package_version_for_test_tag_break_false
run:
name: Tagged as viem version if True Continue Flow
command: |
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g');
if [[ $PACKAGE_VERSION =~ "-viem" ]];
then
echo true
else
echo false
circleci step halt
fi;

- &test_package_version_for_alpha_tag_break_false
run:
Expand Down Expand Up @@ -140,6 +164,30 @@ commands:
- *publish-npm
- save-build-flag

# node-staging-build-steps:
# steps:
# - checkout:
# # Since our working_directory is deeper than the root,
# # remind the job where it needs to checkout.
# path: ~/web3-onboard-monorepo
# - *restore-build-flag
# - *test-build-flag
# - *test_package_version_for_alpha_tag_break_false
# # Services and packages in a Workspace don't get their own
# # yarn.lock so we need to generate them manually.
# - *generate-lock-file
# - *restore-cache
# - run:
# name: Build
# command: |
# yarn
# yarn type-check
# yarn build
# - *save-cache
# - *create-npm-config
# - *publish-npm-tag-as-next
# - save-build-flag

node-staging-build-steps:
steps:
- checkout:
Expand All @@ -148,7 +196,8 @@ commands:
path: ~/web3-onboard-monorepo
- *restore-build-flag
- *test-build-flag
- *test_package_version_for_alpha_tag_break_false
# Tag must be defined for testing publish outside of Alpha or standard prod publish
- *test_package_version_for_test_tag_break_false
# Services and packages in a Workspace don't get their own
# yarn.lock so we need to generate them manually.
- *generate-lock-file
Expand All @@ -167,7 +216,7 @@ commands:
jobs:
build-core:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/core
steps:
- node-build-steps
Expand Down Expand Up @@ -275,7 +324,7 @@ jobs:
- node-build-steps
build-react:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/react
steps:
- node-build-steps
Expand All @@ -293,7 +342,7 @@ jobs:
- node-build-steps
build-web3auth:
docker:
- image: cimg/node:16.18.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/web3auth
steps:
- node-build-steps
Expand All @@ -305,7 +354,7 @@ jobs:
- node-build-steps
build-vue:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/vue
steps:
- node-build-steps
Expand Down Expand Up @@ -341,7 +390,7 @@ jobs:
- node-build-steps
build-uauth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/uauth
steps:
- node-build-steps
Expand Down Expand Up @@ -395,7 +444,7 @@ jobs:
- node-build-steps
build-arcana-auth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/arcana-auth
steps:
- node-build-steps
Expand All @@ -407,7 +456,7 @@ jobs:
- node-build-steps
build-venly:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.18.2
working_directory: ~/web3-onboard-monorepo/packages/venly
steps:
- node-build-steps
Expand All @@ -432,7 +481,7 @@ jobs:
resource_class: large
build-solid:
docker:
- image: cimg/node:16.14.2
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/solid
steps:
- node-build-steps
Expand All @@ -452,7 +501,7 @@ jobs:
# Build staging/Alpha releases
build-staging-core:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/core
steps:
- node-staging-build-steps
Expand Down Expand Up @@ -560,7 +609,7 @@ jobs:
- node-staging-build-steps
build-staging-react:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/react
steps:
- node-staging-build-steps
Expand All @@ -578,7 +627,7 @@ jobs:
- node-staging-build-steps
build-staging-web3auth:
docker:
- image: cimg/node:16.18.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/web3auth
steps:
- node-staging-build-steps
Expand All @@ -590,7 +639,7 @@ jobs:
- node-staging-build-steps
build-staging-vue:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/vue
steps:
- node-staging-build-steps
Expand Down Expand Up @@ -626,7 +675,7 @@ jobs:
- node-staging-build-steps
build-staging-uauth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/uauth
steps:
- node-staging-build-steps
Expand Down Expand Up @@ -680,7 +729,7 @@ jobs:
- node-staging-build-steps
build-staging-arcana-auth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/arcana-auth
steps:
- node-staging-build-steps
Expand All @@ -692,7 +741,7 @@ jobs:
- node-staging-build-steps
build-staging-venly:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.18.2
working_directory: ~/web3-onboard-monorepo/packages/venly
steps:
- node-staging-build-steps
Expand All @@ -716,7 +765,7 @@ jobs:
- node-staging-build-steps
build-staging-solid:
docker:
- image: cimg/node:16.14.2
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/solid
steps:
- node-staging-build-steps
Expand All @@ -733,6 +782,26 @@ jobs:
steps:
- node-staging-build-steps

# # Build testing releases - tag must be defined outside of Alpha tag flow
# build-testing-common:
# docker:
# - image: cimg/node:16.13.1
# working_directory: ~/web3-onboard-monorepo/packages/common
# steps:
# - node-testing-build-steps
# build-testing-core:
# docker:
# - image: cimg/node:16.15.1
# working_directory: ~/web3-onboard-monorepo/packages/core
# steps:
# - node-testing-build-steps
# build-testing-injected:
# docker:
# - image: cimg/node:16.13.1
# working_directory: ~/web3-onboard-monorepo/packages/injected
# steps:
# - node-testing-build-steps

workflows:
version: 2
common:
Expand All @@ -741,6 +810,7 @@ workflows:
<<: *deploy_production_filters
- build-staging-common:
<<: *deploy_staging_filters

core:
jobs:
- build-core:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"devDependencies": {
"prettier": "^2.4.1",
"prettier-plugin-svelte": "^2.4.0",
"typescript": "^4.5.5"
"typescript": "^4.9.4"
},
"peerDependencies": {
"react": "*",
Expand Down
8 changes: 4 additions & 4 deletions packages/arcana-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/arcana-auth",
"version": "2.0.0",
"version": "2.1.0-viem.1",
"license": "MIT",
"description": "Arcana wallet is a built-in, secure Web3 wallet that users can access instantly when logging into an app integrated with the Arcana Auth SDK. It offers a customizable interface that can be branded to match the app's style. Users don't need to generate or manage cryptographic keys or remember passphrases. The wallet uses advanced distributed key generation, giving users full control over their wallets while onboarding Web3 apps using familiar Web2 authentication methods. It is user-friendly, secure, and puts users in control of their Web3 experience.",
"private": false,
Expand All @@ -13,10 +13,10 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@arcana/auth": "^1.0.7",
"@web3-onboard/common": "2.3.3"
"@arcana/auth": "^1.0.10",
"@web3-onboard/common": "2.4.0-viem.4"
},
"devDependencies": {
"typescript": "^5.1.6"
"typescript": "^5.4.5"
}
}
7 changes: 2 additions & 5 deletions packages/arcana-auth/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { createEIP1193Provider, WalletInit } from '@web3-onboard/common'
import icon from './icon.js'
import type { ConstructorParams } from '@arcana/auth/types'
import type { ConstructorParams } from '@arcana/auth'

export default function (opts: {
clientID: string
params?: ConstructorParams
}): WalletInit {
return () => ({
label: 'Arcana Auth',
async getIcon() {
return icon
},
getIcon: async () => (await import('./icon.js')).default,
async getInterface() {
const { AuthProvider } = await import('@arcana/auth')

Expand Down
2 changes: 2 additions & 0 deletions packages/arcana-auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"outDir": "dist",
"rootDir": "src",
"declarationDir": "dist",
"moduleResolution": "node",
"paths": {
"@arcana/auth/types/*": ["./node_modules/@arcana/auth/types/*"],
"*": ["./src/*", "./node_modules/*"]
},
"typeRoots": ["node_modules/@types"],
Expand Down
6 changes: 3 additions & 3 deletions packages/bitget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/bitget",
"version": "2.0.1",
"version": "2.1.0-viem.1",
"description": "bitget-wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -58,10 +58,10 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^17.0.21",
"typescript": "^4.5.5"
"typescript": "^5.4.5"
},
"dependencies": {
"@bitget-wallet/web3-sdk": "^0.0.8",
"@web3-onboard/common": "^2.3.3"
"@web3-onboard/common": "^2.4.0-viem.4"
}
}
6 changes: 3 additions & 3 deletions packages/bitkeep/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/bitkeep",
"version": "2.0.1",
"version": "2.1.0-viem.1",
"description": "Bitkeep Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -58,10 +58,10 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^17.0.21",
"typescript": "^4.5.5"
"typescript": "^5.4.5"
},
"dependencies": {
"@bitget-wallet/web3-sdk": "^0.0.8",
"@web3-onboard/common": "^2.3.3"
"@web3-onboard/common": "^2.4.0-viem.4"
}
}
7 changes: 3 additions & 4 deletions packages/blocto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/blocto",
"version": "2.0.1",
"version": "2.1.0-viem.1",
"description": "Blocto SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -57,15 +57,14 @@
},
"license": "MIT",
"devDependencies": {
"@ethersproject/providers": "^5.5.0",
"@types/lodash.uniqby": "^4.7.6",
"@types/node": "^17.0.21",
"ts-node": "^10.2.1",
"typescript": "^4.5.5",
"typescript": "^5.4.5",
"window": "^4.2.7"
},
"dependencies": {
"@web3-onboard/common": "^2.3.1",
"@web3-onboard/common": "^2.4.0-viem.4",
"@blocto/sdk": "^0.9.1"
}
}
Loading
Loading