Fix compilation errors and code quality issues#1102
Open
aditya23gautam wants to merge 1 commit intoergoplatform:masterfrom
Open
Fix compilation errors and code quality issues#1102aditya23gautam wants to merge 1 commit intoergoplatform:masterfrom
aditya23gautam wants to merge 1 commit intoergoplatform:masterfrom
Conversation
- Fix top-level wildcard error in ContractParser.scala (line 159) - Remove unused implicit variable in Functions.scala (line 408) - Fix SUnit JSON encoding bug in DataJsonEncoder.scala (line 49) These changes resolve compilation errors and improve code quality: * Replaced anonymous wildcard type parameter with named parameter * Removed dead code causing compiler warnings * Fixed JSON encoding to use proper Circe API All changes verified with successful compilation.
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.
We're Team Neuronest participating in the Unstoappable Hackathon LNMIIT 2025, and we've implemented a complete SilverCents demo as part of our contribution.
Team Members:
Himanshu Jasoriya
Aditya Gautam
Ayush Sharma
Fixed 3 bugs in the sigmastate-interpreter repository causing compilation errors and code quality issues.
Repository: https://github.com/aditya23gautam/sigmastate-interpreter.git
Commit: 7067b71
Files Changed: 3
Bug #1: Top-level Wildcard Compilation Error
File:
parsers/shared/src/main/scala/sigmastate/lang/ContractParser.scala (Line 159)
Problem: Scala compiler error - "Top-level wildcard is not allowed"
Before:
After:
Why: Scala 2.13+ requires named type parameters when using context bounds. The wildcard
_cannot be referenced for implicit resolution.Bug #2: Unused Implicit Variable
File:
sc/shared/src/main/scala/sigma/compiler/ir/primitives/Functions.scala (Line 408)
Problem: Compiler warning - "local val eC in method compose is never used"
Before:
After:
Why: The return type
Cis automatically inferred fromf(g(x)). OnlyeAis needed for the lambda parameter.Bug #3: SUnit JSON Encoding Bug
File:
sdk/shared/src/main/scala/org/ergoplatform/sdk/DataJsonEncoder.scala (Line 49)
Problem: Incorrect JSON encoding for Unit type, causing test failures
Before:
After:
Why:
Json.obj()is the correct Circe API for creating empty JSON objects{}.Results
Compilation
Before: ❌ 1 error, 3+ warnings
After: ✅ Success (only standard deprecation warnings)
Tests
Before: ❌ Multiple test failures
After: ✅ Significant improvement (most tests passing)
Code Quality
Impact