Skip to content

Add FixedBuilderScore contract and deployment script#127

Merged
0xleal merged 1 commit intomasterfrom
update-fixed-builder-score
Feb 4, 2026
Merged

Add FixedBuilderScore contract and deployment script#127
0xleal merged 1 commit intomasterfrom
update-fixed-builder-score

Conversation

@0xleal
Copy link
Member

@0xleal 0xleal commented Feb 4, 2026

Replace PassportBuilderScore with a dummy contract that returns a fixed score for all users. Admin can update the score via setFixedScore(). Includes deployment script that also updates TalentVault to use the new contract.


Note

Medium Risk
Impacts yield-rate inputs by enabling a single owner-updatable score source for all users, and includes a script that mutates mainnet TalentVault configuration; mistakes could change reward rates globally.

Overview
Adds FixedBuilderScore, a simple Ownable contract that returns a constant builder score for any passport ID and lets the owner update it via setFixedScore (emitting FixedScoreUpdated).

Introduces a mainnet/base-only Hardhat script (deployFixedBuilderScore.ts) that deploys FixedBuilderScore with an initial score (default 60) and immediately updates the mainnet TalentVault to use it via setPassportBuilderScore. Tests and shared artifacts are extended to cover FixedBuilderScore behavior and to validate TalentVault yield tiering (base vs bonus) when swapping in the fixed-score implementation; .tool-versions adds yarn.

Written by Cursor Bugbot for commit c3dcdca. This will update automatically on new commits. Configure here.

@0xleal 0xleal force-pushed the update-fixed-builder-score branch from ee777dc to 729daf6 Compare February 4, 2026 08:58
RubenSousaDinis
RubenSousaDinis previously approved these changes Feb 4, 2026
Replace PassportBuilderScore with a dummy contract that returns a fixed
score for all users. Admin can update the score via setFixedScore().
Includes deployment script that also updates TalentVault to use the new
contract.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

await talentVault.connect(user1).deposit(depositAmount, user1.address);

// Simulate time passing
ensureTimestamp(currentDateEpochSeconds + 31536000); // 1 year ahead
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing await on async ensureTimestamp calls

Medium Severity

The ensureTimestamp function returns a Promise and needs to be awaited. Without await, the EVM timestamp may not be set before the subsequent refresh() call executes, causing the test to calculate rewards over an incorrect time period. Other usages in TalentRewardClaim.ts and the ensureTimeIsAfterLockPeriod helper function correctly use await.

Additional Locations (1)

Fix in Cursor Fix in Web

@0xleal 0xleal merged commit ae8a19d into master Feb 4, 2026
2 checks passed
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.

2 participants