permit2-signature-transfer-contract

Integrate Permit2 permitWitnessTransferFrom signatures into Solidity contracts.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/cyotee/crane --skill permit2-signature-transfer-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: permit2-signature-transfer-contract
Source: https://github.com/cyotee/crane/tree/main/.claude/skills/permit2-signature-transfer-contract
Command: npx skills add https://github.com/cyotee/crane --skill permit2-signature-transfer-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solidity developers need a ready-to-use pattern to handle Permit2 signatures (permitWitnessTransferFrom) safely in their contracts.

Core Features & Use Cases

  • Integrates permitWitnessTransferFrom for signature-based transfers.
  • Defines witness construction and interaction with Permit2.
  • Use Case: Add support for Permit2-based approvals in DeFi routers or exchanges.

Quick Start

Instantiate and integrate the contract in your Solidity project to enable Permit2 signature transfers.

Frequently Asked Questions about permit2-signature-transfer-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Permit2 signature transfers in a Solidity smart contract?

To implement Permit2 signature transfers in Solidity, you integrate the ISignatureTransfer interface and use permitWitnessTransferFrom to handle signature-based token transfers safely.

What is permitWitnessTransferFrom used for in DeFi routers?

permitWitnessTransferFrom is used in DeFi routers to enable signature-based token transfers, allowing on-chain swaps and liquidity routing without requiring prior token approvals.

How do I construct a witness for Permit2 signature transfers?

Constructing a witness for Permit2 involves defining the witness data structure and passing it to the permitWitnessTransferFrom function via the ISignatureTransfer interface.

Can I use Permit2 signature flows for exchange integration in Solidity?

Yes, you can use Permit2 signature flows for exchange integration in Solidity by instantiating the contract and integrating permitWitnessTransferFrom to support signature-based approvals.

Do I need any dependencies to add Permit2 support to my Solidity project?

No external dependencies are required to add Permit2 support to your Solidity project, as the Skill focuses on defining witness construction and ISignatureTransfer interface interactions.

Why use Permit2 witness transfers instead of standard token approvals?

Permit2 witness transfers replace standard token approvals by bundling signature verification and transfer logic, reducing transaction overhead and enabling more secure DeFi routing.