Get User details based on Referrer
Fetch User Account details based on its referrer, you can also fetch referrer accounts based on it's referrer address
On drift, users can be referred by other users. The referrer field indicates the user public key that referred the authority user. We can get User accounts referred by a particular referrer by querying the drift_UserStats account.
You can directly copy paste this code on replit and see it in action.
Fetch UserStats details by referrer
You can also fetch the referrer for a particular authority account, using the following query
The response will contain the referrer name for the given authority account (pubkey)
Last updated