[ Development - Swapsteem ] - Created Promotion bot Swapsteem
Repository
https://github.com/nirvanaitsolutions/promo-bot
New Projects
What is the project about?
The Swapsteem promo bot is a service designed for promotion of the Swapsteem platform to steem users, however it can be forked and used by anyone willing to promote their account/application/service on the steem blockchain. The related task request by @swapsteem can be found here.
As shown in the below code from this commit,The promo-bot, listens to incoming and outgoing transfers for certain target accounts(Competitors) and sends promotional message to the party using the target accounts' services with a transfer of 0.001 STEEM/SBD and predefined memo.
// stream transactions from the blockchain
const stream = client.blockchain.getOperationsStream({mode: dsteem.BlockchainMode.Latest})
console.log(`Following ${ TARGET_ACCOUNT } For New Transfers`)
// the stream will emit one data event for every operation that happens on the steemit blockchain
stream.on('data', (operation) => {
// we only care about transfer operations made to and from the user we follow
if (operation.op[0] == 'transfer') {
let transfer = operation.op[1]
if (transfer.to === TARGET_ACCOUNT) {
console.log(`${ transfer.from } sent money to ${ transfer.to }`)
//TODO - Check for Transfers from other exchange accounts and skip promotion
// broadcast the promotional transfer to the network
client.broadcast.transfer({
amount:'0.001 SBD',
from:PROMOTER,
to:transfer.from,
memo:TRANSFER_MEMO
},key).then(
console.log("promoted to "+transfer.from)
).catch((error) => {
console.warn('transfer failed', error)
})
}
if (transfer.from === TARGET_ACCOUNT) {
console.log(`${ transfer.from } sent money to ${ transfer.to }`)
//TODO - Check for Transfers to other exchange accounts and skip promotion
// finally broadcast the vote to the network
client.broadcast.transfer({
amount:'0.001 SBD',
from:PROMOTER,
to:transfer.from,
memo:TRANSFER_MEMO
},key).then(
console.log("promoted to "+transfer.from)
).catch((error) => {
console.warn('transfer failed', error)
})
}
}
})
Technology Stack
This bot uses Node.JS as the server and Dsteem library for communication with the steem blockchain.
Roadmap
Currently, the bot is designed specifically for Swapsteem, but I am planning to make it more generalized and configurable for different promotion strategies. The roadmap for next releases is
- Add feature to follow multiple target accounts
- Add feature to skip balcklisted accounts
- Add feature to store promoted accounts in database
- Add filter to only promote to an account only once a week
- Add check for Promotion balance and budget.
How to use and contribute?
- Create an .env file in the root of the project
- Define the env varaibles with help of example.env
- Run npm start
- Add features to existing code
- Create a PR
Thanks for the contribution, @aneilpatel! I was wondering if you have done any research how effective this kind of promotion is? Just curious, as whenever I see memos from others promoting their services it just makes me more likely to not use them, but that's just me haha.
Anyway, some thoughts about the contribution itself:
I look forward to seeing your future contributions and how you implement the features on your roadmap.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thank you for your review, @amosbastian!
So far this week you've reviewed 11 contributions. Keep up the good work!
Thank you @amosbastian for the review.
Yeah, I too am not fan of such promotion, but as a part of our campaign, we wanted every steemian to know that such service exists. We wont be spamming anyone with such promotional messages frequently. I think promoting to each user only once is sufficient.
Also as per your suggestions :
Hey, @aneilpatel!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Greetings from India Mr. @aneilpatel. I want help from you for setup some scripts for Steem blockchain. can you contact me at my Discord server > https://discord.me/Steemin
@aneilpatel!!!!!!!!!!