Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0xFcF8eda095e37A41e002E266DaAD7efC1579bc0A
Balance 0 ETH
Nonce 1
Code Size 8371 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

8371 bytes
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c8063641579a6116100f9578063a9059cbb11610097578063f7ea7a3d11610071578063f7ea7a3d146104f0578063f851a4401461050d578063f9f92be414610531578063fe4b84df14610557576101a9565b8063a9059cbb14610470578063cfaaa2661461049c578063dd62ed3e146104c2576101a9565b80638456cb59116100d35780638456cb591461040857806395d89b41146104105780639dc29fac14610418578063a457c2d714610444576101a9565b8063641579a61461039f5780636b713f4f146103bc57806370a08231146103e2576101a9565b8063313ce567116101665780633f4ba83a116101405780633f4ba83a1461033d57806340c10f1914610345578063469519541461037157806352d1902d14610397576101a9565b8063313ce567146102cb57806339509351146102e95780633afada3914610315576101a9565b806306fdde03146101ae578063095ea7b31461022b578063158ef93e1461026b57806318160ddd146102735780631b3ed7221461028d57806323b872dd14610295575b600080fd5b6101b6610574565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f05781810151838201526020016101d8565b50505050905090810190601f16801561021d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102576004803603604081101561024157600080fd5b506001600160a01b038135169060200135610602565b604080519115158252519081900360200190f35b61025761073e565b61027b610747565b60408051918252519081900360200190f35b61027b610771565b610257600480360360608110156102ab57600080fd5b506001600160a01b03813581169160208101359091169060400135610777565b6102d3610937565b6040805160ff9092168252519081900360200190f35b610257600480360360408110156102ff57600080fd5b506001600160a01b03813516906020013561093c565b61033b6004803603602081101561032b57600080fd5b50356001600160a01b0316610a71565b005b61033b610b14565b6102576004803603604081101561035b57600080fd5b506001600160a01b038135169060200135610b70565b61033b6004803603602081101561038757600080fd5b50356001600160a01b0316610c45565b61027b610d18565b61033b600480360360208110156103b557600080fd5b5035610d3c565b61033b600480360360208110156103d257600080fd5b50356001600160a01b0316610e51565b61027b600480360360208110156103f857600080fd5b50356001600160a01b0316610efc565b61033b610f3a565b6101b6610f9c565b6102576004803603604081101561042e57600080fd5b506001600160a01b038135169060200135610ff7565b6102576004803603604081101561045a57600080fd5b506001600160a01b0381351690602001356110bf565b6102576004803603604081101561048657600080fd5b506001600160a01b0381351690602001356111fd565b61033b600480360360208110156104b257600080fd5b50356001600160a01b0316611329565b61027b600480360360408110156104d857600080fd5b506001600160a01b0381358116916020013516611478565b61033b6004803603602081101561050657600080fd5b50356114c6565b6105156115ab565b604080516001600160a01b039092168252519081900360200190f35b6102576004803603602081101561054757600080fd5b50356001600160a01b03166115ba565b61033b6004803603602081101561056d57600080fd5b50356115cf565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105fa5780601f106105cf576101008083540402835291602001916105fa565b820191906000526020600020905b8154815290600101906020018083116105dd57829003601f168201915b505050505081565b6001600160a01b038216600090815260036020526040812054839060ff1615610660576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b3360008181526003602052604090205460ff16156106b3576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b600854600160a01b900460ff1615610700576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b60075460009085906107249061071e83670de0b6b3a7640000611650565b906116a9565b91506107313388836116eb565b5060019695505050505050565b60005460ff1681565b600061076c670de0b6b3a764000061071e60075460045461165090919063ffffffff16565b905090565b60075481565b6001600160a01b038316600090815260036020526040812054849060ff16156107d5576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615610828576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b6001600160a01b038516600090815260036020526040902054859060ff1615610886576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b600854600160a01b900460ff16156108d3576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b60006108e6886108e16117fa565b611478565b90506108f38888886117fe565b610929886108ff6117fa565b61092489604051806060016040528060288152602001611efc6028913986919061196f565b6116eb565b506001979650505050505050565b601281565b6001600160a01b038216600090815260036020526040812054839060ff161561099a576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b3360008181526003602052604090205460ff16156109ed576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b600854600160a01b900460ff1615610a3a576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b6000610a4d610a476117fa565b87611478565b9050610a65610a5a6117fa565b876109248489611a06565b50600195945050505050565b6008546001600160a01b03163314610abe576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b6001600160a01b0381166000818152600360209081526040808320805460ff191690558051928352517fa901296c036b6de8ffbc2c88ea69148c9af9fe1e370cb31f77f3e377d6e680399281900390910190a250565b6008546001600160a01b03163314610b61576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b6008805460ff60a01b19169055565b6008546000906001600160a01b03163314610bc0576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b600854600160a01b900460ff1615610c0d576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b6007548290600090610c2b9061071e84670de0b6b3a7640000611650565b9050610c38858284611a60565b6001925050505b92915050565b6008546001600160a01b03163314610c92576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b60005460ff161515600114610cd85760405162461bcd60e51b8152600401808060200182810382526033815260200180611fa36033913960400191505060405180910390fd5b610ce181611b47565b6040516001600160a01b038216907f34459cf4c63f38e9b4af4ff8f74035bad6157484e669ffde70188afdf9917c6890600090a250565b7fc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf790565b6008546001600160a01b03163314610d89576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b600854600160a01b900460ff1615610dd6576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b6007548111610e165760405162461bcd60e51b8152600401808060200182810382526039815260200180611f246039913960400191505060405180910390fd5b60078190556040805182815290517fd1ac89bfc464ce49c894c4e2379f1ca2b062aff1a640e929764ac1157fa13f0f9181900360200190a150565b6008546001600160a01b03163314610e9e576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b6001600160a01b038116600081815260036020908152604091829020805460ff19166001908117909155825190815291517fa901296c036b6de8ffbc2c88ea69148c9af9fe1e370cb31f77f3e377d6e680399281900390910190a250565b6007546001600160a01b03821660009081526001602052604081205490918291610f3391670de0b6b3a76400009161071e91611650565b9392505050565b6008546001600160a01b03163314610f87576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b6008805460ff60a01b1916600160a01b179055565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105fa5780601f106105cf576101008083540402835291602001916105fa565b6008546000906001600160a01b03163314611047576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b600854600160a01b900460ff1615611094576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b60075460009083906110b29061071e83670de0b6b3a7640000611650565b9150610c38858383611c34565b6001600160a01b038216600090815260036020526040812054839060ff161561111d576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615611170576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b600854600160a01b900460ff16156111bd576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b60006111ca610a476117fa565b9050610a656111d76117fa565b87610924886040518060600160405280602581526020016120596025913986919061196f565b3360008181526003602052604081205490919060ff1615611253576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b6001600160a01b038416600090815260036020526040902054849060ff16156112b1576040805162461bcd60e51b81526020600482015260166024820152600080516020611ebb833981519152604482015290519081900360640190fd5b600854600160a01b900460ff16156112fe576040805162461bcd60e51b81526020600482015260166024820152600080516020611dff833981519152604482015290519081900360640190fd5b600754600090859061131c9061071e83670de0b6b3a7640000611650565b91506107313388836117fe565b6008546001600160a01b03163314611376576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b6001600160a01b0381166113d1576040805162461bcd60e51b815260206004820152601e60248201527f6163636f756e742063616e6e6f74206265207a65726f20616464726573730000604482015290519081900360640190fd5b6008546001600160a01b0316331461141e576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f7ce7ec0b50378fb6c0186ffb5f48325f6593fcb4ca4386f21861af3129188f5c916020908290030190a150565b6007546001600160a01b038084166000908152600260209081526040808320938616835292905290812054909182916114be91670de0b6b3a76400009161071e91611650565b949350505050565b6008546001600160a01b03163314611513576040805162461bcd60e51b81526020600482015260156024820152600080516020611ffa833981519152604482015290519081900360640190fd5b61151b610747565b81116115585760405162461bcd60e51b815260040180806020018281038252603f81526020018061201a603f913960400191505060405180910390fd5b6004546115719061071e83670de0b6b3a7640000611650565b600781905560408051918252517fd1ac89bfc464ce49c894c4e2379f1ca2b062aff1a640e929764ac1157fa13f0f9181900360200190a150565b6008546001600160a01b031681565b60036020526000908152604090205460ff1681565b60005460ff16156116115760405162461bcd60e51b8152600401808060200182810382526029815260200180611e926029913960400191505060405180910390fd5b611619611d25565b600880546001600160a01b03191633908117909155670de0b6b3a76400006007556004829055600090815260016020526040902055565b60008261165f57506000610c3f565b8282028284828161166c57fe5b0414610f335760405162461bcd60e51b8152600401808060200182810382526021815260200180611edb6021913960400191505060405180910390fd5b6000610f3383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d34565b6001600160a01b0383166117305760405162461bcd60e51b8152600401808060200182810382526024815260200180611fd66024913960400191505060405180910390fd5b6001600160a01b0382166117755760405162461bcd60e51b8152600401808060200182810382526022815260200180611e4a6022913960400191505060405180910390fd5b6007546000906117919061071e84670de0b6b3a7640000611650565b6001600160a01b0380861660008181526002602090815260408083209489168084529482529182902085905581518781529151949550929391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92592918290030190a350505050565b3390565b6001600160a01b0383166118435760405162461bcd60e51b8152600401808060200182810382526025815260200180611f7e6025913960400191505060405180910390fd5b6001600160a01b0382166118885760405162461bcd60e51b8152600401808060200182810382526023815260200180611ddc6023913960400191505060405180910390fd5b6007546000906118a49061071e84670de0b6b3a7640000611650565b90506118e3816040518060600160405280602b8152602001611e1f602b91396001600160a01b038716600090815260016020526040902054919061196f565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546119129082611a06565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350505050565b600081848411156119fe5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119c35781810151838201526020016119ab565b50505050905090810190601f1680156119f05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610f33576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038316611abb576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600454611ac89083611a06565b6004556001600160a01b038316600090815260016020526040902054611aee9083611a06565b6001600160a01b03841660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b806001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b8057600080fd5b505afa158015611b94573d6000803e3d6000fd5b505050506040513d6020811015611baa57600080fd5b50517fc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf714611c10576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420636f6d70617469626c6560901b604482015290519081900360640190fd5b7fc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf755565b6001600160a01b038316611c795760405162461bcd60e51b8152600401808060200182810382526021815260200180611f5d6021913960400191505060405180910390fd5b611cb682604051806060016040528060268152602001611e6c602691396001600160a01b038616600090815260016020526040902054919061196f565b6001600160a01b038416600090815260016020526040902055600454611cdc9083611d99565b6004556040805182815290516000916001600160a01b038616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505050565b6000805460ff19166001179055565b60008183611d835760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156119c35781810151838201526020016119ab565b506000838581611d8f57fe5b0495945050505050565b6000610f3383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061196f56fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737374686520636f6e7472616374206973207061757365640000000000000000000045524332303a207472616e7366657220696e7465726e616c416d7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e20696e7465726e61416d7420657863656564732062616c616e6365546865206c6962726172792068617320616c7265616479206265656e20696e697469616c697a65642e6163636f756e7420697320626c61636b6c697374656400000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365746865206d756c7469706c6965722073686f756c642062652067726561746572207468616e2070726576696f7573206d756c7469706c69657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373546865206c696272617279206973206c6f636b65642e204e6f20646972656374202763616c6c2720697320616c6c6f7765642e45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373796f7520617265206e6f74207468652061646d696e000000000000000000000074686520696e70757420746f74616c20737570706c79206973206e6f742067726561746572207468616e2070726573656e7420746f74616c20737570706c7945524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220972ee3df937ffd8a3f679d5449372d23f4de04e74059671aad74998653fae24264736f6c634300060c0033

