BitgesellOfficial / wbgl-bridge

BGL-WBGL bridge
10 stars 13 forks source link

Add Metamask support #14

Closed leetdev closed 1 year ago

leetdev commented 1 year ago

Refactored frontend application to integrate with Metamask to fetch addresses and make WBGL transfers. Removes a lot of tedium from the bridging process, such as having to enter all addresses manually and generating signatures.

Deployment note: I've added REACT_APP_TITLE as an environment variable that contains the app title (used in both HTML title tag as well as app header). This needs to be present when building the production bundle. Also, NODE_ENV needs to be set to production, otherwise the app will be running on testnet.

leetdev commented 1 year ago

I've set up a staging server for this app that contains all my latest developments. This way, the changes in this PR, for instance, can be tested out before they are approved. Note: it is currently configured to use Ethereum Ropsten, BSC Testnet, and BGL Mainnet. I plan to work on setting up CI and automated deployments next, as well as setting up a test suite for the frontend app.

alekcangp commented 1 year ago

Also, you can use BGL testnet: Explorer: https://testnet.bglnode.online/ Wallet: https://wallet.bglnode.online BGL faucet: https://bglnode.online/ API: https://api.bglnode.online/

leetdev commented 1 year ago

@alekcangp Does Bitgesell core support connecting to this testnet? The bridge runs its own core client. If testnet is supported by core, do you know when (which version) it was added? I am considering creating and publishing docker images for the core client (both with and without wallet support, as well as mainnet and testnet versions). Currently, the bridge docker setup builds its own docker image using bitgesell version 0.1.7, which is the last version that has wallet support built in by default. From 0.1.8 we would have to compile the client from source with wallet support.

alekcangp commented 1 year ago

@leetdev For 0.1.8 Yes, it partially supports, you need to edit BGL.conf file: [test] addnode=164.132.216.58 addnode=164.132.216.61 addnode=77.91.69.182 minimumchainwork=0xff

For 0.1.7 I have checked it and run succesfully Bitgesell core 0.1.7 testnet 206.54.190.212 (https://testnet.bglnode.online/peers), but you also need to edit BGL.conf and copy folder .BGL/testnet3/blocks from 0.1.8 to 0.1.7. I have attached blocks.zip

I think the team would add testnet config to the source code in a new build https://discord.com/channels/745922397349347418/786136696088428574/1001408431493763102. It would be nice to have a new build with wallet and testnet support

van-orton commented 1 year ago

Indeed, new build 0.1.9 would hopefully contain the testnet nodes. This PR has been reviewed and merged to code currently used in production for bridge. Merging this to main branch.