ethereum / remix-desktop

Remix IDE desktop
1.02k stars 264 forks source link

How to use Metamask to connect injected Web3? #133

Open xjf953 opened 2 years ago

xjf953 commented 2 years ago

I downloaded the desktop version, but there is no way to use injected Web3, which means I can't connect to the BSC test chain

deadelus commented 2 years ago

https://remix-ide.readthedocs.io/en/latest/run.html

Injected Provider - provider name: For connecting Remix to an injected web3 provider. The most common injected provider is Metamask.

ryestew commented 2 years ago

True - but this does not work on Remix Desktop. For Remix desktop, you'd need to connect through an infura node or use the wallet connect plugin to approve transactions on your mobile device's wallet.

ShubhamSolanki24 commented 2 years ago

At the moment, there are a few small limitations when using Remix Desktop compared to the regular in-browser experience. To explain a bit further: it is currently not possible to integrate the Metamask browser extension with the Desktop version; Javascript VM and Web3 Provider instances are the only viable alternatives.

Web3 Provider is used when connecting to the network via a local Geth node. After installing Geth, run it as a background process by issuing the command:

geth — rpc — rpccorsdomain=”package://a7df6d3c223593f3550b35e90d7b0b1f.mod” — rpcapi web3,eth,debug,personal,net — vmdebug — datadir <path/to/folder/for/test/chain> — dev console