Verified Source Code Partial Match

Compiler: v0.6.12+commit.27d51765 EVM: istanbul Optimization: Yes (200 runs)
FLEXCoin.sol 639 lines
// File contracts/CoinFLEX/Context.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

abstract contract Context {
  // Empty internal constructor, to prevent people from mistakenly deploying
  // an instance of this contract, which should be used via inheritance.
  constructor() internal {}

  function _msgSender() internal view returns (address payable) {
    return msg.sender;
  }

  function _msgData() internal view returns (bytes memory) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }
}


// File contracts/CoinFLEX/IERC20.sol

interface IERC20 {
  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns the amount of tokens owned by `account`.
   */
  function balanceOf(address account) external view returns (uint256);

  /**
   * @dev Moves `amount` tokens from the caller's account to `recipient`.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transfer(address recipient, uint256 amount)
    external
    returns (bool);

  /**
   * @dev Returns the remaining number of tokens that `spender` will be
   * allowed to spend on behalf of `owner` through {transferFrom}. This is
   * zero by default.
   *
   * This value changes when {approve} or {transferFrom} are called.
   */
  function allowance(address owner, address spender)
    external
    view
    returns (uint256);

  /**
   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * IMPORTANT: Beware that changing an allowance with this method brings the risk
   * that someone may use both the old and the new allowance by unfortunate
   * transaction ordering. One possible solution to mitigate this race
   * condition is to first reduce the spender's allowance to 0 and set the
   * desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   *
   * Emits an {Approval} event.
   */
  function approve(address spender, uint256 amount) external returns (bool);

