PoX error code mapping is wrong — verified against the canonical pox-4 contract
We compared the POX4_ERRORS map in this SDK against the actual pox-4.clar source in stacks-core. The SDK's mapping is wrong for 12 out of 13 codes from 19 onward. When a stacking tx fails, users are seeing the wrong error message.
Also checked @stacks/stacking is missing the new signer-related codes 32–40.
Looks like the SDK mapping is shifted. Maybe generated from increasing ints, but missing an error case.
Relevant code
PoX error code mapping is wrong — verified against the canonical pox-4 contract
We compared the
POX4_ERRORSmap in this SDK against the actual pox-4.clar source in stacks-core. The SDK's mapping is wrong for 12 out of 13 codes from 19 onward. When a stacking tx fails, users are seeing the wrong error message.Also checked
@stacks/stackingis missing the new signer-related codes 32–40.Looks like the SDK mapping is shifted. Maybe generated from increasing ints, but missing an error case.
Relevant code
src/utils/constants.tsL87–L233 — thePOX4_ERRORSmapsrc/utils/helpers.tsL312–L322 —parseClarityErrCode()that reads these codespox-4.clarin stacks-core — the actual contractpackages/stacking/src/constants.tsL101–L130 — correct for 18–31 but missing 32–40