Skip to content

Make reward duration configurable in RequestMint script - #47

Merged
rsolari merged 1 commit into
mainfrom
rsolari/configurable-reward-duration
Feb 5, 2026
Merged

Make reward duration configurable in RequestMint script#47
rsolari merged 1 commit into
mainfrom
rsolari/configurable-reward-duration

Conversation

@rsolari

@rsolari rsolari commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace hardcoded 30-day reward duration with optional REWARD_DURATION_DAYS environment variable. The script defaults to the contract's REWARD_DURATION value when the env var is not set, maintaining backward compatibility while allowing configuration.

Changes

  • Added REWARD_DURATION_DAYS env variable support to RequestMint.ts
  • Updated .env.template with documentation for the new configuration option
  • Added output logging to show whether the duration comes from env or contract

Test plan

  • Run script without REWARD_DURATION_DAYS set to verify it uses contract value
  • Run script with REWARD_DURATION_DAYS set to verify it uses the override value

🤖 Generated with Claude Code

Replace hardcoded 30-day reward duration with optional REWARD_DURATION_DAYS environment variable. The script defaults to the contract's REWARD_DURATION value when the env var is not set.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

Coverage after merging rsolari/configurable-reward-duration into main will be

73.33%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ZkStaker.sol68.42%100%50%73.33%79, 85, 90, 95

@rsolari
rsolari merged commit 7654c42 into main Feb 5, 2026
4 checks passed
@rsolari
rsolari deleted the rsolari/configurable-reward-duration branch February 5, 2026 18:58
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.

1 participant