Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel Montenegro <manuel@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
  • Loading branch information
4 people committed Jul 26, 2023
1 parent 374af2c commit 3759907
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions contracts/contracts/Adjudicator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ contract Adjudicator {
mapping (address => uint256) public penaltyHistory;
mapping (bytes32 => bool) public evaluatedCFrags;

uint256[50] private reservedSlots;

/**
* @param _hashAlgorithm Hashing algorithm
* @param _basePenalty Base for the penalty calculation
Expand Down Expand Up @@ -155,7 +153,7 @@ contract Adjudicator {
SignatureVerifier.hashEIP191(stamp, bytes1(0x45)), // Currently, we use version E (0x45) of EIP191 signatures
_operatorIdentityEvidence);
address stakingProvider = application.stakingProviderFromOperator(operator);
require(stakingProvider != address(0), "Operator must be related to a provider");
require(stakingProvider != address(0), "Operator must be associated with a provider");

// 5. Check that staking provider can be slashed
uint96 stakingProviderValue = application.authorizedStake(stakingProvider);
Expand Down
10 changes: 5 additions & 5 deletions contracts/contracts/TACoApplication.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ contract TACoApplication is IApplication, OwnableUpgradeable {
* @param _tStaking T token staking contract
* @param _minimumAuthorization Amount of minimum allowable authorization
* @param _minOperatorSeconds Min amount of seconds while an operator can't be changed
* @param _rewardDuration Duration of one reward cycle
* @param _deauthorizationDuration Duration of decreasing authorization
* @param _rewardDuration Duration of one reward cycle in seconds
* @param _deauthorizationDuration Duration of decreasing authorization in seconds
*/
constructor(
IERC20 _token,
Expand Down Expand Up @@ -229,7 +229,7 @@ contract TACoApplication is IApplication, OwnableUpgradeable {
}

/**
* @notice Set Set adjudicator contract. If zero then slashing is disabled
* @notice Set adjudicator contract. If zero then slashing is disabled
*/
function setAdjudicator(address _adjudicator) external onlyOwner {
require(address(_adjudicator) != address(adjudicator), "New address must not be equal to the current one");
Expand Down Expand Up @@ -285,7 +285,7 @@ contract TACoApplication is IApplication, OwnableUpgradeable {
}

/**
* @notice Returns amount of reward for the staking provider
* @notice Returns amount of reward in T units for the staking provider
* @param _stakingProvider Staking provider address
*/
function availableRewards(address _stakingProvider) public view returns (uint96) {
Expand Down Expand Up @@ -598,7 +598,7 @@ contract TACoApplication is IApplication, OwnableUpgradeable {
/**
* @notice Bond operator
* @param _stakingProvider Staking provider address
* @param _operator Operator address. Must be a real address, not a contract
* @param _operator Operator address. Must be an EOA, not a contract address
*/
function bondOperator(address _stakingProvider, address _operator)
external onlyOwnerOrStakingProvider(_stakingProvider) updateReward(_stakingProvider)
Expand Down
4 changes: 2 additions & 2 deletions contracts/contracts/coordination/IUpdatableStakeInfo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
pragma solidity ^0.8.0;

/**
* @title StakeInfo
* @notice StakeInfo
* @title IUpdatableStakeInfo
* @notice Interface for x-chain interactions between application and coordinator
*/
interface IUpdatableStakeInfo {

Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy_taco_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main(account_id=None):
t_token = deployments_config.get("t_token")

# TODO deploy proxy
pre_app = project.TACoApplication.deploy(
taco_app = project.TACoApplication.deploy(
t_token,
t_staking,
deployments_config.get("pre_min_authorization"),
Expand All @@ -30,4 +30,4 @@ def main(account_id=None):
sender=deployer,
publish=deployments_config.get("verify"),
)
return pre_app
return taco_app

0 comments on commit 3759907

Please sign in to comment.