Transaction Hash:
Block:
13821528 at Dec-17-2021 08:15:31 AM +UTC
Transaction Fee:
0.00323913408481912 ETH
$6.96
Gas Used:
46,910 Gas / 69.049969832 Gwei
Emitted Events:
| 245 |
OBSR.Transfer( from=[Sender] 0x1f69b6147203344049ea381f5dd2008714caedda, to=0x88273924B71116dCa2c87fbA613954451d262c62, value=23982800000000 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x1f69b614...714caEDdA |
9.452307642599408867 Eth
Nonce: 33338
|
9.449068508514589747 Eth
Nonce: 33339
| 0.00323913408481912 | ||
|
0x829BD824...93333A830
Miner
| (F2Pool Old) | 4,165.703867081666064698 Eth | 4,165.703937446666064698 Eth | 0.000070365 | |
| 0x87DEF926...9f074BeD6 |
Execution Trace
OBSR.transfer( recipient=0x88273924B71116dCa2c87fbA613954451d262c62, amount=23982800000000 ) => ( True )
{"ERC1132.sol":{"content":"pragma solidity 0.5.2;\n\n\n/**\n * @title ERC1132 interface\n * @dev see https://github.com/ethereum/EIPs/issues/1132\n */\n\ncontract ERC1132 {\n /**\n * @dev Reasons why a user\u0027s tokens have been locked\n */\n mapping(address =\u003e bytes32[]) public lockReason;\n\n /**\n * @dev locked token structure\n */\n struct lockToken {\n uint256 amount;\n uint256 validity;\n bool claimed;\n }\n\n /**\n * @dev Holds number \u0026 validity of tokens locked for a given reason for\n * a specified address\n */\n mapping(address =\u003e mapping(bytes32 =\u003e lockToken)) public locked;\n\n /**\n * @dev Records data of all the tokens Locked\n */\n event Locked(\n address indexed _of,\n bytes32 indexed _reason,\n uint256 _amount,\n uint256 _validity\n );\n\n /**\n * @dev Records data of all the tokens unlocked\n */\n event Unlocked(\n address indexed _of,\n bytes32 indexed _reason,\n uint256 _amount\n );\n\n\n function getListLockedAddrs()\n public view returns( address [] memory);\n \n function getListResons()\n public view returns(bytes32 [] memory);\n \n function getAddrByReason(bytes32 my_reason) \n public view returns(address);\n\n \n /**\n * @dev Locks a specified amount of tokens against an address,\n * for a specified reason and time\n * @param _reason The reason to lock tokens\n * @param _amount Number of tokens to be locked\n * @param _time Lock time in seconds\n */\n function lock(bytes32 _reason, uint256 _amount, uint256 _time)\n public returns (bool);\n \n /**\n * @dev Returns tokens locked for a specified address for a\n * specified reason\n *\n * @param _of The address whose tokens are locked\n * @param _reason The reason to query the lock tokens for\n */\n function tokensLocked(address _of, bytes32 _reason)\n public view returns (uint256 amount);\n \n /**\n * @dev Returns tokens locked for a specified address for a\n * specified reason at a specific time\n *\n * @param _of The address whose tokens are locked\n * @param _reason The reason to query the lock tokens for\n * @param _time The timestamp to query the lock tokens for\n */\n function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)\n public view returns (uint256 amount);\n \n /**\n * @dev Returns total tokens held by an address (locked + transferable)\n * @param _of The address to query the total balance of\n */\n function totalBalanceOf(address _of)\n public view returns (uint256 amount);\n \n /**\n * @dev Extends lock for a specified reason and time\n * @param _reason The reason to lock tokens\n * @param _time Lock extension time in seconds\n */\n function extendLock(bytes32 _reason, uint256 _time)\n public returns (bool);\n \n /**\n * @dev Increase number of tokens locked for a specified reason\n * @param _reason The reason to lock tokens\n * @param _amount Number of tokens to be increased\n */\n function increaseLockAmount(bytes32 _reason, uint256 _amount)\n public returns (bool);\n\n /**\n * @dev Returns unlockable tokens for a specified address for a specified reason\n * @param _of The address to query the the unlockable token count of\n * @param _reason The reason to query the unlockable tokens for\n */\n function tokensUnlockable(address _of, bytes32 _reason)\n public view returns (uint256 amount);\n \n /**\n * @dev Unlocks the unlockable tokens of a specified address\n * @param _of Address of user, claiming back unlockable tokens\n */\n function unlock(address _of)\n public returns (uint256 unlockableTokens);\n\n /**\n * @dev Gets the unlockable tokens of a specified address\n * @param _of The address to query the the unlockable token count of\n */\n function getUnlockableTokens(address _of)\n public view returns (uint256 unlockableTokens);\n\n}\n"},"ERC20.sol":{"content":"pragma solidity 0.5.2;\n\nimport \"./IERC20.sol\";\nimport \"./SafeMath.sol\";\n\n/**\n * @dev Implementation of the `IERC20` interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using `_mint`.\n * For a generic mechanism see `ERC20Mintable`.\n *\n * *For a detailed writeup see our guide [How to implement supply\n * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an `Approval` event is emitted on calls to `transferFrom`.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn\u0027t required by the specification.\n *\n * Finally, the non-standard `decreaseAllowance` and `increaseAllowance`\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See `IERC20.approve`.\n */\ncontract ERC20 is IERC20 {\n using SafeMath for uint256;\n\n mapping (address =\u003e uint256) private _balances;\n\n mapping (address =\u003e mapping (address =\u003e uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n /**\n * @dev See `IERC20.totalSupply`.\n */\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See `IERC20.balanceOf`.\n */\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See `IERC20.transfer`.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n /**\n * @dev See `IERC20.allowance`.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See `IERC20.approve`.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev See `IERC20.transferFrom`.\n *\n * Emits an `Approval` event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of `ERC20`;\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `value`.\n * - the caller must have allowance for `sender`\u0027s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to `approve` that can be used as a mitigation for\n * problems described in `IERC20.approve`.\n *\n * Emits an `Approval` event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to `approve` that can be used as a mitigation for\n * problems described in `IERC20.approve`.\n *\n * Emits an `Approval` event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to `transfer`, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a `Transfer` event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(amount);\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a `Transfer` event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destoys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a `Transfer` event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 value) internal {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _totalSupply = _totalSupply.sub(value);\n _balances[account] = _balances[account].sub(value);\n emit Transfer(account, address(0), value);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an `Approval` event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /**\n * @dev Destoys `amount` tokens from `account`.`amount` is then deducted\n * from the caller\u0027s allowance.\n *\n * See `_burn` and `_approve`.\n */\n function _burnFrom(address account, uint256 amount) internal {\n _burn(account, amount);\n _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));\n }\n}\n"},"ERC20Detailed.sol":{"content":"pragma solidity 0.5.2;\n\nimport \"./IERC20.sol\";\n\n/**\n * @dev Optional functions from the ERC20 standard.\n */\ncontract ERC20Detailed is IERC20 {\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of\n * these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol, uint8 decimals) public {\n _name = name;\n _symbol = symbol;\n _decimals = decimals;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei.\n *\n * \u003e Note that this information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * `IERC20.balanceOf` and `IERC20.transfer`.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n}\n"},"IERC20.sol":{"content":"pragma solidity 0.5.2;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see `ERC20Detailed`.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller\u0027s account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a `Transfer` event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through `transferFrom`. This is\n * zero by default.\n *\n * This value changes when `approve` or `transferFrom` are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller\u0027s tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * \u003e Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender\u0027s allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an `Approval` event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller\u0027s\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a `Transfer` event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to `approve`. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"Migrations.sol":{"content":"pragma solidity 0.5.2;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n"},"OBSR.sol":{"content":"pragma solidity 0.5.2;\n\n\nimport \u0027./ERC1132.sol\u0027;\nimport \u0027./ERC20.sol\u0027;\nimport \u0027./ERC20Detailed.sol\u0027;\n\n\n\n\n/**\n * @title SimpleToken\n * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.\n * Note they can later distribute these tokens as they wish using `transfer` and other\n * `ERC20` functions.\n */\ncontract OBSR is ERC1132, ERC20, ERC20Detailed {\n uint8 public constant DECIMALS = 8;\n uint256 public constant INITIAL_SUPPLY = 1500000000000000000;\n\n/**\n * @dev Error messages for require statements\n */\n\n\n string internal constant ALREADY_LOCKED = \u0027Tokens already locked\u0027;\n string internal constant NOT_LOCKED = \u0027No tokens locked\u0027;\n string internal constant AMOUNT_ZERO = \u0027Amount can not be 0\u0027;\n\n address[] lockedAddrs;\n bytes32[] reasons;\n \n \n\n /**\n * @dev Constructor that gives msg.sender all of existing tokens.\n */\n\n constructor () public ERC20Detailed(\"OBSR\", \"OBSR\", DECIMALS) {\n _mint(msg.sender, INITIAL_SUPPLY);\n }\n\nfunction getListLockedAddrs()public view returns( address [] memory)\n{\n return lockedAddrs;\n}\n \n\nfunction getListResons()public view returns(bytes32 [] memory)\n{\n return reasons;\n}\n\n\n//returns addrlocked by reason\n\n\n\n\n\nfunction getAddrByReason(bytes32 my_reason) public view returns(address)\n{\n for (uint256 j = 0; j \u003c lockedAddrs.length; j++)\n {\n uint256 amountLocked = tokensLockedAtTime(lockedAddrs[j],my_reason,now);\n \n if(amountLocked!=0)\n {\n return lockedAddrs[j]; \n }\n }\n}\n\nfunction tokensValidityLockedAtTime(address _of, bytes32 _reason, uint256 _time)\n public\n view\n returns (uint256 validity)\n {\n if (locked[_of][_reason].validity \u003e _time)\n validity = locked[_of][_reason].validity;\n }\n\n\n\n\n/**\n * @dev Locks a specified amount of tokens against an address,\n * for a specified reason and time\n * @param _reason The reason to lock tokens\n * @param _amount Number of tokens to be locked\n * @param _time Lock time in seconds\n */\n \n \n \n function lock(bytes32 _reason, uint256 _amount, uint256 _time)\n public\n returns (bool)\n {\n uint256 validUntil = now.add(_time); //solhint-disable-line\n\n // If tokens are already locked, then functions extendLock or\n // increaseLockAmount should be used to make any changes\n require(tokensLocked(msg.sender, _reason) == 0, ALREADY_LOCKED);\n require(_amount != 0, AMOUNT_ZERO);\n\n if (locked[msg.sender][_reason].amount == 0)\n lockReason[msg.sender].push(_reason);\n\n transfer(address(this), _amount);\n\n locked[msg.sender][_reason] = lockToken(_amount, validUntil, false);\n \n lockedAddrs.push(msg.sender);\n \n \n \n reasons.push(_reason);\n \n emit Locked(msg.sender, _reason, _amount, validUntil);\n return true;\n }\n \n /**\n * @dev Transfers and Locks a specified amount of tokens,\n * for a specified reason and time\n * @param _to adress to which tokens are to be transfered\n * @param _reason The reason to lock tokens\n * @param _amount Number of tokens to be transfered and locked\n * @param _time Lock time in seconds\n */\n function transferWithLock(address _to, bytes32 _reason, uint256 _amount, uint256 _time)\n public\n returns (bool)\n {\n uint256 validUntil = now.add(_time); //solhint-disable-line\n\n require(tokensLocked(_to, _reason) == 0, ALREADY_LOCKED);\n require(_amount != 0, AMOUNT_ZERO);\n\n if (locked[_to][_reason].amount == 0)\n lockReason[_to].push(_reason);\n\n transfer(address(this), _amount);\n\n locked[_to][_reason] = lockToken(_amount, validUntil, false);\n \n emit Locked(_to, _reason, _amount, validUntil);\n\n lockedAddrs.push(_to);\n reasons.push(_reason);\n\n return true;\n }\n\n /**\n * @dev Returns tokens locked for a specified address for a\n * specified reason\n *\n * @param _of The address whose tokens are locked\n * @param _reason The reason to query the lock tokens for\n */\n function tokensLocked(address _of, bytes32 _reason)\n public\n view\n returns (uint256 amount)\n {\n if (!locked[_of][_reason].claimed)\n amount = locked[_of][_reason].amount;\n }\n \n /**\n * @dev Returns tokens locked for a specified address for a\n * specified reason at a specific time\n *\n * @param _of The address whose tokens are locked\n * @param _reason The reason to query the lock tokens for\n * @param _time The timestamp to query the lock tokens for\n */\n function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time)\n public\n view\n returns (uint256 amount)\n {\n if (locked[_of][_reason].validity \u003e _time)\n amount = locked[_of][_reason].amount;\n }\n\n /**\n * @dev Returns total tokens held by an address (locked + transferable)\n * @param _of The address to query the total balance of\n */\n function totalBalanceOf(address _of)\n public\n view\n returns (uint256 amount)\n {\n amount = balanceOf(_of);\n\n for (uint256 i = 0; i \u003c lockReason[_of].length; i++) {\n amount = amount.add(tokensLocked(_of, lockReason[_of][i]));\n } \n } \n \n /**\n * @dev Extends lock for a specified reason and time\n * @param _reason The reason to lock tokens\n * @param _time Lock extension time in seconds\n */\n function extendLock(bytes32 _reason, uint256 _time)\n public\n returns (bool)\n {\n require(tokensLocked(msg.sender, _reason) \u003e 0, NOT_LOCKED);\n\n locked[msg.sender][_reason].validity = locked[msg.sender][_reason].validity.add(_time);\n\n emit Locked(msg.sender, _reason, locked[msg.sender][_reason].amount, locked[msg.sender][_reason].validity);\n return true;\n }\n \n /**\n * @dev Increase number of tokens locked for a specified reason\n * @param _reason The reason to lock tokens\n * @param _amount Number of tokens to be increased\n */\n function increaseLockAmount(bytes32 _reason, uint256 _amount)\n public\n returns (bool)\n {\n require(tokensLocked(msg.sender, _reason) \u003e 0, NOT_LOCKED);\n transfer(address(this), _amount);\n\n locked[msg.sender][_reason].amount = locked[msg.sender][_reason].amount.add(_amount);\n\n emit Locked(msg.sender, _reason, locked[msg.sender][_reason].amount, locked[msg.sender][_reason].validity);\n return true;\n }\n\n /**\n * @dev Returns unlockable tokens for a specified address for a specified reason\n * @param _of The address to query the the unlockable token count of\n * @param _reason The reason to query the unlockable tokens for\n */\n function tokensUnlockable(address _of, bytes32 _reason)\n public\n view\n returns (uint256 amount)\n {\n if (locked[_of][_reason].validity \u003c= now \u0026\u0026 !locked[_of][_reason].claimed) //solhint-disable-line\n amount = locked[_of][_reason].amount;\n }\n\n /**\n * @dev Unlocks the unlockable tokens of a specified address\n * @param _of Address of user, claiming back unlockable tokens\n */\n function unlock(address _of)\n public\n returns (uint256 unlockableTokens)\n {\n uint256 lockedTokens;\n\n for (uint256 i = 0; i \u003c lockReason[_of].length; i++) {\n lockedTokens = tokensUnlockable(_of, lockReason[_of][i]);\n if (lockedTokens \u003e 0) {\n unlockableTokens = unlockableTokens.add(lockedTokens);\n locked[_of][lockReason[_of][i]].claimed = true;\n emit Unlocked(_of, lockReason[_of][i], lockedTokens);\n\t\t for (uint256 k = 0; k \u003c reasons.length; k++) {\n if(lockReason[_of][i]==reasons[k])\n delete reasons[k];\n } \n }\n } \n\n if (unlockableTokens \u003e 0)\n this.transfer(_of, unlockableTokens);\n }\n\n /**\n * @dev Gets the unlockable tokens of a specified address\n * @param _of The address to query the the unlockable token count of\n */\n function getUnlockableTokens(address _of)\n public\n view\n returns (uint256 unlockableTokens)\n {\n for (uint256 i = 0; i \u003c lockReason[_of].length; i++) {\n unlockableTokens = unlockableTokens.add(tokensUnlockable(_of, lockReason[_of][i]));\n } \n }\n\n}\n\n\n\n/*\n\nfunction append(string memory a, string memory b, string memory c) internal pure returns (string memory ) {\n\n return string(abi.encodePacked(a, b, c));\n\n}\n\n\nfunction toString(address x) internal pure returns (string memory) {\n bytes memory b = new bytes(20);\n for (uint i = 0; i \u003c 20; i++)\n b[i] = byte(uint8(uint(x) / (2**(8*(19 - i)))));\n return string(b);\n }\n\n\nfunction uint2str(uint _i) internal pure returns (string memory _uintAsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint j = _i;\n uint len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint k = len - 1;\n while (_i != 0) {\n bstr[k--] = byte(uint8(48 + _i % 10));\n _i /= 10;\n }\n return string(bstr);\n}\n*/\n\n\n/*\n bytes32[] bts;\n\nfunction getInfoByReason(bytes32 my_reason) public returns(bytes32[] memory)\n{\n \n bts =0;\n for (uint256 j = 0; j \u003c lockedAddrs.length; j++)\n {\n uint256 amountLocked = tokensLockedAtTime(lockedAddrs[j],my_reason,now);\n \n if(amountLocked!=0)\n {\n // string memory abcde = new string(_ba.length + _ \n // return append(toString(lockedAddrs[j]), \"\", uint2str(amountLocked));\n \n bts.push(bytes32(uint256(msg.sender)));\n bts.push(bytes32(amountLocked));\n \n return bts;\n // return \"123\";\n }\n \n \n }\n \n \n \n\n}\n\n*/\n\n\n\n\n\n"},"SafeMath.sol":{"content":"pragma solidity 0.5.2;\n\n/**\n * @dev Wrappers over Solidity\u0027s arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it\u0027s recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c \u003e= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity\u0027s `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b \u003c= a, \"SafeMath: subtraction overflow\");\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\n // benefit is lost if \u0027b\u0027 is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity\u0027s `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b \u003e 0, \"SafeMath: division by zero\");\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn\u0027t hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, \"SafeMath: modulo by zero\");\n return a % b;\n }\n}\n"}}