Hi everyone! Today I’d like to share a very small proof of concept I’ve built over the past weekend. It was an excuse for me to learn a bit more about Rust, Axum and Polkadot.JS API on a concrete goal, doing projects like these is essentially how I learn. After chatting with Santiago & Birdo about it they motivated me to share it here as well.
This project is not directly related to the work we’re doing at the Parity Data team.
Assume you are in a situation where you want someone to send you 10 DOT. Dealing with this should be relatively straightforward given the wallets that are available today.
Now imagine you’re in a situation where you want 100 people to send you 10 DOT each. How do you do that or coordinate that avoiding any copy/paste errors or any friction?
I’ve built this small thing called tapDOT.xyz, which I like to think of as the “Stripe Checkout” for the Polkadot ecosystem.
It works like this:
- As a developer, you configure the parameters for an extrinsic you’d like someone to sign (ie: a transfer to 10 DOT to a specific address)
- tapDOT.xyz generates a unique URL that identifies this operation
- By sending this unique URL to someone, they can sign the transaction
- The developer can opt-in to get notified of this event, make it unique (only once etc)
A very short video of how this works:
The unique tapDOT.xyz link shown in that video:
- https://tapdot.xyz/uKdPjPs1fS (signing this will send me some ROC)
- The resulting on-chain Extrinsic once signed
This requires no sign-up, all you do is configure a transaction, get a link and share it. Kinda like how URL shorteners work, but for any extrinsic you can configure on any Substrate based chain. Most of the work is done by the sender, instead of the user. The signing is done client-side.
Sending a transfer is in fact here an edge case I used to illustrate my point, this can be used for any type of on-chain action that you would like to scaffold for an “end-user” to just sign, instead of having to figure out the details & parameters on their own. Another possible use case would be to generate a unique link to vote AYE/NAY on a referendum and reduce friction to participating to on-chain activities.
The gist of it is really to have something where anyone is just one link away from executing specific actions on the Polkadot ecosystem, like: Pay fees with USDC (thanks Santiago for this idea), exchange DOT for another token, interacting with a contract, etc.
I don’t have big plans for this as I’m really not sure if there’s any interest, but here it is, I’m happy I went through and shipped it. I recommend only using it from a browser with a throwaway Rococo account for now. In fact, I’ve only enabled it for Rococo at the moment and it’s a complete alpha. It “should” work with any Wallet but I only tried it with Birdo’s all time favorite wallet. Any feedback would be welcome (except about my frontend skills which are not the yellow of the egg but that has never been a secret )
Down the line if there’s interest, I’ll add DOT.