I see that each user that connects with meta mask will create a user id as their username if none is set.
Currently I am having the user be able to set their username and this information is stored based on the addresses that the user has connected with a given account, I have also noticed if a new address that has connected tries to set a username already in use it will not work.
So I am trying to see is it possible to use the username as a query string (example.com/?ref=username) to be included when a new user connects their wallet and keeping record that x-user has referred them?
Also if then a query to the database could also be made for that users referrals and to then filter by only referrals that have interacted with a specific smart contract with a specific function to then reward that user for the referral?
I know its a bit confusing, but I don’t just want to reward referrals for visits or signups, but actually doing something on the dapp such as interacting with it or calling a specific function.
I think this might be able to work by passing this data to the login script similar to how I’ve seen Ivan do it for creating a new user with data already populated. But not sure how to do it in this fashion?