🤖 Bots

Bot

Telegram Bot and an XMTP Bot are deployed on the Arbitrum Sepolia and Polygon Mumbai networks and accept bets in WETH and WMATIC tokens, respectively. These bots interact with users through text messages. Let's explore how you can engage with each of these bots!

Game: Coin Toss. The game is played with a two-sided coin. The game's goal is to guess whether the lucky coin face will be Heads or Tails.

Telegram Bot

1) Connect to SwirlBot:
Access [Testnet] SwirlBot and initiate the bot with the /start command.

Connect SwirlBot

Choose your preferred blockchain network. This choice is made in advance to guarantee the creation of a wallet connection link tailored specifically to your selected blockchain.

Pre-select a chain

After preselecting the chain, a link to connect your wallet will be generated.

2) Link Your Crypto Wallet:

Follow the "Generate Signed Message" link.

Before Connect Wallet

Generate a message signature using the "Sign" button and copy it to your clipboard.

Generate Signed Message

Paste the copied message into the Telegram chat with Bot and send it. The bot will respond confirming that your wallet has been successfully connected.

Send Message

Set the allowance sufficient to play few games.

Set Allowance

3) Place a Bet:
If you don't have test tokens in your wallet, please obtain them from a faucet. Get Test Tokens
To start the game, choose from two options:

  • Manual Entry:

Choose Heads or Tails and enter the game command (e.g., play heads 0.05 WETH or play tails 0.05 WETH).

Manual Bet Entry
  • Using the /play Command:

Activate the game by typing /play. Then, sequentially choose the coin side, token, and bet amount using the interactive buttons. The complete command will appear at the chat's bottom. Clicking this command initiates the game.

Interactive Bet Entry

4) Game Results:
Bot will start the game and provide a transaction link and report win or loss with a link to the transaction.

Game

5) Insufficient Bet Allowance: If you have insufficient allowance for the bet, Bot will suggest increasing the allowance by sending a link to the SwirlBot connection page.

Insufficient Allowance

Follow the link and set the allowance sufficient to play the required number of games.

6) Limits:
Betting limits are set for safety and compliance reasons. If your bet falls outside the established limits, you will receive a message from the bot indicating both the minimum or maximum bet amounts allowed.

Betting Limits

7) Disconnecting wallet from the Bot:
Enter the /disconnect command to disconnect your wallet from Bot.

Disconnect

Game Commands:

  • play [side] [amount] [token] - Place a bet. For example,
    play heads 0.05 WETH to bet on heads using WETH or
    play tails 0.05 WETH to bet on tails using WETH.
  • /play - Place a bet by interactive buttons.

Account Management Commands:

/disconnect - Disconnect from the bot and end the session.

Commands:

  • /info: Get information about SwirlBot's version, game address, and available tokens.
  • /help: Show a list of available commands.
  • /start: Launch SwirlBot and view the initial welcome message.
  • /chain: Choose your preferred blockchain network.
  • /status: Show connected wallet and selected chain.

XMTP-bot

1) Open XMTP Chat:
Start by opening the chat via the link: https://xmtp.chat/.

Open XMTP Chat

Initiate a conversation with the Bot at the address: 0xDBa9c0B61e27225c1fDCA54546e9FE91129b6cc9 by copying and pasting the address into the 'To' field.

Initiate Conversation with XMTP Bot

2) Select a chain:
The Arbitrum Sepolia network is selected by default. If you want to change the network, you can do so by typing /chain and selecting the desired chain. For example,
/chain arbitrum_sepolia to choose Arbitrum Sepolia or
/chain polygon_mumbai to choose Polygon Mumbai.

Select Chain XMTP Bot

3) Place a Bet:
Choose Heads or Tails and enter the game command (e.g., play heads 0.05 WETH or play tails 0.05 WETH). Bot will check if your bet is within the set limits and if there are sufficient funds and allowance in your wallet to place the bet. If you don't have test tokens in your account, please obtain them from a faucet. Get Test Tokens

Place Bet with XMTP Bot

4) Game Results:
Bot will start the game and provide a transaction link and report win or loss with a link to the transaction.

XMTP Game Interaction

5) Insufficient Bet Allowance:
If you have insufficient allowance for the bet, Bot will suggest increasing the allowance by sending a link to the allowance setting page.

XMTP Insufficient Allowance

Follow the link and set the allowance sufficient to play the required number of games.

6) Limits:
Betting limits are set for safety and compliance reasons. If your bet falls outside the established limits, you will receive a message from the bot indicating both the minimum or maximum bet amounts allowed.

XMTP Betting Limits

Game Commands:

play [side] [amount] [token] - Place a bet. For example,
play heads 0.05 WETH to bet on heads using WETH or
play tails 0.05 WETH to bet on tails using WETH.

Commands:

  • /info: Get information about SwirlBot's version, game address, and available tokens.
  • /help: Show a list of available commands.
  • /chain [chain]: Choose your preferred blockchain network. For example,
    /chain arbitrum_sepolia to choose Arbitrum Sepolia or
    /chain polygon_mumbai to choose Polygon Mumbai.
  • /status: Show connected wallet and selected chain.

Adding Testnet Tokens Using Faucets

To enjoy the gaming experience with SwirlBot, you will need to have some testnet tokens. You can get testnet tokens from the following faucets:

Arbitrum Sepolia Faucets

  1. Triangle Platform Faucet
  2. Bware Labs Faucet
  3. Quicknode Faucet

Polygon Mumbai Faucets

  1. Mumbai Faucet
  2. Triangle Platform Faucet
  3. Quicknode Faucet
  4. Bware Labs Faucet

How to Use a Faucet:

  1. Visit the Faucet Link: Choose a faucet from the list above based on your desired testnet.
  2. Enter Your Wallet Address: Input the wallet address you intend to use for the game.
  3. Request Tokens: Follow the specific instructions on the faucet website to receive your testnet tokens.

Wrapping Tokens

After obtaining testnet tokens from the faucets, you should proceed to the following URLs:

For Arbitrum Sepolia: Arbitrum Sepolia Page
For Polygon Mumbai: Polygon Mumbai Page

On these pages, you can use the tETH to WETH wrapper (for Arbitrum Sepolia) or tMATIC to WMATIC wrapper (for Polygon Mumbai) to convert your tokens into WETH or WMATIC.

Wrap Token

Once you have your testnet wrapped tokens, you can return to SwirlBot and start placing your bets!