Telegram bot progress thread by @renzokuken

Actually, while we are at it, maybe Slateboy should show the contract flow
Nice way to educate everyone

                                         Signature 1         Signature 2
|         Send Contract                                                =>   |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <=     Sign contract                                            ✅        |         
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|        Sign and publish                        ✅               ✅  =>    |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The above but than more graphical, with all text and checks in large arrows representing the three steps.
1 Like

Nice idea! I like “send” and “sign”, another option could be “SRS” and “RSR” which are the two slatepack flows sender-receiver-sender and receiver-sender-receiver.

Good idea. The slatepacks would be exchanged via DMs but bot could update everyone in the public of the state of the flow in educational matter.

Is the transaction flow below clear/useful? If so I can put it in the body, I will keep the screen/face, but make it smaller and put the Grin ツ as face.
In the body I can put the transaction flow. Optionally, we can make three versions where Slateboy points to the phase of the transaction the user is in.
For me this is the clearest way to visualize the transaction flow.

3 Likes

I think this graphic is very useful to understand what is going on, but I would also include info what command has been called in the grin-wallet
→ Send: Draft contract
← Receive: Sign contract
→ Finalize: Sign & broadcast
what do you think?

I agree, it might be useful to name the commands. Not sure if the commands are the same though for the transaction flow suggested by @oryhp. I did not have time to try it yet. But yes, using the names/commands should make it even more clear.

I see in Oryphs post the commands are

contract new 
contract sign
contract sign

Incorporating the above it would look like this:

Also I would like to somewhere mention BEGINSLATEPACK. and ENDSLATEPACK, just not sure where yet. Maybe on the envelop Slateboy is holding.

3 Likes

First Concept of Slateboy with SSS (Send-Sign-Sign) contract flow.
Feedback is always welcome.

5 Likes

Dude, this is amazing! :heart_eyes: I like it so much I am offering you 500ツ from my bounty for this initiative. Regardless if you decide to continue or not, feel free to drop me your slatepack address in DM or here in the forum up to your preference!

2 Likes

I never say no to free Grinnies :smiley:, I will DM you.
I am still far away from my target of 86400 ツ (1 Grin day).
Suggestions for improvement are welcome. I will make also three more designs where SLATEBOY points to which phase of the transaction the user is at.

2 Likes

Confirmed receipt of 500 ツ for my SLATEBOY design, thx @renzokuken :grin:.
More versions of SLATEBOY, with cap (just to see if that would look even better) and where he points which transaction step is taking place will come soon.

6 Likes

They are not free! I am sharing part of my bounty for your design work :slight_smile: well earned!

Pleasure working with you!

Yeah I was about to ask if we can try the hat on once again, I really liked it. I think at some point I will turn graphics into Telegram stickers and let the bot send the stickers to not flood the group with images.

2 Likes

Implemented

  1. storage of bot configuration in the bot context data
  2. a mechanism that ensures that only the bot admin is able to add the bot to the groups (otherwise slateboy will leave the group immediately after added)
  3. keeping track of users that are being added to the groups that Slateboy follows, initiating their metadata (joined timestamp and message count) as well as removing the metadata if they leave the group
  4. incrementing the message count

All changes in the repo

6 Likes

Slateboy, cleaned up a few graphical blibs and added a hat. Any feedback is welcome.
I could also relatively easy change hand postures or apparel like the had, e.g. wizarding hat.
With a bit of work I think I could make stickers with different facial expression and different arm/leg postures.

For now I have some other tasks to focus on.

5 Likes

Awesome work! I like the design with the hat! Please focus on your other tasks, I will ping you when test bot is being deployed.

2 Likes

Implemented

  1. a faucet requesting and approval mechanisms.

This allows one to call /faucet to get some ツ. If request has already been made bot responds with how many approvals are still needed. There also is an /approve command which members of the group can invoke to approve such requests.

Mechanisms that specifies in the config who can invoke those commands. There is a minimum number of sent messages and time spent in the group that regulates that. Those numbers can be different for /approval and /faucet commands.

7 Likes

Today:

  1. Implemented feature of bot providing instructions how to donate by giving own slatepack address and exact wallet commands
  2. Handling withdrawal DMs implemented
  3. Fixed some bad copy-paste errors that were causing syntax errors
  4. Drafted a job queue that starts automatically with the bot process and regularly cleans-up locked outputs
6 Likes

Today:

  1. Improved the processing logic and the data structure. Distinguished /faucet from /withdraw command and added /status and /cancel commands.
  2. Implemented the handler that removes stale jobs.
3 Likes

Today:

  1. Debugged feature of bot automatically leaving groups if added by someone else than bots admin,
  2. Implemented bot configuration as TOML, this is more GRIN style of configuration files, consistent with wallet and node,
  3. Implemented configurable log level,
  4. Fixed a bug that was preventing saving configuration in the bot context,
  5. Implemented decorators for authentication purposes, they make source-code shorter and more readable,
  6. Resolved a whole set of syntax errors and other minor problems.
7 Likes

Hey all. During the meeting with @davidtavarez and @nagini we discussed the bot briefly and we found more use cases. If you are interested in knowing more details check GRIN gathering in Warsaw - Marek Narozniak's Homepage.

I want this bot to not have any specific use case but rather I want it to be a generic bot capable of handling deposits and withdrawals using slatepacks. The exact functionality, for instance a faucet, tipping bot or tech support rewards bot or even a gambling game, that could be specified using callback functions.

Today I was working on this new design and just as a test I made a super simple minimalistic telegram bot that takes callbacks to customize its behaviour and I think this is enough to prove its possible.

https://github.com/marekyggdrasil/customizable-telegram-bots

Stay tuned for more updates!

4 Likes

:point_up:broken link. Filling up to 20 characters

1 Like