Skip to content

fix: threshold_config.rs uses incompatible set_config API signature #2

Description

@Icahbod

Overview

threshold_config.rs calls client.set_config() with an SLAConfig struct, but the actual contract accepts individual parameters. This file will not compile.

Evidence

File: apexchainx_calculator/src/threshold_config.rs, lines 18-26
File: apexchainx_calculator/src/lib.rs — actual signature uses individual params

Impact

  • Test file is broken and will not compile
  • Indicates tests were never run against current contract API

Proposed Solution

Update all set_config() calls to pass individual parameter values.

Acceptance Criteria

  • All set_config() calls use individual parameters
  • cargo test compiles and passes
  • Test assertions remain equivalent
  • Zero threshold test verifies violation
  • Near-zero threshold test verifies boundary
  • All existing tests pass

File Map

  • apexchainx_calculator/src/threshold_config.rs

Testing Strategy

Compile: cargo build must succeed. Unit: two threshold tests pass.

Labels: bug, high, good first issue, quick win

Priority: High

Difficulty: Beginner

Estimated Effort: 1h

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignbugSomething isn't workinggood first issueGood for newcomershigh

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions