AlphaWallet / AlphaWallet/alpha-wallet-android

Add Faucet for each testnet

Abierto
#2,856 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Free for all
Lenguaje dominante
Java
Estrellas
646
Forks
579
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Add a faucet button for each Testnet, which would be in the 'extended' buttons on the chain detail (ERC20DetailActivity) page.

Here's faucets I know about:

Aurora Testnet: https://aurora.dev/faucet
Goerli: https://goerlifaucet.com/
Sepolia: https://faucet.sepolia.dev
Mumbai: https://mumbaifaucet.com/

TODO: Find other faucets. Don't worry about the deprecated chains.

Optimism Bridge (need Goerli): ??? (Should be within Alchemy, see here: https://www.alchemy.com/overviews/migrate-from-kovan-to-goerli-on-optimism)
Arbitrum Bridge (need Goerli): https://bridge.arbitrum.io. This integration is the cleanest: just switch to the dapp browser and set chain to Goerli, the UI should take care of the rest :) Note you may need to create a new ```loadDirect``` method that allows setting the chain.

We can use TokenScript for the Bridges between Goerli -> Arbitrum/Optimism. The bridge works by depositing into the bridging contract:

Goerli -> Arbitrum: send a ```depositEth()``` function with ```value``` attached to ```0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72```

Goerli -> Optimism: send a ```depositETH(uint32 _l2gas, bytes _data)``` with ```value``` to ```0x636af16bf2f682dd3109e60102b8e1a089fedaa8```

_l2gas seems to be fixed as 0x30d40
_data can be zero value

To make it easier for the user, automatically put the user's address into the clipboard or ensure that there's a 'copy address to clipboard' in the drop-down menu.

When the user clicks on the faucet; the app should switch to dapp browser and open the page at the faucet.

Note that this mechanism is already in place in HomeActivity: see ```loadDirect(URL)```. The way to trigger it is to set a ```setFragmentResultListener``` and then switch to the page using ```loadDirect```.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.