Open yangwao opened 2 years ago
I was thinking @AndreyGrin might be interested in this kind of hacking? 👀
Hey, this looks interesting. I can work on it.
Can provide a list of testing addresses, i.e. one with balance and with some NFTs on https://kusama.subscan.io/account/CuHWHNcBt3ASMVSJmcJyiBWGxxiWLyjYoYbGjfhL4ovoeSd We can get some artists from spotlight to help test as well https://nft.kodadot.xyz/spotlight which are on our Discord :)
I will start with M1. I guess you already have API key for subscan or should I make a new one?
Originally thought using polkadotjs, but using Subscan might cut times to verify you I guess (i.e. connecting to chain takes ages) Let's try to go with Subscan :)
Ok, I will request API key from them
Their free API key has limit of 5 request/second. I guess that's fine for now. I will check what's Polkadot offers as well
I got my API key, continue setting up.
Bot now can reads user's wallet balance. Found a few issues:
For DB we can use free tier on Heroku or Firebase if you don't have any existing one.
For DB we can use free tier on Heroku or Firebase
If there are no catches on free tier I would use it.
I can setup scheduler that will check balance every X minutes/hours.
20-30 min interval should be fine imho
What should we do when someone sold his KSM? Ban or kick off?
We could ban until they have some money again
Interesting that Subscan shows some balance for my account Gai2tc3mZ9u4bLdoXVTfaXjGLerijuXBZawZKTakuVdJuBh but actually I have 0 KSM there.
What min amount of KSM customers should hold on the wallet?
@vikiival @yangwao I'm almost done with M1, need your answers. Another question: what to do with existing users? I wouldn't ban or kick them out, but can annoy one a week until they add their wallet ID, how that sounds to you?
- Discords API doesn't allow to save custom info into user's profile. That means we need to save it to external DB.
If possible, want to make it storage less. Just fetch your balance and then give you attributes, i.e. let you inside
- We won't be able to kick user immediately if they sell their's KSM. I can setup scheduler that will check balance every X minutes/hours.
I guess one way would be listening for events but that would be costly, other way around would be yes, having sort of schedule to check every once per hour/day (to save some costs when userbase might grow)
What should we do when someone sold his KSM? Ban or kick off?
Kick off-channel, that's purpose, ban would be way too strict :)
What min amount of KSM customers should hold on the wallet?
I guess starting with 10KSM would be for now default? Oh wait, I would also account if that KSM is staked, that brings bit complication into game I guess 😄
Another question: what to do with existing users?
What is scenario?
I wouldn't ban or kick them out, but can annoy one a week until they add their wallet ID, how that sounds to you?
I would not spam users bc they might can report your bot without no reason:)
We've chatted with @AndreyGrin that later would be nice to change firebase to something decentralized/distributed, maybe Textile/ThreadDb would be nice to check, maybe https://orbitdb.org/ but seems the recent release wasn't quite along.
hey, is it still valid? I think, last time I've worked on this, M1 points already completed in that MVP
I think yes
Right now we are a bit fighting with spam.
To have quality people in the room, we would like to check if they are holding n amount of KSM (native asset for other parachains) to prove they are believers.
Probably use some serverless implementation, by your choice, probably use basic discord bot example from stdlib - we've got great vibes with them https://autocode.com/app/discord/basic-discord-example/ there are probably more interesting cases https://autocode.com/app/
Tasks are
M1
M2
Check if an address is
Hint you can use our KodaDot SubQuery for M2 - https://github.com/vikiival/magick