-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate ETH address conversion; ensure parachain links #459
Comments
@pgherveou how is the eth address mapped to a substrate address? |
@smiasojed , I think you already did something similar for Remix, do you have some js code to go |
@lovelaced let us know if you need help on this. |
Doesn't look complex. I'll try to get it to PR stage today. |
@mutantcornholio only required for westend asset hub for now, but if it's easier to add for all chains that's also fine |
Adding it to all chains would be easier. Will it work as expected? |
@pgherveou @smiasojed do you have any input on the above? ^ |
It works the same for all chains: |
For Kusama or Polkadot will be different prefix in SS58 encode. |
Ah yeah, thanks, the pieces came together now.
There's no faucet for Kusama / Polkadot, but good to keep in mind. I'll probably make the prefix configurable. |
Turns out, it's actually already implemented: https://faucet.polkadot.io/westend?parachain=1000 |
seems to work for me, it does update it to assethub |
I meant the other way around: select a different parachain from the dropdown → the url doesn't get updated. |
ah right that's correct, I think it will still be nice if not too much extra works to have a "clean url" without querystring |
What's wrong with querystring? |
I get it's ok this is just bike shedding, we need to reference the faucets on some repo, Quick question can you also specify the address from the querystring? |
Yeah, but could you explain the usecase for this? |
use case would be to create link that prefill everything, once you have connected your wallet, we can point you to the url where you can ask for test funds by prefilling all the details |
@pgherveou do you mean we would be linking directly from remix or something? Where is the user going to be connecting their wallet and being redirected to the faucet? (just for context) |
We will be linking to the faucet from our tutorial: Would be nice if we can select the correct network via direct link. Otherwise the user has to select the correct network. |
Yes, this is already possible. I was wondering about the context for prefilled addresses. |
I'm trying to conjure a meaningful e2e test for address conversion. I want to avoid duplicating the same conversion logic both in code and in test |
Not sure what @pgherveou has in mind. But we could use it to fill the address that is selected in Metamask. Doesn't seem like a high priority, though. |
yeah not a hight priority at all just checking if this could be done at all |
You can just do an ethereum transfer (you can generate a regular eth address in metamask, and then send funds to another address). You could probably use web3.js or ethers.js for this if that makes sense, you can view such transactions here with the resulting substrate addresses. |
Fixes #459 I'm still thinking on how to properly test ethereum drips, will follow up on that.
Fixes #459 I'm still thinking on how to properly test ethereum drips, will follow up on that.
Fixes #459 I'm still thinking on how to properly test ethereum drips, will follow up on that.
Yes it's definitely possible, but we can revisit this if there's a direct need for it |
The changes were deployed, try using 0x.. address here: https://faucet.polkadot.io/westend?parachain=1000 |
Nice, worked for me @mutantcornholio ! 🎉 |
@mutantcornholio the RPC URL needs to be changed to https://westend-asset-hub-eth-rpc.polkadot.io in addition, can the placeholder text in the address field say something like: "5rt6... or 0x833..."? |
Why? Faucet dripper account lives on relay chain, and we're teleporting tokens to AH.
sure |
Oh, sorry, my misunderstanding - I thought the eth RPC was used somehow here. |
|
Quoting from @pgherveou :
The text was updated successfully, but these errors were encountered: