@@ -7,20 +7,20 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
77
88/// @title QueryTypeStakerFactory
99/// @author [ScopeLift](https://scopelift.co)
10- /// @notice This contract manages the creation of staking pools for different query types .
11- /// Each query type can have one active staking pool, and only the contract owner can create new
12- /// pools.
10+ /// @notice This contract manages the creation of staking pools for different query type bit fields .
11+ /// Each query type bit field can have one active staking pool, and only the contract owner can
12+ /// create new pools.
1313contract QueryTypeStakerFactory is Ownable {
1414 /// @notice The token that will be used for staking.
1515 IERC20 public immutable STAKING_TOKEN;
1616
17- /// @notice Maps query types to their corresponding staking pool addresses.
18- mapping (uint8 queryType = > address poolAddress ) public queryTypePools;
17+ /// @notice Maps query type bit fields to their corresponding staking pool addresses.
18+ mapping (bytes32 queryType = > address poolAddress ) public queryTypePools;
1919
20- /// @notice Emitted when a new staking pool is created for a query type.
21- event CreateQueryTypeStakingPool (uint8 indexed queryType , address indexed poolAddress );
20+ /// @notice Emitted when a new staking pool is created for a query type bit field .
21+ event CreateQueryTypeStakingPool (bytes32 indexed queryType , address indexed poolAddress );
2222
23- /// @notice Thrown when attempting to create a pool for a query type that already has one .
23+ /// @notice Thrown when attempting to create a pool for a query type bit field that exists .
2424 error QueryTypeStakerFactory__PoolExists ();
2525
2626 /// @notice Thrown when an invalid (zero) token address is provided.
@@ -34,13 +34,13 @@ contract QueryTypeStakerFactory is Ownable {
3434 STAKING_TOKEN = IERC20 (_stakingToken);
3535 }
3636
37- /// @notice Creates a new staking pool for a specific query type.
38- /// @param _queryType The type of query this pool will be associated with .
37+ /// @notice Creates a new staking pool for a specific query type bit field .
38+ /// @param _queryType The bit field representing the queries this pool will support .
3939 /// @param _poolOwner The address that will own the staking pool.
4040 /// @param _initialEntry The initial conversion table entry for the pool.
4141 /// @return _poolAddress The address of the newly created staking pool.
4242 /// @dev Only callable by the contract owner.
43- function createStakingPool (uint8 _queryType , address _poolOwner , bytes32 _initialEntry )
43+ function createStakingPool (bytes32 _queryType , address _poolOwner , bytes32 _initialEntry )
4444 external
4545 returns (address _poolAddress )
4646 {
0 commit comments