Request Donations V2 Beta on Testnet and an Introduction to CacheDB

Adamsk1111
Request
Published in
4 min readNov 28, 2018

What is the Request Donations app?

Request Donations seamlessly allows websites to accept an array of cryptocurrency donations directly on their own website without technical worries and expensive overheads. No complex integrations; just a simple, easy to implement solution that works.

The documentation for donations can be found here. 📖

What is Donations v2?

We’ve received a lot of feedback from current and potential users of Request Donations. One point that stands out is that the current payment flow (redirecting to app.request.network) is confusing and difficult for new users to follow. As part of continually improving our products we have carried out some improvements to Request Donations to help onboard new users.

The v2 demo can viewed at https://donations-v2.request.network/demo/. 🌐 (Rinkeby + ETH only) — please note donations v2 is currently in beta.

Note: If you need Rinkeby ETH, feel free to reach out to @AdmReq on Discord or Telegram.

In the previous version, making payments with the donations app involved being redirected to app.request.network and then redirecting back to another website to view your receipt.
For the second version of Request Donations we have the payment handled directly in the modal. Not only does this make the process much quicker, it also provides a much more seamless experience for the end-user.

With the release of CacheDB (later in this article) we can also implement new payment methods like QR Codes, payments via MEW, other wallets and much more.

Below, you can find a video of the new process using MetaMask.

Video of Request Donations v2 in progress.

Request Donations v2 in action

After clicking the ‘Donate with Request’ button you will be prompted with a Request Network donation screen to select the amount and the type of tokens you wish to send.

Instead of redirecting to app.request.network for completing the payment, the payment can now be completed directly inside the modal itself. There can be numerous options here which will allow a vast array of payment methods for the end user.

In this example below we use MetaMask to pay.

The payment via MetaMask has been processed and your receipt is available directly from the modal — the entire process is completed without ever leaving the website.

Introducing CacheDB

CacheDB is a useful tool which allows app developers that are building on Request to find and filter requests and associated IPFS data from the blockchain in a much more seamless way.

Previously, developers would have to programmatically find the request directly on the blockchain and then have a second lookup to retrieve any IPFS data — load times involved in this process can have a negative impact on the user’s experience of your apps.

With CacheDB we parse the blockchain in real-time and store the data in a fast and easy-to-query database. Apps can now query this database in for a much-improved user experience.

CacheDB also allows us to integrate more payment methods (like mobile wallets, MEW etc.) as we can now accurately detect when requests have been paid.

You can view the docs for CacheDB here.

Example use cases

Find requests based on a users address

The most basic use-case for CacheDB is to find any associated requests by a users wallet address, as an example if we wanted to see all requests paid by 0x1CAD56fc63830fa0a225daf8d5072496e1990efd we can use the following endpoint: https://rinkeby.requestnetworkapi.com/requests?payer=0x1CAD56fc63830fa0a225daf8d5072496e1990efd

Similarly, we can use the ‘payee’ endpoint to see all the requests received by that address.

Finding requests by App

Each app should conform to the Request Network Data Format — using this format each request is assigned a ‘builderId’, using CacheDB we can filter requests by this builderID to see information on all of the requests they have made.

For example, we can see all the requests made on Rinkeby by the builder ‘RequestDonations’ here: https://rinkeby.requestnetworkapi.com/requests?builderId=RequestDonations

Using this data we can create tracking tools to accurately track requests and filter them in various ways.

There are many more uses cases for CacheDB and it’s very flexible allowing it to be used in almost any app created on Request.

Have any questions?

The best way to get in touch is via Discord — https://discord.gg/rEb4Ca.
We have also have a dedicated #request-donations channel for any queries.

Alternatively, feel free to get in contact directly by any of the following methods:

Slack: adm
Telegram: @admREQ
Reddit: /u/admREQ
Discord: AdmReq#4167

--

--