- Contract name:
- VoteTokenImplementation
- Optimization enabled
- false
- Compiler version
- v0.5.5+commit.47a71e8f
- EVM Version
- default
- Verified at
- 2023-10-05T10:31:14.928728Z
Contract source code
// File: @openzeppelin/upgrades/contracts/Initializable.sol pragma solidity ^0.5.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Detailed.sol /** * @dev Optional functions from the ERC20 standard. */ contract ERC20Detailed is Initializable, IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ function initialize(string memory name, string memory symbol, uint8 decimals) public initializer { _name = name; _symbol = symbol; _decimals = decimals; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks 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: @openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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. * * _Available since v2.4.0._ */ 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. * * _Available since v2.4.0._ */ 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Initializable, Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); 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 returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].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 returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/access/Roles.sol /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } // File: @openzeppelin/contracts-ethereum-package/contracts/access/roles/MinterRole.sol contract MinterRole is Initializable, Context { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private _minters; function initialize(address sender) public initializer { if (!isMinter(sender)) { _addMinter(sender); } } modifier onlyMinter() { require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role"); _; } function isMinter(address account) public view returns (bool) { return _minters.has(account); } function addMinter(address account) public onlyMinter { _addMinter(account); } function renounceMinter() public { _removeMinter(_msgSender()); } function _addMinter(address account) internal { _minters.add(account); emit MinterAdded(account); } function _removeMinter(address account) internal { _minters.remove(account); emit MinterRemoved(account); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Mintable.sol /** * @dev Extension of {ERC20} that adds a set of accounts with the {MinterRole}, * which have permission to mint (create) new tokens as they see fit. * * At construction, the deployer of the contract is the only minter. */ contract ERC20Mintable is Initializable, ERC20, MinterRole { function initialize(address sender) public initializer { MinterRole.initialize(sender); } /** * @dev See {ERC20-_mint}. * * Requirements: * * - the caller must have the {MinterRole}. */ function mint(address account, uint256 amount) public onlyMinter returns (bool) { _mint(account, amount); return true; } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/access/roles/PauserRole.sol contract PauserRole is Initializable, Context { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private _pausers; function initialize(address sender) public initializer { if (!isPauser(sender)) { _addPauser(sender); } } modifier onlyPauser() { require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role"); _; } function isPauser(address account) public view returns (bool) { return _pausers.has(account); } function addPauser(address account) public onlyPauser { _addPauser(account); } function renouncePauser() public { _removePauser(_msgSender()); } function _addPauser(address account) internal { _pausers.add(account); emit PauserAdded(account); } function _removePauser(address account) internal { _pausers.remove(account); emit PauserRemoved(account); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/lifecycle/Pausable.sol /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ contract Pausable is Initializable, Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. Assigns the Pauser role * to the deployer. */ function initialize(address sender) public initializer { PauserRole.initialize(sender); _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } /** * @dev Called by a pauser to pause, triggers stopped state. */ function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Called by a pauser to unpause, returns to normal state. */ function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Pausable.sol /** * @title Pausable token * @dev ERC20 with pausable transfers and allowances. * * Useful if you want to stop trades until the end of a crowdsale, or have * an emergency switch for freezing all token transfers in the event of a large * bug. */ contract ERC20Pausable is Initializable, ERC20, Pausable { function initialize(address sender) public initializer { Pausable.initialize(sender); } function transfer(address to, uint256 value) public whenNotPaused returns (bool) { return super.transfer(to, value); } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { return super.transferFrom(from, to, value); } function approve(address spender, uint256 value) public whenNotPaused returns (bool) { return super.approve(spender, value); } function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) { return super.increaseAllowance(spender, addedValue); } function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) { return super.decreaseAllowance(spender, subtractedValue); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/StandaloneERC20.sol /** * @title Standard ERC20 token, with minting and pause functionality. * */ contract StandaloneERC20 is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pausable { function initialize( string memory name, string memory symbol, uint8 decimals, uint256 initialSupply, address initialHolder, address[] memory minters, address[] memory pausers ) public initializer { ERC20Detailed.initialize(name, symbol, decimals); // Mint the initial supply _mint(initialHolder, initialSupply); // Initialize the minter and pauser roles, and renounce them ERC20Mintable.initialize(address(this)); _removeMinter(address(this)); ERC20Pausable.initialize(address(this)); _removePauser(address(this)); // Add the requested minters and pausers (this can be done after renouncing since // these are the internal calls) for (uint256 i = 0; i < minters.length; ++i) { _addMinter(minters[i]); } for (uint256 i = 0; i < pausers.length; ++i) { _addPauser(pausers[i]); } } function initialize( string memory name, string memory symbol, uint8 decimals, address[] memory minters, address[] memory pausers ) public initializer { ERC20Detailed.initialize(name, symbol, decimals); // Initialize the minter and pauser roles, and renounce them ERC20Mintable.initialize(address(this)); _removeMinter(address(this)); ERC20Pausable.initialize(address(this)); _removePauser(address(this)); // Add the requested minters and pausers (this can be done after renouncing since // these are the internal calls) for (uint256 i = 0; i < minters.length; ++i) { _addMinter(minters[i]); } for (uint256 i = 0; i < pausers.length; ++i) { _addPauser(pausers[i]); } } } // File: contracts/lib/ArrayListLib.sol library ArrayListLib { struct ListItem { uint256 index; address item; } struct StoredList { mapping(address => ListItem) storageMap; bool initialized; address[] storageList; } function add(StoredList storage self, address _address) internal { if (!exists(self, _address)) { ListItem memory item = ListItem(self.storageList.length + 1,_address); self.storageList.push(_address); self.storageMap[_address] = item; } } function exists(StoredList storage self, address _address) internal view returns (bool) { return self.storageMap[_address].index > 0; } function remove(StoredList storage self, address _address) internal { if (exists(self, _address)) { uint lastIndex = self.storageList.length; if (lastIndex != self.storageMap[_address].index) { self.storageMap[self.storageList[lastIndex - 1]].index = self.storageMap[_address].index; self.storageList[self.storageMap[_address].index - 1] = self.storageList[lastIndex - 1]; } self.storageList.length--; } delete self.storageMap[_address]; } function getItems(StoredList storage self) internal view returns (address[] memory items) { return self.storageList; } } // File: contracts/VoteTokenImplementation.sol contract VoteTokenImplementation is Initializable, StandaloneERC20 { using ArrayListLib for ArrayListLib.StoredList; ArrayListLib.StoredList private surveys; ArrayListLib.StoredList private ownersList; ArrayListLib.StoredList private exclusionList; address private owner; bool private initializedByProxy; modifier onlyOwner { require(msg.sender == owner, 'Not allowed to call this method'); _; } constructor() public { initializedByProxy = true; } function initialize( string memory name, string memory symbol, uint8 decimals, uint256 initialSupply, address initialHolder, address[] memory minters, address[] memory pausers ) public initializer { require(!initializedByProxy, "already initialized"); owner = initialHolder; exclusionList.add(initialHolder); StandaloneERC20.initialize(name, symbol, decimals, initialSupply, initialHolder, minters, pausers); } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { bool transferResult = super.transferFrom(sender, recipient, amount); if( balanceOf(recipient) > 0 && //has positive balance !ownersList.exists(recipient) //not added already to owners list ) { ownersList.add(recipient); } //sender's balance is 0, taking it out from owners' list if(balanceOf(sender) == 0 && ownersList.exists(sender)) { ownersList.remove(sender); } return transferResult; } function transfer(address recipient, uint256 amount) public returns (bool) { address _from = msg.sender; bool transferResult = super.transfer(recipient, amount); if( balanceOf(recipient) > 0 && //has positive balance !ownersList.exists(recipient) && //not added already to owners list recipient != owner //not adding the owner to this list ) { ownersList.add(recipient); } //sender's balance is 0, taking it out from owners' list if(balanceOf(_from) == 0 && ownersList.exists(_from)) { ownersList.remove(_from); } return transferResult; } function registerSurvey(address _survey) public { surveys.add(_survey); } function unregisterSurvey(address _survey) public { surveys.remove(_survey); } function isSurveyRegistered(address _survey) public view returns (bool) { return surveys.exists(_survey); } function batchTransfer(address payable _from, address[] memory _to, uint256[] memory _values) public { uint256 toLength = _to.length; require(toLength == _values.length, "Batches counters do not match"); for (uint index = 0; index < toLength; index++) { if (_from == msg.sender) { transfer(_to[index], _values[index]); } else { transferFrom(_from, _to[index], _values[index]); } } } function getCirculatingSupply(uint256 offset, uint256 count, uint256 cap) public view returns (uint256) { uint256 balance; uint256 circulatingSupply; uint256 totalCount; uint256 adjustSupply; if (offset >= ownersList.storageList.length) { return 0; } totalCount = offset + count > ownersList.storageList.length ? ownersList.storageList.length : offset + count; for (uint256 index = offset; index < totalCount; index++) { balance = balanceOf(ownersList.storageList[index]); adjustSupply = cap > balance ? balance : cap; circulatingSupply = circulatingSupply + adjustSupply; } return circulatingSupply; } function getOwnersCount() external view returns (uint) { return ownersList.storageList.length; } function getOwner() public view returns (address tokenOwner) { return owner; } function burn(address account, uint256 value) public onlyOwner { require(account == owner, 'Not allowed to burn tokens from non-owner'); super._burn(account, value); } function version() public pure returns (uint) { return 8; } }
Contract ABI
[{"type":"constructor","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addMinter","inputs":[{"type":"address","name":"account"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addPauser","inputs":[{"type":"address","name":"account"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"allowance","inputs":[{"type":"address","name":"owner"},{"type":"address","name":"spender"}],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"approve","inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"value"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"balanceOf","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"batchTransfer","inputs":[{"type":"address","name":"_from"},{"type":"address[]","name":"_to"},{"type":"uint256[]","name":"_values"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"address","name":"account"},{"type":"uint256","name":"value"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":""}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"subtractedValue"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"getCirculatingSupply","inputs":[{"type":"uint256","name":"offset"},{"type":"uint256","name":"count"},{"type":"uint256","name":"cap"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"tokenOwner"}],"name":"getOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"getOwnersCount","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"addedValue"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name"},{"type":"string","name":"symbol"},{"type":"uint8","name":"decimals"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name"},{"type":"string","name":"symbol"},{"type":"uint8","name":"decimals"},{"type":"address[]","name":"minters"},{"type":"address[]","name":"pausers"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name"},{"type":"string","name":"symbol"},{"type":"uint8","name":"decimals"},{"type":"uint256","name":"initialSupply"},{"type":"address","name":"initialHolder"},{"type":"address[]","name":"minters"},{"type":"address[]","name":"pausers"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"sender"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"isMinter","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"isPauser","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"isSurveyRegistered","inputs":[{"type":"address","name":"_survey"}],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"mint","inputs":[{"type":"address","name":"account"},{"type":"uint256","name":"amount"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":""}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"paused","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"registerSurvey","inputs":[{"type":"address","name":"_survey"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceMinter","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renouncePauser","inputs":[],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":""}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"transfer","inputs":[{"type":"address","name":"recipient"},{"type":"uint256","name":"amount"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"transferFrom","inputs":[{"type":"address","name":"sender"},{"type":"address","name":"recipient"},{"type":"uint256","name":"amount"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unregisterSurvey","inputs":[{"type":"address","name":"_survey"}],"constant":false},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":""}],"name":"version","inputs":[],"constant":true},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"spender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"MinterAdded","inputs":[{"type":"address","name":"account","indexed":true}],"anonymous":false},{"type":"event","name":"MinterRemoved","inputs":[{"type":"address","name":"account","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","indexed":false}],"anonymous":false},{"type":"event","name":"PauserAdded","inputs":[{"type":"address","name":"account","indexed":true}],"anonymous":false},{"type":"event","name":"PauserRemoved","inputs":[{"type":"address","name":"account","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","indexed":false}],"anonymous":false}]
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636ef8d66d1161011a578063983b2d56116100ad578063a9059cbb1161007c578063a9059cbb146110ac578063aa271e1a14611112578063c12153f11461116e578063c4d66de8146111ca578063dd62ed3e1461120e57610206565b8063983b2d5614610faa5780639865027514610fee5780639dc29fac14610ff8578063a457c2d71461104657610206565b806382dc1ec4116100e957806382dc1ec414610e8f5780638456cb5914610ed3578063893d20e814610edd57806395d89b4114610f2757610206565b80636ef8d66d14610dcb57806370a0823114610dd557806373ff81cc14610e2d57806374eb8c0114610e4b57610206565b8063395093511161019d57806346fbf68e1161016c57806346fbf68e14610a2857806348be01c614610a845780634b6df33e14610d3557806354fd4d5014610d8b5780635c975abb14610da957610206565b8063395093511461090e5780633f4ba83a1461097457806340c10f191461097e5780634660259d146109e457610206565b806318160ddd116101d957806318160ddd146105bf57806323b872dd146105dd57806331392b4a14610663578063313ce567146108ea57610206565b806306fdde031461020b578063095ea7b31461028e5780631239ec8c146102f45780631624f6c614610460575b600080fd5b610213611286565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610253578082015181840152602081019050610238565b50505050905090810190601f1680156102805780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102da600480360360408110156102a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611328565b604051808215151515815260200191505060405180910390f35b61045e6004803603606081101561030a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561034757600080fd5b82018360208201111561035957600080fd5b8035906020019184602083028401116401000000008311171561037b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103db57600080fd5b8201836020820111156103ed57600080fd5b8035906020019184602083028401116401000000008311171561040f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506113c2565b005b6105bd6004803603606081101561047657600080fd5b810190808035906020019064010000000081111561049357600080fd5b8201836020820111156104a557600080fd5b803590602001918460018302840111640100000000831117156104c757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561052a57600080fd5b82018360208201111561053c57600080fd5b8035906020019184600183028401116401000000008311171561055e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff16906020019092919050505061150f565b005b6105c761165c565b6040518082815260200191505060405180910390f35b610649600480360360608110156105f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611666565b604051808215151515815260200191505060405180910390f35b6108e8600480360360a081101561067957600080fd5b810190808035906020019064010000000081111561069657600080fd5b8201836020820111156106a857600080fd5b803590602001918460018302840111640100000000831117156106ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561072d57600080fd5b82018360208201111561073f57600080fd5b8035906020019184600183028401116401000000008311171561076157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff169060200190929190803590602001906401000000008111156107d157600080fd5b8201836020820111156107e357600080fd5b8035906020019184602083028401116401000000008311171561080557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561086557600080fd5b82018360208201111561087757600080fd5b8035906020019184602083028401116401000000008311171561089957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061170a565b005b6108f26118b5565b604051808260ff1660ff16815260200191505060405180910390f35b61095a6004803603604081101561092457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506118cc565b604051808215151515815260200191505060405180910390f35b61097c611966565b005b6109ca6004803603604081101561099457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ada565b604051808215151515815260200191505060405180910390f35b610a26600480360360208110156109fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b57565b005b610a6a60048036036020811015610a3e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b6f565b604051808215151515815260200191505060405180910390f35b610d33600480360360e0811015610a9a57600080fd5b8101908080359060200190640100000000811115610ab757600080fd5b820183602082011115610ac957600080fd5b80359060200191846001830284011164010000000083111715610aeb57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610b4e57600080fd5b820183602082011115610b6057600080fd5b80359060200191846001830284011164010000000083111715610b8257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610c1c57600080fd5b820183602082011115610c2e57600080fd5b80359060200191846020830284011164010000000083111715610c5057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610cb057600080fd5b820183602082011115610cc257600080fd5b80359060200191846020830284011164010000000083111715610ce457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611b8d565b005b610d7560048036036060811015610d4b57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611d81565b6040518082815260200191505060405180910390f35b610d93611e58565b6040518082815260200191505060405180910390f35b610db1611e61565b604051808215151515815260200191505060405180910390f35b610dd3611e79565b005b610e1760048036036020811015610deb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e8b565b6040518082815260200191505060405180910390f35b610e35611ed4565b6040518082815260200191505060405180910390f35b610e8d60048036036020811015610e6157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ee5565b005b610ed160048036036020811015610ea557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611efd565b005b610edb611f70565b005b610ee56120e5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610f2f612110565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f6f578082015181840152602081019050610f54565b50505050905090810190601f168015610f9c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610fec60048036036020811015610fc057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121b2565b005b610ff6612225565b005b6110446004803603604081101561100e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612237565b005b6110926004803603604081101561105c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123b4565b604051808215151515815260200191505060405180910390f35b6110f8600480360360408110156110c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061244e565b604051808215151515815260200191505060405180910390f35b6111546004803603602081101561112857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612551565b604051808215151515815260200191505060405180910390f35b6111b06004803603602081101561118457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061256e565b604051808215151515815260200191505060405180910390f35b61120c600480360360208110156111e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258c565b005b6112706004803603604081101561122457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612697565b6040518082815260200191505060405180910390f35b606060338054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561131e5780601f106112f35761010080835404028352916020019161131e565b820191906000526020600020905b81548152906001019060200180831161130157829003601f168201915b5050505050905090565b600061013560009054906101000a900460ff161515156113b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6113ba838361271e565b905092915050565b600082519050815181141515611440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4261746368657320636f756e7465727320646f206e6f74206d6174636800000081525060200191505060405180910390fd5b60008090505b81811015611508573373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156114c0576114ba848281518110151561149357fe5b9060200190602002015184838151811015156114ab57fe5b9060200190602002015161244e565b506114fb565b6114f98585838151811015156114d257fe5b9060200190602002015185848151811015156114ea57fe5b90602001906020020151611666565b505b8080600101915050611446565b5050505050565b600060019054906101000a900460ff168061152e575061152d61273c565b5b8061154557506000809054906101000a900460ff16155b151561159c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156115ec576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b836033908051906020019061160292919061431f565b50826034908051906020019061161992919061431f565b5081603560006101000a81548160ff021916908360ff16021790555080156116565760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606a54905090565b600080611674858585612753565b9050600061168185611e8b565b1180156116a0575061169e8461019d6127ef90919063ffffffff16565b155b156116bb576116ba8461019d61284090919063ffffffff16565b5b60006116c686611e8b565b1480156116e457506116e38561019d6127ef90919063ffffffff16565b5b156116ff576116fe8561019d61299390919063ffffffff16565b5b809150509392505050565b600060019054906101000a900460ff1680611729575061172861273c565b5b8061174057506000809054906101000a900460ff16155b1515611797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156117e7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6117f286868661150f565b6117fb30612c37565b61180430612d42565b61180d3061258c565b61181630612d9c565b60008090505b835181101561185057611845848281518110151561183657fe5b90602001906020020151612df7565b80600101905061181c565b5060008090505b825181101561188b57611880838281518110151561187157fe5b90602001906020020151612e51565b806001019050611857565b5080156118ad5760008060016101000a81548160ff0219169083151502179055505b505050505050565b6000603560009054906101000a900460ff16905090565b600061013560009054906101000a900460ff16151515611954576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61195e8383612eac565b905092915050565b611976611971612f5f565b611b6f565b15156119cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806144666030913960400191505060405180910390fd5b61013560009054906101000a900460ff161515611a52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b600061013560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611a97612f5f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000611aec611ae7612f5f565b612551565b1515611b43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806145076030913960400191505060405180910390fd5b611b4d8383612f67565b6001905092915050565b611b6c8161019a61299390919063ffffffff16565b50565b6000611b868261010261312690919063ffffffff16565b9050919050565b600060019054906101000a900460ff1680611bac5750611bab61273c565b5b80611bc357506000809054906101000a900460ff16155b1515611c1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611c6a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6101a360149054906101000a900460ff16151515611cf0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f616c726561647920696e697469616c697a65640000000000000000000000000081525060200191505060405180910390fd5b836101a360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611d47846101a061284090919063ffffffff16565b611d5688888888888888613206565b8015611d775760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600080600080600061019d6002018054905088101515611da8576000945050505050611e51565b61019d6002018054905087890111611dc257868801611dcd565b61019d600201805490505b915060008890505b82811015611e4857611e2361019d60020182815481101515611df357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611e8b565b9450848711611e325786611e34565b845b915081840193508080600101915050611dd5565b50829450505050505b9392505050565b60006008905090565b600061013560009054906101000a900460ff16905090565b611e89611e84612f5f565b612d9c565b565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600061019d60020180549050905090565b611efa8161019a61284090919063ffffffff16565b50565b611f0d611f08612f5f565b611b6f565b1515611f64576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806144666030913960400191505060405180910390fd5b611f6d81612e51565b50565b611f80611f7b612f5f565b611b6f565b1515611fd7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806144666030913960400191505060405180910390fd5b61013560009054906101000a900460ff1615151561205d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600161013560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120a2612f5f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60006101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060348054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156121a85780601f1061217d576101008083540402835291602001916121a8565b820191906000526020600020905b81548152906001019060200180831161218b57829003601f168201915b5050505050905090565b6121c26121bd612f5f565b612551565b1515612219576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806145076030913960400191505060405180910390fd5b61222281612df7565b50565b612235612230612f5f565b612d42565b565b6101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156122fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e6f7420616c6c6f77656420746f2063616c6c2074686973206d6574686f640081525060200191505060405180910390fd5b6101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415156123a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806144b86029913960400191505060405180910390fd5b6123b082826133bd565b5050565b600061013560009054906101000a900460ff1615151561243c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6124468383613579565b905092915050565b60008033905060006124608585613646565b9050600061246d86611e8b565b11801561248c575061248a8561019d6127ef90919063ffffffff16565b155b80156124e757506101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15612502576125018561019d61284090919063ffffffff16565b5b600061250d83611e8b565b14801561252b575061252a8261019d6127ef90919063ffffffff16565b5b15612546576125458261019d61299390919063ffffffff16565b5b809250505092915050565b600061256782609d61312690919063ffffffff16565b9050919050565b60006125858261019a6127ef90919063ffffffff16565b9050919050565b600060019054906101000a900460ff16806125ab57506125aa61273c565b5b806125c257506000809054906101000a900460ff16155b1515612619576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612669576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612672826136e0565b80156126935760008060016101000a81548160ff0219169083151502179055505b5050565b6000606960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061273261272b612f5f565b8484613807565b6001905092915050565b6000803090506000813b9050600081149250505090565b600061013560009054906101000a900460ff161515156127db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6127e6848484613a02565b90509392505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411905092915050565b61284a82826127ef565b151561298f5761285861439f565b6040518060400160405280600185600201805490500181526020018373ffffffffffffffffffffffffffffffffffffffff168152509050826002018290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050505b5050565b61299d82826127ef565b15612bc0576000826002018054905090508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015481141515612ba6578260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548360000160008560020160018503815481101515612a5a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508260020160018203815481101515612ada57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360020160018560000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015403815481101515612b5d57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b82600201805480919060019003612bbd91906143cf565b50505b8160000160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b600060019054906101000a900460ff1680612c565750612c5561273c565b5b80612c6d57506000809054906101000a900460ff16155b1515612cc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612d14576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612d1d82613adb565b8015612d3e5760008060016101000a81548160ff0219169083151502179055505b5050565b612d5681609d613bf690919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669260405160405180910390a250565b612db181610102613bf690919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b612e0b81609d613cb590919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f660405160405180910390a250565b612e6681610102613cb590919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b6000612f55612eb9612f5f565b84612f508560696000612eca612f5f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d9290919063ffffffff16565b613807565b6001905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561300c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61302181606a54613d9290919063ffffffff16565b606a8190555061307981606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d9290919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156131af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806145806022913960400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600060019054906101000a900460ff1680613225575061322461273c565b5b8061323c57506000809054906101000a900460ff16155b1515613293576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156132e3576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6132ee88888861150f565b6132f88486612f67565b61330130612c37565b61330a30612d42565b6133133061258c565b61331c30612d9c565b60008090505b83518110156133565761334b848281518110151561333c57fe5b90602001906020020151612df7565b806001019050613322565b5060008090505b825181101561339157613386838281518110151561337757fe5b90602001906020020151612e51565b80600101905061335d565b5080156133b35760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613445576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806145d06021913960400191505060405180910390fd5b6134b18160405180606001604052806022815260200161444460229139606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613e1c9092919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061350981606a54613ede90919063ffffffff16565b606a81905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600061363c613586612f5f565b846136378560405180606001604052806025815260200161463a60259139606960006135b0612f5f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613e1c9092919063ffffffff16565b613807565b6001905092915050565b600061013560009054906101000a900460ff161515156136ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6136d88383613f28565b905092915050565b600060019054906101000a900460ff16806136ff57506136fe61273c565b5b8061371657506000809054906101000a900460ff16155b151561376d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156137bd576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6137c682613f46565b600061013560006101000a81548160ff02191690831515021790555080156138035760008060016101000a81548160ff0219169083151502179055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561388f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806146166024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613917576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806144966022913960400191505060405180910390fd5b80606960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000613a0f848484614061565b613ad084613a1b612f5f565b613acb8560405180606001604052806028815260200161455860289139606960008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000613a81612f5f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613e1c9092919063ffffffff16565b613807565b600190509392505050565b600060019054906101000a900460ff1680613afa5750613af961273c565b5b80613b1157506000809054906101000a900460ff16155b1515613b68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613bb8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613bc182612551565b1515613bd157613bd082612df7565b5b8015613bf25760008060016101000a81548160ff0219169083151502179055505b5050565b613c008282613126565b1515613c57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806145376021913960400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b613cbf8282613126565b151515613d34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000808284019050838110151515613e12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008383111582901515613ecb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613e90578082015181840152602081019050613e75565b50505050905090810190601f168015613ebd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000613f2083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613e1c565b905092915050565b6000613f3c613f35612f5f565b8484614061565b6001905092915050565b600060019054906101000a900460ff1680613f655750613f6461273c565b5b80613f7c57506000809054906101000a900460ff16155b1515613fd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806145a2602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614023576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61402c82611b6f565b151561403c5761403b82612e51565b5b801561405d5760008060016101000a81548160ff0219169083151502179055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156140e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806145f16025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515614171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806144216023913960400191505060405180910390fd5b6141dd816040518060600160405280602681526020016144e160269139606860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613e1c9092919063ffffffff16565b606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061427281606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d9290919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061436057805160ff191683800117855561438e565b8280016001018555821561438e579182015b8281111561438d578251825591602001919060010190614372565b5b50905061439b91906143fb565b5090565b604051806040016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b8154818355818111156143f6578183600052602060002091820191016143f591906143fb565b5b505050565b61441d91905b80821115614419576000816000905550600101614401565b5090565b9056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c6545524332303a20617070726f766520746f20746865207a65726f20616464726573734e6f7420616c6c6f77656420746f206275726e20746f6b656e732066726f6d206e6f6e2d6f776e657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a7230582030a43136026d59e989d3a46f24cf8ff0dd7a4216397f3133910d8ba606ba40710029