Telegram bot progress thread by @renzokuken

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

Sorry about that, the link was right, I just forgot to make the repo public. It should be fine now.

1 Like

Dear all,

Here is a short progress update on my work. The new architecture permits to implement various ツ Telegram bots by just extending one class. In brief, the Slateboy is devided into three components: 1. Slateboy itself which handles Telegram, deposits and withdrawals, 2. Provider class which serves as a bridge to the ツ wallet and finally 3. Personality class which determined bot behaviour. You may make your own ツ bot by just extending the personality class.

I include more info in the README, also an example of how to make a bot

This is still a work-in-progress, but test coverage starts to be reasonable. Please not the Travis CI is on an tests are passing. Still work to do but we are getting there!

Please consider subscribing to my Telegram channel Telegram: Contact @grinventions to get notified with updates about other ツ-related projects I work on.

7 Likes

Hi all,
Just want to share few updates. I have just returned from Turkey where me and @davidtavarez were hosted by @Cobragrin. We spent some great time there and there is a lot to share but I will write about it in the Grinventions news channel. What I want to share with you now is I had a lot of progress on the Telegram bot over there. Many commands are working and I am very close to having successful deposits and withdrawals.

Unfortunately I encountered an issue with the finalize_tx method. I have already reported it while working on different ツ related project and now managed to reproduce it using a newer wallet.

Details here Owner API finalize_tx responds with Fee: Missing fee fields error · Issue #635 · mimblewimble/grin-wallet · GitHub

I will continue working on the bot without having it fixed, I can hard code some values to make it pretend the tx was finalized and I can continue the development work on remaining features. However, there will be no functioning bot until finalize_tx method. It is hard to imagine a ツ functional product that does not require transaction building finalization.

9 Likes

Boy, you’re doing a good job. Good)

2 Likes