> For the complete documentation index, see [llms.txt](https://docs.payswap.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payswap.org/zhong-guo-ren/products/betting/bets-with-alpha-encoding.md).

# 使用字母编码的投注

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

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

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

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

{% content-ref url="/pages/nZHVea1yn51Pj0sAgXrv" %}
[投注合约](/zhong-guo-ren/products/betting.md)
{% endcontent-ref %}

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

<div><figure><img src="/files/MFuarSJWt0OmCurGskxi" alt=""><figcaption></figcaption></figure> <figure><img src="/files/pTMreF2E4tCpLGyj0U7z" alt=""><figcaption></figcaption></figure></div>

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

<div><figure><img src="/files/uHFLADeisjHudhpO3Bky" alt=""><figcaption></figcaption></figure> <figure><img src="/files/dEHdOgD49U9BZbsUfRsh" alt=""><figcaption></figcaption></figure></div>

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
