- Contract name:
- VoteTokenImplementation
- Optimization enabled
- false
- Compiler version
- v0.5.1+commit.c8a2cb62
- Verified at
- 2021-10-28T14:01:51.759538Z
Contract source code
// File: @openzeppelin/upgrades/contracts/Initializable.sol pragma solidity 0.5.1; /** * @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. uint256 cs; assembly { cs := extcodesize(address) } 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 pragma solidity 0.5.1; /** * @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. * * > 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 pragma solidity 0.5.1; /** * @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 that 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 pragma solidity 0.5.1; /* * @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 not 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 { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, with should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address) { 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 pragma solidity 0.5.1; /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); 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-solidity/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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); 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) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol pragma solidity 0.5.1; /** * @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. * * *For a detailed writeup see our guide [How to implement supply * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).* * * 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 to, uint256 value) public returns (bool) { _transfer(_msgSender(), to, value); 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 value) public returns (bool) { _approve(_msgSender(), spender, value); 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 value. * - the caller must have allowance for sender's tokens of at least * amount. */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _transfer(from, to, value); _approve(from, _msgSender(), _allowances[from][_msgSender()].sub(value)); 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)); 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); _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 Destoys 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 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Sets amount as the allowance of spender over the owners 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 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Destoys 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)); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/access/Roles.sol pragma solidity 0.5.1; /** * @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 pragma solidity 0.5.1; 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 pragma solidity 0.5.1; /** * @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); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/access/roles/PauserRole.sol pragma solidity 0.5.1; 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 pragma solidity 0.5.1; /** * @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 pragma solidity 0.5.1; /** * @title Pausable token * @dev ERC20 modified with pausable transfers. */ 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, uint addedValue) public whenNotPaused returns (bool) { return super.increaseAllowance(spender, addedValue); } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) { return super.decreaseAllowance(spender, subtractedValue); } uint256[50] private ______gap; } // File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/StandaloneERC20.sol pragma solidity 0.5.1; /** * @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/ArrayListLib.sol pragma solidity 0.5.1; 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 pragma solidity 0.5.1; //import './Survey.sol'; contract Survey { function updateQuorum(uint256 _fromNewBalance, uint256 _fromOldBalance, uint256 _toNewBalance, uint256 _toOldBalance) public; function adjustTotalWeights(address _owner, bool _exclude) external; } 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; modifier onlyOwner { require(msg.sender == owner, 'Not allowed to call this method'); _; } function initialize( string memory name, string memory symbol, uint8 decimals, uint256 initialSupply, address initialHolder, address[] memory minters, address[] memory pausers ) public initializer { 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) { 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); } } function transfer(address recipient, uint256 amount) public returns (bool) { address _from = msg.sender; 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); } } 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 7; } }
Contract ABI
[{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":""}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"approve","inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"value"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"batchTransfer","inputs":[{"type":"address","name":"_from"},{"type":"address[]","name":"_to"},{"type":"uint256[]","name":"_values"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name"},{"type":"string","name":"symbol"},{"type":"uint8","name":"decimals"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"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","payable":false,"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":"view","payable":false,"outputs":[{"type":"uint8","name":""}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"addedValue"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"unpause","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"unregisterSurvey","inputs":[{"type":"address","name":"_survey"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isPauser","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"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":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getCirculatingSupply","inputs":[{"type":"uint256","name":"offset"},{"type":"uint256","name":"count"},{"type":"uint256","name":"cap"}],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"version","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"paused","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renouncePauser","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"balanceOf","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getOwnersCount","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"registerSurvey","inputs":[{"type":"address","name":"_survey"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"addPauser","inputs":[{"type":"address","name":"account"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"pause","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"tokenOwner"}],"name":"getOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":""}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"addMinter","inputs":[{"type":"address","name":"account"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceMinter","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"burn","inputs":[{"type":"address","name":"account"},{"type":"uint256","name":"value"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"subtractedValue"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"transfer","inputs":[{"type":"address","name":"recipient"},{"type":"uint256","name":"amount"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isMinter","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isSurveyRegistered","inputs":[{"type":"address","name":"_survey"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"initialize","inputs":[{"type":"address","name":"sender"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"allowance","inputs":[{"type":"address","name":"owner"},{"type":"address","name":"spender"}],"constant":true},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","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":"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":"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":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"spender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false}]
Deployed ByteCode
0x60806040526004361061019b576000357c01000000000000000000000000000000000000000000000000000000009004806306fdde03146101a0578063095ea7b3146102305780631239ec8c146102a35780631624f6c61461041c57806318160ddd1461058857806323b872dd146105b357806331392b4a14610646578063313ce567146108da578063395093511461090b5780633f4ba83a1461097e5780634660259d1461099557806346fbf68e146109e657806348be01c614610a4f5780634b6df33e14610d0d57806354fd4d5014610d705780635c975abb14610d9b5780636ef8d66d14610dca57806370a0823114610de157806373ff81cc14610e4657806374eb8c0114610e7157806382dc1ec414610ec25780638456cb5914610f13578063893d20e814610f2a57806395d89b4114610f81578063983b2d561461101157806398650275146110625780639dc29fac14611079578063a457c2d7146110d4578063a9059cbb14611147578063aa271e1a146111ba578063c12153f114611223578063c4d66de81461128c578063dd62ed3e146112dd575b600080fd5b3480156101ac57600080fd5b506101b5611362565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f55780820151818401526020810190506101da565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023c57600080fd5b506102896004803603604081101561025357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611404565b604051808215151515815260200191505060405180910390f35b3480156102af57600080fd5b5061041a600480360360608110156102c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561030357600080fd5b82018360208201111561031557600080fd5b8035906020019184602083028401116401000000008311171561033757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561039757600080fd5b8201836020820111156103a957600080fd5b803590602001918460208302840111640100000000831117156103cb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061149e565b005b34801561042857600080fd5b506105866004803603606081101561043f57600080fd5b810190808035906020019064010000000081111561045c57600080fd5b82018360208201111561046e57600080fd5b8035906020019184600183028401116401000000008311171561049057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156104f357600080fd5b82018360208201111561050557600080fd5b8035906020019184600183028401116401000000008311171561052757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506115eb565b005b34801561059457600080fd5b5061059d61177b565b6040518082815260200191505060405180910390f35b3480156105bf57600080fd5b5061062c600480360360608110156105d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611785565b604051808215151515815260200191505060405180910390f35b34801561065257600080fd5b506108d8600480360360a081101561066957600080fd5b810190808035906020019064010000000081111561068657600080fd5b82018360208201111561069857600080fd5b803590602001918460018302840111640100000000831117156106ba57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561071d57600080fd5b82018360208201111561072f57600080fd5b8035906020019184600183028401116401000000008311171561075157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff169060200190929190803590602001906401000000008111156107c157600080fd5b8201836020820111156107d357600080fd5b803590602001918460208302840111640100000000831117156107f557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561085557600080fd5b82018360208201111561086757600080fd5b8035906020019184602083028401116401000000008311171561088957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611823565b005b3480156108e657600080fd5b506108ef611a11565b604051808260ff1660ff16815260200191505060405180910390f35b34801561091757600080fd5b506109646004803603604081101561092e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a28565b604051808215151515815260200191505060405180910390f35b34801561098a57600080fd5b50610993611ac2565b005b3480156109a157600080fd5b506109e4600480360360208110156109b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c79565b005b3480156109f257600080fd5b50610a3560048036036020811015610a0957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c91565b604051808215151515815260200191505060405180910390f35b348015610a5b57600080fd5b50610d0b600480360360e0811015610a7257600080fd5b8101908080359060200190640100000000811115610a8f57600080fd5b820183602082011115610aa157600080fd5b80359060200191846001830284011164010000000083111715610ac357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610b2657600080fd5b820183602082011115610b3857600080fd5b80359060200191846001830284011164010000000083111715610b5a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610bf457600080fd5b820183602082011115610c0657600080fd5b80359060200191846020830284011164010000000083111715610c2857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610c8857600080fd5b820183602082011115610c9a57600080fd5b80359060200191846020830284011164010000000083111715610cbc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611caf565b005b348015610d1957600080fd5b50610d5a60048036036060811015610d3057600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611e60565b6040518082815260200191505060405180910390f35b348015610d7c57600080fd5b50610d85611f37565b6040518082815260200191505060405180910390f35b348015610da757600080fd5b50610db0611f40565b604051808215151515815260200191505060405180910390f35b348015610dd657600080fd5b50610ddf611f58565b005b348015610ded57600080fd5b50610e3060048036036020811015610e0457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f6a565b6040518082815260200191505060405180910390f35b348015610e5257600080fd5b50610e5b611fb3565b6040518082815260200191505060405180910390f35b348015610e7d57600080fd5b50610ec060048036036020811015610e9457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fc4565b005b348015610ece57600080fd5b50610f1160048036036020811015610ee557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fdc565b005b348015610f1f57600080fd5b50610f28612092565b005b348015610f3657600080fd5b50610f3f61224a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610f8d57600080fd5b50610f96612275565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fd6578082015181840152602081019050610fbb565b50505050905090810190601f1680156110035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561101d57600080fd5b506110606004803603602081101561103457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612317565b005b34801561106e57600080fd5b506110776123cd565b005b34801561108557600080fd5b506110d26004803603604081101561109c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123df565b005b3480156110e057600080fd5b5061112d600480360360408110156110f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061259f565b604051808215151515815260200191505060405180910390f35b34801561115357600080fd5b506111a06004803603604081101561116a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612639565b604051808215151515815260200191505060405180910390f35b3480156111c657600080fd5b50611209600480360360208110156111dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612735565b604051808215151515815260200191505060405180910390f35b34801561122f57600080fd5b506112726004803603602081101561124657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612752565b604051808215151515815260200191505060405180910390f35b34801561129857600080fd5b506112db600480360360208110156112af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612770565b005b3480156112e957600080fd5b5061134c6004803603604081101561130057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128be565b6040518082815260200191505060405180910390f35b606060338054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113fa5780601f106113cf576101008083540402835291602001916113fa565b820191906000526020600020905b8154815290600101906020018083116113dd57829003601f168201915b5050505050905090565b600061013560009054906101000a900460ff1615151561148c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6114968383612945565b905092915050565b60008251905081518114151561151c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4261746368657320636f756e7465727320646f206e6f74206d6174636800000081525060200191505060405180910390fd5b60008090505b818110156115e4573373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561159c57611596848281518110151561156f57fe5b90602001906020020151848381518110151561158757fe5b90602001906020020151612639565b506115d7565b6115d58585838151811015156115ae57fe5b9060200190602002015185848151811015156115c657fe5b90602001906020020151611785565b505b8080600101915050611522565b5050505050565b600060019054906101000a900460ff168061160a5750611609612963565b5b8061162157506000809054906101000a900460ff16155b15156116bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561170b576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b836033908051906020019061172192919061477b565b50826034908051906020019061173892919061477b565b5081603560006101000a81548160ff021916908360ff16021790555080156117755760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606a54905090565b6000611792848484612974565b50600061179e84611f6a565b1180156117bd57506117bb8361019d612a1090919063ffffffff16565b155b156117d8576117d78361019d612a6190919063ffffffff16565b5b60006117e385611f6a565b14801561180157506118008461019d612a1090919063ffffffff16565b5b1561181c5761181b8461019d612bb490919063ffffffff16565b5b9392505050565b600060019054906101000a900460ff16806118425750611841612963565b5b8061185957506000809054906101000a900460ff16155b15156118f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611943576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61194e8686866115eb565b61195730612e58565b61196030612fa6565b61196930612770565b61197230613000565b60008090505b83518110156119ac576119a1848281518110151561199257fe5b9060200190602002015161305b565b806001019050611978565b5060008090505b82518110156119e7576119dc83828151811015156119cd57fe5b906020019060200201516130b5565b8060010190506119b3565b508015611a095760008060016101000a81548160ff0219169083151502179055505b505050505050565b6000603560009054906101000a900460ff16905090565b600061013560009054906101000a900460ff16151515611ab0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611aba8383613110565b905092915050565b611ad2611acd6131c3565b611c91565b1515611b6c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f207468652050617573657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b61013560009054906101000a900460ff161515611bf1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b600061013560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611c366131c3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b611c8e8161019a612bb490919063ffffffff16565b50565b6000611ca8826101026131cb90919063ffffffff16565b9050919050565b600060019054906101000a900460ff1680611cce5750611ccd612963565b5b80611ce557506000809054906101000a900460ff16155b1515611d7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611dcf576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b836101a360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611e26846101a0612a6190919063ffffffff16565b611e35888888888888886132ee565b8015611e565760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600080600080600061019d6002018054905088101515611e87576000945050505050611f30565b61019d6002018054905087890111611ea157868801611eac565b61019d600201805490505b915060008890505b82811015611f2757611f0261019d60020182815481101515611ed257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611f6a565b9450848711611f115786611f13565b845b915081840193508080600101915050611eb4565b50829450505050505b9392505050565b60006007905090565b600061013560009054906101000a900460ff16905090565b611f68611f636131c3565b613000565b565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600061019d60020180549050905090565b611fd98161019a612a6190919063ffffffff16565b50565b611fec611fe76131c3565b611c91565b1515612086576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f207468652050617573657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b61208f816130b5565b50565b6120a261209d6131c3565b611c91565b151561213c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f207468652050617573657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b61013560009054906101000a900460ff161515156121c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600161013560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122076131c3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60006101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060348054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561230d5780601f106122e25761010080835404028352916020019161230d565b820191906000526020600020905b8154815290600101906020018083116122f057829003601f168201915b5050505050905090565b6123276123226131c3565b612735565b15156123c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b6123ca8161305b565b50565b6123dd6123d86131c3565b612fa6565b565b6101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156124a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e6f7420616c6c6f77656420746f2063616c6c2074686973206d6574686f640081525060200191505060405180910390fd5b6101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515612591576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001807f4e6f7420616c6c6f77656420746f206275726e20746f6b656e732066726f6d2081526020017f6e6f6e2d6f776e6572000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61259b82826134e8565b5050565b600061013560009054906101000a900460ff16151515612627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61263183836136cd565b905092915050565b6000803390506126498484613780565b50600061265585611f6a565b11801561267457506126728461019d612a1090919063ffffffff16565b155b80156126cf57506101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156126ea576126e98461019d612a6190919063ffffffff16565b5b60006126f582611f6a565b14801561271357506127128161019d612a1090919063ffffffff16565b5b1561272e5761272d8161019d612bb490919063ffffffff16565b5b5092915050565b600061274b82609d6131cb90919063ffffffff16565b9050919050565b60006127698261019a612a1090919063ffffffff16565b9050919050565b600060019054906101000a900460ff168061278f575061278e612963565b5b806127a657506000809054906101000a900460ff16155b1515612840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612890576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6128998261381a565b80156128ba5760008060016101000a81548160ff0219169083151502179055505b5050565b6000606960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006129596129526131c3565b8484613984565b6001905092915050565b600080303b90506000811491505090565b600061013560009054906101000a900460ff161515156129fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b612a07848484613c05565b90509392505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411905092915050565b612a6b8282612a10565b1515612bb057612a796147fb565b6040805190810160405280600185600201805490500181526020018373ffffffffffffffffffffffffffffffffffffffff168152509050826002018290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050505b5050565b612bbe8282612a10565b15612de1576000826002018054905090508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015481141515612dc7578260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548360000160008560020160018503815481101515612c7b57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508260020160018203815481101515612cfb57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360020160018560000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015403815481101515612d7e57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b82600201805480919060019003612dde919061482b565b50505b8160000160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b600060019054906101000a900460ff1680612e775750612e76612963565b5b80612e8e57506000809054906101000a900460ff16155b1515612f28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612f78576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612f8182613cc4565b8015612fa25760008060016101000a81548160ff0219169083151502179055505b5050565b612fba81609d613e2290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669260405160405180910390a250565b61301581610102613e2290919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b61306f81609d613f2490919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f660405160405180910390a250565b6130ca81610102613f2490919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b60006131b961311d6131c3565b846131b4856069600061312e6131c3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461400190919063ffffffff16565b613984565b6001905092915050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613297576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f526f6c65733a206163636f756e7420697320746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600060019054906101000a900460ff168061330d575061330c612963565b5b8061332457506000809054906101000a900460ff16155b15156133be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561340e576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6134198888886115eb565b613423848661408b565b61342c30612e58565b61343530612fa6565b61343e30612770565b61344730613000565b60008090505b835181101561348157613476848281518110151561346757fe5b9060200190602002015161305b565b80600101905061344d565b5060008090505b82518110156134bc576134b183828151811015156134a257fe5b906020019060200201516130b5565b806001019050613488565b5080156134de5760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156135b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f45524332303a206275726e2066726f6d20746865207a65726f2061646472657381526020017f730000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6135c881606a5461424a90919063ffffffff16565b606a8190555061362081606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461424a90919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60006137766136da6131c3565b8461377185606960006136eb6131c3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461424a90919063ffffffff16565b613984565b6001905092915050565b600061013560009054906101000a900460ff16151515613808576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61381283836142d5565b905092915050565b600060019054906101000a900460ff16806138395750613838612963565b5b8061385057506000809054906101000a900460ff16155b15156138ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561393a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613943826142f3565b600061013560006101000a81548160ff02191690831515021790555080156139805760008060016101000a81548160ff0219169083151502179055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515613a4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f45524332303a20617070726f76652066726f6d20746865207a65726f2061646481526020017f726573730000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613b1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f45524332303a20617070726f766520746f20746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80606960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000613c12848484614451565b613cb984613c1e6131c3565b613cb485606960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000613c6b6131c3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461424a90919063ffffffff16565b613984565b600190509392505050565b600060019054906101000a900460ff1680613ce35750613ce2612963565b5b80613cfa57506000809054906101000a900460ff16155b1515613d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613de4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613ded82612735565b1515613dfd57613dfc8261305b565b5b8015613e1e5760008060016101000a81548160ff0219169083151502179055505b5050565b613e2c82826131cb565b1515613ec6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c81526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b613f2e82826131cb565b151515613fa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000808284019050838110151515614081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515614130576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61414581606a5461400190919063ffffffff16565b606a8190555061419d81606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461400190919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60008282111515156142c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b60006142e96142e26131c3565b8484614451565b6001905092915050565b600060019054906101000a900460ff16806143125750614311612963565b5b8061432957506000809054906101000a900460ff16155b15156143c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614413576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61441c82611c91565b151561442c5761442b826130b5565b5b801561444d5760008060016101000a81548160ff0219169083151502179055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561451c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f45524332303a207472616e736665722066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156145e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f45524332303a207472616e7366657220746f20746865207a65726f206164647281526020017f657373000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61463981606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461424a90919063ffffffff16565b606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506146ce81606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461400190919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106147bc57805160ff19168380011785556147ea565b828001600101855582156147ea579182015b828111156147e95782518255916020019190600101906147ce565b5b5090506147f79190614857565b5090565b604080519081016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b815481835581811115614852578183600052602060002091820191016148519190614857565b5b505050565b61487991905b8082111561487557600081600090555060010161485d565b5090565b9056fea165627a7a7230582079224ace79f993fea43ce75af81500166937c5e06fd66dbcaf019ebee71879360029