Fix Soroban contract environment handling and resolve "mis-tagged object reference" errors#143
Merged
greatest0fallt1me merged 15 commits intoJul 8, 2025
Merged
Conversation
…er environment setup
…y Hybrid contract, enhancing oracle configuration capabilities
…nhancing vector handling capabilities
… improving type organization and clarity
…oved clarity and consistency
…tter readability and maintainability
…ng module for improved organization
…ctify Hybrid tests for proper environment setup
…ng without permission checks and using admin-specific storage keys
…and retrieval methods for consistency
…nt context for improved consistency and clarity
…cks for Soroban String/Symbol conversion limitations
…onment context for improved functionality and consistency
…ronment context, addressing Soroban SDK limitations and enhancing consistency
… Soroban String conversion limitations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed critical environment handling issues in the predictify-hybrid contract that were causing "mis-tagged object reference" errors and test failures. The main issue was improper use of
Env::default()in contract code, which is not allowed in Soroban contracts.Closes #118
Changes Made
�� Core Fixes
Env::default()calls from contract utility functions&Envparameter where needed�� Files Modified
src/utils.rs- Fixed utility functions to accept&Envparametersrc/events.rs- Updated event documentation and helper functionssrc/lib.rs- Updated contract interface functions to pass environment correctlysrc/admin.rs- Fixed admin utility functionssrc/validation.rs- Updated validation functions🧪 Test Fixes
Address::generate()usage in test utilities🐛 Issues Resolved
test_event_documentation_overviewnow passesTechnical Details
Envinstances withEnv::default()&EnvparameterTesting
test_event_documentation_overviewnow passesNotes