Environment
- Package:
@polymarket/clob-client-v2 v1.0.5
- Account type: V1 Gnosis Safe proxy, migrated to V2 (not a new deposit-wallet account)
- Signer: viem
createWalletClient + privateKeyToAccount
Steps to reproduce
- Construct signer via viem:
const account = privateKeyToAccount(privateKey);
const signer = createWalletClient({ account, chain: polygon, transport: http(rpcUrl) });
const client = new ClobClient({ host, chain: 137, signer, signatureType: 2, funderAddress });
const creds = await client.createOrDeriveApiKey(); // succeeds
const info = await client.getClobMarketInfo(conditionId); // succeeds
const resp = await client.createAndPostOrder(
{ tokenID, price, side: Side.BUY, size },
{ tickSize, negRisk },
OrderType.GTC
);
Expected
Order submits successfully (this account trades fine manually via the Polymarket web UI — funds, permissions, and market access are all confirmed working).
Actual
{ "error": "invalid POLY_GNOSIS_SAFE signature", "status": 400 }
Order is created and signed client-side without any error — the rejection happens server-side on the final POST.
Additional data point
Also tried omitting signatureType entirely (to let the SDK auto-detect):
{ "error": "invalid EOA signature: signer and maker do not match for EOA sig", "status": 400 }
This confirms the SDK falls back to type-0 (pure EOA) signing when signatureType is unset — which is incorrect for a Safe-funded order, and produces a different (also wrong) error.
Per docs, signatureType: 2 (POLY_GNOSIS_SAFE) should be correct for an existing V1 Safe/proxy account post-V2-migration (type 3 / POLY_1271 is documented as being for new deposit-wallet accounts only). Every variation of client construction with type 2 fails with the same signature error, which points to an issue in the Gnosis Safe signing path itself — possibly related to the EIP-712 domain version bump between V1 (version “1”) and V2 (version “2”), or an incorrect verifyingContract in the Safe signature construction.
Happy to provide more detail or test a patch if useful.
KNOWN ISSUES v2.zip
Environment
@polymarket/clob-client-v2v1.0.5createWalletClient+privateKeyToAccountSteps to reproduce
const client = new ClobClient({ host, chain: 137, signer, signatureType: 2, funderAddress });
const creds = await client.createOrDeriveApiKey(); // succeeds
const info = await client.getClobMarketInfo(conditionId); // succeeds
const resp = await client.createAndPostOrder(
{ tokenID, price, side: Side.BUY, size },
{ tickSize, negRisk },
OrderType.GTC
);
Expected
Order submits successfully (this account trades fine manually via the Polymarket web UI — funds, permissions, and market access are all confirmed working).
Actual
{ "error": "invalid POLY_GNOSIS_SAFE signature", "status": 400 }
Order is created and signed client-side without any error — the rejection happens server-side on the final POST.
Additional data point
Also tried omitting signatureType entirely (to let the SDK auto-detect):
{ "error": "invalid EOA signature: signer and maker do not match for EOA sig", "status": 400 }
This confirms the SDK falls back to type-0 (pure EOA) signing when signatureType is unset — which is incorrect for a Safe-funded order, and produces a different (also wrong) error.
Per docs, signatureType: 2 (POLY_GNOSIS_SAFE) should be correct for an existing V1 Safe/proxy account post-V2-migration (type 3 / POLY_1271 is documented as being for new deposit-wallet accounts only). Every variation of client construction with type 2 fails with the same signature error, which points to an issue in the Gnosis Safe signing path itself — possibly related to the EIP-712 domain version bump between V1 (version “1”) and V2 (version “2”), or an incorrect verifyingContract in the Safe signature construction.
Happy to provide more detail or test a patch if useful.
KNOWN ISSUES v2.zip