AlphaWallet / AlphaWallet/alpha-wallet-android

Add Faucet for each testnet

Offen
#2,856 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Free for all
Vorherrschende Sprache
Java
Sterne
646
Forks
579
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.