# 使用字母编码的投注

这些赌注合约只接受用户的字母答案。底层的智能合约将用户给出的答案从字母转换为数字，因为智能合约只能理解数字。

让我们以一场体育赛事为例，你想让用户下注下一个进球的球员的名字。由于选项太多，可能更好的做法是将这个投注事件进行字母编码，让用户提供他们认为会进球的球员的名字，而不是不得不列出所有可能的选项，这可能超过20个不同的选项。

以下是创建这种投注事件的逐步指南：

* 进入你的投注合约。你可以阅读如何在下面的页面上部署你的投注合约的指南：

{% content-ref url="" %}
[](https://docs.payswap.org/zhong-guo-ren/products/betting)
{% endcontent-ref %}

* 在您的合约面板中，点击控制面板按钮，然后点击更新参数按钮。我们需要将我们的赌注合约的票价设定为27，这是字母表中的字母数量。

<div><figure><img src="https://1537385970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MmAKM1uBRsaHufNf3DD%2Fuploads%2Fgit-blob-f4c8141753af5c0f2290fab39f979535c3890f3f%2Fbetting4%20(1).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1537385970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MmAKM1uBRsaHufNf3DD%2Fuploads%2Fgit-blob-15e890b78535f962632232da8cf93292b4f7c5f0%2Fbetting7.png?alt=media" alt=""><figcaption></figcaption></figure></div>

* 下一步是返回到您的赌注合约的控制面板菜单，点击**创建/更新事件**按钮。

<div><figure><img src="https://1537385970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MmAKM1uBRsaHufNf3DD%2Fuploads%2Fgit-blob-f4c8141753af5c0f2290fab39f979535c3890f3f%2Fbetting4%20(2).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1537385970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MmAKM1uBRsaHufNf3DD%2Fuploads%2Fgit-blob-c6ee420a27b93835791ccc45425bc5ead4b85459%2Fbetting6%20(1).png?alt=media" alt=""><figcaption></figcaption></figure></div>

* 在表单中填写字段，并确保**字母编码**字段设置为是。
* 验证表单并确认交易。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payswap.org/zhong-guo-ren/products/betting/bets-with-alpha-encoding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
