# Adapter for ERC-3643 (TransferManager)

```solidity
contract FairwayTo3643Adapter is ITransferManager3643 {
    IPolicyEngine public policy;
    bytes public ruleFrom;
    bytes public ruleTo;

    constructor(address _policy, bytes memory _ruleFrom, bytes memory _ruleTo) {
        policy = IPolicyEngine(_policy);
        ruleFrom = _ruleFrom;
        ruleTo = _ruleTo;
    }

    function canTransfer(address from, address to, uint256)
        external view
        returns (bool ok, uint256 reason)
    {
        (bool okFrom, uint32 rFrom) = policy.isEligible(from, ruleFrom);
        if (!okFrom) return (false, rFrom);
        (bool okTo, uint32 rTo) = policy.isEligible(to, ruleTo);
        if (!okTo) return (false, rTo);
        return (true, 0);
    }
}

```


---

# Agent Instructions: 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.fairway.global/developers/build-on-evm/attestation-led-compliance-eas-erc-1271-erc-3643/adapter-for-erc-3643-transfermanager.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.
