Skip to content

Conversation

@RonTuretzky
Copy link

Summary

  • Refactored CheckSignature.s.sol to dynamically read operator count from environment
  • Updated run-check-signatures.sh to support OPERATOR_NAMES environment variable
  • Removed hardcoded 3-operator limitation

Context

Fixes #3 - The e2e test was previously configured to run with only 3 operators. Running with a different amount of operators was only partially supported, most notably in CheckSignature.sol where the number of operators was hardcoded.

Changes

1. CheckSignature.s.sol

  • Replaced hardcoded operator structs (operator1, operator2, operator3) with dynamic arrays
  • Added _readOperators() function that reads operator names from environment variable
  • Modified signature aggregation logic to work with any number of operators

2. run-check-signatures.sh

  • Added support for OPERATOR_NAMES environment variable
  • Defaults to "testacc1,testacc2,testacc3" for backward compatibility

3. Documentation

  • Created DYNAMIC_OPERATORS.md with usage instructions and examples

Usage

# Default (3 operators)
./scripts/run-check-signatures.sh

# Custom number of operators
export OPERATOR_NAMES="testacc1,testacc2"
./scripts/run-check-signatures.sh

Test Plan

  • Verify e2e tests pass with default 3 operators
  • Test with 2 operators
  • Test with 5 operators (if test accounts are available)
  • Ensure backward compatibility is maintained

🤖 Generated with Claude Code

- Refactor CheckSignature.s.sol to dynamically read operator count from env
- Update run-check-signatures.sh to support OPERATOR_NAMES env variable
- Remove hardcoded 3-operator limitation
- Add documentation for dynamic operator configuration

The e2e tests now support any number of operators via the OPERATOR_NAMES
environment variable (defaults to "testacc1,testacc2,testacc3").

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

Refactor e2e test to support dynamic operator amounts

1 participant