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

[Draft] feat: support web3js #2205

Closed

Conversation

Muhammad-Altabba
Copy link

This is currently just a draft.

This MR is to support using web3.js with web3modal.

Breaking Changes

N/A

Changes

  • feat: support web3js
  • chore: read EMAIL_DOMAIN from env variable (and default to 'web3modal.msdc.co' if not provided).

Associated Issues

N/A

* draft version for web3.js

* add code for web3.js to apps/laboratory
* fix and ensure mail tests passing at laboratory

* add EMAIL_DOMAIN to env variables

* update .env.example
Copy link

vercel bot commented May 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
web3modal-gallery ❌ Failed (Inspect) May 16, 2024 6:17pm

Copy link

vercel bot commented May 3, 2024

@Muhammad-Altabba is attempting to deploy a commit to the WalletConnect Team on Vercel.

A member of the Team first needs to authorize it.

@glitch-txs
Copy link
Member

Hi thanks for the effort, we won't be adding another package but rather simplify support into a single one for ethers and web3js

@Muhammad-Altabba
Copy link
Author

Hi thanks for the effort, we won't be adding another package but rather simplify support into a single one for ethers and web3js

Thanks @glitch-txs,
We hope this PR gives some ideas on how web3.js could be used with web3modal. Let us know please if we need to provide support for the code changes that would simplify the support of ethers and web3.js into the anticipated single package.

And for now, I published a temporary package as a demo at: https://www.npmjs.com/package/web3modal-web3js

Best regards,

* chore(lab): dogfooding button (WalletConnect#2206)

* chore: fix typos (WalletConnect#2188)

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* refactor: render tooltip in root (WalletConnect#2210)

* feat: add react-ethers 6 example (WalletConnect#1920)

Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>

* refactor: swap business logic improvements (WalletConnect#2199)

* chore: detailed canary timings (WalletConnect#2214)

* chore: add apple app site association (WalletConnect#2216)

* :feat add send logic  (WalletConnect#2173)

Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* fix: apple-app-site-association content type header (WalletConnect#2217)

* feat: Sign 2.5 (WalletConnect#2033)

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* feat: Smart Account 6492 Signature Tests (WalletConnect#2196)

* fix: sign modal not appearing when going through siwe flow (WalletConnect#2213)

* Add signAndSendTransaction to Solflare, Backpack and Trust Wallet Ada… (WalletConnect#2190)

Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>

* fix: missing call to SIWE `onSignOut` (WalletConnect#2054)

Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* fix: dayjs locale format seconds is not working and is polluting the global dayjs locale (WalletConnect#1689)

Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
Co-authored-by: enesozturk <enesozturk.d@gmail.com>

* :deprecate - injected connector (WalletConnect#2223)

* chore: more canary timings (WalletConnect#2215)

* chore: updates ethereum-provider to latest (WalletConnect#2226)

* fix: add assertion for the erc20 abi json import (WalletConnect#2225)

* update packages

---------

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Luka Isailovic <lukaisailovic@gmail.com>
Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: GooxPF <gooxpf@gmail.com>
Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>
Co-authored-by: Tiến Nguyễn Khắc <tien.nguyenkhac@icloud.com>
Co-authored-by: Nikos Rossolatos <nikos@cointracker.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
* chore(lab): dogfooding button (WalletConnect#2206)

* chore: fix typos (WalletConnect#2188)

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* refactor: render tooltip in root (WalletConnect#2210)

* feat: add react-ethers 6 example (WalletConnect#1920)

Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>

* refactor: swap business logic improvements (WalletConnect#2199)

* chore: detailed canary timings (WalletConnect#2214)

* chore: add apple app site association (WalletConnect#2216)

* :feat add send logic  (WalletConnect#2173)

Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* fix: apple-app-site-association content type header (WalletConnect#2217)

* feat: Sign 2.5 (WalletConnect#2033)

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* feat: Smart Account 6492 Signature Tests (WalletConnect#2196)

* fix: sign modal not appearing when going through siwe flow (WalletConnect#2213)

* Add signAndSendTransaction to Solflare, Backpack and Trust Wallet Ada… (WalletConnect#2190)

Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>

* fix: missing call to SIWE `onSignOut` (WalletConnect#2054)

Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* fix: dayjs locale format seconds is not working and is polluting the global dayjs locale (WalletConnect#1689)

Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
Co-authored-by: enesozturk <enesozturk.d@gmail.com>

* :deprecate - injected connector (WalletConnect#2223)

* chore: more canary timings (WalletConnect#2215)

* chore: updates ethereum-provider to latest (WalletConnect#2226)

* fix: add assertion for the erc20 abi json import (WalletConnect#2225)

* fix: encodes all `personal_sign` messages to hex (WalletConnect#2237)

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>

* fix: siwe tests for 1 click auth (WalletConnect#2267)

* feat: phantom deeplink for mobile app browsers (WalletConnect#2250)

Co-authored-by: tomiir <rocchitomas@gmail.com>

* fix: 4.2.0 bug fixes (WalletConnect#2234)

Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>

* chore: UI canary 10 minute timeout (WalletConnect#2269)

* chore: bump to main 4.2.0 version (WalletConnect#2270)

* :feat social login - 1 - UI  (WalletConnect#2266)

Co-authored-by: enesozturk <enesozturk.d@gmail.com>

* :feat social login - 2 - Wallet (WalletConnect#2272)

* :feat social login - 3 - AuthConnector  (WalletConnect#2274)

* refactor: update profile name rendering logic (WalletConnect#2276)

* :hotfix in app support for injected and announced wallets  (WalletConnect#2279)

* refactor/theme variables and v4 ui updates (WalletConnect#2277)

---------

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Luka Isailovic <lukaisailovic@gmail.com>
Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: GooxPF <gooxpf@gmail.com>
Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>
Co-authored-by: Tiến Nguyễn Khắc <tien.nguyenkhac@icloud.com>
Co-authored-by: Nikos Rossolatos <nikos@cointracker.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
* chore(lab): dogfooding button (WalletConnect#2206)

* add web3 examples

* update example

---------

Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>
@glitch-txs
Copy link
Member

Thanks @Muhammad-Altabba! We are planning to migrate from ethers support to a more agnostic approach by exposing the wallet provider on its own so devs would be able to work/choose any ethereum library they wish to use

@enesozturk
Copy link
Contributor

Hey @Muhammad-Altabba, thank you for such a big contribution. We are working on a general structure refactor for web3modal and as @glitch-txs mentioned we won't need to implement web3.js client explicitly and it'll be library agnostic.

So, closing this for now. But will keep in mind if we need to follow this way. We appreciate your effort. Best!

@enesozturk enesozturk closed this May 21, 2024
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.

None yet

4 participants