Is it possible to create a UX where you can just press a button and get your Metamask wallet refilled from a faucet ( for example for rinkeby testnet). Currently the process is very cumbersome where you have to copy wallet address, then paste in faucet window, then do some social auth and then your wallet gets funded. Any suggestions in how to make this UX better?

1 Answer 1


ya, you can grab the address from metamask by using web3.eth.accounts[0]. Since metamask injects web3 into each webpage

Make sure to grab web3 from metamask first after page load.

For more documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.