AlphaWallet / AlphaWallet/alpha-wallet-android

Add Faucet for each testnet

Ouverte
#2,856 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Free for all
Langage dominant
Java
Étoiles
646
Forks
579
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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```.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.