  /**
   * @dev Moves `amount` tokens from `sender` to `recipient` using the
   * allowance mechanism. `amount` is then deducted from the caller's
   * allowance.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  ) external returns (bool);

  /**
   * @dev Emitted when `value` tokens are moved from one account (`from`) to
   * another (`to`).
   *
   * Note that `value` may be zero.
   */
  event Transfer(address indexed from, address indexed to, uint256 value);

  /**
   * @dev Emitted when the allowance of a `spender` for an `owner` is set by
   * a call to {approve}. `value` is the new allowance.
   */
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}


// File contracts/CoinFLEX/Storage.sol

contract Storage {
  /** 
   * @dev WARNING: NEVER RE-ORDER VARIABLES! 
   *  Always double-check that new variables are added APPEND-ONLY.
   *  Re-ordering variables can permanently BREAK the deployed proxy contract.
   */
  bool public initialized;
  mapping(address => uint256) internal _balances;
  mapping(address => mapping(address => uint256)) internal _allowances;
  mapping(address => bool) public blacklist;
  uint256 internal _totalSupply;
  string public name;
  string public symbol;
  uint256 public multiplier;
  uint8 public constant decimals = 18;
  address public admin;
  uint256 internal constant deci = 1e18;
  bool internal getpause;

  constructor(string memory _name, string memory _symbol) public {
    name = _name;
    symbol = _symbol;
  }
}


