review line by line this contract to find the correct vulnerabilities //…
- User
review line by line this contract to find the correct vulnerabilities // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.19;
import {ERC20Ubiquity} from "./ERC20Ubiquity.sol"; import {IERC20Ubiquity} from "../../dollar/interfaces/IERC20Ubiquity.sol"; import {IIncentive} from "../../dollar/interfaces/IIncentive.sol";
import "../libraries/Constants.sol";
/**
-
@notice Ubiquity Dollar token contract / contract UbiquityDollarToken is ERC20Ubiquity { /*
- @notice Mapping of account and incentive contract address
- @dev Address is 0 if there is no incentive contract for the account */ mapping(address => address) public incentiveContract;
/// @notice Emitted on setting an incentive contract for an account event IncentiveContractUpdate( address indexed _incentivized, address indexed _incentiveContract );
/// @notice Ensures initialize cannot be called on the implementation contract constructor() { _disableInitializers(); }
/// @notice Initializes the contract /// @param _manager Address of the Ubiquity Manager function initialize(address _manager) public initializer { // cspell: disable-next-line __ERC20Ubiquity_init(_manager, "Ubiquity Dollar", "uAD"); }
// ----------- Modifiers -----------
/// @notice Modifier checks that the method is called by a user with the "Dollar minter" role modifier onlyDollarMinter() { require( accessControl.hasRole(DOLLAR_TOKEN_MINTER_ROLE, _msgSender()), "Dollar token: not minter" ); _; }
/// @notice Modifier checks that the method is called by a user with the "Dollar burner" role modifier onlyDollarBurner() { require( accessControl.hasRole(DOLLAR_TOKEN_BURNER_ROLE, _msgSender()), "Dollar token: not burner" ); _; }
/**
-
@notice Sets
incentivecontract foraccount -
@notice Incentive contracts are applied on Dollar transfers:
-
- EOA => contract
-
- contract => EOA
-
- contract => contract
-
- any transfer global incentive
-
@param account Account to incentivize
-
@param incentive Incentive contract address */ function setIncentiveContract(address account, address incentive) external { require( accessControl.hasRole(GOVERNANCE_TOKEN_MANAGER_ROLE, _msgSender()), "Dollar: must have admin role" );
incentiveContract[account] = incentive; emit IncentiveContractUpdate(account, incentive); }
/**
-
- Assistant
- User
- Assistant