Skip to content

Commit

Permalink
fix: missing or incorrect documentation (OZ L-08)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed Aug 24, 2024
1 parent fb5956a commit 2a131ca
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,10 @@ interface IHorizonStakingMain {
* This function can be called by the service provider or by an operator authorized by the provider
* for this specific verifier.
* @dev Requirements:
* - `tokens` cannot be zero and must be over the data service minimum required.
* - Provision parameters must be within the range allowed by the verifier (`maxVerifierCut` and `thawingPeriod`)
* - `tokens` cannot be zero.
* - The `serviceProvider` must have enough idle stake to cover the tokens to provision.
* - `maxVerifierCut` must be less than or equal to `MAX_MAX_VERIFIER_CUT`.
* - `thawingPeriod` must be less than or equal to `_maxThawingPeriod`.
*
* Emits a {ProvisionCreated} event.
*
Expand Down Expand Up @@ -688,7 +689,6 @@ interface IHorizonStakingMain {
* - Then after the thawing period, the tokens are removed from the provision using {withdrawDelegated}.
*
* Requirements:
* - Must have previously initiated a thaw request using {undelegate}.
* - `shares` cannot be zero.
*
* Emits a {TokensUndelegated} and {ThawRequestCreated} event.
Expand Down Expand Up @@ -822,7 +822,7 @@ interface IHorizonStakingMain {
) external;

/**
* @notice Authorize or unauthorize an address to be an operator for the caller on a data service.
* @notice Authorize or unauthorize an address to be an operator for the caller on a verifier.
*
* @dev See {setOperator}.
* Additional requirements:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ interface IHorizonStakingTypes {
struct DelegationPoolInternal {
// (Deprecated) Time, in blocks, an indexer must wait before updating delegation parameters
uint32 __DEPRECATED_cooldownBlocks;
// (Deprecated) Percentage of indexing rewards for the delegation pool, in PPM
// (Deprecated) Percentage of indexing rewards for the service provider, in PPM
uint32 __DEPRECATED_indexingRewardCut;
// (Deprecated) Percentage of query fees for the delegation pool, in PPM
// (Deprecated) Percentage of query fees for the service provider, in PPM
uint32 __DEPRECATED_queryFeeCut;
// (Deprecated) Block when the delegation parameters were last updated
uint256 __DEPRECATED_updatedAtBlock;
Expand Down
4 changes: 3 additions & 1 deletion packages/horizon/contracts/libraries/PPMMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ library PPMMath {
}

/**
* @notice Multiplies two values, one of which must be in PPM, and rounds up the result.
* @notice Multiplies two values, the second one must be in PPM, and rounds up the result.
* @dev requirements:
* - The second value must be in PPM.
* @param a The first value.
* @param b The second value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ library Allocation {
}

/**
* @notice Checks if an allocation is closed
* @notice Checks if an allocation is alturistic
* @param self The allocation
*/
function isAltruistic(State memory self) internal pure returns (bool) {
Expand Down
3 changes: 3 additions & 0 deletions packages/subgraph-service/contracts/libraries/Attestation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ library Attestation {

// solhint-disable-next-line no-inline-assembly
assembly {
// Load the 32-byte word from memory starting at `_bytes + _start + 1`
// The `0x1` accounts for the fact that we want only the first byte (uint8)
// of the loaded 32 bytes.
tempUint := mload(add(add(_bytes, 0x1), _start))
}

Expand Down

0 comments on commit 2a131ca

Please sign in to comment.