// File contracts/CoinFLEX/LibertyLock.sol

abstract contract LibraryLock is Storage {
  // Ensures no one can manipulate the Logic Contract once it is deployed.	
  // PARITY WALLET HACK PREVENTION	

  modifier delegatedOnly() {	
    require(	
      initialized == true,
      "The library is locked. No direct 'call' is allowed."	
    );	
    _;	
  }

  function initialize() internal {	
    initialized = true;	
  }
}


// File contracts/CoinFLEX/Proxiable.sol


contract Proxiable {
  // Code position in storage is keccak256("PROXIABLE") = "0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7"

  function updateCodeAddress(address newAddress) internal {
    require(
      bytes32(
        0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7
      ) == Proxiable(newAddress).proxiableUUID(),
      'Not compatible'
    );
    assembly {
      // solium-disable-line
      sstore(
        0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7,
        newAddress
      )
    }
  }

  function proxiableUUID() public pure returns (bytes32) {
    return
      0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7;
  }
}


// File contracts/CoinFLEX/SafeMath.sol


library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, "SafeMath: subtraction overflow");
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;

    return c;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, "SafeMath: division by zero");
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, "SafeMath: modulo by zero");
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts with custom message when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}


// File contracts/CoinFLEX/FlexCoin.sol

contract FLEXCoin is Storage, Context, IERC20, Proxiable, LibraryLock {	
  using SafeMath for uint256;

  event TokenBlacklist(address indexed account, bool blocked);
  event ChangeMultiplier(uint256 multiplier);
  event AdminChanged(address admin);
  event CodeUpdated(address indexed newCode);	

  constructor() Storage("FLEX Coin", "FLEX") public {}

  function initialize(uint256 _totalsupply) public {
    require(!initialized, "The library has already been initialized.");	
    LibraryLock.initialize();
    admin = msg.sender;
    multiplier = 1 * deci;
    _totalSupply = _totalsupply;
    _balances[msg.sender] = _totalSupply;
  }

  /// @dev Update the logic contract code	
  function updateCode(address newCode) external onlyAdmin delegatedOnly {	
    updateCodeAddress(newCode);	
    emit CodeUpdated(newCode);	
  }

  function setMultiplier(uint256 _multiplier)
    external
    onlyAdmin()
    ispaused()
  {
    require(
      _multiplier > multiplier,
      "the multiplier should be greater than previous multiplier"
    );
    multiplier = _multiplier;
    emit ChangeMultiplier(multiplier);
  }

  function totalSupply() public override view returns (uint256) {
    return _totalSupply.mul(multiplier).div(deci);
  }

  function setTotalSupply(uint256 inputTotalsupply) external onlyAdmin() {
    require(
      inputTotalsupply > totalSupply(),
      "the input total supply is not greater than present total supply"
    );
    multiplier = (inputTotalsupply.mul(deci)).div(_totalSupply);
    emit ChangeMultiplier(multiplier);
  }

  function balanceOf(address account) public override view returns (uint256) {
    uint256 externalAmt;
    externalAmt = _balances[account].mul(multiplier).div(deci);
    return externalAmt;
  }

  function transfer(address recipient, uint256 amount)
    public
    virtual
    override
    Notblacklist(msg.sender)
    Notblacklist(recipient)
    ispaused()
    returns (bool)
  {
    uint256 internalAmt;
    uint256 externalAmt = amount;
    internalAmt = (amount.mul(deci)).div(multiplier);

    _transfer(msg.sender, recipient, externalAmt);
    return true;
  }

  function allowance(address owner, address spender)
    public
    virtual
    override
    view
    returns (uint256)
  {
    uint256 internalAmt;
    internalAmt = (_allowances[owner][spender]).mul(multiplier).div(deci);
    return internalAmt;
  }

  function approve(address spender, uint256 amount)
    public
    virtual
    override
    Notblacklist(spender)
    Notblacklist(msg.sender)
    ispaused()
    returns (bool)
  {
    uint256 internalAmt;
    uint256 externalAmt = amount;
    internalAmt = externalAmt.mul(deci).div(multiplier);
    _approve(msg.sender, spender, externalAmt);
    return true;
  }
  
    /**
   * @dev Atomically increases the allowance granted to `spender` by the caller.
   *
   * This is an alternative to {approve} that can be used as a mitigation for
   * problems described in {IERC20-approve}.
   *
   * Emits an {Approval} event indicating the updated allowance.
   *
   * Requirements:
   *
   * - `spender` cannot be the zero address.
   */
  function increaseAllowance(address spender, uint256 addedValue) public 
    Notblacklist(spender)
    Notblacklist(msg.sender)
    ispaused()  
    returns (bool) {
     uint256 externalAmt = allowance(_msgSender(),spender) ;
    _approve(_msgSender(), spender, externalAmt.add(addedValue));
    return true;
  }

  /**
   * @dev Atomically decreases the allowance granted to `spender` by the caller.
   *
   * This is an alternative to {approve} that can be used as a mitigation for
   * problems described in {IERC20-approve}.
   *
   * Emits an {Approval} event indicating the updated allowance.
   *
   * Requirements:
   *
   * - `spender` cannot be the zero address.
   * - `spender` must have allowance for the caller of at least
   * `subtractedValue`.
   */
  function decreaseAllowance(address spender, uint256 subtractedValue) public 
    Notblacklist(spender)
    Notblacklist(msg.sender)
    ispaused() 
    returns (bool) {
    uint256 externalAmt = allowance(_msgSender(),spender) ;
    _approve(_msgSender(), spender, externalAmt.sub(subtractedValue, "ERC20: decreased allowance below zero"));
    return true;
  }

  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  )
    public
    virtual
    override
    Notblacklist(sender)
    Notblacklist(msg.sender)
    Notblacklist(recipient)
    ispaused()
    returns (bool)
  {
    uint256 externalAmt = allowance(sender,_msgSender());
    _transfer(sender, recipient, amount);
    _approve(
      sender,
      _msgSender(),
       externalAmt.sub(
        amount,
        "ERC20: transfer amount exceeds allowance"
      )
    );
    return true;
  }

  function _transfer(
    address sender,
    address recipient,
    uint256 externalAmt
  ) internal virtual {
    require(sender != address(0), "ERC20: transfer from the zero address");
    require(recipient != address(0), "ERC20: transfer to the zero address");
    uint256 internalAmt = externalAmt.mul(deci).div(multiplier);
    _balances[sender] = _balances[sender].sub(
      internalAmt,
      "ERC20: transfer internalAmt exceeds balance"
    );
    _balances[recipient] = _balances[recipient].add(internalAmt);
    emit Transfer(sender, recipient, externalAmt);
  }

  function mint(address mintTo, uint256 amount)
    public
    virtual
    onlyAdmin()
    ispaused()
    returns (bool)
  {
    uint256 externalAmt = amount;
    uint256 internalAmt = externalAmt.mul(deci).div(multiplier);
    _mint(mintTo, internalAmt, externalAmt);
    return true;
  }

  function _mint(
    address account,
    uint256 internalAmt,
    uint256 externalAmt
  ) internal virtual {
    require(account != address(0), "ERC20: mint to the zero address");

    _totalSupply = _totalSupply.add(internalAmt);
    _balances[account] = _balances[account].add(internalAmt);
    emit Transfer(address(0), account, externalAmt);
  }

  function burn(address burnFrom, uint256 amount)
    public
    virtual
    onlyAdmin()
    ispaused()
    returns (bool)
  {
    uint256 internalAmt;
    uint256 externalAmt = amount;
    internalAmt = externalAmt.mul(deci).div(multiplier);

    _burn(burnFrom, internalAmt, externalAmt);
    return true;
  }

  function _burn(
    address account,
    uint256 internalAmt,
    uint256 externalAmt
  ) internal virtual {
    require(account != address(0), "ERC20: burn from the zero address");

    _balances[account] = _balances[account].sub(
      internalAmt,
      "ERC20: burn internaAmt exceeds balance"
    );
    _totalSupply = _totalSupply.sub(internalAmt);
    emit Transfer(account, address(0), externalAmt);
  }

  function _approve(
    address owner,
    address spender,
    uint256 externalAmt
  ) internal virtual {
    require(owner != address(0), "ERC20: approve from the zero address");
    require(spender != address(0), "ERC20: approve to the zero address");
    uint256 internalAmt = externalAmt.mul(deci).div(multiplier);
    _allowances[owner][spender] = internalAmt;
    emit Approval(owner, spender,externalAmt);
  }

  function TransferOwnership(address account) public onlyAdmin() {
    require(account != address(0), "account cannot be zero address");
    require(msg.sender == admin, "you are not the admin");
    admin = account;
    emit AdminChanged(admin);
  }

  function pause() external onlyAdmin() {
    getpause = true;
  }

  function unpause() external onlyAdmin() {
    getpause = false;
  }

  // pause unpause

  modifier ispaused() {
    require(getpause == false, "the contract is paused");
    _;
  }

  modifier onlyAdmin() {
    require(msg.sender == admin, "you are not the admin");
    _;
  }

  function AddToBlacklist(address account) external onlyAdmin() {
    blacklist[account] = true;
    emit TokenBlacklist(account, true);
  }

  function RemoveFromBlacklist(address account) external onlyAdmin() {
    blacklist[account] = false;
    emit TokenBlacklist(account, false);
  }

  modifier Notblacklist(address account) {
    require(!blacklist[account], "account is blacklisted");
    _;
  }
}

Read Contract

admin 0xf851a440 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blacklist 0xf9f92be4 → bool
decimals 0x313ce567 → uint8
initialized 0x158ef93e → bool
multiplier 0x1b3ed722 → uint256
name 0x06fdde03 → string
proxiableUUID 0x52d1902d → bytes32
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 16 functions

These functions modify contract state and require a wallet transaction to execute.

AddToBlacklist 0x6b713f4f
address account
RemoveFromBlacklist 0x3afada39
address account
TransferOwnership 0xcfaaa266
address account
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x9dc29fac
address burnFrom
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
initialize 0xfe4b84df
uint256 _totalsupply
mint 0x40c10f19
address mintTo
uint256 amount
returns: bool
pause 0x8456cb59
No parameters
setMultiplier 0x641579a6
uint256 _multiplier
setTotalSupply 0xf7ea7a3d
uint256 inputTotalsupply
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
unpause 0x3f4ba83a
No parameters
updateCode 0x46951954
address newCode

Recent Transactions

No transactions found for this address