> For the complete documentation index, see [llms.txt](https://docs.getlaika.app/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getlaika.app/docs/docs-cn/ji-chu/lai-ka-ying-yong/dai-ma-mu-ban.md).

# 代码模板

莱卡熟知dapp开发中的需求，并为在工作区中为你提供了在Dapp中对函数发出请求的必要代码模板。我们提供以下代码生成模式：

1. Ethers.js (ES6)
2. Ethers.js (CommonJS)
3. Web3.js (ES6)
4. Web3.js (CommonJS)
5. Web3.py&#x20;

要使用代码模板，只需要点击工作区右侧仪表盘中的代码符号按钮 "**\</>**"

![](/files/GwVDducfhaqYVo6SxVVH)

点击按钮后，仪表盘会展开并显示代码生成器。您可以在此处选择用于生成函数特定代码片段的模式。

![](/files/kC3WbmASfD1tySepqi8K)

就是这样！你可以直接复制这些模板并在你的喜欢的代码编辑器使用。


---

# 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:

```
GET https://docs.getlaika.app/docs/docs-cn/ji-chu/lai-ka-ying-yong/dai-ma-mu-ban.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.
