Detect a Palisec agent
Anyone can check on chain, without asking Palisec, whether an agent's account is enforced by Palisec: its key alone cannot move funds.
Palisec co-signers
| Network | Co-signer address |
|---|---|
| Robinhood Chain mainnet (4663) | 0x628FdA166280b9E2C5E5FBD89fDDDaCe626d8ec7 |
| Robinhood Chain testnet (46630) | 0xc4022a43FeFaeB9Ac6d66Cd6B74B1c8044ca8beD |
One fixed address per network. It does not rotate on its own: a new co-signer would have to be added as an owner of every account by its owners, so any change is announced here and in the changelog in advance, with both addresses valid during the change. The co-signer is what identifies a Palisec account: the Safe contracts themselves are the standard ones anyone can deploy (singleton 0x41675C099F32341bf84BFc5382aF534df5C7461a, factory 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67, 4337 module 0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226).
The rule
An address is Enforced by Palisec only if all of these hold, read from chain:
- It is a Safe: storage slot 0 (the proxy's singleton) is the Safe v1.4.1 singleton.
- Exactly 3 owners and a threshold of exactly 2, one of them the Palisec co-signer for that network. The other two are the agent's key and a human recovery owner, so the agent's key never reaches the threshold alone.
- Only the Safe 4337 module is enabled (
getModulesPaginated(0x…01, 10)). Another module could execute without the owners' signatures. - No guard is set (storage slot
0x4a204f62…is zero).
Anything else (four owners, threshold 1 or 3, no co-signer, an extra module, a guard, a plain key account) is not enforced.
Reference function
TypeScript with viem. Returns enforced and the reason. Read-only: nothing is signed or sent.
isEnforcedByPalisec.ts
import { createPublicClient, getAddress, http, parseAbi } from "viem";
const COSIGNERS: Record<number, string[]> = {
4663: ["0x628FdA166280b9E2C5E5FBD89fDDDaCe626d8ec7"],
46630: ["0xc4022a43FeFaeB9Ac6d66Cd6B74B1c8044ca8beD"],
};
const SINGLETON = "0x41675C099F32341bf84BFc5382aF534df5C7461a"; // Safe v1.4.1
const MODULE = "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226"; // Safe4337Module
const GUARD_SLOT = "0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8";
const ABI = parseAbi([
"function getOwners() view returns (address[])",
"function getThreshold() view returns (uint256)",
"function getModulesPaginated(address,uint256) view returns (address[],address)",
]);
const asAddr = (w?: string) => (w && w !== "0x" ? getAddress(`0x${w.slice(-40)}`) : undefined);
export async function isEnforcedByPalisec(rpcUrl: string, chainId: number, account: `0x${string}`) {
const c = createPublicClient({ transport: http(rpcUrl) });
const code = await c.getCode({ address: account });
if (!code || code === "0x") return { enforced: false, reason: "plain key account" };
try {
const [slot0, guard, owners, threshold, [modules]] = await Promise.all([
c.getStorageAt({ address: account, slot: "0x0" }),
c.getStorageAt({ address: account, slot: GUARD_SLOT }),
c.readContract({ address: account, abi: ABI, functionName: "getOwners" }),
c.readContract({ address: account, abi: ABI, functionName: "getThreshold" }),
c.readContract({ address: account, abi: ABI, functionName: "getModulesPaginated", args: ["0x0000000000000000000000000000000000000001", 10n] }),
]);
if (asAddr(slot0) !== getAddress(SINGLETON)) return { enforced: false, reason: "not a Safe v1.4.1" };
const cosigners = (COSIGNERS[chainId] ?? []).map((a) => getAddress(a));
if (!owners.some((o) => cosigners.includes(getAddress(o)))) return { enforced: false, reason: "no Palisec co-signer" };
if (owners.length !== 3 || threshold !== 2n) return { enforced: false, reason: "owners/threshold allow signing without Palisec" };
if (modules.length !== 1 || getAddress(modules[0]!) !== getAddress(MODULE)) return { enforced: false, reason: "other module enabled" };
if (asAddr(guard) && asAddr(guard) !== "0x0000000000000000000000000000000000000000") return { enforced: false, reason: "guard set" };
return { enforced: true, reason: "Enforced by Palisec" };
} catch {
return { enforced: false, reason: "not a Safe" };
}
}Example
The Palisec demo smart account 0x375BdF5DA6b7440889e50f13C894A3C4AC988329 on mainnet returns true. An ordinary key account such as 0x989EfcD8Ad76E695CFD5ba915b1b12118471c430, or any contract that is not a Safe, returns false.