// File: openzeppelin-solidity/contracts/math/SafeMath.sol
pragma solidity ^0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on 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);
return c;
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
}
// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.2;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol
pragma solidity ^0.5.2;
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
* all accounts just by listening to said events. Note that this isn't required by the specification, and other
* compliant implementations may not do it.
*/
contract ERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
}
/**
* @dev Transfer token for a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* 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
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function mint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
require(spender != address(0));
require(owner != address(0));
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
function _burn(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
}
// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol
pragma solidity ^0.5.2;
/**
* @title Capped token
* @dev Mintable token with a token cap.
*/
contract ERC20Capped is ERC20 {
uint256 private _cap;
constructor (uint256 cap) public {
require(cap > 0);
_cap = cap;
}
/**
* @return the cap for the token minting.
*/
function cap() public view returns (uint256) {
return _cap;
}
function _mint(address account, uint256 value) internal {
require(totalSupply().add(value) <= _cap);
super.mint(account, value);
}
}
// File: contracts/ITAMToken.sol
pragma solidity ^0.5.2;
contract ITAMToken is ERC20Capped {
string public name = "ITAM";
string public symbol = "ITAM";
uint8 public decimals = 18;
uint256 constant TOTAL_CAP = 2500000000 ether;
address public firstMaster;
address public secondMaster;
address public thirdMaster;
mapping(address => mapping(address => bool)) public decidedOwner;
address public owner;
address public gameMaster;
mapping(address => bool) public blackLists;
uint8 public unlockCount = 0;
address public strategicSaleAddress;
uint[] public strategicSaleReleaseCaps = [15000000 ether, 15000000 ether, 15000000 ether,
15000000 ether, 15000000 ether, 15000000 ether,
15000000 ether, 22500000 ether, 22500000 ether];
address public privateSaleAddress;
uint[] public privateSaleReleaseCaps = [97500000 ether, 97500000 ether, 97500000 ether,
97500000 ether, 130000000 ether, 130000000 ether];
address public publicSaleAddress;
uint public publicSaleReleaseCap = 200000000 ether;
address public teamAddress;
uint[] public teamReleaseCaps = [0, 0, 0, 0, 0, 0,
12500000 ether, 12500000 ether, 12500000 ether,
12500000 ether, 12500000 ether, 12500000 ether,
12500000 ether, 12500000 ether, 12500000 ether,
12500000 ether, 12500000 ether, 12500000 ether,
12500000 ether, 12500000 ether, 12500000 ether,
12500000 ether, 12500000 ether, 12500000 ether,
12500000 ether, 12500000 ether];
address public advisorAddress;
uint[] public advisorReleaseCaps = [0, 0, 0, 25000000 ether, 0, 25000000 ether,
0, 25000000 ether, 0, 25000000 ether, 0, 25000000 ether];
address public marketingAddress;
uint[] public marketingReleaseCaps = [100000000 ether, 25000000 ether, 25000000 ether,
25000000 ether, 25000000 ether, 25000000 ether,
25000000 ether, 25000000 ether, 25000000 ether,
25000000 ether, 25000000 ether, 25000000 ether];
address public ecoAddress;
uint[] public ecoReleaseCaps = [50000000 ether, 50000000 ether, 50000000 ether,
50000000 ether, 50000000 ether, 50000000 ether,
50000000 ether, 50000000 ether, 50000000 ether,
50000000 ether, 50000000 ether, 50000000 ether,
50000000 ether, 50000000 ether, 50000000 ether];
address payable public inAppAddress;
ERC20 erc20;
// appId => itemId => tokenAddress => amount
mapping(uint64 => mapping(uint64 => mapping(address => uint256))) items;
event Unlock(uint8 unlockCount);
event WithdrawEther(address indexed _to, uint256 amount);
event PurchaseItemOnEther(address indexed _spender, uint64 appId, uint64 itemId, uint256 amount);
event PurchaseItemOnITAM(address indexed _spender, uint64 appId, uint64 itemId, uint256 amount);
event PurchaseItemOnERC20(address indexed _spender, address indexed _tokenAddress, uint64 appId, uint64 itemId, uint256 amount);
event SetItem(uint64 appId);
event ChangeOwner(address _owner);
constructor(address _firstMaster, address _secondMaster, address _thirdMaster,
address _owner, address _gameMaster, address _strategicSaleAddress,
address _privateSaleAddress, address _publicSaleAddress, address _teamAddress,
address _advisorAddress, address _marketingAddress, address _ecoAddress, address payable _inAppAddress) public ERC20Capped(TOTAL_CAP) {
firstMaster = _firstMaster;
secondMaster = _secondMaster;
thirdMaster = _thirdMaster;
owner = _owner;
gameMaster = _gameMaster;
strategicSaleAddress = _strategicSaleAddress;
privateSaleAddress = _privateSaleAddress;
publicSaleAddress = _publicSaleAddress;
teamAddress = _teamAddress;
advisorAddress = _advisorAddress;
marketingAddress = _marketingAddress;
ecoAddress = _ecoAddress;
inAppAddress = _inAppAddress;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
modifier onlyGameMaster {
require(msg.sender == gameMaster);
_;
}
modifier onlyMaster {
require(msg.sender == firstMaster || msg.sender == secondMaster || msg.sender == thirdMaster);
_;
}
function setGameMaster(address _gameMaster) public onlyOwner {
gameMaster = _gameMaster;
}
function transfer(address _to, uint256 _value) public onlyNotBlackList returns (bool) {
return super.transfer(_to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) public onlyNotBlackList returns (bool) {
return super.transferFrom(_from, _to, _value);
}
function approve(address spender, uint256 value) public onlyNotBlackList returns (bool) {
return super.approve(spender, value);
}
function burn(uint256 value) public onlyOwner {
super._burn(msg.sender, value);
}
function unlock() public onlyOwner returns (bool) {
uint8 _unlockCount = unlockCount;
if(strategicSaleReleaseCaps.length > _unlockCount) {
super._mint(strategicSaleAddress, strategicSaleReleaseCaps[_unlockCount]);
}
if(privateSaleReleaseCaps.length > _unlockCount) {
super._mint(privateSaleAddress, privateSaleReleaseCaps[_unlockCount]);
}
if(_unlockCount == 0) {
super._mint(publicSaleAddress, publicSaleReleaseCap);
}
if(teamReleaseCaps.length > _unlockCount) {
super._mint(teamAddress, teamReleaseCaps[_unlockCount]);
}
if(advisorReleaseCaps.length > _unlockCount) {
super._mint(advisorAddress, advisorReleaseCaps[_unlockCount]);
}
if(marketingReleaseCaps.length > _unlockCount) {
super._mint(marketingAddress, marketingReleaseCaps[_unlockCount]);
}
if(ecoReleaseCaps.length > _unlockCount) {
super._mint(ecoAddress, ecoReleaseCaps[_unlockCount]);
}
unlockCount++;
return true;
}
function setAddresses(address _strategicSaleAddress, address _privateSaleAddress, address _publicSaleAddress, address _teamAddress, address _advisorAddress, address _marketingAddress, address _ecoAddress,
address payable _inAppAddress) public onlyOwner {
strategicSaleAddress = _strategicSaleAddress;
privateSaleAddress = _privateSaleAddress;
publicSaleAddress = _publicSaleAddress;
teamAddress = _teamAddress;
advisorAddress = _advisorAddress;
marketingAddress = _marketingAddress;
ecoAddress = _ecoAddress;
inAppAddress = _inAppAddress;
}
function changeOwner(address _owner) public onlyMaster {
decidedOwner[msg.sender][_owner] = true;
uint16 decidedCount = 0;
if (decidedOwner[firstMaster][_owner] == true) {
decidedCount += 1;
}
if (decidedOwner[secondMaster][_owner] == true) {
decidedCount += 1;
}
if (decidedOwner[thirdMaster][_owner] == true) {
decidedCount += 1;
}
if (decidedCount >= 2) {
owner = _owner;
emit ChangeOwner(_owner);
}
}
function addToBlackList(address _to) public onlyOwner {
require(!blackLists[_to], "already blacklist");
blackLists[_to] = true;
}
function removeFromBlackList(address _to) public onlyOwner {
require(blackLists[_to], "cannot found this address from blacklist");
blackLists[_to] = false;
}
modifier onlyNotBlackList {
require(!blackLists[msg.sender], "sender cannot call this contract");
_;
}
// can accept ether
function() payable external {
}
function withdrawEther(uint256 amount) public onlyOwner {
inAppAddress.transfer(amount);
emit WithdrawEther(inAppAddress, amount);
}
function createOrUpdateItem(uint64 appId, uint64[] memory itemIds, address[] memory tokenAddresses, uint256[] memory values) public onlyGameMaster returns(bool) {
uint itemLength = itemIds.length;
require(itemLength == tokenAddresses.length && tokenAddresses.length == values.length);
uint64 itemId;
address tokenAddress;
uint256 value;
for(uint16 i = 0; i < itemLength; i++) {
itemId = itemIds[i];
tokenAddress = tokenAddresses[i];
value = values[i];
items[appId][itemId][tokenAddress] = value;
}
emit SetItem(appId);
return true;
}
function _getItemAmount(uint64 appId, uint64 itemId, address tokenAddress) private view returns(uint256) {
uint256 itemAmount = items[appId][itemId][tokenAddress];
require(itemAmount > 0, "invalid item id");
return itemAmount;
}
function purchaseItemOnERC20(address payable tokenAddress, uint64 appId, uint64 itemId) external onlyNotBlackList returns(bool) {
uint256 itemAmount = _getItemAmount(appId, itemId, tokenAddress);
erc20 = ERC20(tokenAddress);
require(erc20.transferFrom(msg.sender, inAppAddress, itemAmount), "failed transferFrom");
emit PurchaseItemOnERC20(msg.sender, tokenAddress, appId, itemId, itemAmount);
return true;
}
function purchaseItemOnITAM(uint64 appId, uint64 itemId) external onlyNotBlackList returns(bool) {
uint256 itemAmount = _getItemAmount(appId, itemId, address(this));
transfer(inAppAddress, itemAmount);
emit PurchaseItemOnITAM(msg.sender, appId, itemId, itemAmount);
return true;
}
function purchaseItemOnEther(uint64 appId, uint64 itemId) external payable onlyNotBlackList returns(bool) {
uint256 itemAmount = _getItemAmount(appId, itemId, address(0));
require(itemAmount == msg.value, "wrong quantity");
emit PurchaseItemOnEther(msg.sender, appId, itemId, msg.value);
return true;
}
}
{
"compilationTarget": {
"ITAMToken.sol": "ITAMToken"
},
"evmVersion": "byzantium",
"libraries": {},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"appId","type":"uint64"},{"name":"itemId","type":"uint64"}],"name":"purchaseItemOnERC20","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"secondMaster","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"teamAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"publicSaleReleaseCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategicSaleAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"addToBlackList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"appId","type":"uint64"},{"name":"itemIds","type":"uint64[]"},{"name":"tokenAddresses","type":"address[]"},{"name":"values","type":"uint256[]"}],"name":"createOrUpdateItem","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"removeFromBlackList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"inAppAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ecoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"firstMaster","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"strategicSaleReleaseCaps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"thirdMaster","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ecoReleaseCaps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"advisorAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"marketingReleaseCaps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketingAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unlock","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"advisorReleaseCaps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"decidedOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"privateSaleAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"privateSaleReleaseCaps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gameMaster","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_gameMaster","type":"address"}],"name":"setGameMaster","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"publicSaleAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"teamReleaseCaps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_strategicSaleAddress","type":"address"},{"name":"_privateSaleAddress","type":"address"},{"name":"_publicSaleAddress","type":"address"},{"name":"_teamAddress","type":"address"},{"name":"_advisorAddress","type":"address"},{"name":"_marketingAddress","type":"address"},{"name":"_ecoAddress","type":"address"},{"name":"_inAppAddress","type":"address"}],"name":"setAddresses","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"blackLists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"unlockCount","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"appId","type":"uint64"},{"name":"itemId","type":"uint64"}],"name":"purchaseItemOnEther","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"appId","type":"uint64"},{"name":"itemId","type":"uint64"}],"name":"purchaseItemOnITAM","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_firstMaster","type":"address"},{"name":"_secondMaster","type":"address"},{"name":"_thirdMaster","type":"address"},{"name":"_owner","type":"address"},{"name":"_gameMaster","type":"address"},{"name":"_strategicSaleAddress","type":"address"},{"name":"_privateSaleAddress","type":"address"},{"name":"_publicSaleAddress","type":"address"},{"name":"_teamAddress","type":"address"},{"name":"_advisorAddress","type":"address"},{"name":"_marketingAddress","type":"address"},{"name":"_ecoAddress","type":"address"},{"name":"_inAppAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"unlockCount","type":"uint8"}],"name":"Unlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"appId","type":"uint64"},{"indexed":false,"name":"itemId","type":"uint64"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PurchaseItemOnEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"appId","type":"uint64"},{"indexed":false,"name":"itemId","type":"uint64"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PurchaseItemOnITAM","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_spender","type":"address"},{"indexed":true,"name":"_tokenAddress","type":"address"},{"indexed":false,"name":"appId","type":"uint64"},{"indexed":false,"name":"itemId","type":"uint64"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PurchaseItemOnERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"appId","type":"uint64"}],"name":"SetItem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_owner","type":"address"}],"name":"ChangeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]