SuperAPI AI 工具集

permissioned-pools-issuer

通用与其它

查看项目

更新于 10-15 22:33

技能介绍

用途:为发行方工程团队提供把带转账限制的 ERC-20(RWA/代币化资产)接入 Uniswap v4 许可池的参考材料,讲清合约行为、调用顺序与各 revert 含义,不提供部署演练。

主要能力:区分底层许可代币与 PermissionsAdapter(虚拟代币)两个地址——PoolKey 用适配器,allowlist 检查器看到的是底层代币,钱包/LP 持有底层代币,Permit2 授权也在底层;适配器代币名与符号由底层 name()、symbol()、decimals() 派生(缺失时回退为 Uniswap v4 Permissioned Token、v4PT、18)。列出五条代码强制的顺序边及其 revert(PermissionsAdapterNotVerified、NotPermissionsAdapterAdmin、NoVerifiedAdapter/UnverifiedAdapter、InvalidHook、Unauthorized 等),并给出推荐七步流程。强调命名大小写:BaseAllowlistChecker 与文件 BaseAllowListChecker.sol、IAllowlistChecker、updateAllowListChecker、allowListChecker()、setAllowedHook、isAllowedHooks、AllowedHooksUpdated、PermissionFlags/PermissionFlag。权限标志 NONE、SWAP_ALLOWED、LIQUIDITY_ALLOWED、ALL_ALLOWED。包装器注册集合:PermissionedPositionManager、Universal Router 2.2.0+(UniversalRouter#v2.2)、V4Quoter、MixedRouteQuoterV2,且不得注册工厂或 hook。

使用方式:npm 上 @uniswap/v4-periphery 最新为 1.0.3,tarball 不含 permissionedPools 目录且无 git tag,只能按提交固定:forge install Uniswap/v4-periphery@3245c3cb99c48fa1dc2459c3b60abc37d4294aba,并在 remappings.txt 写 @uniswap/v4-periphery/=lib/v4-periphery/。检查器须通过 ERC-165 校验,否则 createPermissionsAdapter 报 InvalidAllowListChecker。

适用场景:发行方接入许可池、排查 revert、核对命名与导入路径。

限制:仅为教学参考,需自行审计、先在测试网验证、自行解析并核验地址;LP 仓位永久不可转让(TransferDisabled),适配器管理员可用 unwindPosition 强制退出;三份审计报告均不覆盖自写检查器;路由资格、代币列表等需与 Uniswap Labs 协调。