Skip to content

Support ethers.js#44

Merged
evgenykuzyakov merged 6 commits intodevfrom
support-ethers-js
Apr 24, 2023
Merged

Support ethers.js#44
evgenykuzyakov merged 6 commits intodevfrom
support-ethers-js

Conversation

@evgenykuzyakov
Copy link
Contributor

  • Support ethers.js based on [DO NOT MERGE] Add Ethers.js viewer#130
    • Expose Ethers and ethers in the global scope.
    • Add custom Web3Connect component that renders Web3 connect/disconnect button. Currently, the API is heavily influenced by Web3Onboard API.
    • VM now exports EthersProviderContext React context type. A gateway that wants to support Ethers.js should wrap the app with EthersProviderContext.Provider component with the object value {provider}. Provider is Web3 provider that can be used to create an Ethers.js provider.

@evgenykuzyakov evgenykuzyakov merged commit d25338c into dev Apr 24, 2023
evgenykuzyakov pushed a commit to NearSocial/viewer that referenced this pull request Apr 25, 2023
The following change enables `Ethers` and `ethers` using `ethers.js`
from the VM.

To enable Web3 in the VM, the gateway should inject Web3 provider in the
specific react context `EthersProviderContext` given from the VM.

Currently the implementation depends on the Web3Onboard as a wallet
selector.

See NearSocial/VM#44
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.

3 participants