Summary
The contracts/scripts/populateCourts.ts script currently uses @ts-expect-error suppressions to work around a misalignment between the expected way to access additional court parameters (e.g., hiddenVotes, jurorsForCourtJump) from the courts() return type and the actual runtime shape.
Context
The following @ts-expect-error comments were added as a temporary workaround to allow the check-types script to pass:
// @ts-expect-error populateCourts additionalCourtParams types
// Currently, there seems to be a misalignment between the expected way to access additional court params and the actual way to access them.
// This comment allows the check-types script to pass, but the script needs updating to deal with current `courts()` return type.
These suppressions affect access to courtPresent.hiddenVotes and courtPresent.jurorsForCourtJump in the court update loop.
Action Required
Investigate and fix the type mismatch between the TypeChain-generated KlerosCore.courts() return type and the actual fields being accessed in the script, removing the @ts-expect-error suppressions once the types are properly aligned.
References
/cc @kyrers
Summary
The
contracts/scripts/populateCourts.tsscript currently uses@ts-expect-errorsuppressions to work around a misalignment between the expected way to access additional court parameters (e.g.,hiddenVotes,jurorsForCourtJump) from thecourts()return type and the actual runtime shape.Context
The following
@ts-expect-errorcomments were added as a temporary workaround to allow thecheck-typesscript to pass:These suppressions affect access to
courtPresent.hiddenVotesandcourtPresent.jurorsForCourtJumpin the court update loop.Action Required
Investigate and fix the type mismatch between the TypeChain-generated
KlerosCore.courts()return type and the actual fields being accessed in the script, removing the@ts-expect-errorsuppressions once the types are properly aligned.References
/cc @kyrers