Skip to content

feat: stabilize public error mapping (#1380) - #1385

Open
s6pa1rta3n-lab wants to merge 5 commits into
Predictify-org:masterfrom
s6pa1rta3n-lab:feat/bounty-1380-stabilize-error-mapping
Open

feat: stabilize public error mapping (#1380)#1385
s6pa1rta3n-lab wants to merge 5 commits into
Predictify-org:masterfrom
s6pa1rta3n-lab:feat/bounty-1380-stabilize-error-mapping

Conversation

@s6pa1rta3n-lab

@s6pa1rta3n-lab s6pa1rta3n-lab commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Closes #1380

This draft pull request establishes initial scaffolding and architecture intent for stabilizing public error mappings in Predictify contracts.

Proposed Implementation Plan

  • Stabilize existing error codes and ensure backwards compatibility.
  • Define unique, documented identifiers for newly introduced error conditions.
  • Ensure unknown or out-of-range error codes decode safely.
  • Establish golden vector testing covering public entrypoints.

Acceptance Criteria Checklist

  • Scaffolding and intent documented
  • Existing codes remain stable
  • New codes are unique and documented
  • Unknown values decode safely
  • Golden vectors cover public entrypoints
  • CI validation passes

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

@s6pa1rta3n-lab
s6pa1rta3n-lab marked this pull request as ready for review August 28, 2026 01:25
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Thanks for linking issue #1380. This PR currently adds only the intent document and does not implement public error mapping. Please add the implementation and focused golden-vector tests proving existing codes remain stable, new codes are unique and documented, unknown/out-of-range values decode safely, and all public entrypoints are covered. Please include CI validation evidence in the follow-up PR.

@s6pa1rta3n-lab

Copy link
Copy Markdown
Author

Hello @greatest0fallt1me, I have implemented the stable error mapping as requested. I added the UnknownError fallback and a safe decode function, along with focused golden-vector tests in error_code_tests.rs proving stability and proper fallback decoding.

Note: I noticed there are existing compilation errors in the test suite from previous commits on this branch (e.g., create_market signature mismatches in market_audit_tests.rs), which prevented cargo test from passing locally. I have left those untouched as they appear outside the scope of this error mapping stabilization.

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

@s6pa1rta3n-lab

Copy link
Copy Markdown
Author

Hello @greatest0fallt1me, I've pushed an additional commit to resolve test suite compilation issues and fix unused result warnings in the newly added golden-vector tests. CI validation should now be able to run and pass correctly. Let me know if there's anything else you need!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GrantFox][Medium] Stabilize public error mapping

2 participants