- Contract name:
- VoteTokenImplementation
- Optimization enabled
- false
- Compiler version
- v0.5.1+commit.c8a2cb62
- EVM Version
- default
- Verified at
- 2023-07-07T20:10:47.722454Z
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, 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 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)) { uint256 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; 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":"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
0x60806040526004361061019b576000357c01000000000000000000000000000000000000000000000000000000009004806306fdde03146101a0578063095ea7b3146102305780631239ec8c146102a35780631624f6c61461041c57806318160ddd1461058857806323b872dd146105b357806331392b4a14610646578063313ce567146108da578063395093511461090b5780633f4ba83a1461097e5780634660259d1461099557806346fbf68e146109e657806348be01c614610a4f5780634b6df33e14610d0d57806354fd4d5014610d705780635c975abb14610d9b5780636ef8d66d14610dca57806370a0823114610de157806373ff81cc14610e4657806374eb8c0114610e7157806382dc1ec414610ec25780638456cb5914610f13578063893d20e814610f2a57806395d89b4114610f81578063983b2d561461101157806398650275146110625780639dc29fac14611079578063a457c2d7146110d4578063a9059cbb14611147578063aa271e1a146111ba578063c12153f114611223578063c4d66de81461128c578063dd62ed3e146112dd575b600080fd5b3480156101ac57600080fd5b506101b5611362565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f55780820151818401526020810190506101da565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023c57600080fd5b506102896004803603604081101561025357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611404565b604051808215151515815260200191505060405180910390f35b3480156102af57600080fd5b5061041a600480360360608110156102c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561030357600080fd5b82018360208201111561031557600080fd5b8035906020019184602083028401116401000000008311171561033757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561039757600080fd5b8201836020820111156103a957600080fd5b803590602001918460208302840111640100000000831117156103cb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061149e565b005b34801561042857600080fd5b506105866004803603606081101561043f57600080fd5b810190808035906020019064010000000081111561045c57600080fd5b82018360208201111561046e57600080fd5b8035906020019184600183028401116401000000008311171561049057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156104f357600080fd5b82018360208201111561050557600080fd5b8035906020019184600183028401116401000000008311171561052757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506115eb565b005b34801561059457600080fd5b5061059d61177b565b6040518082815260200191505060405180910390f35b3480156105bf57600080fd5b5061062c600480360360608110156105d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611785565b604051808215151515815260200191505060405180910390f35b34801561065257600080fd5b506108d8600480360360a081101561066957600080fd5b810190808035906020019064010000000081111561068657600080fd5b82018360208201111561069857600080fd5b803590602001918460018302840111640100000000831117156106ba57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561071d57600080fd5b82018360208201111561072f57600080fd5b8035906020019184600183028401116401000000008311171561075157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff169060200190929190803590602001906401000000008111156107c157600080fd5b8201836020820111156107d357600080fd5b803590602001918460208302840111640100000000831117156107f557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561085557600080fd5b82018360208201111561086757600080fd5b8035906020019184602083028401116401000000008311171561088957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611829565b005b3480156108e657600080fd5b506108ef611a17565b604051808260ff1660ff16815260200191505060405180910390f35b34801561091757600080fd5b506109646004803603604081101561092e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a2e565b604051808215151515815260200191505060405180910390f35b34801561098a57600080fd5b50610993611ac8565b005b3480156109a157600080fd5b506109e4600480360360208110156109b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c7f565b005b3480156109f257600080fd5b50610a3560048036036020811015610a0957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c97565b604051808215151515815260200191505060405180910390f35b348015610a5b57600080fd5b50610d0b600480360360e0811015610a7257600080fd5b8101908080359060200190640100000000811115610a8f57600080fd5b820183602082011115610aa157600080fd5b80359060200191846001830284011164010000000083111715610ac357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610b2657600080fd5b820183602082011115610b3857600080fd5b80359060200191846001830284011164010000000083111715610b5a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610bf457600080fd5b820183602082011115610c0657600080fd5b80359060200191846020830284011164010000000083111715610c2857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610c8857600080fd5b820183602082011115610c9a57600080fd5b80359060200191846020830284011164010000000083111715610cbc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611cb5565b005b348015610d1957600080fd5b50610d5a60048036036060811015610d3057600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611eec565b6040518082815260200191505060405180910390f35b348015610d7c57600080fd5b50610d85611fc3565b6040518082815260200191505060405180910390f35b348015610da757600080fd5b50610db0611fcc565b604051808215151515815260200191505060405180910390f35b348015610dd657600080fd5b50610ddf611fe4565b005b348015610ded57600080fd5b50610e3060048036036020811015610e0457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ff6565b6040518082815260200191505060405180910390f35b348015610e5257600080fd5b50610e5b61203f565b6040518082815260200191505060405180910390f35b348015610e7d57600080fd5b50610ec060048036036020811015610e9457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612050565b005b348015610ece57600080fd5b50610f1160048036036020811015610ee557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612068565b005b348015610f1f57600080fd5b50610f2861211e565b005b348015610f3657600080fd5b50610f3f6122d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610f8d57600080fd5b50610f96612301565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fd6578082015181840152602081019050610fbb565b50505050905090810190601f1680156110035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561101d57600080fd5b506110606004803603602081101561103457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123a3565b005b34801561106e57600080fd5b50611077612459565b005b34801561108557600080fd5b506110d26004803603604081101561109c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061246b565b005b3480156110e057600080fd5b5061112d600480360360408110156110f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061262b565b604051808215151515815260200191505060405180910390f35b34801561115357600080fd5b506111a06004803603604081101561116a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506126c5565b604051808215151515815260200191505060405180910390f35b3480156111c657600080fd5b50611209600480360360208110156111dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127c8565b604051808215151515815260200191505060405180910390f35b34801561122f57600080fd5b506112726004803603602081101561124657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127e5565b604051808215151515815260200191505060405180910390f35b34801561129857600080fd5b506112db600480360360208110156112af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612803565b005b3480156112e957600080fd5b5061134c6004803603604081101561130057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612951565b6040518082815260200191505060405180910390f35b606060338054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113fa5780601f106113cf576101008083540402835291602001916113fa565b820191906000526020600020905b8154815290600101906020018083116113dd57829003601f168201915b5050505050905090565b600061013560009054906101000a900460ff1615151561148c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61149683836129d8565b905092915050565b60008251905081518114151561151c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4261746368657320636f756e7465727320646f206e6f74206d6174636800000081525060200191505060405180910390fd5b60008090505b818110156115e4573373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561159c57611596848281518110151561156f57fe5b90602001906020020151848381518110151561158757fe5b906020019060200201516126c5565b506115d7565b6115d58585838151811015156115ae57fe5b9060200190602002015185848151811015156115c657fe5b90602001906020020151611785565b505b8080600101915050611522565b5050505050565b600060019054906101000a900460ff168061160a57506116096129f6565b5b8061162157506000809054906101000a900460ff16155b15156116bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561170b576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b836033908051906020019061172192919061480e565b50826034908051906020019061173892919061480e565b5081603560006101000a81548160ff021916908360ff16021790555080156117755760008060016101000a81548160ff0219169083151502179055505b50505050565b6000606a54905090565b600080611793858585612a07565b905060006117a085611ff6565b1180156117bf57506117bd8461019d612aa390919063ffffffff16565b155b156117da576117d98461019d612af490919063ffffffff16565b5b60006117e586611ff6565b14801561180357506118028561019d612aa390919063ffffffff16565b5b1561181e5761181d8561019d612c4790919063ffffffff16565b5b809150509392505050565b600060019054906101000a900460ff168061184857506118476129f6565b5b8061185f57506000809054906101000a900460ff16155b15156118f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611949576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6119548686866115eb565b61195d30612eeb565b61196630613039565b61196f30612803565b61197830613093565b60008090505b83518110156119b2576119a7848281518110151561199857fe5b906020019060200201516130ee565b80600101905061197e565b5060008090505b82518110156119ed576119e283828151811015156119d357fe5b90602001906020020151613148565b8060010190506119b9565b508015611a0f5760008060016101000a81548160ff0219169083151502179055505b505050505050565b6000603560009054906101000a900460ff16905090565b600061013560009054906101000a900460ff16151515611ab6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611ac083836131a3565b905092915050565b611ad8611ad3613256565b611c97565b1515611b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f207468652050617573657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b61013560009054906101000a900460ff161515611bf7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b600061013560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611c3c613256565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b611c948161019a612c4790919063ffffffff16565b50565b6000611cae8261010261325e90919063ffffffff16565b9050919050565b600060019054906101000a900460ff1680611cd45750611cd36129f6565b5b80611ceb57506000809054906101000a900460ff16155b1515611d85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611dd5576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6101a360149054906101000a900460ff16151515611e5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f616c726561647920696e697469616c697a65640000000000000000000000000081525060200191505060405180910390fd5b836101a360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611eb2846101a0612af490919063ffffffff16565b611ec188888888888888613381565b8015611ee25760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600080600080600061019d6002018054905088101515611f13576000945050505050611fbc565b61019d6002018054905087890111611f2d57868801611f38565b61019d600201805490505b915060008890505b82811015611fb357611f8e61019d60020182815481101515611f5e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ff6565b9450848711611f9d5786611f9f565b845b915081840193508080600101915050611f40565b50829450505050505b9392505050565b60006008905090565b600061013560009054906101000a900460ff16905090565b611ff4611fef613256565b613093565b565b6000606860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600061019d60020180549050905090565b6120658161019a612af490919063ffffffff16565b50565b612078612073613256565b611c97565b1515612112576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f207468652050617573657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b61211b81613148565b50565b61212e612129613256565b611c97565b15156121c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f207468652050617573657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b61013560009054906101000a900460ff1615151561224e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600161013560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612293613256565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60006101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060348054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123995780601f1061236e57610100808354040283529160200191612399565b820191906000526020600020905b81548152906001019060200180831161237c57829003601f168201915b5050505050905090565b6123b36123ae613256565b6127c8565b151561244d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b612456816130ee565b50565b612469612464613256565b613039565b565b6101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e6f7420616c6c6f77656420746f2063616c6c2074686973206d6574686f640081525060200191505060405180910390fd5b6101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151561261d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001807f4e6f7420616c6c6f77656420746f206275726e20746f6b656e732066726f6d2081526020017f6e6f6e2d6f776e6572000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b612627828261357b565b5050565b600061013560009054906101000a900460ff161515156126b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6126bd8383613760565b905092915050565b60008033905060006126d78585613813565b905060006126e486611ff6565b11801561270357506127018561019d612aa390919063ffffffff16565b155b801561275e57506101a360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15612779576127788561019d612af490919063ffffffff16565b5b600061278483611ff6565b1480156127a257506127a18261019d612aa390919063ffffffff16565b5b156127bd576127bc8261019d612c4790919063ffffffff16565b5b809250505092915050565b60006127de82609d61325e90919063ffffffff16565b9050919050565b60006127fc8261019a612aa390919063ffffffff16565b9050919050565b600060019054906101000a900460ff168061282257506128216129f6565b5b8061283957506000809054906101000a900460ff16155b15156128d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612923576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61292c826138ad565b801561294d5760008060016101000a81548160ff0219169083151502179055505b5050565b6000606960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006129ec6129e5613256565b8484613a17565b6001905092915050565b600080303b90506000811491505090565b600061013560009054906101000a900460ff16151515612a8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b612a9a848484613c98565b90509392505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411905092915050565b612afe8282612aa3565b1515612c4357612b0c61488e565b6040805190810160405280600185600201805490500181526020018373ffffffffffffffffffffffffffffffffffffffff168152509050826002018290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050505b5050565b612c518282612aa3565b15612e74576000826002018054905090508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015481141515612e5a578260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548360000160008560020160018503815481101515612d0e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508260020160018203815481101515612d8e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360020160018560000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015403815481101515612e1157fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b82600201805480919060019003612e7191906148be565b50505b8160000160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b600060019054906101000a900460ff1680612f0a5750612f096129f6565b5b80612f2157506000809054906101000a900460ff16155b1515612fbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561300b576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61301482613d57565b80156130355760008060016101000a81548160ff0219169083151502179055505b5050565b61304d81609d613eb590919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669260405160405180910390a250565b6130a881610102613eb590919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b61310281609d613fb790919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f660405160405180910390a250565b61315d81610102613fb790919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b600061324c6131b0613256565b8461324785606960006131c1613256565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461409490919063ffffffff16565b613a17565b6001905092915050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561332a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f526f6c65733a206163636f756e7420697320746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600060019054906101000a900460ff16806133a0575061339f6129f6565b5b806133b757506000809054906101000a900460ff16155b1515613451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156134a1576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6134ac8888886115eb565b6134b6848661411e565b6134bf30612eeb565b6134c830613039565b6134d130612803565b6134da30613093565b60008090505b83518110156135145761350984828151811015156134fa57fe5b906020019060200201516130ee565b8060010190506134e0565b5060008090505b825181101561354f57613544838281518110151561353557fe5b90602001906020020151613148565b80600101905061351b565b5080156135715760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613646576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f45524332303a206275726e2066726f6d20746865207a65726f2061646472657381526020017f730000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61365b81606a546142dd90919063ffffffff16565b606a819055506136b381606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142dd90919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600061380961376d613256565b84613804856069600061377e613256565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142dd90919063ffffffff16565b613a17565b6001905092915050565b600061013560009054906101000a900460ff1615151561389b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6138a58383614368565b905092915050565b600060019054906101000a900460ff16806138cc57506138cb6129f6565b5b806138e357506000809054906101000a900460ff16155b151561397d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156139cd576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6139d682614386565b600061013560006101000a81548160ff0219169083151502179055508015613a135760008060016101000a81548160ff0219169083151502179055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515613ae2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f45524332303a20617070726f76652066726f6d20746865207a65726f2061646481526020017f726573730000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613bad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f45524332303a20617070726f766520746f20746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80606960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000613ca58484846144e4565b613d4c84613cb1613256565b613d4785606960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000613cfe613256565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142dd90919063ffffffff16565b613a17565b600190509392505050565b600060019054906101000a900460ff1680613d765750613d756129f6565b5b80613d8d57506000809054906101000a900460ff16155b1515613e27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613e77576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613e80826127c8565b1515613e9057613e8f826130ee565b5b8015613eb15760008060016101000a81548160ff0219169083151502179055505b5050565b613ebf828261325e565b1515613f59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c81526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b613fc1828261325e565b151515614036576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000808284019050838110151515614114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156141c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6141d881606a5461409490919063ffffffff16565b606a8190555061423081606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461409490919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000828211151515614357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b600061437c614375613256565b84846144e4565b6001905092915050565b600060019054906101000a900460ff16806143a557506143a46129f6565b5b806143bc57506000809054906101000a900460ff16155b1515614456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156144a6576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6144af82611c97565b15156144bf576144be82613148565b5b80156144e05760008060016101000a81548160ff0219169083151502179055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156145af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f45524332303a207472616e736665722066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561467a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f45524332303a207472616e7366657220746f20746865207a65726f206164647281526020017f657373000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6146cc81606860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142dd90919063ffffffff16565b606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061476181606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461409490919063ffffffff16565b606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061484f57805160ff191683800117855561487d565b8280016001018555821561487d579182015b8281111561487c578251825591602001919060010190614861565b5b50905061488a91906148ea565b5090565b604080519081016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b8154818355818111156148e5578183600052602060002091820191016148e491906148ea565b5b505050565b61490c91905b808211156149085760008160009055506001016148f0565b5090565b9056fea165627a7a72305820c6878ab77427dd2785caaae362efbfc5af4710a5fb7179038c197bd91f8e7fb60029