# Hats Protocol

整理：链小知（AI 辅助）
资料核对日期：2026-10-12
引用地址：https://lianxiaozhi.com/tools/hats-protocol

用树状角色和动态资格管理权限的协议；适合核对完整 hat ID、当前 wearing、管理员/模块和外部授权，排查仍有历史持有却失权。

官方入口：https://app.hatsprotocol.xyz/
类别：治理与公共资金
网络：Ethereum、Arbitrum、Gnosis、OP Mainnet、Polygon、Base
访问条件：角色/开发文档与公开tree说明可读；EOA、多签、DAO或合约均可wear，不能默认个人钱包等于多签角色主体。读取已有角色/状态记录无需钱包权限；部署、claim、修改资格/toggle、renounce或撤销是独立链上/外部行为。
费用：公开资料未给统一当前Hats平台套餐/模块费用或外部权限系统收费，保留未知；阅读文档/已有记录无链上Gas，创建/修改/撤销等交易及各集成/模块成本另核，不承诺全部免费。

## 用途
- 核对链、tree与完整uint256角色ID
- 区分历史Mint与当前动态wearer
- 排查个人eligibility和全hatinactive
- 核对role关联的具体外部权限

## 使用边界
- mainnet网络仅取所读支持链表例子，Gnosis/OPMainnet为本站规范名；同协议地址不表示跨链树/角色共享，旧测试链列表未核实当前运行。
- Hats接口ERC1155-compatible/similar，非全标准compliant，wearer不可自行转让，mint/transfer不触发onERC1155Received。
- 有效wearing为静态记录、active、eligible共同结果；历史事件/索引列表不代表当前余额。dynamic0不一律等于物理burn；查询失败和false分开。
- 管理员hat、eligibility地址、toggle地址和外部权限集成不同；mutable/immutable不能替代实际模块条件或外部授权检查。
- 外部权限必须有配置和动作范围；角色名/链接不会自动给所有系统提案/资金/编辑权限，文档截图与当前具体UI版本可能不同。
- 仅读公开正文/SDK文档字段，不调用SDK/RPC、连接、部署、签名、改角色或实测外部访问；检查状态的write方法不是只读刷新。

## 操作教程
- [Hats 角色到底授予什么：核对完整 hat ID、链与外部权限](https://lianxiaozhi.com/tools/guides/hats-hat-id-tree-authority-check)：从已有 Hats tree 查看角色与 wearer 记录，追到真正关联的系统权限，避免把同名 hat、Mint事件或管理员层级当任意操作授权。
- [Hats 仍显示持有却失去权限：检查资格、standing和全角色停用](https://lianxiaozhi.com/tools/guides/hats-wearer-lost-access-eligibility-toggle)：用既有状态记录和 ERC20 资格参数区分个人资格变化、全角色inactive、历史索引与外部授权，避免重部署或转币试错。

## 相关知识
- [ERC-1155 为什么一个合约里可以有多种资产？](https://lianxiaozhi.com/learn/erc1155-multiple-assets)
- [多签钱包与模块权限：为什么看签名人数还不够](https://lianxiaozhi.com/learn/multisig-and-modules)
- [原始、解码和整理后的链上数据有什么区别？](https://lianxiaozhi.com/learn/raw-decoded-curated-data)

## 官方依据
- [Hats：角色与外部集成范围](https://docs.hatsprotocol.xyz/readme.md)
- [Hats App：复制完整Token ID](https://docs.hatsprotocol.xyz/using-hats/connecting-hats-w-permissions-and-authorities/connecting-hats-to-token-gates/finding-a-hats-token-id.md)
- [Hats：部署链与相同合约地址](https://docs.hatsprotocol.xyz/using-hats/hats-protocol-supported-chains.md)
- [Hats：动态余额与isWearerOfHat](https://docs.hatsprotocol.xyz/for-developers/hats-protocol-for-developers/wearing-a-hat.md)
- [Hats v1 SDK：角色、资格与管理员读取](https://docs.hatsprotocol.xyz/for-developers/v1-sdk/core/onchain-reads.md)
- [Hats App：Revocation & Eligibility](https://docs.hatsprotocol.xyz/using-hats/eligibility-requirements-for-wearers.md)
- [Hats：资格、standing和模块权限](https://docs.hatsprotocol.xyz/for-developers/hats-protocol-for-developers/eligibility-modules.md)
- [Hats：active与toggle模块](https://docs.hatsprotocol.xyz/for-developers/hats-protocol-for-developers/toggle-modules.md)
- [Hats：关联外部权限](https://docs.hatsprotocol.xyz/using-hats/connecting-hats-w-permissions-and-authorities.md)
- [Hats：查看ERC20资格的既有参数](https://docs.hatsprotocol.xyz/hats-integrations/eligibility-and-accountability-criteria/erc20-eligibility.md)
- [Hats：ERC1155接口兼容限制](https://docs.hatsprotocol.xyz/for-developers/hats-protocol-for-developers/erc1155-compatibility.md)
- [Hats：mutable与管理员修改范围](https://docs.hatsprotocol.xyz/using-hats/setting-a-hats-basic-properties.md)
- [Hats：My Hats、角色侧栏与权限链接](https://docs.hatsprotocol.xyz/using-hats/essentials-for-hat-wearers.md)
