AlphaWallet / AlphaWallet/alpha-wallet-android

Add Faucet for each testnet

Đang mở
#2,856 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Free for all
Ngôn ngữ chính
Java
Star
646
Fork
579
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.