Skip to content

Instantly share code, notes, and snippets.

@ethereumdegen
Last active June 14, 2019 15:52
Show Gist options
  • Save ethereumdegen/21e4184cebfb0ad6280cdac6e2e0a757 to your computer and use it in GitHub Desktop.
Save ethereumdegen/21e4184cebfb0ad6280cdac6e2e0a757 to your computer and use it in GitHub Desktop.
A series of methods for querying the 0xBTC token using Web3
//put your ropsten API key here
var INFURA_ROPSTEN_URL = 'https://ropsten.infura.io/--------------';
var INFURA_MAINNET_URL = 'https://mainnet.infura.io/------------------';
//make sure you have these files
var deployedContractInfo = require('./assets/DeployedContractInfo.json');
var _0xBitcoinContract = require('./assets/_0xBitcoinToken.json');
//make sure you have web3 installed in Node... 'npm install web3 --save'
var embeddedWeb3 = require('web3')
export default class EthHelper {
init( ){
// this.alertRenderer = alertRenderer;
return this.connectWeb3(new embeddedWeb3());
}
connectWeb3(web3){
if (typeof web3 !== 'undefined') {
window.web3 = new Web3(new Web3.providers.HttpProvider(INFURA_MAINNET_URL));
console.log('connected to web3!')
return window.web3;
} else {
// this.alertRenderer.renderError('No web3? You should consider trying MetaMask!')
return {}
// fallback - use your fallback strategy (local node / hosted node + in-dapp id mgmt / fail)
//window.web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
}
}
async connectToContract(web3, dashboardRenderer, callback)
{
var tokenContract = this.getWeb3ContractInstance(
web3,
this.getContractAddress(),
this.getContractABI()
)
console.log(tokenContract)
var contractAddress = this.getContractAddress() ;
var difficulty = await tokenContract.getMiningDifficulty().toNumber() ;
var challenge_number = await tokenContract.getChallengeNumber() ;
var amountMined = await tokenContract.tokensMinted()
var totalSupply = await tokenContract._totalSupply()
var lastRewardAmount = await tokenContract.lastRewardAmount()
var lastRewardTo = await tokenContract.lastRewardTo()
var lastRewardEthBlockNumber = await tokenContract.lastRewardEthBlockNumber()
var decimals = Math.pow(10,8);
var renderData = {
contractUrl: 'https://etherscan.io/address/'+contractAddress,
contractAddress : contractAddress,
difficulty: difficulty,
challenge_number: challenge_number,
amountMined: (parseInt(amountMined) / decimals),
totalSupply: (parseInt(totalSupply) / decimals),
lastRewardTo: lastRewardTo,
lastRewardAmount: (parseInt(lastRewardAmount) / decimals),
lastRewardEthBlockNumber: lastRewardEthBlockNumber
}
//dashboardRenderer.renderContractData(renderData);
callback(renderData);
}
getWeb3ContractInstance(web3, contract_address, contract_abi )
{
return web3.eth.contract(contract_abi).at(contract_address)
}
getContractAddress()
{
return deployedContractInfo.contracts._0xbitcointoken.blockchain_address;
}
getContractABI()
{
return _0xBitcoinContract.abi;
}
}
{
"contractName": "_0xBitcoinToken",
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "tokens",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastRewardEthBlockNumber",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getMiningDifficulty",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "nonce",
"type": "uint256"
},
{
"name": "challenge_digest",
"type": "bytes32"
}
],
"name": "mint",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "tokens",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "rewardEra",
"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": "getMiningTarget",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"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": "getMiningReward",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getChallengeNumber",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "maxSupplyForEra",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "tokensMinted",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastRewardTo",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenOwner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "nonce",
"type": "uint256"
},
{
"name": "challenge_digest",
"type": "bytes32"
},
{
"name": "challenge_number",
"type": "bytes32"
},
{
"name": "testDifficulty",
"type": "uint256"
}
],
"name": "checkMintSolution",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "epochCount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "_MAXIMUM_TARGET",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "miningTarget",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "challengeNumber",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"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": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "nonce",
"type": "uint256"
},
{
"name": "challenge_digest",
"type": "bytes32"
},
{
"name": "challenge_number",
"type": "bytes32"
}
],
"name": "getMintDigest",
"outputs": [
{
"name": "digesttest",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "to",
"type": "address"
},
{
"name": "tokens",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "_BLOCKS_PER_READJUSTMENT",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastRewardAmount",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "tokens",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
}
],
"name": "approveAndCall",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "latestDifficultyPeriodStarted",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "newOwner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenAddress",
"type": "address"
},
{
"name": "tokens",
"type": "uint256"
}
],
"name": "transferAnyERC20Token",
"outputs": [
{
"name": "success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "_MINIMUM_TARGET",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenOwner",
"type": "address"
},
{
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "remaining",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": false,
"name": "reward_amount",
"type": "uint256"
},
{
"indexed": false,
"name": "epochCount",
"type": "uint256"
},
{
"indexed": false,
"name": "newChallengeNumber",
"type": "bytes32"
}
],
"name": "Mint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "tokens",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "tokenOwner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "tokens",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"bytecode": "0x60606040526101006008556101006009557f0400000000000000000000000000000000000000000000000000000000000000600a5534156200004057600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620000dc57600080fd5b6040805190810160405280600581526020017f307842544300000000000000000000000000000000000000000000000000000081525060029080519060200190620001299291906200045e565b506040805190810160405280600f81526020017f3078426974636f696e20546f6b656e000000000000000000000000000000000081525060039080519060200190620001779291906200045e565b506008600460006101000a81548160ff021916908360ff160217905550600460009054906101000a900460ff1660ff16600a0a6301406f400260058190555060006013819055506000600d81905550620001ec6002600554620002266401000000000262001d60179091906401000000009004565b600e81905550600a54600b8190555043600681905550620002206200024c6401000000000262001da0176401000000009004565b6200050d565b600080821115156200023757600080fd5b81838115156200024357fe5b04905092915050565b600e54601354101580156200026357506020600d54105b1562000276576001600d5401600d819055505b620002a36001600d540160020a600554620002266401000000000262001d60179091906401000000009004565b60055403600e819055506001430340600c8160001916905550620002e26001600754620003236401000000000262001d84179091906401000000009004565b6007819055506000600854600754811515620002fa57fe5b061415620003215762000320620003406401000000000262001e59176401000000009004565b5b565b600081830190508281101515156200033a57600080fd5b92915050565b6000806000600654430392506008549150603c8202905080831015620003b657620003aa6200038a6014600b54620002266401000000000262001d60179091906401000000009004565b600b54620004416401000000000262001e3d179091906401000000009004565b600b8190555062000407565b62000400620003e06014600b54620002266401000000000262001d60179091906401000000009004565b600b54620003236401000000000262001d84179091906401000000009004565b600b819055505b43600681905550600954600b5410156200042557600954600b819055505b600a54600b5411156200043c57600a54600b819055505b505050565b60008282111515156200045357600080fd5b818303905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004a157805160ff1916838001178555620004d2565b82800160010185558215620004d2579182015b82811115620004d1578251825591602001919060010190620004b4565b5b509050620004e19190620004e5565b5090565b6200050a91905b8082111562000506576000816000905550600101620004ec565b5090565b90565b611f42806200051d6000396000f3006060604052600436106101c2576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146101c7578063095ea7b314610255578063163aa00d146102af57806317da485f146102d85780631801fbe51461030157806318160ddd1461034957806323b872dd146103725780632d38bf7a146103eb578063313ce5671461041457806332e99708146104435780633eaaf86b1461046c578063490203a7146104955780634ef37628146104be5780634fa972e1146104ef5780636de9f32b146105185780636fd396d61461054157806370a082311461059657806379ba5097146105e357806381269a56146105f8578063829965cc1461065657806387a2a9d61461067f5780638a769d35146106a85780638ae0368b146106d15780638da5cb5b1461070257806395d89b411461075757806397566aa0146107e5578063a9059cbb1461083e578063b5ade81b14610898578063bafedcaa146108c1578063cae9ca51146108ea578063cb9ae70714610987578063d4ee1d90146109b0578063dc39d06d14610a05578063dc6e9cf914610a5f578063dd62ed3e14610a88578063f2fde38b14610af4575b600080fd5b34156101d257600080fd5b6101da610b2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561021a5780820151818401526020810190506101ff565b50505050905090810190601f1680156102475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561026057600080fd5b610295600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bcb565b604051808215151515815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610cbd565b6040518082815260200191505060405180910390f35b34156102e357600080fd5b6102eb610cc3565b6040518082815260200191505060405180910390f35b341561030c57600080fd5b61032f600480803590602001909190803560001916906020019091905050610ce1565b604051808215151515815260200191505060405180910390f35b341561035457600080fd5b61035c610f54565b6040518082815260200191505060405180910390f35b341561037d57600080fd5b6103d1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610f9f565b604051808215151515815260200191505060405180910390f35b34156103f657600080fd5b6103fe61124a565b6040518082815260200191505060405180910390f35b341561041f57600080fd5b610427611250565b604051808260ff1660ff16815260200191505060405180910390f35b341561044e57600080fd5b610456611263565b6040518082815260200191505060405180910390f35b341561047757600080fd5b61047f61126d565b6040518082815260200191505060405180910390f35b34156104a057600080fd5b6104a8611273565b6040518082815260200191505060405180910390f35b34156104c957600080fd5b6104d16112aa565b60405180826000191660001916815260200191505060405180910390f35b34156104fa57600080fd5b6105026112b4565b6040518082815260200191505060405180910390f35b341561052357600080fd5b61052b6112ba565b6040518082815260200191505060405180910390f35b341561054c57600080fd5b6105546112c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105a157600080fd5b6105cd600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112e6565b6040518082815260200191505060405180910390f35b34156105ee57600080fd5b6105f661132f565b005b341561060357600080fd5b61063c600480803590602001909190803560001916906020019091908035600019169060200190919080359060200190919050506114ce565b604051808215151515815260200191505060405180910390f35b341561066157600080fd5b610669611577565b6040518082815260200191505060405180910390f35b341561068a57600080fd5b61069261157d565b6040518082815260200191505060405180910390f35b34156106b357600080fd5b6106bb611583565b6040518082815260200191505060405180910390f35b34156106dc57600080fd5b6106e4611589565b60405180826000191660001916815260200191505060405180910390f35b341561070d57600080fd5b61071561158f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561076257600080fd5b61076a6115b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107aa57808201518184015260208101905061078f565b50505050905090810190601f1680156107d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156107f057600080fd5b61082060048080359060200190919080356000191690602001909190803560001916906020019091905050611652565b60405180826000191660001916815260200191505060405180910390f35b341561084957600080fd5b61087e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506116cb565b604051808215151515815260200191505060405180910390f35b34156108a357600080fd5b6108ab611866565b6040518082815260200191505060405180910390f35b34156108cc57600080fd5b6108d461186c565b6040518082815260200191505060405180910390f35b34156108f557600080fd5b61096d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611872565b604051808215151515815260200191505060405180910390f35b341561099257600080fd5b61099a611abc565b6040518082815260200191505060405180910390f35b34156109bb57600080fd5b6109c3611ac2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a1057600080fd5b610a45600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611ae8565b604051808215151515815260200191505060405180910390f35b3415610a6a57600080fd5b610a72611c34565b6040518082815260200191505060405180910390f35b3415610a9357600080fd5b610ade600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c3a565b6040518082815260200191505060405180910390f35b3415610aff57600080fd5b610b2b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611cc1565b005b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bc35780601f10610b9857610100808354040283529160200191610bc3565b820191906000526020600020905b815481529060010190602001808311610ba657829003601f168201915b505050505081565b600081601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60115481565b6000610cdc600b54600a54611d6090919063ffffffff16565b905090565b600080600080610cef611273565b9250600c5433876040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040518091039020915084600019168260001916141515610d7457600080fd5b600b5482600190041115610d8757600080fd5b60126000836000191660001916815260200190815260200160002054905060075460126000846000191660001916815260200190815260200160002081905550600081141515610dd657600080fd5b610e2883601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e8083601354611d8490919063ffffffff16565b60138190555033600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260108190555043601181905550610edd611da0565b3373ffffffffffffffffffffffffffffffffffffffff167fcf6fbb9dcea7d07263ab4f5c3a92f53af33dffc421d9d121e1c74b307e68189d84600754600c54604051808481526020018381526020018260001916600019168152602001935050505060405180910390a26001935050505092915050565b6000601460008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055403905090565b6000610ff382601460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3d90919063ffffffff16565b601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110c582601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3d90919063ffffffff16565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061119782601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b601460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600d5481565b600460009054906101000a900460ff1681565b6000600b54905090565b60055481565b60006112a5600d5460020a600460009054906101000a900460ff1660ff16600a0a603202611d6090919063ffffffff16565b905090565b6000600c54905090565b600e5481565b60135481565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138b57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806000808492506114df611273565b91508533896040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209050600b548160019004111561155f57600080fd5b86600019168160001916149350505050949350505050565b60075481565b600a5481565b600b5481565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561164a5780601f1061161f5761010080835404028352916020019161164a565b820191906000526020600020905b81548152906001019060200180831161162d57829003601f168201915b505050505081565b6000808233866040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209050809150509392505050565b600061171f82601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3d90919063ffffffff16565b601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117b482601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b601460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60085481565b60105481565b600082601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611a4f578082015181840152602081019050611a34565b50505050905090810190601f168015611a7c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1515611a9d57600080fd5b6102c65a03f11515611aae57600080fd5b505050600190509392505050565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b4557600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611c1157600080fd5b6102c65a03f11515611c2257600080fd5b50505060405180519050905092915050565b60095481565b6000601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d1c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082111515611d7057600080fd5b8183811515611d7b57fe5b04905092915050565b60008183019050828110151515611d9a57600080fd5b92915050565b600e5460135410158015611db657506020600d54105b15611dc8576001600d5401600d819055505b611de56001600d540160020a600554611d6090919063ffffffff16565b60055403600e819055506001430340600c8160001916905550611e146001600754611d8490919063ffffffff16565b6007819055506000600854600754811515611e2b57fe5b061415611e3b57611e3a611e59565b5b565b6000828211151515611e4e57600080fd5b818303905092915050565b6000806000600654430392506008549150603c8202905080831015611ead57611ea2611e916014600b54611d6090919063ffffffff16565b600b54611e3d90919063ffffffff16565b600b81905550611ede565b611ed7611ec66014600b54611d6090919063ffffffff16565b600b54611d8490919063ffffffff16565b600b819055505b43600681905550600954600b541015611efb57600954600b819055505b600a54600b541115611f1157600a54600b819055505b5050505600a165627a7a72305820d59f3473ee8072d3b732daa114aa23e8db3e168007f7eca216306713144505270029",
"deployedBytecode": "0x6060604052600436106101c2576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146101c7578063095ea7b314610255578063163aa00d146102af57806317da485f146102d85780631801fbe51461030157806318160ddd1461034957806323b872dd146103725780632d38bf7a146103eb578063313ce5671461041457806332e99708146104435780633eaaf86b1461046c578063490203a7146104955780634ef37628146104be5780634fa972e1146104ef5780636de9f32b146105185780636fd396d61461054157806370a082311461059657806379ba5097146105e357806381269a56146105f8578063829965cc1461065657806387a2a9d61461067f5780638a769d35146106a85780638ae0368b146106d15780638da5cb5b1461070257806395d89b411461075757806397566aa0146107e5578063a9059cbb1461083e578063b5ade81b14610898578063bafedcaa146108c1578063cae9ca51146108ea578063cb9ae70714610987578063d4ee1d90146109b0578063dc39d06d14610a05578063dc6e9cf914610a5f578063dd62ed3e14610a88578063f2fde38b14610af4575b600080fd5b34156101d257600080fd5b6101da610b2d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561021a5780820151818401526020810190506101ff565b50505050905090810190601f1680156102475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561026057600080fd5b610295600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bcb565b604051808215151515815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610cbd565b6040518082815260200191505060405180910390f35b34156102e357600080fd5b6102eb610cc3565b6040518082815260200191505060405180910390f35b341561030c57600080fd5b61032f600480803590602001909190803560001916906020019091905050610ce1565b604051808215151515815260200191505060405180910390f35b341561035457600080fd5b61035c610f54565b6040518082815260200191505060405180910390f35b341561037d57600080fd5b6103d1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610f9f565b604051808215151515815260200191505060405180910390f35b34156103f657600080fd5b6103fe61124a565b6040518082815260200191505060405180910390f35b341561041f57600080fd5b610427611250565b604051808260ff1660ff16815260200191505060405180910390f35b341561044e57600080fd5b610456611263565b6040518082815260200191505060405180910390f35b341561047757600080fd5b61047f61126d565b6040518082815260200191505060405180910390f35b34156104a057600080fd5b6104a8611273565b6040518082815260200191505060405180910390f35b34156104c957600080fd5b6104d16112aa565b60405180826000191660001916815260200191505060405180910390f35b34156104fa57600080fd5b6105026112b4565b6040518082815260200191505060405180910390f35b341561052357600080fd5b61052b6112ba565b6040518082815260200191505060405180910390f35b341561054c57600080fd5b6105546112c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105a157600080fd5b6105cd600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112e6565b6040518082815260200191505060405180910390f35b34156105ee57600080fd5b6105f661132f565b005b341561060357600080fd5b61063c600480803590602001909190803560001916906020019091908035600019169060200190919080359060200190919050506114ce565b604051808215151515815260200191505060405180910390f35b341561066157600080fd5b610669611577565b6040518082815260200191505060405180910390f35b341561068a57600080fd5b61069261157d565b6040518082815260200191505060405180910390f35b34156106b357600080fd5b6106bb611583565b6040518082815260200191505060405180910390f35b34156106dc57600080fd5b6106e4611589565b60405180826000191660001916815260200191505060405180910390f35b341561070d57600080fd5b61071561158f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561076257600080fd5b61076a6115b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107aa57808201518184015260208101905061078f565b50505050905090810190601f1680156107d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156107f057600080fd5b61082060048080359060200190919080356000191690602001909190803560001916906020019091905050611652565b60405180826000191660001916815260200191505060405180910390f35b341561084957600080fd5b61087e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506116cb565b604051808215151515815260200191505060405180910390f35b34156108a357600080fd5b6108ab611866565b6040518082815260200191505060405180910390f35b34156108cc57600080fd5b6108d461186c565b6040518082815260200191505060405180910390f35b34156108f557600080fd5b61096d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611872565b604051808215151515815260200191505060405180910390f35b341561099257600080fd5b61099a611abc565b6040518082815260200191505060405180910390f35b34156109bb57600080fd5b6109c3611ac2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a1057600080fd5b610a45600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611ae8565b604051808215151515815260200191505060405180910390f35b3415610a6a57600080fd5b610a72611c34565b6040518082815260200191505060405180910390f35b3415610a9357600080fd5b610ade600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c3a565b6040518082815260200191505060405180910390f35b3415610aff57600080fd5b610b2b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611cc1565b005b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bc35780601f10610b9857610100808354040283529160200191610bc3565b820191906000526020600020905b815481529060010190602001808311610ba657829003601f168201915b505050505081565b600081601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60115481565b6000610cdc600b54600a54611d6090919063ffffffff16565b905090565b600080600080610cef611273565b9250600c5433876040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040518091039020915084600019168260001916141515610d7457600080fd5b600b5482600190041115610d8757600080fd5b60126000836000191660001916815260200190815260200160002054905060075460126000846000191660001916815260200190815260200160002081905550600081141515610dd657600080fd5b610e2883601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e8083601354611d8490919063ffffffff16565b60138190555033600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260108190555043601181905550610edd611da0565b3373ffffffffffffffffffffffffffffffffffffffff167fcf6fbb9dcea7d07263ab4f5c3a92f53af33dffc421d9d121e1c74b307e68189d84600754600c54604051808481526020018381526020018260001916600019168152602001935050505060405180910390a26001935050505092915050565b6000601460008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055403905090565b6000610ff382601460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3d90919063ffffffff16565b601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110c582601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3d90919063ffffffff16565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061119782601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b601460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600d5481565b600460009054906101000a900460ff1681565b6000600b54905090565b60055481565b60006112a5600d5460020a600460009054906101000a900460ff1660ff16600a0a603202611d6090919063ffffffff16565b905090565b6000600c54905090565b600e5481565b60135481565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138b57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806000808492506114df611273565b91508533896040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209050600b548160019004111561155f57600080fd5b86600019168160001916149350505050949350505050565b60075481565b600a5481565b600b5481565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561164a5780601f1061161f5761010080835404028352916020019161164a565b820191906000526020600020905b81548152906001019060200180831161162d57829003601f168201915b505050505081565b6000808233866040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209050809150509392505050565b600061171f82601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3d90919063ffffffff16565b601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117b482601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8490919063ffffffff16565b601460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60085481565b60105481565b600082601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611a4f578082015181840152602081019050611a34565b50505050905090810190601f168015611a7c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1515611a9d57600080fd5b6102c65a03f11515611aae57600080fd5b505050600190509392505050565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b4557600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611c1157600080fd5b6102c65a03f11515611c2257600080fd5b50505060405180519050905092915050565b60095481565b6000601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d1c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082111515611d7057600080fd5b8183811515611d7b57fe5b04905092915050565b60008183019050828110151515611d9a57600080fd5b92915050565b600e5460135410158015611db657506020600d54105b15611dc8576001600d5401600d819055505b611de56001600d540160020a600554611d6090919063ffffffff16565b60055403600e819055506001430340600c8160001916905550611e146001600754611d8490919063ffffffff16565b6007819055506000600854600754811515611e2b57fe5b061415611e3b57611e3a611e59565b5b565b6000828211151515611e4e57600080fd5b818303905092915050565b6000806000600654430392506008549150603c8202905080831015611ead57611ea2611e916014600b54611d6090919063ffffffff16565b600b54611e3d90919063ffffffff16565b600b81905550611ede565b611ed7611ec66014600b54611d6090919063ffffffff16565b600b54611d8490919063ffffffff16565b600b819055505b43600681905550600954600b541015611efb57600954600b819055505b600a54600b541115611f1157600a54600b819055505b5050505600a165627a7a72305820d59f3473ee8072d3b732daa114aa23e8db3e168007f7eca216306713144505270029",
"sourceMap": "3478:11796:0:-;;;3927:3;3888:42;;4037:4;4006:35;;4101:6;4070:37;;4982:514;;;;;;;;2804:10;2796:5;;:18;;;;;;;;;;;;;;;;;;2881:5;;;;;;;;;;;2867:19;;:10;:19;;;2859:28;;;;;;;;5036:16;;;;;;;;;;;;;;;;;;:6;:16;;;;;;;;;;;;:::i;:::-;;5063:24;;;;;;;;;;;;;;;;;;:4;:24;;;;;;;;;;;;:::i;:::-;;5109:1;5098:8;;:12;;;;;;;;;;;;;;;;;;5156:8;;;;;;;;;;;5151:14;;5147:2;:18;5136:8;:29;5121:12;:44;;;;5190:1;5175:12;:16;;;;5214:1;5202:9;:13;;;;5243:19;5260:1;5243:12;;:16;;;;;;:19;;;;;:::i;:::-;5225:15;:37;;;;5288:15;;5273:12;:30;;;;5346:12;5314:29;:44;;;;5369:22;:20;;;;;:22;;;:::i;:::-;3478:11796;;916:113;968:6;999:1;995;:5;987:14;;;;;;;;1020:1;1016;:5;;;;;;;;1012:9;;916:113;;;;:::o;5502:821::-;5646:15;;5630:12;;:31;;:49;;;;;5677:2;5665:9;;:14;5630:49;5627:152;;;5769:1;5757:9;;:13;5745:9;:25;;;;5627:152;5884:37;5918:1;5906:9;;:13;5902:1;:18;5884:12;;:16;;;;;;:37;;;;;:::i;:::-;5869:12;;:52;5851:15;:70;;;;6096:1;6081:12;:16;6065:33;6047:15;:51;;;;;;;6121:17;6136:1;6121:10;;:14;;;;;;:17;;;;;:::i;:::-;6108:10;:30;;;;6265:1;6237:24;;6224:10;;:37;;;;;;;;:42;6221:93;;;6284:21;:19;;;;;:21;;;:::i;:::-;6221:93;5502:821::o;542:114::-;594:6;621:1;617;:5;613:9;;646:1;641;:6;;633:15;;;;;;;;542:114;;;;:::o;6547:1108::-;6599:39;6857:16;6917:28;6656:29;;6641:12;:44;6599:86;;6876:24;;6857:43;;6962:2;6948:11;:16;6917:47;;7127:23;7090:34;:60;7086:285;;;7215:38;7232:20;7249:2;7232:12;;:16;;;;;;:20;;;;;:::i;:::-;7215:12;;:16;;;;;;:38;;;;;:::i;:::-;7200:12;:53;;;;7086:285;;;7322:38;7339:20;7356:2;7339:12;;:16;;;;;;:20;;;;;:::i;:::-;7322:12;;:16;;;;;;:38;;;;;:::i;:::-;7307:12;:53;;;;7086:285;7415:12;7383:29;:44;;;;7456:15;;7441:12;;:30;7438:100;;;7512:15;;7497:12;:30;;;;7438:100;7566:15;;7551:12;;:30;7548:101;;;7623:15;;7608:12;:30;;;;7548:101;6547:1108;;;:::o;662:114::-;714:6;746:1;741;:6;;733:15;;;;;;;;767:1;763;:5;759:9;;662:114;;;;:::o;3478:11796::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "3478:11796:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14835:8;;;3593:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12405:203:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4441:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10036:119;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8393:1361;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10815:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13149:338;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4312:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3619;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10161:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3647:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10367:257;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9844:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4339:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4559:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4374:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11156:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3022:191;;;;;;;;;;;;;;7902:484;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3832:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4070:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4115:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4222:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2625:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3566;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7662:232:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11629:262;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3888:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4407:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14290:312;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3782:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2652:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15087:184;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4006:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13773:151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2914:102;;;;;;;;;;;;;;;;;;;;;;;;;;;;3593:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;12405:203::-;12468:12;12524:6;12493:7;:19;12501:10;12493:19;;;;;;;;;;;;;;;:28;12513:7;12493:28;;;;;;;;;;;;;;;:37;;;;12562:7;12541:37;;12550:10;12541:37;;;12571:6;12541:37;;;;;;;;;;;;;;;;;;12596:4;12589:11;;12405:203;;;;:::o;4441:36::-;;;;:::o;10036:119::-;10092:4;10115:33;10135:12;;10115:15;;:19;;:33;;;;:::i;:::-;10108:40;;10036:119;:::o;8393:1361::-;8464:12;8540:18;8739:14;9139;8561:17;:15;:17::i;:::-;8540:38;;8767:15;;8784:10;8796:5;8757:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8739:64;;8883:16;8873:26;;;:6;:26;;;;;8869:40;;;8901:8;;;8869:40;8994:12;;8984:6;8976:15;;;:30;8973:43;;;9008:8;;;8973:43;9156:17;:25;9174:6;9156:25;;;;;;;;;;;;;;;;;;9139:42;;9220:10;;9192:17;:25;9210:6;9192:25;;;;;;;;;;;;;;;;;:38;;;;9257:1;9244:9;:14;;9241:27;;;9260:8;;;9241:27;9351:39;9376:13;9351:8;:20;9360:10;9351:20;;;;;;;;;;;;;;;;:24;;:39;;;;:::i;:::-;9328:8;:20;9337:10;9328:20;;;;;;;;;;;;;;;:62;;;;9417:31;9434:13;9417:12;;:16;;:31;;;;:::i;:::-;9402:12;:46;;;;9515:10;9500:12;;:25;;;;;;;;;;;;;;;;;;9554:13;9535:16;:32;;;;9604:12;9577:24;:39;;;;9629:22;:20;:22::i;:::-;9669:10;9664:61;;;9681:13;9696:10;;9708:15;;9664:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9742:4;9735:11;;8393:1361;;;;;;;:::o;10815:116::-;10863:4;10903:8;:20;10920:1;10903:20;;;;;;;;;;;;;;;;10887:12;;:36;10880:43;;10815:116;:::o;13149:338::-;13226:12;13268:26;13287:6;13268:8;:14;13277:4;13268:14;;;;;;;;;;;;;;;;:18;;:26;;;;:::i;:::-;13251:8;:14;13260:4;13251:14;;;;;;;;;;;;;;;:43;;;;13333:37;13363:6;13333:7;:13;13341:4;13333:13;;;;;;;;;;;;;;;:25;13347:10;13333:25;;;;;;;;;;;;;;;;:29;;:37;;;;:::i;:::-;13305:7;:13;13313:4;13305:13;;;;;;;;;;;;;;;:25;13319:10;13305:25;;;;;;;;;;;;;;;:65;;;;13396:24;13413:6;13396:8;:12;13405:2;13396:12;;;;;;;;;;;;;;;;:16;;:24;;;;:::i;:::-;13381:8;:12;13390:2;13381:12;;;;;;;;;;;;;;;:39;;;;13446:2;13431:26;;13440:4;13431:26;;;13450:6;13431:26;;;;;;;;;;;;;;;;;;13475:4;13468:11;;13149:338;;;;;:::o;4312:21::-;;;;:::o;3619:::-;;;;;;;;;;;;;:::o;10161:92::-;10213:4;10235:12;;10228:19;;10161:92;:::o;3647:24::-;;;;:::o;10367:257::-;10419:4;10569:46;10604:9;;10601:1;:12;10584:8;;;;;;;;;;;10579:14;;10575:2;:18;10570:2;:23;10569:30;;:46;;;;:::i;:::-;10562:53;;10367:257;:::o;9844:103::-;9899:7;9925:15;;9918:22;;9844:103;:::o;4339:27::-;;;;:::o;4559:24::-;;;;:::o;4374:27::-;;;;;;;;;;;;;:::o;11156:124::-;11220:12;11252:8;:20;11261:10;11252:20;;;;;;;;;;;;;;;;11245:27;;11156:124;;;:::o;3022:191::-;3089:8;;;;;;;;;;;3075:22;;:10;:22;;;3067:31;;;;;;;;3137:8;;;;;;;;;;;3109:37;;3130:5;;;;;;;;;;;3109:37;;;;;;;;;;;;3165:8;;;;;;;;;;;3157:5;;:16;;;;;;;;;;;;;;;;;;3203:1;3184:8;;:21;;;;;;;;;;;;;;;;;;3022:191::o;7902:484::-;8033:12;8060:15;8104:18;8155:14;8078;8060:32;;8125:17;:15;:17::i;:::-;8104:38;;8182:16;8199:10;8210:5;8172:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8155:61;;8304:12;;8294:6;8286:15;;;:30;8283:43;;;8318:8;;;8283:43;8357:16;8347:26;;;:6;:26;;;;8339:35;;7902:484;;;;;;;;;:::o;3832:22::-;;;;:::o;4070:37::-;;;;:::o;4115:24::-;;;;:::o;4222:30::-;;;;:::o;2625:20::-;;;;;;;;;;;;;:::o;3566:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7662:232::-;7768:18;7799:14;7826:16;7843:10;7854:5;7816:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7799:61;;7878:6;7871:13;;7662:232;;;;;;:::o;11629:262::-;11688:12;11736:32;11761:6;11736:8;:20;11745:10;11736:20;;;;;;;;;;;;;;;;:24;;:32;;;;:::i;:::-;11713:8;:20;11722:10;11713:20;;;;;;;;;;;;;;;:55;;;;11794:24;11811:6;11794:8;:12;11803:2;11794:12;;;;;;;;;;;;;;;;:16;;:24;;;;:::i;:::-;11779:8;:12;11788:2;11779:12;;;;;;;;;;;;;;;:39;;;;11850:2;11829:32;;11838:10;11829:32;;;11854:6;11829:32;;;;;;;;;;;;;;;;;;11879:4;11872:11;;11629:262;;;;:::o;3888:42::-;;;;:::o;4407:28::-;;;;:::o;14290:312::-;14372:12;14428:6;14397:7;:19;14405:10;14397:19;;;;;;;;;;;;;;;:28;14417:7;14397:28;;;;;;;;;;;;;;;:37;;;;14466:7;14445:37;;14454:10;14445:37;;;14475:6;14445:37;;;;;;;;;;;;;;;;;;14516:7;14493:47;;;14541:10;14553:6;14561:4;14567;14493:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14590:4:0;14583:11;;14290:312;;;;;:::o;3782:41::-;;;;:::o;2652:23::-;;;;;;;;;;;;;:::o;15087:184::-;15179:12;2881:5;;;;;;;;;;;2867:19;;:10;:19;;;2859:28;;;;;;;;15226:12;15211:37;;;15249:5;;;;;;;;;;;15256:6;15211:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15204:59;;15087:184;;;;:::o;4006:35::-;;;;:::o;13773:151::-;13854:14;13888:7;:19;13896:10;13888:19;;;;;;;;;;;;;;;:28;13908:7;13888:28;;;;;;;;;;;;;;;;13881:35;;13773:151;;;;:::o;2914:102::-;2881:5;;;;;;;;;;;2867:19;;:10;:19;;;2859:28;;;;;;;;2999:9;2988:8;;:20;;;;;;;;;;;;;;;;;;2914:102;:::o;916:113::-;968:6;999:1;995;:5;987:14;;;;;;;;1020:1;1016;:5;;;;;;;;1012:9;;916:113;;;;:::o;542:114::-;594:6;621:1;617;:5;613:9;;646:1;641;:6;;633:15;;;;;;;;542:114;;;;:::o;5502:821::-;5646:15;;5630:12;;:31;;:49;;;;;5677:2;5665:9;;:14;5630:49;5627:152;;;5769:1;5757:9;;:13;5745:9;:25;;;;5627:152;5884:37;5918:1;5906:9;;:13;5902:1;:18;5884:12;;:16;;:37;;;;:::i;:::-;5869:12;;:52;5851:15;:70;;;;6096:1;6081:12;:16;6065:33;6047:15;:51;;;;;;;6121:17;6136:1;6121:10;;:14;;:17;;;;:::i;:::-;6108:10;:30;;;;6265:1;6237:24;;6224:10;;:37;;;;;;;;:42;6221:93;;;6284:21;:19;:21::i;:::-;6221:93;5502:821::o;662:114::-;714:6;746:1;741;:6;;733:15;;;;;;;;767:1;763;:5;759:9;;662:114;;;;:::o;6547:1108::-;6599:39;6857:16;6917:28;6656:29;;6641:12;:44;6599:86;;6876:24;;6857:43;;6962:2;6948:11;:16;6917:47;;7127:23;7090:34;:60;7086:285;;;7215:38;7232:20;7249:2;7232:12;;:16;;:20;;;;:::i;:::-;7215:12;;:16;;:38;;;;:::i;:::-;7200:12;:53;;;;7086:285;;;7322:38;7339:20;7356:2;7339:12;;:16;;:20;;;;:::i;:::-;7322:12;;:16;;:38;;;;:::i;:::-;7307:12;:53;;;;7086:285;7415:12;7383:29;:44;;;;7456:15;;7441:12;;:30;7438:100;;;7512:15;;7497:12;:30;;;;7438:100;7566:15;;7551:12;;:30;7548:101;;;7623:15;;7608:12;:30;;;;7548:101;6547:1108;;;:::o",
"source": "pragma solidity ^0.4.18;\n\n\n// ----------------------------------------------------------------------------\n\n// '0xBitcoin Token' contract\n\n//\n\n// Symbol : 0xBTC\n\n// Name : 0xBitcoin Token\n\n// Total supply: 21,000,000.00\n\n// Decimals : 8\n\n//\n\n\n// ----------------------------------------------------------------------------\n\n\n\n// ----------------------------------------------------------------------------\n\n// Safe maths\n\n// ----------------------------------------------------------------------------\n\nlibrary SafeMath {\n\n function add(uint a, uint b) internal pure returns (uint c) {\n\n c = a + b;\n\n require(c >= a);\n\n }\n\n function sub(uint a, uint b) internal pure returns (uint c) {\n\n require(b <= a);\n\n c = a - b;\n\n }\n\n function mul(uint a, uint b) internal pure returns (uint c) {\n\n c = a * b;\n\n require(a == 0 || c / a == b);\n\n }\n\n function div(uint a, uint b) internal pure returns (uint c) {\n\n require(b > 0);\n\n c = a / b;\n\n }\n\n}\n\n\n\n// ----------------------------------------------------------------------------\n\n// ERC Token Standard #20 Interface\n\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md\n\n// ----------------------------------------------------------------------------\n\ncontract ERC20Interface {\n\n function totalSupply() public constant returns (uint);\n\n function balanceOf(address tokenOwner) public constant returns (uint balance);\n\n function allowance(address tokenOwner, address spender) public constant returns (uint remaining);\n\n function transfer(address to, uint tokens) public returns (bool success);\n\n function approve(address spender, uint tokens) public returns (bool success);\n\n function transferFrom(address from, address to, uint tokens) public returns (bool success);\n\n\n event Transfer(address indexed from, address indexed to, uint tokens);\n\n event Approval(address indexed tokenOwner, address indexed spender, uint tokens);\n\n}\n\n\n\n// ----------------------------------------------------------------------------\n\n// Contract function to receive approval and execute function in one call\n\n//\n\n// Borrowed from MiniMeToken\n\n// ----------------------------------------------------------------------------\n\ncontract ApproveAndCallFallBack {\n\n function receiveApproval(address from, uint256 tokens, address token, bytes data) public;\n\n}\n\n\n\n// ----------------------------------------------------------------------------\n\n// Owned contract\n\n// ----------------------------------------------------------------------------\n\ncontract Owned {\n\n address public owner;\n\n address public newOwner;\n\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n\n function Owned() public {\n\n owner = msg.sender;\n\n }\n\n\n modifier onlyOwner {\n\n require(msg.sender == owner);\n\n _;\n\n }\n\n\n function transferOwnership(address _newOwner) public onlyOwner {\n\n newOwner = _newOwner;\n\n }\n\n function acceptOwnership() public {\n\n require(msg.sender == newOwner);\n\n OwnershipTransferred(owner, newOwner);\n\n owner = newOwner;\n\n newOwner = address(0);\n\n }\n\n}\n\n\n\n// ----------------------------------------------------------------------------\n\n// ERC20 Token, with the addition of symbol, name and decimals and an\n\n// initial fixed supply\n\n// ----------------------------------------------------------------------------\n\ncontract _0xBitcoinToken is ERC20Interface, Owned {\n\n using SafeMath for uint;\n\n\n string public symbol;\n\n string public name;\n\n uint8 public decimals;\n\n uint public _totalSupply;\n\n\n\n //ethereum block number when last 0xbtc was minted\n // uint public latestMiningEpochStarted;\n\n uint public latestDifficultyPeriodStarted;\n\n\n\n uint public epochCount;//number of 'blocks' mined\n\n\n uint public _BLOCKS_PER_READJUSTMENT = 256;\n\n\n //a big number is easier ; just find a solution that is smaller\n uint public _MINIMUM_TARGET = 2**8;\n\n //a little number\n uint public _MAXIMUM_TARGET = 2**250;\n\n\n uint public miningTarget;\n // uint public miningDifficulty; //adjusts every 2016 epochs (or blocks)\n\n bytes32 public challengeNumber; //generate a new one when a new reward is minted\n\n\n\n uint public rewardEra;\n uint public maxSupplyForEra;\n\n\n address public lastRewardTo;\n uint public lastRewardAmount;\n uint public lastRewardEthBlockNumber;\n\n\n mapping(bytes32 => uint) rewardHashesFound; //the hash and the nonce\n\n uint public tokensMinted;\n\n mapping(address => uint) balances;\n\n\n\n\n\n mapping(address => mapping(address => uint)) allowed;\n\n\n\n\n event Mint(address indexed from, uint reward_amount, uint epochCount, bytes32 newChallengeNumber);\n\n // ------------------------------------------------------------------------\n\n // Constructor\n\n // ------------------------------------------------------------------------\n\n function _0xBitcoinToken() public onlyOwner{\n\n symbol = \"0xBTC\";\n\n name = \"0xBitcoin Token\";\n\n decimals = 8;\n\n _totalSupply = 21000000 * 10**uint(decimals);\n tokensMinted = 0;\n\n rewardEra = 0;\n maxSupplyForEra = _totalSupply.div(2);\n\n miningTarget = _MAXIMUM_TARGET;\n\n latestDifficultyPeriodStarted = block.number;\n\n _startNewMiningEpoch();\n\n //balances[owner] = _totalSupply;\n\n //Transfer(address(0), owner, _totalSupply);\n\n }\n\n function _startNewMiningEpoch() internal {//a new block to be mined\n\n //latestMiningEpochStarted = block.number;\n\n if(tokensMinted >= maxSupplyForEra && rewardEra < 32) //32 is the final era, almost all tokens minted\n {\n rewardEra = rewardEra + 1;\n }\n\n //set the next minted supply at which the era will change\n maxSupplyForEra = _totalSupply - _totalSupply.div( 2**(rewardEra + 1));\n\n //make the latest ethereum block hash a part of the next challenge for PoW to prevent pre-mining future blocks\n challengeNumber = block.blockhash(block.number - 1);\n\n\n epochCount = epochCount.add(1);\n\n //every so often, readjust difficulty, dont readjust when deploying\n if(epochCount % _BLOCKS_PER_READJUSTMENT == 0)\n {\n _reAdjustDifficulty();\n }\n\n\n\n }\n\n\n\n\n //https://en.bitcoin.it/wiki/Difficulty#What_is_the_formula_for_difficulty.3F\n //as of 2017 the bitcoin difficulty was up to 17 zeroes, it was only 8 in the early days\n\n //readjust the target by 5 percent\n function _reAdjustDifficulty() internal {\n\n\n uint ethBlocksSinceLastDifficultyPeriod = block.number - latestDifficultyPeriodStarted;\n\n //assume 360 ethereum blocks per hour\n\n //we want miners to spend 10 minutes to mine each 'block', about 60 ethereum blocks = one 0xbitcoin epoch\n uint epochsMined = _BLOCKS_PER_READJUSTMENT; //256\n\n uint targetEthBlocksPerEpoch = epochsMined * 60; //should be 60 times slower than ethereum\n\n //if there were less eth blocks passed in time than expected\n if( ethBlocksSinceLastDifficultyPeriod < targetEthBlocksPerEpoch )\n {\n //make it harder\n miningTarget = miningTarget.sub(miningTarget.div(20));\n }else{\n //make it easier\n miningTarget = miningTarget.add(miningTarget.div(20));\n }\n\n\n\n latestDifficultyPeriodStarted = block.number;\n\n if(miningTarget < _MINIMUM_TARGET) //6\n {\n miningTarget = _MINIMUM_TARGET;\n }\n\n if(miningTarget > _MAXIMUM_TARGET) //54\n {\n miningTarget = _MAXIMUM_TARGET;\n }\n }\n\n\n function getMintDigest(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number) public returns (bytes32 digesttest) {\n\n bytes32 digest = keccak256(challenge_number,msg.sender,nonce);\n\n return digest;\n\n }\n\n function checkMintSolution(uint256 nonce, bytes32 challenge_digest, bytes32 challenge_number, uint testDifficulty) public returns (bool success) {\n\n uint difficulty = testDifficulty;\n uint reward_amount = getMiningReward();\n\n bytes32 digest = keccak256(challenge_number,msg.sender,nonce);\n\n //bytes memory characters = bytes(digest);\n\n if(uint256(digest) > miningTarget) revert();\n\n return (digest == challenge_digest);\n\n }\n\n\n function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success) {\n\n // uint difficulty = getMiningDifficulty();\n uint reward_amount = getMiningReward();\n\n //the PoW must contain work that includes a recent etherum block hash (challenge number) and the msg.sender's address to prevent MITM attacks\n bytes32 digest = keccak256(challengeNumber, msg.sender, nonce );\n\n //the challenge digest must match the expected\n if (digest != challenge_digest) revert();\n\n //the digest must be smaller than the target\n if(uint256(digest) > miningTarget) revert();\n // for(uint i = 0; i < difficulty ; i++) {\n // if (digest[i] != 0x0 ) revert();\n // }\n\n uint hashFound = rewardHashesFound[digest];\n rewardHashesFound[digest] = epochCount;\n if(hashFound != 0) revert(); //prevent the same answer from awarding twice\n\n\n\n balances[msg.sender] = balances[msg.sender].add(reward_amount);\n\n\n tokensMinted = tokensMinted.add(reward_amount);\n\n\n //set readonly diagnostics data\n lastRewardTo = msg.sender;\n lastRewardAmount = reward_amount;\n lastRewardEthBlockNumber = block.number;\n\n\n _startNewMiningEpoch();\n\n Mint(msg.sender, reward_amount, epochCount, challengeNumber );\n\n return true;\n\n }\n\n //this is a recent ethreum block hash, used to prevent pre-mining future blocks\n function getChallengeNumber() public constant returns (bytes32) {\n return challengeNumber;\n }\n\n //the number of zeroes the digest of the PoW solution requires. Auto adjusts\n function getMiningDifficulty() public constant returns (uint) {\n return _MAXIMUM_TARGET.div(miningTarget);\n }\n\n function getMiningTarget() public constant returns (uint) {\n return miningTarget;\n }\n\n\n\n //21m coins total\n //reward begins at 50 and is cut in half every reward era (as tokens are mined)\n function getMiningReward() public constant returns (uint) {\n //once we get half way thru the coins, only get 25 per block\n\n //every reward era, the reward amount halves.\n\n return (50 * 10**uint(decimals) ).div( 2**rewardEra ) ;\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Total supply\n\n // ------------------------------------------------------------------------\n\n function totalSupply() public constant returns (uint) {\n\n return _totalSupply - balances[address(0)];\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Get the token balance for account `tokenOwner`\n\n // ------------------------------------------------------------------------\n\n function balanceOf(address tokenOwner) public constant returns (uint balance) {\n\n return balances[tokenOwner];\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Transfer the balance from token owner's account to `to` account\n\n // - Owner's account must have sufficient balance to transfer\n\n // - 0 value transfers are allowed\n\n // ------------------------------------------------------------------------\n\n function transfer(address to, uint tokens) public returns (bool success) {\n\n balances[msg.sender] = balances[msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n Transfer(msg.sender, to, tokens);\n\n return true;\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Token owner can approve for `spender` to transferFrom(...) `tokens`\n\n // from the token owner's account\n\n //\n\n // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md\n\n // recommends that there are no checks for the approval double-spend attack\n\n // as this should be implemented in user interfaces\n\n // ------------------------------------------------------------------------\n\n function approve(address spender, uint tokens) public returns (bool success) {\n\n allowed[msg.sender][spender] = tokens;\n\n Approval(msg.sender, spender, tokens);\n\n return true;\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Transfer `tokens` from the `from` account to the `to` account\n\n //\n\n // The calling account must already have sufficient tokens approve(...)-d\n\n // for spending from the `from` account and\n\n // - From account must have sufficient balance to transfer\n\n // - Spender must have sufficient allowance to transfer\n\n // - 0 value transfers are allowed\n\n // ------------------------------------------------------------------------\n\n function transferFrom(address from, address to, uint tokens) public returns (bool success) {\n\n balances[from] = balances[from].sub(tokens);\n\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n Transfer(from, to, tokens);\n\n return true;\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Returns the amount of tokens approved by the owner that can be\n\n // transferred to the spender's account\n\n // ------------------------------------------------------------------------\n\n function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {\n\n return allowed[tokenOwner][spender];\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Token owner can approve for `spender` to transferFrom(...) `tokens`\n\n // from the token owner's account. The `spender` contract function\n\n // `receiveApproval(...)` is then executed\n\n // ------------------------------------------------------------------------\n\n function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {\n\n allowed[msg.sender][spender] = tokens;\n\n Approval(msg.sender, spender, tokens);\n\n ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);\n\n return true;\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Don't accept ETH\n\n // ------------------------------------------------------------------------\n\n function () public payable {\n\n revert();\n\n }\n\n\n\n // ------------------------------------------------------------------------\n\n // Owner can transfer out any accidentally sent ERC20 tokens\n\n // ------------------------------------------------------------------------\n\n function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {\n\n return ERC20Interface(tokenAddress).transfer(owner, tokens);\n\n }\n\n}\n",
"sourcePath": "/home/andy/dev/0xbitcoin-token/contracts/_0xBitcoinToken.sol",
"ast": {
"attributes": {
"absolutePath": "/home/andy/dev/0xbitcoin-token/contracts/_0xBitcoinToken.sol",
"exportedSymbols": {
"ApproveAndCallFallBack": [
175
],
"ERC20Interface": [
163
],
"Owned": [
244
],
"SafeMath": [
96
],
"_0xBitcoinToken": [
964
]
}
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.4",
".18"
]
},
"id": 1,
"name": "PragmaDirective",
"src": "0:24:0"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
96
],
"name": "SafeMath",
"scope": 965
},
"children": [
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "add",
"payable": false,
"scope": 96,
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "a",
"scope": 23,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 2,
"name": "ElementaryTypeName",
"src": "555:4:0"
}
],
"id": 3,
"name": "VariableDeclaration",
"src": "555:6:0"
},
{
"attributes": {
"constant": false,
"name": "b",
"scope": 23,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 4,
"name": "ElementaryTypeName",
"src": "563:4:0"
}
],
"id": 5,
"name": "VariableDeclaration",
"src": "563:6:0"
}
],
"id": 6,
"name": "ParameterList",
"src": "554:16:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "c",
"scope": 23,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 7,
"name": "ElementaryTypeName",
"src": "594:4:0"
}
],
"id": 8,
"name": "VariableDeclaration",
"src": "594:6:0"
}
],
"id": 9,
"name": "ParameterList",
"src": "593:8:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8,
"type": "uint256",
"value": "c"
},
"id": 10,
"name": "Identifier",
"src": "613:1:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3,
"type": "uint256",
"value": "a"
},
"id": 11,
"name": "Identifier",
"src": "617:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 5,
"type": "uint256",
"value": "b"
},
"id": 12,
"name": "Identifier",
"src": "621:1:0"
}
],
"id": 13,
"name": "BinaryOperation",
"src": "617:5:0"
}
],
"id": 14,
"name": "Assignment",
"src": "613:9:0"
}
],
"id": 15,
"name": "ExpressionStatement",
"src": "613:9:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 979,
"type": "function (bool) pure",
"value": "require"
},
"id": 16,
"name": "Identifier",
"src": "633:7:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 8,
"type": "uint256",
"value": "c"
},
"id": 17,
"name": "Identifier",
"src": "641:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3,
"type": "uint256",
"value": "a"
},
"id": 18,
"name": "Identifier",
"src": "646:1:0"
}
],
"id": 19,
"name": "BinaryOperation",
"src": "641:6:0"
}
],
"id": 20,
"name": "FunctionCall",
"src": "633:15:0"
}
],
"id": 21,
"name": "ExpressionStatement",
"src": "633:15:0"
}
],
"id": 22,
"name": "Block",
"src": "602:54:0"
}
],
"id": 23,
"name": "FunctionDefinition",
"src": "542:114:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "sub",
"payable": false,
"scope": 96,
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "a",
"scope": 45,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 24,
"name": "ElementaryTypeName",
"src": "675:4:0"
}
],
"id": 25,
"name": "VariableDeclaration",
"src": "675:6:0"
},
{
"attributes": {
"constant": false,
"name": "b",
"scope": 45,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 26,
"name": "ElementaryTypeName",
"src": "683:4:0"
}
],
"id": 27,
"name": "VariableDeclaration",
"src": "683:6:0"
}
],
"id": 28,
"name": "ParameterList",
"src": "674:16:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "c",
"scope": 45,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 29,
"name": "ElementaryTypeName",
"src": "714:4:0"
}
],
"id": 30,
"name": "VariableDeclaration",
"src": "714:6:0"
}
],
"id": 31,
"name": "ParameterList",
"src": "713:8:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 979,
"type": "function (bool) pure",
"value": "require"
},
"id": 32,
"name": "Identifier",
"src": "733:7:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 27,
"type": "uint256",
"value": "b"
},
"id": 33,
"name": "Identifier",
"src": "741:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 25,
"type": "uint256",
"value": "a"
},
"id": 34,
"name": "Identifier",
"src": "746:1:0"
}
],
"id": 35,
"name": "BinaryOperation",
"src": "741:6:0"
}
],
"id": 36,
"name": "FunctionCall",
"src": "733:15:0"
}
],
"id": 37,
"name": "ExpressionStatement",
"src": "733:15:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 30,
"type": "uint256",
"value": "c"
},
"id": 38,
"name": "Identifier",
"src": "759:1:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 25,
"type": "uint256",
"value": "a"
},
"id": 39,
"name": "Identifier",
"src": "763:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 27,
"type": "uint256",
"value": "b"
},
"id": 40,
"name": "Identifier",
"src": "767:1:0"
}
],
"id": 41,
"name": "BinaryOperation",
"src": "763:5:0"
}
],
"id": 42,
"name": "Assignment",
"src": "759:9:0"
}
],
"id": 43,
"name": "ExpressionStatement",
"src": "759:9:0"
}
],
"id": 44,
"name": "Block",
"src": "722:54:0"
}
],
"id": 45,
"name": "FunctionDefinition",
"src": "662:114:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "mul",
"payable": false,
"scope": 96,
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "a",
"scope": 73,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 46,
"name": "ElementaryTypeName",
"src": "795:4:0"
}
],
"id": 47,
"name": "VariableDeclaration",
"src": "795:6:0"
},
{
"attributes": {
"constant": false,
"name": "b",
"scope": 73,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 48,
"name": "ElementaryTypeName",
"src": "803:4:0"
}
],
"id": 49,
"name": "VariableDeclaration",
"src": "803:6:0"
}
],
"id": 50,
"name": "ParameterList",
"src": "794:16:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "c",
"scope": 73,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 51,
"name": "ElementaryTypeName",
"src": "834:4:0"
}
],
"id": 52,
"name": "VariableDeclaration",
"src": "834:6:0"
}
],
"id": 53,
"name": "ParameterList",
"src": "833:8:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 52,
"type": "uint256",
"value": "c"
},
"id": 54,
"name": "Identifier",
"src": "853:1:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 47,
"type": "uint256",
"value": "a"
},
"id": 55,
"name": "Identifier",
"src": "857:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 49,
"type": "uint256",
"value": "b"
},
"id": 56,
"name": "Identifier",
"src": "861:1:0"
}
],
"id": 57,
"name": "BinaryOperation",
"src": "857:5:0"
}
],
"id": 58,
"name": "Assignment",
"src": "853:9:0"
}
],
"id": 59,
"name": "ExpressionStatement",
"src": "853:9:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 979,
"type": "function (bool) pure",
"value": "require"
},
"id": 60,
"name": "Identifier",
"src": "873:7:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "||",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 47,
"type": "uint256",
"value": "a"
},
"id": 61,
"name": "Identifier",
"src": "881:1:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 62,
"name": "Literal",
"src": "886:1:0"
}
],
"id": 63,
"name": "BinaryOperation",
"src": "881:6:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 52,
"type": "uint256",
"value": "c"
},
"id": 64,
"name": "Identifier",
"src": "891:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 47,
"type": "uint256",
"value": "a"
},
"id": 65,
"name": "Identifier",
"src": "895:1:0"
}
],
"id": 66,
"name": "BinaryOperation",
"src": "891:5:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 49,
"type": "uint256",
"value": "b"
},
"id": 67,
"name": "Identifier",
"src": "900:1:0"
}
],
"id": 68,
"name": "BinaryOperation",
"src": "891:10:0"
}
],
"id": 69,
"name": "BinaryOperation",
"src": "881:20:0"
}
],
"id": 70,
"name": "FunctionCall",
"src": "873:29:0"
}
],
"id": 71,
"name": "ExpressionStatement",
"src": "873:29:0"
}
],
"id": 72,
"name": "Block",
"src": "842:68:0"
}
],
"id": 73,
"name": "FunctionDefinition",
"src": "782:128:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "div",
"payable": false,
"scope": 96,
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "a",
"scope": 95,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 74,
"name": "ElementaryTypeName",
"src": "929:4:0"
}
],
"id": 75,
"name": "VariableDeclaration",
"src": "929:6:0"
},
{
"attributes": {
"constant": false,
"name": "b",
"scope": 95,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 76,
"name": "ElementaryTypeName",
"src": "937:4:0"
}
],
"id": 77,
"name": "VariableDeclaration",
"src": "937:6:0"
}
],
"id": 78,
"name": "ParameterList",
"src": "928:16:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "c",
"scope": 95,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 79,
"name": "ElementaryTypeName",
"src": "968:4:0"
}
],
"id": 80,
"name": "VariableDeclaration",
"src": "968:6:0"
}
],
"id": 81,
"name": "ParameterList",
"src": "967:8:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 979,
"type": "function (bool) pure",
"value": "require"
},
"id": 82,
"name": "Identifier",
"src": "987:7:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 77,
"type": "uint256",
"value": "b"
},
"id": 83,
"name": "Identifier",
"src": "995:1:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 84,
"name": "Literal",
"src": "999:1:0"
}
],
"id": 85,
"name": "BinaryOperation",
"src": "995:5:0"
}
],
"id": 86,
"name": "FunctionCall",
"src": "987:14:0"
}
],
"id": 87,
"name": "ExpressionStatement",
"src": "987:14:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 80,
"type": "uint256",
"value": "c"
},
"id": 88,
"name": "Identifier",
"src": "1012:1:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "/",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 75,
"type": "uint256",
"value": "a"
},
"id": 89,
"name": "Identifier",
"src": "1016:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 77,
"type": "uint256",
"value": "b"
},
"id": 90,
"name": "Identifier",
"src": "1020:1:0"
}
],
"id": 91,
"name": "BinaryOperation",
"src": "1016:5:0"
}
],
"id": 92,
"name": "Assignment",
"src": "1012:9:0"
}
],
"id": 93,
"name": "ExpressionStatement",
"src": "1012:9:0"
}
],
"id": 94,
"name": "Block",
"src": "976:53:0"
}
],
"id": 95,
"name": "FunctionDefinition",
"src": "916:113:0"
}
],
"id": 96,
"name": "ContractDefinition",
"src": "518:514:0"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"linearizedBaseContracts": [
163
],
"name": "ERC20Interface",
"scope": 965
},
"children": [
{
"attributes": {
"body": null,
"constant": true,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "totalSupply",
"payable": false,
"scope": 163,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 97,
"name": "ParameterList",
"src": "1365:2:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 101,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 98,
"name": "ElementaryTypeName",
"src": "1393:4:0"
}
],
"id": 99,
"name": "VariableDeclaration",
"src": "1393:4:0"
}
],
"id": 100,
"name": "ParameterList",
"src": "1392:6:0"
}
],
"id": 101,
"name": "FunctionDefinition",
"src": "1345:54:0"
},
{
"attributes": {
"body": null,
"constant": true,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "balanceOf",
"payable": false,
"scope": 163,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "tokenOwner",
"scope": 108,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 102,
"name": "ElementaryTypeName",
"src": "1424:7:0"
}
],
"id": 103,
"name": "VariableDeclaration",
"src": "1424:18:0"
}
],
"id": 104,
"name": "ParameterList",
"src": "1423:20:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "balance",
"scope": 108,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 105,
"name": "ElementaryTypeName",
"src": "1469:4:0"
}
],
"id": 106,
"name": "VariableDeclaration",
"src": "1469:12:0"
}
],
"id": 107,
"name": "ParameterList",
"src": "1468:14:0"
}
],
"id": 108,
"name": "FunctionDefinition",
"src": "1405:78:0"
},
{
"attributes": {
"body": null,
"constant": true,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "allowance",
"payable": false,
"scope": 163,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "tokenOwner",
"scope": 117,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 109,
"name": "ElementaryTypeName",
"src": "1508:7:0"
}
],
"id": 110,
"name": "VariableDeclaration",
"src": "1508:18:0"
},
{
"attributes": {
"constant": false,
"name": "spender",
"scope": 117,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 111,
"name": "ElementaryTypeName",
"src": "1528:7:0"
}
],
"id": 112,
"name": "VariableDeclaration",
"src": "1528:15:0"
}
],
"id": 113,
"name": "ParameterList",
"src": "1507:37:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "remaining",
"scope": 117,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 114,
"name": "ElementaryTypeName",
"src": "1570:4:0"
}
],
"id": 115,
"name": "VariableDeclaration",
"src": "1570:14:0"
}
],
"id": 116,
"name": "ParameterList",
"src": "1569:16:0"
}
],
"id": 117,
"name": "FunctionDefinition",
"src": "1489:97:0"
},
{
"attributes": {
"body": null,
"constant": false,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "transfer",
"payable": false,
"scope": 163,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "to",
"scope": 126,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 118,
"name": "ElementaryTypeName",
"src": "1610:7:0"
}
],
"id": 119,
"name": "VariableDeclaration",
"src": "1610:10:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 126,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 120,
"name": "ElementaryTypeName",
"src": "1622:4:0"
}
],
"id": 121,
"name": "VariableDeclaration",
"src": "1622:11:0"
}
],
"id": 122,
"name": "ParameterList",
"src": "1609:25:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 126,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 123,
"name": "ElementaryTypeName",
"src": "1651:4:0"
}
],
"id": 124,
"name": "VariableDeclaration",
"src": "1651:12:0"
}
],
"id": 125,
"name": "ParameterList",
"src": "1650:14:0"
}
],
"id": 126,
"name": "FunctionDefinition",
"src": "1592:73:0"
},
{
"attributes": {
"body": null,
"constant": false,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "approve",
"payable": false,
"scope": 163,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "spender",
"scope": 135,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 127,
"name": "ElementaryTypeName",
"src": "1688:7:0"
}
],
"id": 128,
"name": "VariableDeclaration",
"src": "1688:15:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 135,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 129,
"name": "ElementaryTypeName",
"src": "1705:4:0"
}
],
"id": 130,
"name": "VariableDeclaration",
"src": "1705:11:0"
}
],
"id": 131,
"name": "ParameterList",
"src": "1687:30:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 135,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 132,
"name": "ElementaryTypeName",
"src": "1734:4:0"
}
],
"id": 133,
"name": "VariableDeclaration",
"src": "1734:12:0"
}
],
"id": 134,
"name": "ParameterList",
"src": "1733:14:0"
}
],
"id": 135,
"name": "FunctionDefinition",
"src": "1671:77:0"
},
{
"attributes": {
"body": null,
"constant": false,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "transferFrom",
"payable": false,
"scope": 163,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "from",
"scope": 146,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 136,
"name": "ElementaryTypeName",
"src": "1776:7:0"
}
],
"id": 137,
"name": "VariableDeclaration",
"src": "1776:12:0"
},
{
"attributes": {
"constant": false,
"name": "to",
"scope": 146,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 138,
"name": "ElementaryTypeName",
"src": "1790:7:0"
}
],
"id": 139,
"name": "VariableDeclaration",
"src": "1790:10:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 146,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 140,
"name": "ElementaryTypeName",
"src": "1802:4:0"
}
],
"id": 141,
"name": "VariableDeclaration",
"src": "1802:11:0"
}
],
"id": 142,
"name": "ParameterList",
"src": "1775:39:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 146,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 143,
"name": "ElementaryTypeName",
"src": "1831:4:0"
}
],
"id": 144,
"name": "VariableDeclaration",
"src": "1831:12:0"
}
],
"id": 145,
"name": "ParameterList",
"src": "1830:14:0"
}
],
"id": 146,
"name": "FunctionDefinition",
"src": "1754:91:0"
},
{
"attributes": {
"anonymous": false,
"name": "Transfer"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": true,
"name": "from",
"scope": 154,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 147,
"name": "ElementaryTypeName",
"src": "1867:7:0"
}
],
"id": 148,
"name": "VariableDeclaration",
"src": "1867:20:0"
},
{
"attributes": {
"constant": false,
"indexed": true,
"name": "to",
"scope": 154,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 149,
"name": "ElementaryTypeName",
"src": "1889:7:0"
}
],
"id": 150,
"name": "VariableDeclaration",
"src": "1889:18:0"
},
{
"attributes": {
"constant": false,
"indexed": false,
"name": "tokens",
"scope": 154,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 151,
"name": "ElementaryTypeName",
"src": "1909:4:0"
}
],
"id": 152,
"name": "VariableDeclaration",
"src": "1909:11:0"
}
],
"id": 153,
"name": "ParameterList",
"src": "1866:55:0"
}
],
"id": 154,
"name": "EventDefinition",
"src": "1852:70:0"
},
{
"attributes": {
"anonymous": false,
"name": "Approval"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": true,
"name": "tokenOwner",
"scope": 162,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 155,
"name": "ElementaryTypeName",
"src": "1943:7:0"
}
],
"id": 156,
"name": "VariableDeclaration",
"src": "1943:26:0"
},
{
"attributes": {
"constant": false,
"indexed": true,
"name": "spender",
"scope": 162,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 157,
"name": "ElementaryTypeName",
"src": "1971:7:0"
}
],
"id": 158,
"name": "VariableDeclaration",
"src": "1971:23:0"
},
{
"attributes": {
"constant": false,
"indexed": false,
"name": "tokens",
"scope": 162,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 159,
"name": "ElementaryTypeName",
"src": "1996:4:0"
}
],
"id": 160,
"name": "VariableDeclaration",
"src": "1996:11:0"
}
],
"id": 161,
"name": "ParameterList",
"src": "1942:66:0"
}
],
"id": 162,
"name": "EventDefinition",
"src": "1928:81:0"
}
],
"id": 163,
"name": "ContractDefinition",
"src": "1314:698:0"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"linearizedBaseContracts": [
175
],
"name": "ApproveAndCallFallBack",
"scope": 965
},
"children": [
{
"attributes": {
"body": null,
"constant": false,
"implemented": false,
"isConstructor": false,
"modifiers": [
null
],
"name": "receiveApproval",
"payable": false,
"scope": 175,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "from",
"scope": 174,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 164,
"name": "ElementaryTypeName",
"src": "2351:7:0"
}
],
"id": 165,
"name": "VariableDeclaration",
"src": "2351:12:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 174,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 166,
"name": "ElementaryTypeName",
"src": "2365:7:0"
}
],
"id": 167,
"name": "VariableDeclaration",
"src": "2365:14:0"
},
{
"attributes": {
"constant": false,
"name": "token",
"scope": 174,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 168,
"name": "ElementaryTypeName",
"src": "2381:7:0"
}
],
"id": 169,
"name": "VariableDeclaration",
"src": "2381:13:0"
},
{
"attributes": {
"constant": false,
"name": "data",
"scope": 174,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes memory",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes storage pointer"
},
"id": 170,
"name": "ElementaryTypeName",
"src": "2396:5:0"
}
],
"id": 171,
"name": "VariableDeclaration",
"src": "2396:10:0"
}
],
"id": 172,
"name": "ParameterList",
"src": "2350:57:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 173,
"name": "ParameterList",
"src": "2414:0:0"
}
],
"id": 174,
"name": "FunctionDefinition",
"src": "2326:89:0"
}
],
"id": 175,
"name": "ContractDefinition",
"src": "2287:131:0"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
244
],
"name": "Owned",
"scope": 965
},
"children": [
{
"attributes": {
"constant": false,
"name": "owner",
"scope": 244,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 176,
"name": "ElementaryTypeName",
"src": "2625:7:0"
}
],
"id": 177,
"name": "VariableDeclaration",
"src": "2625:20:0"
},
{
"attributes": {
"constant": false,
"name": "newOwner",
"scope": 244,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 178,
"name": "ElementaryTypeName",
"src": "2652:7:0"
}
],
"id": 179,
"name": "VariableDeclaration",
"src": "2652:23:0"
},
{
"attributes": {
"anonymous": false,
"name": "OwnershipTransferred"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": true,
"name": "_from",
"scope": 185,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 180,
"name": "ElementaryTypeName",
"src": "2710:7:0"
}
],
"id": 181,
"name": "VariableDeclaration",
"src": "2710:21:0"
},
{
"attributes": {
"constant": false,
"indexed": true,
"name": "_to",
"scope": 185,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 182,
"name": "ElementaryTypeName",
"src": "2733:7:0"
}
],
"id": 183,
"name": "VariableDeclaration",
"src": "2733:19:0"
}
],
"id": 184,
"name": "ParameterList",
"src": "2709:44:0"
}
],
"id": 185,
"name": "EventDefinition",
"src": "2683:71:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": true,
"modifiers": [
null
],
"name": "Owned",
"payable": false,
"scope": 244,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 186,
"name": "ParameterList",
"src": "2775:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 187,
"name": "ParameterList",
"src": "2785:0:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 177,
"type": "address",
"value": "owner"
},
"id": 188,
"name": "Identifier",
"src": "2796:5:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 189,
"name": "Identifier",
"src": "2804:3:0"
}
],
"id": 190,
"name": "MemberAccess",
"src": "2804:10:0"
}
],
"id": 191,
"name": "Assignment",
"src": "2796:18:0"
}
],
"id": 192,
"name": "ExpressionStatement",
"src": "2796:18:0"
}
],
"id": 193,
"name": "Block",
"src": "2785:37:0"
}
],
"id": 194,
"name": "FunctionDefinition",
"src": "2761:61:0"
},
{
"attributes": {
"name": "onlyOwner",
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 195,
"name": "ParameterList",
"src": "2848:0:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 979,
"type": "function (bool) pure",
"value": "require"
},
"id": 196,
"name": "Identifier",
"src": "2859:7:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 197,
"name": "Identifier",
"src": "2867:3:0"
}
],
"id": 198,
"name": "MemberAccess",
"src": "2867:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 177,
"type": "address",
"value": "owner"
},
"id": 199,
"name": "Identifier",
"src": "2881:5:0"
}
],
"id": 200,
"name": "BinaryOperation",
"src": "2867:19:0"
}
],
"id": 201,
"name": "FunctionCall",
"src": "2859:28:0"
}
],
"id": 202,
"name": "ExpressionStatement",
"src": "2859:28:0"
},
{
"id": 203,
"name": "PlaceholderStatement",
"src": "2898:1:0"
}
],
"id": 204,
"name": "Block",
"src": "2848:59:0"
}
],
"id": 205,
"name": "ModifierDefinition",
"src": "2829:78:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"name": "transferOwnership",
"payable": false,
"scope": 244,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "_newOwner",
"scope": 217,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 206,
"name": "ElementaryTypeName",
"src": "2941:7:0"
}
],
"id": 207,
"name": "VariableDeclaration",
"src": "2941:17:0"
}
],
"id": 208,
"name": "ParameterList",
"src": "2940:19:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 211,
"name": "ParameterList",
"src": "2977:0:0"
},
{
"attributes": {
"arguments": [
null
]
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 205,
"type": "modifier ()",
"value": "onlyOwner"
},
"id": 209,
"name": "Identifier",
"src": "2967:9:0"
}
],
"id": 210,
"name": "ModifierInvocation",
"src": "2967:9:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 179,
"type": "address",
"value": "newOwner"
},
"id": 212,
"name": "Identifier",
"src": "2988:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 207,
"type": "address",
"value": "_newOwner"
},
"id": 213,
"name": "Identifier",
"src": "2999:9:0"
}
],
"id": 214,
"name": "Assignment",
"src": "2988:20:0"
}
],
"id": 215,
"name": "ExpressionStatement",
"src": "2988:20:0"
}
],
"id": 216,
"name": "Block",
"src": "2977:39:0"
}
],
"id": 217,
"name": "FunctionDefinition",
"src": "2914:102:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "acceptOwnership",
"payable": false,
"scope": 244,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 218,
"name": "ParameterList",
"src": "3046:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 219,
"name": "ParameterList",
"src": "3056:0:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 979,
"type": "function (bool) pure",
"value": "require"
},
"id": 220,
"name": "Identifier",
"src": "3067:7:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 221,
"name": "Identifier",
"src": "3075:3:0"
}
],
"id": 222,
"name": "MemberAccess",
"src": "3075:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 179,
"type": "address",
"value": "newOwner"
},
"id": 223,
"name": "Identifier",
"src": "3089:8:0"
}
],
"id": 224,
"name": "BinaryOperation",
"src": "3075:22:0"
}
],
"id": 225,
"name": "FunctionCall",
"src": "3067:31:0"
}
],
"id": 226,
"name": "ExpressionStatement",
"src": "3067:31:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 185,
"type": "function (address,address)",
"value": "OwnershipTransferred"
},
"id": 227,
"name": "Identifier",
"src": "3109:20:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 177,
"type": "address",
"value": "owner"
},
"id": 228,
"name": "Identifier",
"src": "3130:5:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 179,
"type": "address",
"value": "newOwner"
},
"id": 229,
"name": "Identifier",
"src": "3137:8:0"
}
],
"id": 230,
"name": "FunctionCall",
"src": "3109:37:0"
}
],
"id": 231,
"name": "ExpressionStatement",
"src": "3109:37:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 177,
"type": "address",
"value": "owner"
},
"id": 232,
"name": "Identifier",
"src": "3157:5:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 179,
"type": "address",
"value": "newOwner"
},
"id": 233,
"name": "Identifier",
"src": "3165:8:0"
}
],
"id": 234,
"name": "Assignment",
"src": "3157:16:0"
}
],
"id": 235,
"name": "ExpressionStatement",
"src": "3157:16:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 179,
"type": "address",
"value": "newOwner"
},
"id": 236,
"name": "Identifier",
"src": "3184:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "address",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)",
"value": "address"
},
"id": 237,
"name": "ElementaryTypeNameExpression",
"src": "3195:7:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 238,
"name": "Literal",
"src": "3203:1:0"
}
],
"id": 239,
"name": "FunctionCall",
"src": "3195:10:0"
}
],
"id": 240,
"name": "Assignment",
"src": "3184:21:0"
}
],
"id": 241,
"name": "ExpressionStatement",
"src": "3184:21:0"
}
],
"id": 242,
"name": "Block",
"src": "3056:157:0"
}
],
"id": 243,
"name": "FunctionDefinition",
"src": "3022:191:0"
}
],
"id": 244,
"name": "ContractDefinition",
"src": "2603:613:0"
},
{
"attributes": {
"contractDependencies": [
163,
244
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
964,
244,
163
],
"name": "_0xBitcoinToken",
"scope": 965
},
"children": [
{
"attributes": {
"arguments": [
null
]
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "ERC20Interface",
"referencedDeclaration": 163,
"type": "contract ERC20Interface"
},
"id": 245,
"name": "UserDefinedTypeName",
"src": "3506:14:0"
}
],
"id": 246,
"name": "InheritanceSpecifier",
"src": "3506:14:0"
},
{
"attributes": {
"arguments": [
null
]
},
"children": [
{
"attributes": {
"contractScope": null,
"name": "Owned",
"referencedDeclaration": 244,
"type": "contract Owned"
},
"id": 247,
"name": "UserDefinedTypeName",
"src": "3522:5:0"
}
],
"id": 248,
"name": "InheritanceSpecifier",
"src": "3522:5:0"
},
{
"children": [
{
"attributes": {
"contractScope": null,
"name": "SafeMath",
"referencedDeclaration": 96,
"type": "library SafeMath"
},
"id": 249,
"name": "UserDefinedTypeName",
"src": "3541:8:0"
},
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 250,
"name": "ElementaryTypeName",
"src": "3554:4:0"
}
],
"id": 251,
"name": "UsingForDirective",
"src": "3535:24:0"
},
{
"attributes": {
"constant": false,
"name": "symbol",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "string storage ref",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "string",
"type": "string storage pointer"
},
"id": 252,
"name": "ElementaryTypeName",
"src": "3566:6:0"
}
],
"id": 253,
"name": "VariableDeclaration",
"src": "3566:20:0"
},
{
"attributes": {
"constant": false,
"name": "name",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "string storage ref",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "string",
"type": "string storage pointer"
},
"id": 254,
"name": "ElementaryTypeName",
"src": "3593:6:0"
}
],
"id": 255,
"name": "VariableDeclaration",
"src": "3593:19:0"
},
{
"attributes": {
"constant": false,
"name": "decimals",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint8",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint8",
"type": "uint8"
},
"id": 256,
"name": "ElementaryTypeName",
"src": "3619:5:0"
}
],
"id": 257,
"name": "VariableDeclaration",
"src": "3619:21:0"
},
{
"attributes": {
"constant": false,
"name": "_totalSupply",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 258,
"name": "ElementaryTypeName",
"src": "3647:4:0"
}
],
"id": 259,
"name": "VariableDeclaration",
"src": "3647:24:0"
},
{
"attributes": {
"constant": false,
"name": "latestDifficultyPeriodStarted",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 260,
"name": "ElementaryTypeName",
"src": "3782:4:0"
}
],
"id": 261,
"name": "VariableDeclaration",
"src": "3782:41:0"
},
{
"attributes": {
"constant": false,
"name": "epochCount",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 262,
"name": "ElementaryTypeName",
"src": "3832:4:0"
}
],
"id": 263,
"name": "VariableDeclaration",
"src": "3832:22:0"
},
{
"attributes": {
"constant": false,
"name": "_BLOCKS_PER_READJUSTMENT",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 264,
"name": "ElementaryTypeName",
"src": "3888:4:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "323536",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 256",
"value": "256"
},
"id": 265,
"name": "Literal",
"src": "3927:3:0"
}
],
"id": 266,
"name": "VariableDeclaration",
"src": "3888:42:0"
},
{
"attributes": {
"constant": false,
"name": "_MINIMUM_TARGET",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 267,
"name": "ElementaryTypeName",
"src": "4006:4:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "**",
"type": "int_const 256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 268,
"name": "Literal",
"src": "4037:1:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "38",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 8",
"value": "8"
},
"id": 269,
"name": "Literal",
"src": "4040:1:0"
}
],
"id": 270,
"name": "BinaryOperation",
"src": "4037:4:0"
}
],
"id": 271,
"name": "VariableDeclaration",
"src": "4006:35:0"
},
{
"attributes": {
"constant": false,
"name": "_MAXIMUM_TARGET",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 272,
"name": "ElementaryTypeName",
"src": "4070:4:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_rational_1809251394333065553493296640760748560207343510400633813116524750123642650624_by_1",
"typeString": "int_const 1809251394333065553493296640760748560207343510400633813116524750123642650624"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "**",
"type": "int_const 1809251394333065553493296640760748560207343510400633813116524750123642650624"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 273,
"name": "Literal",
"src": "4101:1:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "323530",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 250",
"value": "250"
},
"id": 274,
"name": "Literal",
"src": "4104:3:0"
}
],
"id": 275,
"name": "BinaryOperation",
"src": "4101:6:0"
}
],
"id": 276,
"name": "VariableDeclaration",
"src": "4070:37:0"
},
{
"attributes": {
"constant": false,
"name": "miningTarget",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 277,
"name": "ElementaryTypeName",
"src": "4115:4:0"
}
],
"id": 278,
"name": "VariableDeclaration",
"src": "4115:24:0"
},
{
"attributes": {
"constant": false,
"name": "challengeNumber",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 279,
"name": "ElementaryTypeName",
"src": "4222:7:0"
}
],
"id": 280,
"name": "VariableDeclaration",
"src": "4222:30:0"
},
{
"attributes": {
"constant": false,
"name": "rewardEra",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 281,
"name": "ElementaryTypeName",
"src": "4312:4:0"
}
],
"id": 282,
"name": "VariableDeclaration",
"src": "4312:21:0"
},
{
"attributes": {
"constant": false,
"name": "maxSupplyForEra",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 283,
"name": "ElementaryTypeName",
"src": "4339:4:0"
}
],
"id": 284,
"name": "VariableDeclaration",
"src": "4339:27:0"
},
{
"attributes": {
"constant": false,
"name": "lastRewardTo",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 285,
"name": "ElementaryTypeName",
"src": "4374:7:0"
}
],
"id": 286,
"name": "VariableDeclaration",
"src": "4374:27:0"
},
{
"attributes": {
"constant": false,
"name": "lastRewardAmount",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 287,
"name": "ElementaryTypeName",
"src": "4407:4:0"
}
],
"id": 288,
"name": "VariableDeclaration",
"src": "4407:28:0"
},
{
"attributes": {
"constant": false,
"name": "lastRewardEthBlockNumber",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 289,
"name": "ElementaryTypeName",
"src": "4441:4:0"
}
],
"id": 290,
"name": "VariableDeclaration",
"src": "4441:36:0"
},
{
"attributes": {
"constant": false,
"name": "rewardHashesFound",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(bytes32 => uint256)",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "mapping(bytes32 => uint256)"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 291,
"name": "ElementaryTypeName",
"src": "4493:7:0"
},
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 292,
"name": "ElementaryTypeName",
"src": "4504:4:0"
}
],
"id": 293,
"name": "Mapping",
"src": "4485:24:0"
}
],
"id": 294,
"name": "VariableDeclaration",
"src": "4485:42:0"
},
{
"attributes": {
"constant": false,
"name": "tokensMinted",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 295,
"name": "ElementaryTypeName",
"src": "4559:4:0"
}
],
"id": 296,
"name": "VariableDeclaration",
"src": "4559:24:0"
},
{
"attributes": {
"constant": false,
"name": "balances",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(address => uint256)",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 297,
"name": "ElementaryTypeName",
"src": "4598:7:0"
},
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 298,
"name": "ElementaryTypeName",
"src": "4609:4:0"
}
],
"id": 299,
"name": "Mapping",
"src": "4590:24:0"
}
],
"id": 300,
"name": "VariableDeclaration",
"src": "4590:33:0"
},
{
"attributes": {
"constant": false,
"name": "allowed",
"scope": 964,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(address => mapping(address => uint256))",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"type": "mapping(address => mapping(address => uint256))"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 301,
"name": "ElementaryTypeName",
"src": "4642:7:0"
},
{
"attributes": {
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 302,
"name": "ElementaryTypeName",
"src": "4661:7:0"
},
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 303,
"name": "ElementaryTypeName",
"src": "4672:4:0"
}
],
"id": 304,
"name": "Mapping",
"src": "4653:24:0"
}
],
"id": 305,
"name": "Mapping",
"src": "4634:44:0"
}
],
"id": 306,
"name": "VariableDeclaration",
"src": "4634:52:0"
},
{
"attributes": {
"anonymous": false,
"name": "Mint"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": true,
"name": "from",
"scope": 316,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 307,
"name": "ElementaryTypeName",
"src": "4707:7:0"
}
],
"id": 308,
"name": "VariableDeclaration",
"src": "4707:20:0"
},
{
"attributes": {
"constant": false,
"indexed": false,
"name": "reward_amount",
"scope": 316,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 309,
"name": "ElementaryTypeName",
"src": "4729:4:0"
}
],
"id": 310,
"name": "VariableDeclaration",
"src": "4729:18:0"
},
{
"attributes": {
"constant": false,
"indexed": false,
"name": "epochCount",
"scope": 316,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 311,
"name": "ElementaryTypeName",
"src": "4749:4:0"
}
],
"id": 312,
"name": "VariableDeclaration",
"src": "4749:15:0"
},
{
"attributes": {
"constant": false,
"indexed": false,
"name": "newChallengeNumber",
"scope": 316,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 313,
"name": "ElementaryTypeName",
"src": "4766:7:0"
}
],
"id": 314,
"name": "VariableDeclaration",
"src": "4766:26:0"
}
],
"id": 315,
"name": "ParameterList",
"src": "4706:87:0"
}
],
"id": 316,
"name": "EventDefinition",
"src": "4696:98:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": true,
"name": "_0xBitcoinToken",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 317,
"name": "ParameterList",
"src": "5006:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 320,
"name": "ParameterList",
"src": "5025:0:0"
},
{
"attributes": {
"arguments": [
null
]
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 205,
"type": "modifier ()",
"value": "onlyOwner"
},
"id": 318,
"name": "Identifier",
"src": "5016:9:0"
}
],
"id": 319,
"name": "ModifierInvocation",
"src": "5016:9:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "string storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 253,
"type": "string storage ref",
"value": "symbol"
},
"id": 321,
"name": "Identifier",
"src": "5036:6:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3078425443",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"0xBTC\"",
"value": "0xBTC"
},
"id": 322,
"name": "Literal",
"src": "5045:7:0"
}
],
"id": 323,
"name": "Assignment",
"src": "5036:16:0"
}
],
"id": 324,
"name": "ExpressionStatement",
"src": "5036:16:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "string storage ref"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 255,
"type": "string storage ref",
"value": "name"
},
"id": 325,
"name": "Identifier",
"src": "5063:4:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3078426974636f696e20546f6b656e",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "string",
"type": "literal_string \"0xBitcoin Token\"",
"value": "0xBitcoin Token"
},
"id": 326,
"name": "Literal",
"src": "5070:17:0"
}
],
"id": 327,
"name": "Assignment",
"src": "5063:24:0"
}
],
"id": 328,
"name": "ExpressionStatement",
"src": "5063:24:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint8"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 257,
"type": "uint8",
"value": "decimals"
},
"id": 329,
"name": "Identifier",
"src": "5098:8:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "38",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 8",
"value": "8"
},
"id": 330,
"name": "Literal",
"src": "5109:1:0"
}
],
"id": 331,
"name": "Assignment",
"src": "5098:12:0"
}
],
"id": 332,
"name": "ExpressionStatement",
"src": "5098:12:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 259,
"type": "uint256",
"value": "_totalSupply"
},
"id": 333,
"name": "Identifier",
"src": "5121:12:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3231303030303030",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 21000000",
"value": "21000000"
},
"id": 334,
"name": "Literal",
"src": "5136:8:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 335,
"name": "Literal",
"src": "5147:2:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)",
"value": "uint"
},
"id": 336,
"name": "ElementaryTypeNameExpression",
"src": "5151:4:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 257,
"type": "uint8",
"value": "decimals"
},
"id": 337,
"name": "Identifier",
"src": "5156:8:0"
}
],
"id": 338,
"name": "FunctionCall",
"src": "5151:14:0"
}
],
"id": 339,
"name": "BinaryOperation",
"src": "5147:18:0"
}
],
"id": 340,
"name": "BinaryOperation",
"src": "5136:29:0"
}
],
"id": 341,
"name": "Assignment",
"src": "5121:44:0"
}
],
"id": 342,
"name": "ExpressionStatement",
"src": "5121:44:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 296,
"type": "uint256",
"value": "tokensMinted"
},
"id": 343,
"name": "Identifier",
"src": "5175:12:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 344,
"name": "Literal",
"src": "5190:1:0"
}
],
"id": 345,
"name": "Assignment",
"src": "5175:16:0"
}
],
"id": 346,
"name": "ExpressionStatement",
"src": "5175:16:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 282,
"type": "uint256",
"value": "rewardEra"
},
"id": 347,
"name": "Identifier",
"src": "5202:9:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 348,
"name": "Literal",
"src": "5214:1:0"
}
],
"id": 349,
"name": "Assignment",
"src": "5202:13:0"
}
],
"id": 350,
"name": "ExpressionStatement",
"src": "5202:13:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 284,
"type": "uint256",
"value": "maxSupplyForEra"
},
"id": 351,
"name": "Identifier",
"src": "5225:15:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 95,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 259,
"type": "uint256",
"value": "_totalSupply"
},
"id": 352,
"name": "Identifier",
"src": "5243:12:0"
}
],
"id": 353,
"name": "MemberAccess",
"src": "5243:16:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 354,
"name": "Literal",
"src": "5260:1:0"
}
],
"id": 355,
"name": "FunctionCall",
"src": "5243:19:0"
}
],
"id": 356,
"name": "Assignment",
"src": "5225:37:0"
}
],
"id": 357,
"name": "ExpressionStatement",
"src": "5225:37:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 358,
"name": "Identifier",
"src": "5273:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 276,
"type": "uint256",
"value": "_MAXIMUM_TARGET"
},
"id": 359,
"name": "Identifier",
"src": "5288:15:0"
}
],
"id": 360,
"name": "Assignment",
"src": "5273:30:0"
}
],
"id": 361,
"name": "ExpressionStatement",
"src": "5273:30:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 261,
"type": "uint256",
"value": "latestDifficultyPeriodStarted"
},
"id": 362,
"name": "Identifier",
"src": "5314:29:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "number",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 968,
"type": "block",
"value": "block"
},
"id": 363,
"name": "Identifier",
"src": "5346:5:0"
}
],
"id": 364,
"name": "MemberAccess",
"src": "5346:12:0"
}
],
"id": 365,
"name": "Assignment",
"src": "5314:44:0"
}
],
"id": 366,
"name": "ExpressionStatement",
"src": "5314:44:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 431,
"type": "function ()",
"value": "_startNewMiningEpoch"
},
"id": 367,
"name": "Identifier",
"src": "5369:20:0"
}
],
"id": 368,
"name": "FunctionCall",
"src": "5369:22:0"
}
],
"id": 369,
"name": "ExpressionStatement",
"src": "5369:22:0"
}
],
"id": 370,
"name": "Block",
"src": "5025:471:0"
}
],
"id": 371,
"name": "FunctionDefinition",
"src": "4982:514:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "_startNewMiningEpoch",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 372,
"name": "ParameterList",
"src": "5531:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 373,
"name": "ParameterList",
"src": "5543:0:0"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "&&",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 296,
"type": "uint256",
"value": "tokensMinted"
},
"id": 374,
"name": "Identifier",
"src": "5630:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 284,
"type": "uint256",
"value": "maxSupplyForEra"
},
"id": 375,
"name": "Identifier",
"src": "5646:15:0"
}
],
"id": 376,
"name": "BinaryOperation",
"src": "5630:31:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 282,
"type": "uint256",
"value": "rewardEra"
},
"id": 377,
"name": "Identifier",
"src": "5665:9:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3332",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 32",
"value": "32"
},
"id": 378,
"name": "Literal",
"src": "5677:2:0"
}
],
"id": 379,
"name": "BinaryOperation",
"src": "5665:14:0"
}
],
"id": 380,
"name": "BinaryOperation",
"src": "5630:49:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 282,
"type": "uint256",
"value": "rewardEra"
},
"id": 381,
"name": "Identifier",
"src": "5745:9:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 282,
"type": "uint256",
"value": "rewardEra"
},
"id": 382,
"name": "Identifier",
"src": "5757:9:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 383,
"name": "Literal",
"src": "5769:1:0"
}
],
"id": 384,
"name": "BinaryOperation",
"src": "5757:13:0"
}
],
"id": 385,
"name": "Assignment",
"src": "5745:25:0"
}
],
"id": 386,
"name": "ExpressionStatement",
"src": "5745:25:0"
}
],
"id": 387,
"name": "Block",
"src": "5735:44:0"
}
],
"id": 388,
"name": "IfStatement",
"src": "5627:152:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 284,
"type": "uint256",
"value": "maxSupplyForEra"
},
"id": 389,
"name": "Identifier",
"src": "5851:15:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 259,
"type": "uint256",
"value": "_totalSupply"
},
"id": 390,
"name": "Identifier",
"src": "5869:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 95,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 259,
"type": "uint256",
"value": "_totalSupply"
},
"id": 391,
"name": "Identifier",
"src": "5884:12:0"
}
],
"id": 392,
"name": "MemberAccess",
"src": "5884:16:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 393,
"name": "Literal",
"src": "5902:1:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "+",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 282,
"type": "uint256",
"value": "rewardEra"
},
"id": 394,
"name": "Identifier",
"src": "5906:9:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 395,
"name": "Literal",
"src": "5918:1:0"
}
],
"id": 396,
"name": "BinaryOperation",
"src": "5906:13:0"
}
],
"id": 397,
"name": "TupleExpression",
"src": "5905:15:0"
}
],
"id": 398,
"name": "BinaryOperation",
"src": "5902:18:0"
}
],
"id": 399,
"name": "FunctionCall",
"src": "5884:37:0"
}
],
"id": 400,
"name": "BinaryOperation",
"src": "5869:52:0"
}
],
"id": 401,
"name": "Assignment",
"src": "5851:70:0"
}
],
"id": 402,
"name": "ExpressionStatement",
"src": "5851:70:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "bytes32"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 280,
"type": "bytes32",
"value": "challengeNumber"
},
"id": 403,
"name": "Identifier",
"src": "6047:15:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "blockhash",
"referencedDeclaration": null,
"type": "function (uint256) view returns (bytes32)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 968,
"type": "block",
"value": "block"
},
"id": 404,
"name": "Identifier",
"src": "6065:5:0"
}
],
"id": 405,
"name": "MemberAccess",
"src": "6065:15:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "number",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 968,
"type": "block",
"value": "block"
},
"id": 406,
"name": "Identifier",
"src": "6081:5:0"
}
],
"id": 407,
"name": "MemberAccess",
"src": "6081:12:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 408,
"name": "Literal",
"src": "6096:1:0"
}
],
"id": 409,
"name": "BinaryOperation",
"src": "6081:16:0"
}
],
"id": 410,
"name": "FunctionCall",
"src": "6065:33:0"
}
],
"id": 411,
"name": "Assignment",
"src": "6047:51:0"
}
],
"id": 412,
"name": "ExpressionStatement",
"src": "6047:51:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 263,
"type": "uint256",
"value": "epochCount"
},
"id": 413,
"name": "Identifier",
"src": "6108:10:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "add",
"referencedDeclaration": 23,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 263,
"type": "uint256",
"value": "epochCount"
},
"id": 414,
"name": "Identifier",
"src": "6121:10:0"
}
],
"id": 415,
"name": "MemberAccess",
"src": "6121:14:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 416,
"name": "Literal",
"src": "6136:1:0"
}
],
"id": 417,
"name": "FunctionCall",
"src": "6121:17:0"
}
],
"id": 418,
"name": "Assignment",
"src": "6108:30:0"
}
],
"id": 419,
"name": "ExpressionStatement",
"src": "6108:30:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "%",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 263,
"type": "uint256",
"value": "epochCount"
},
"id": 420,
"name": "Identifier",
"src": "6224:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 266,
"type": "uint256",
"value": "_BLOCKS_PER_READJUSTMENT"
},
"id": 421,
"name": "Identifier",
"src": "6237:24:0"
}
],
"id": 422,
"name": "BinaryOperation",
"src": "6224:37:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 423,
"name": "Literal",
"src": "6265:1:0"
}
],
"id": 424,
"name": "BinaryOperation",
"src": "6224:42:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 501,
"type": "function ()",
"value": "_reAdjustDifficulty"
},
"id": 425,
"name": "Identifier",
"src": "6284:19:0"
}
],
"id": 426,
"name": "FunctionCall",
"src": "6284:21:0"
}
],
"id": 427,
"name": "ExpressionStatement",
"src": "6284:21:0"
}
],
"id": 428,
"name": "Block",
"src": "6274:40:0"
}
],
"id": 429,
"name": "IfStatement",
"src": "6221:93:0"
}
],
"id": 430,
"name": "Block",
"src": "5543:780:0"
}
],
"id": 431,
"name": "FunctionDefinition",
"src": "5502:821:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "_reAdjustDifficulty",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 432,
"name": "ParameterList",
"src": "6575:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 433,
"name": "ParameterList",
"src": "6587:0:0"
},
{
"children": [
{
"attributes": {
"assignments": [
435
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "ethBlocksSinceLastDifficultyPeriod",
"scope": 501,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 434,
"name": "ElementaryTypeName",
"src": "6599:4:0"
}
],
"id": 435,
"name": "VariableDeclaration",
"src": "6599:39:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "number",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 968,
"type": "block",
"value": "block"
},
"id": 436,
"name": "Identifier",
"src": "6641:5:0"
}
],
"id": 437,
"name": "MemberAccess",
"src": "6641:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 261,
"type": "uint256",
"value": "latestDifficultyPeriodStarted"
},
"id": 438,
"name": "Identifier",
"src": "6656:29:0"
}
],
"id": 439,
"name": "BinaryOperation",
"src": "6641:44:0"
}
],
"id": 440,
"name": "VariableDeclarationStatement",
"src": "6599:86:0"
},
{
"attributes": {
"assignments": [
442
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "epochsMined",
"scope": 501,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 441,
"name": "ElementaryTypeName",
"src": "6857:4:0"
}
],
"id": 442,
"name": "VariableDeclaration",
"src": "6857:16:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 266,
"type": "uint256",
"value": "_BLOCKS_PER_READJUSTMENT"
},
"id": 443,
"name": "Identifier",
"src": "6876:24:0"
}
],
"id": 444,
"name": "VariableDeclarationStatement",
"src": "6857:43:0"
},
{
"attributes": {
"assignments": [
446
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "targetEthBlocksPerEpoch",
"scope": 501,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 445,
"name": "ElementaryTypeName",
"src": "6917:4:0"
}
],
"id": 446,
"name": "VariableDeclaration",
"src": "6917:28:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 442,
"type": "uint256",
"value": "epochsMined"
},
"id": 447,
"name": "Identifier",
"src": "6948:11:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3630",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 60",
"value": "60"
},
"id": 448,
"name": "Literal",
"src": "6962:2:0"
}
],
"id": 449,
"name": "BinaryOperation",
"src": "6948:16:0"
}
],
"id": 450,
"name": "VariableDeclarationStatement",
"src": "6917:47:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 435,
"type": "uint256",
"value": "ethBlocksSinceLastDifficultyPeriod"
},
"id": 451,
"name": "Identifier",
"src": "7090:34:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 446,
"type": "uint256",
"value": "targetEthBlocksPerEpoch"
},
"id": 452,
"name": "Identifier",
"src": "7127:23:0"
}
],
"id": 453,
"name": "BinaryOperation",
"src": "7090:60:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 454,
"name": "Identifier",
"src": "7200:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sub",
"referencedDeclaration": 45,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 455,
"name": "Identifier",
"src": "7215:12:0"
}
],
"id": 456,
"name": "MemberAccess",
"src": "7215:16:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 95,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 457,
"name": "Identifier",
"src": "7232:12:0"
}
],
"id": 458,
"name": "MemberAccess",
"src": "7232:16:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3230",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 20",
"value": "20"
},
"id": 459,
"name": "Literal",
"src": "7249:2:0"
}
],
"id": 460,
"name": "FunctionCall",
"src": "7232:20:0"
}
],
"id": 461,
"name": "FunctionCall",
"src": "7215:38:0"
}
],
"id": 462,
"name": "Assignment",
"src": "7200:53:0"
}
],
"id": 463,
"name": "ExpressionStatement",
"src": "7200:53:0"
}
],
"id": 464,
"name": "Block",
"src": "7161:103:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 465,
"name": "Identifier",
"src": "7307:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "add",
"referencedDeclaration": 23,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 466,
"name": "Identifier",
"src": "7322:12:0"
}
],
"id": 467,
"name": "MemberAccess",
"src": "7322:16:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 95,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 468,
"name": "Identifier",
"src": "7339:12:0"
}
],
"id": 469,
"name": "MemberAccess",
"src": "7339:16:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3230",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 20",
"value": "20"
},
"id": 470,
"name": "Literal",
"src": "7356:2:0"
}
],
"id": 471,
"name": "FunctionCall",
"src": "7339:20:0"
}
],
"id": 472,
"name": "FunctionCall",
"src": "7322:38:0"
}
],
"id": 473,
"name": "Assignment",
"src": "7307:53:0"
}
],
"id": 474,
"name": "ExpressionStatement",
"src": "7307:53:0"
}
],
"id": 475,
"name": "Block",
"src": "7268:103:0"
}
],
"id": 476,
"name": "IfStatement",
"src": "7086:285:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 261,
"type": "uint256",
"value": "latestDifficultyPeriodStarted"
},
"id": 477,
"name": "Identifier",
"src": "7383:29:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "number",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 968,
"type": "block",
"value": "block"
},
"id": 478,
"name": "Identifier",
"src": "7415:5:0"
}
],
"id": 479,
"name": "MemberAccess",
"src": "7415:12:0"
}
],
"id": 480,
"name": "Assignment",
"src": "7383:44:0"
}
],
"id": 481,
"name": "ExpressionStatement",
"src": "7383:44:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "<",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 482,
"name": "Identifier",
"src": "7441:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 271,
"type": "uint256",
"value": "_MINIMUM_TARGET"
},
"id": 483,
"name": "Identifier",
"src": "7456:15:0"
}
],
"id": 484,
"name": "BinaryOperation",
"src": "7441:30:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 485,
"name": "Identifier",
"src": "7497:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 271,
"type": "uint256",
"value": "_MINIMUM_TARGET"
},
"id": 486,
"name": "Identifier",
"src": "7512:15:0"
}
],
"id": 487,
"name": "Assignment",
"src": "7497:30:0"
}
],
"id": 488,
"name": "ExpressionStatement",
"src": "7497:30:0"
}
],
"id": 489,
"name": "Block",
"src": "7485:53:0"
}
],
"id": 490,
"name": "IfStatement",
"src": "7438:100:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 491,
"name": "Identifier",
"src": "7551:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 276,
"type": "uint256",
"value": "_MAXIMUM_TARGET"
},
"id": 492,
"name": "Identifier",
"src": "7566:15:0"
}
],
"id": 493,
"name": "BinaryOperation",
"src": "7551:30:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 494,
"name": "Identifier",
"src": "7608:12:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 276,
"type": "uint256",
"value": "_MAXIMUM_TARGET"
},
"id": 495,
"name": "Identifier",
"src": "7623:15:0"
}
],
"id": 496,
"name": "Assignment",
"src": "7608:30:0"
}
],
"id": 497,
"name": "ExpressionStatement",
"src": "7608:30:0"
}
],
"id": 498,
"name": "Block",
"src": "7596:53:0"
}
],
"id": 499,
"name": "IfStatement",
"src": "7548:101:0"
}
],
"id": 500,
"name": "Block",
"src": "6587:1068:0"
}
],
"id": 501,
"name": "FunctionDefinition",
"src": "6547:1108:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "getMintDigest",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "nonce",
"scope": 524,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 502,
"name": "ElementaryTypeName",
"src": "7685:7:0"
}
],
"id": 503,
"name": "VariableDeclaration",
"src": "7685:13:0"
},
{
"attributes": {
"constant": false,
"name": "challenge_digest",
"scope": 524,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 504,
"name": "ElementaryTypeName",
"src": "7700:7:0"
}
],
"id": 505,
"name": "VariableDeclaration",
"src": "7700:24:0"
},
{
"attributes": {
"constant": false,
"name": "challenge_number",
"scope": 524,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 506,
"name": "ElementaryTypeName",
"src": "7726:7:0"
}
],
"id": 507,
"name": "VariableDeclaration",
"src": "7726:24:0"
}
],
"id": 508,
"name": "ParameterList",
"src": "7684:67:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "digesttest",
"scope": 524,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 509,
"name": "ElementaryTypeName",
"src": "7768:7:0"
}
],
"id": 510,
"name": "VariableDeclaration",
"src": "7768:18:0"
}
],
"id": 511,
"name": "ParameterList",
"src": "7767:20:0"
},
{
"children": [
{
"attributes": {
"assignments": [
513
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "digest",
"scope": 524,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 512,
"name": "ElementaryTypeName",
"src": "7799:7:0"
}
],
"id": 513,
"name": "VariableDeclaration",
"src": "7799:14:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 970,
"type": "function () pure returns (bytes32)",
"value": "keccak256"
},
"id": 514,
"name": "Identifier",
"src": "7816:9:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 507,
"type": "bytes32",
"value": "challenge_number"
},
"id": 515,
"name": "Identifier",
"src": "7826:16:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 516,
"name": "Identifier",
"src": "7843:3:0"
}
],
"id": 517,
"name": "MemberAccess",
"src": "7843:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 503,
"type": "uint256",
"value": "nonce"
},
"id": 518,
"name": "Identifier",
"src": "7854:5:0"
}
],
"id": 519,
"name": "FunctionCall",
"src": "7816:44:0"
}
],
"id": 520,
"name": "VariableDeclarationStatement",
"src": "7799:61:0"
},
{
"attributes": {
"functionReturnParameters": 511
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 513,
"type": "bytes32",
"value": "digest"
},
"id": 521,
"name": "Identifier",
"src": "7878:6:0"
}
],
"id": 522,
"name": "Return",
"src": "7871:13:0"
}
],
"id": 523,
"name": "Block",
"src": "7788:106:0"
}
],
"id": 524,
"name": "FunctionDefinition",
"src": "7662:232:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "checkMintSolution",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "nonce",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 525,
"name": "ElementaryTypeName",
"src": "7929:7:0"
}
],
"id": 526,
"name": "VariableDeclaration",
"src": "7929:13:0"
},
{
"attributes": {
"constant": false,
"name": "challenge_digest",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 527,
"name": "ElementaryTypeName",
"src": "7944:7:0"
}
],
"id": 528,
"name": "VariableDeclaration",
"src": "7944:24:0"
},
{
"attributes": {
"constant": false,
"name": "challenge_number",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 529,
"name": "ElementaryTypeName",
"src": "7970:7:0"
}
],
"id": 530,
"name": "VariableDeclaration",
"src": "7970:24:0"
},
{
"attributes": {
"constant": false,
"name": "testDifficulty",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 531,
"name": "ElementaryTypeName",
"src": "7996:4:0"
}
],
"id": 532,
"name": "VariableDeclaration",
"src": "7996:19:0"
}
],
"id": 533,
"name": "ParameterList",
"src": "7928:88:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 534,
"name": "ElementaryTypeName",
"src": "8033:4:0"
}
],
"id": 535,
"name": "VariableDeclaration",
"src": "8033:12:0"
}
],
"id": 536,
"name": "ParameterList",
"src": "8032:14:0"
},
{
"children": [
{
"attributes": {
"assignments": [
538
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "difficulty",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 537,
"name": "ElementaryTypeName",
"src": "8060:4:0"
}
],
"id": 538,
"name": "VariableDeclaration",
"src": "8060:15:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 532,
"type": "uint256",
"value": "testDifficulty"
},
"id": 539,
"name": "Identifier",
"src": "8078:14:0"
}
],
"id": 540,
"name": "VariableDeclarationStatement",
"src": "8060:32:0"
},
{
"attributes": {
"assignments": [
542
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "reward_amount",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 541,
"name": "ElementaryTypeName",
"src": "8104:4:0"
}
],
"id": 542,
"name": "VariableDeclaration",
"src": "8104:18:0"
},
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 723,
"type": "function () view returns (uint256)",
"value": "getMiningReward"
},
"id": 543,
"name": "Identifier",
"src": "8125:15:0"
}
],
"id": 544,
"name": "FunctionCall",
"src": "8125:17:0"
}
],
"id": 545,
"name": "VariableDeclarationStatement",
"src": "8104:38:0"
},
{
"attributes": {
"assignments": [
547
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "digest",
"scope": 570,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 546,
"name": "ElementaryTypeName",
"src": "8155:7:0"
}
],
"id": 547,
"name": "VariableDeclaration",
"src": "8155:14:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 970,
"type": "function () pure returns (bytes32)",
"value": "keccak256"
},
"id": 548,
"name": "Identifier",
"src": "8172:9:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 530,
"type": "bytes32",
"value": "challenge_number"
},
"id": 549,
"name": "Identifier",
"src": "8182:16:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 550,
"name": "Identifier",
"src": "8199:3:0"
}
],
"id": 551,
"name": "MemberAccess",
"src": "8199:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 526,
"type": "uint256",
"value": "nonce"
},
"id": 552,
"name": "Identifier",
"src": "8210:5:0"
}
],
"id": 553,
"name": "FunctionCall",
"src": "8172:44:0"
}
],
"id": 554,
"name": "VariableDeclarationStatement",
"src": "8155:61:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)",
"value": "uint256"
},
"id": 555,
"name": "ElementaryTypeNameExpression",
"src": "8286:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 547,
"type": "bytes32",
"value": "digest"
},
"id": 556,
"name": "Identifier",
"src": "8294:6:0"
}
],
"id": 557,
"name": "FunctionCall",
"src": "8286:15:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 558,
"name": "Identifier",
"src": "8304:12:0"
}
],
"id": 559,
"name": "BinaryOperation",
"src": "8286:30:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 980,
"type": "function () pure",
"value": "revert"
},
"id": 560,
"name": "Identifier",
"src": "8318:6:0"
}
],
"id": 561,
"name": "FunctionCall",
"src": "8318:8:0"
}
],
"id": 562,
"name": "ExpressionStatement",
"src": "8318:8:0"
}
],
"id": 563,
"name": "IfStatement",
"src": "8283:43:0"
},
{
"attributes": {
"functionReturnParameters": 536
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 547,
"type": "bytes32",
"value": "digest"
},
"id": 564,
"name": "Identifier",
"src": "8347:6:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 528,
"type": "bytes32",
"value": "challenge_digest"
},
"id": 565,
"name": "Identifier",
"src": "8357:16:0"
}
],
"id": 566,
"name": "BinaryOperation",
"src": "8347:26:0"
}
],
"id": 567,
"name": "TupleExpression",
"src": "8346:28:0"
}
],
"id": 568,
"name": "Return",
"src": "8339:35:0"
}
],
"id": 569,
"name": "Block",
"src": "8047:339:0"
}
],
"id": 570,
"name": "FunctionDefinition",
"src": "7902:484:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "mint",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "nonce",
"scope": 676,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 571,
"name": "ElementaryTypeName",
"src": "8407:7:0"
}
],
"id": 572,
"name": "VariableDeclaration",
"src": "8407:13:0"
},
{
"attributes": {
"constant": false,
"name": "challenge_digest",
"scope": 676,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 573,
"name": "ElementaryTypeName",
"src": "8422:7:0"
}
],
"id": 574,
"name": "VariableDeclaration",
"src": "8422:24:0"
}
],
"id": 575,
"name": "ParameterList",
"src": "8406:41:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 676,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 576,
"name": "ElementaryTypeName",
"src": "8464:4:0"
}
],
"id": 577,
"name": "VariableDeclaration",
"src": "8464:12:0"
}
],
"id": 578,
"name": "ParameterList",
"src": "8463:14:0"
},
{
"children": [
{
"attributes": {
"assignments": [
580
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "reward_amount",
"scope": 676,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 579,
"name": "ElementaryTypeName",
"src": "8540:4:0"
}
],
"id": 580,
"name": "VariableDeclaration",
"src": "8540:18:0"
},
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 723,
"type": "function () view returns (uint256)",
"value": "getMiningReward"
},
"id": 581,
"name": "Identifier",
"src": "8561:15:0"
}
],
"id": 582,
"name": "FunctionCall",
"src": "8561:17:0"
}
],
"id": 583,
"name": "VariableDeclarationStatement",
"src": "8540:38:0"
},
{
"attributes": {
"assignments": [
585
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "digest",
"scope": 676,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 584,
"name": "ElementaryTypeName",
"src": "8739:7:0"
}
],
"id": 585,
"name": "VariableDeclaration",
"src": "8739:14:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "bytes32",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 970,
"type": "function () pure returns (bytes32)",
"value": "keccak256"
},
"id": 586,
"name": "Identifier",
"src": "8757:9:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 280,
"type": "bytes32",
"value": "challengeNumber"
},
"id": 587,
"name": "Identifier",
"src": "8767:15:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 588,
"name": "Identifier",
"src": "8784:3:0"
}
],
"id": 589,
"name": "MemberAccess",
"src": "8784:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 572,
"type": "uint256",
"value": "nonce"
},
"id": 590,
"name": "Identifier",
"src": "8796:5:0"
}
],
"id": 591,
"name": "FunctionCall",
"src": "8757:46:0"
}
],
"id": 592,
"name": "VariableDeclarationStatement",
"src": "8739:64:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 585,
"type": "bytes32",
"value": "digest"
},
"id": 593,
"name": "Identifier",
"src": "8873:6:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 574,
"type": "bytes32",
"value": "challenge_digest"
},
"id": 594,
"name": "Identifier",
"src": "8883:16:0"
}
],
"id": 595,
"name": "BinaryOperation",
"src": "8873:26:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 980,
"type": "function () pure",
"value": "revert"
},
"id": 596,
"name": "Identifier",
"src": "8901:6:0"
}
],
"id": 597,
"name": "FunctionCall",
"src": "8901:8:0"
}
],
"id": 598,
"name": "ExpressionStatement",
"src": "8901:8:0"
}
],
"id": 599,
"name": "IfStatement",
"src": "8869:40:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": ">",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)",
"value": "uint256"
},
"id": 600,
"name": "ElementaryTypeNameExpression",
"src": "8976:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 585,
"type": "bytes32",
"value": "digest"
},
"id": 601,
"name": "Identifier",
"src": "8984:6:0"
}
],
"id": 602,
"name": "FunctionCall",
"src": "8976:15:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 603,
"name": "Identifier",
"src": "8994:12:0"
}
],
"id": 604,
"name": "BinaryOperation",
"src": "8976:30:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 980,
"type": "function () pure",
"value": "revert"
},
"id": 605,
"name": "Identifier",
"src": "9008:6:0"
}
],
"id": 606,
"name": "FunctionCall",
"src": "9008:8:0"
}
],
"id": 607,
"name": "ExpressionStatement",
"src": "9008:8:0"
}
],
"id": 608,
"name": "IfStatement",
"src": "8973:43:0"
},
{
"attributes": {
"assignments": [
610
]
},
"children": [
{
"attributes": {
"constant": false,
"name": "hashFound",
"scope": 676,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 609,
"name": "ElementaryTypeName",
"src": "9139:4:0"
}
],
"id": 610,
"name": "VariableDeclaration",
"src": "9139:14:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 294,
"type": "mapping(bytes32 => uint256)",
"value": "rewardHashesFound"
},
"id": 611,
"name": "Identifier",
"src": "9156:17:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 585,
"type": "bytes32",
"value": "digest"
},
"id": 612,
"name": "Identifier",
"src": "9174:6:0"
}
],
"id": 613,
"name": "IndexAccess",
"src": "9156:25:0"
}
],
"id": 614,
"name": "VariableDeclarationStatement",
"src": "9139:42:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 294,
"type": "mapping(bytes32 => uint256)",
"value": "rewardHashesFound"
},
"id": 615,
"name": "Identifier",
"src": "9192:17:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 585,
"type": "bytes32",
"value": "digest"
},
"id": 616,
"name": "Identifier",
"src": "9210:6:0"
}
],
"id": 617,
"name": "IndexAccess",
"src": "9192:25:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 263,
"type": "uint256",
"value": "epochCount"
},
"id": 618,
"name": "Identifier",
"src": "9220:10:0"
}
],
"id": 619,
"name": "Assignment",
"src": "9192:38:0"
}
],
"id": 620,
"name": "ExpressionStatement",
"src": "9192:38:0"
},
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 610,
"type": "uint256",
"value": "hashFound"
},
"id": 621,
"name": "Identifier",
"src": "9244:9:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 622,
"name": "Literal",
"src": "9257:1:0"
}
],
"id": 623,
"name": "BinaryOperation",
"src": "9244:14:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 980,
"type": "function () pure",
"value": "revert"
},
"id": 624,
"name": "Identifier",
"src": "9260:6:0"
}
],
"id": 625,
"name": "FunctionCall",
"src": "9260:8:0"
}
],
"id": 626,
"name": "ExpressionStatement",
"src": "9260:8:0"
}
],
"id": 627,
"name": "IfStatement",
"src": "9241:27:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 628,
"name": "Identifier",
"src": "9328:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 629,
"name": "Identifier",
"src": "9337:3:0"
}
],
"id": 630,
"name": "MemberAccess",
"src": "9337:10:0"
}
],
"id": 631,
"name": "IndexAccess",
"src": "9328:20:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "add",
"referencedDeclaration": 23,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 632,
"name": "Identifier",
"src": "9351:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 633,
"name": "Identifier",
"src": "9360:3:0"
}
],
"id": 634,
"name": "MemberAccess",
"src": "9360:10:0"
}
],
"id": 635,
"name": "IndexAccess",
"src": "9351:20:0"
}
],
"id": 636,
"name": "MemberAccess",
"src": "9351:24:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 580,
"type": "uint256",
"value": "reward_amount"
},
"id": 637,
"name": "Identifier",
"src": "9376:13:0"
}
],
"id": 638,
"name": "FunctionCall",
"src": "9351:39:0"
}
],
"id": 639,
"name": "Assignment",
"src": "9328:62:0"
}
],
"id": 640,
"name": "ExpressionStatement",
"src": "9328:62:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 296,
"type": "uint256",
"value": "tokensMinted"
},
"id": 641,
"name": "Identifier",
"src": "9402:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "add",
"referencedDeclaration": 23,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 296,
"type": "uint256",
"value": "tokensMinted"
},
"id": 642,
"name": "Identifier",
"src": "9417:12:0"
}
],
"id": 643,
"name": "MemberAccess",
"src": "9417:16:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 580,
"type": "uint256",
"value": "reward_amount"
},
"id": 644,
"name": "Identifier",
"src": "9434:13:0"
}
],
"id": 645,
"name": "FunctionCall",
"src": "9417:31:0"
}
],
"id": 646,
"name": "Assignment",
"src": "9402:46:0"
}
],
"id": 647,
"name": "ExpressionStatement",
"src": "9402:46:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 286,
"type": "address",
"value": "lastRewardTo"
},
"id": 648,
"name": "Identifier",
"src": "9500:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 649,
"name": "Identifier",
"src": "9515:3:0"
}
],
"id": 650,
"name": "MemberAccess",
"src": "9515:10:0"
}
],
"id": 651,
"name": "Assignment",
"src": "9500:25:0"
}
],
"id": 652,
"name": "ExpressionStatement",
"src": "9500:25:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 288,
"type": "uint256",
"value": "lastRewardAmount"
},
"id": 653,
"name": "Identifier",
"src": "9535:16:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 580,
"type": "uint256",
"value": "reward_amount"
},
"id": 654,
"name": "Identifier",
"src": "9554:13:0"
}
],
"id": 655,
"name": "Assignment",
"src": "9535:32:0"
}
],
"id": 656,
"name": "ExpressionStatement",
"src": "9535:32:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 290,
"type": "uint256",
"value": "lastRewardEthBlockNumber"
},
"id": 657,
"name": "Identifier",
"src": "9577:24:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "number",
"referencedDeclaration": null,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 968,
"type": "block",
"value": "block"
},
"id": 658,
"name": "Identifier",
"src": "9604:5:0"
}
],
"id": 659,
"name": "MemberAccess",
"src": "9604:12:0"
}
],
"id": 660,
"name": "Assignment",
"src": "9577:39:0"
}
],
"id": 661,
"name": "ExpressionStatement",
"src": "9577:39:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 431,
"type": "function ()",
"value": "_startNewMiningEpoch"
},
"id": 662,
"name": "Identifier",
"src": "9629:20:0"
}
],
"id": 663,
"name": "FunctionCall",
"src": "9629:22:0"
}
],
"id": 664,
"name": "ExpressionStatement",
"src": "9629:22:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 316,
"type": "function (address,uint256,uint256,bytes32)",
"value": "Mint"
},
"id": 665,
"name": "Identifier",
"src": "9664:4:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 666,
"name": "Identifier",
"src": "9669:3:0"
}
],
"id": 667,
"name": "MemberAccess",
"src": "9669:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 580,
"type": "uint256",
"value": "reward_amount"
},
"id": 668,
"name": "Identifier",
"src": "9681:13:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 263,
"type": "uint256",
"value": "epochCount"
},
"id": 669,
"name": "Identifier",
"src": "9696:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 280,
"type": "bytes32",
"value": "challengeNumber"
},
"id": 670,
"name": "Identifier",
"src": "9708:15:0"
}
],
"id": 671,
"name": "FunctionCall",
"src": "9664:61:0"
}
],
"id": 672,
"name": "ExpressionStatement",
"src": "9664:61:0"
},
{
"attributes": {
"functionReturnParameters": 578
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 673,
"name": "Literal",
"src": "9742:4:0"
}
],
"id": 674,
"name": "Return",
"src": "9735:11:0"
}
],
"id": 675,
"name": "Block",
"src": "8478:1276:0"
}
],
"id": 676,
"name": "FunctionDefinition",
"src": "8393:1361:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "getChallengeNumber",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 677,
"name": "ParameterList",
"src": "9871:2:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 684,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 678,
"name": "ElementaryTypeName",
"src": "9899:7:0"
}
],
"id": 679,
"name": "VariableDeclaration",
"src": "9899:7:0"
}
],
"id": 680,
"name": "ParameterList",
"src": "9898:9:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 680
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 280,
"type": "bytes32",
"value": "challengeNumber"
},
"id": 681,
"name": "Identifier",
"src": "9925:15:0"
}
],
"id": 682,
"name": "Return",
"src": "9918:22:0"
}
],
"id": 683,
"name": "Block",
"src": "9908:39:0"
}
],
"id": 684,
"name": "FunctionDefinition",
"src": "9844:103:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "getMiningDifficulty",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 685,
"name": "ParameterList",
"src": "10064:2:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 695,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 686,
"name": "ElementaryTypeName",
"src": "10092:4:0"
}
],
"id": 687,
"name": "VariableDeclaration",
"src": "10092:4:0"
}
],
"id": 688,
"name": "ParameterList",
"src": "10091:6:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 688
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 95,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 276,
"type": "uint256",
"value": "_MAXIMUM_TARGET"
},
"id": 689,
"name": "Identifier",
"src": "10115:15:0"
}
],
"id": 690,
"name": "MemberAccess",
"src": "10115:19:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 691,
"name": "Identifier",
"src": "10135:12:0"
}
],
"id": 692,
"name": "FunctionCall",
"src": "10115:33:0"
}
],
"id": 693,
"name": "Return",
"src": "10108:40:0"
}
],
"id": 694,
"name": "Block",
"src": "10098:57:0"
}
],
"id": 695,
"name": "FunctionDefinition",
"src": "10036:119:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "getMiningTarget",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 696,
"name": "ParameterList",
"src": "10185:2:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 703,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 697,
"name": "ElementaryTypeName",
"src": "10213:4:0"
}
],
"id": 698,
"name": "VariableDeclaration",
"src": "10213:4:0"
}
],
"id": 699,
"name": "ParameterList",
"src": "10212:6:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 699
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 278,
"type": "uint256",
"value": "miningTarget"
},
"id": 700,
"name": "Identifier",
"src": "10235:12:0"
}
],
"id": 701,
"name": "Return",
"src": "10228:19:0"
}
],
"id": 702,
"name": "Block",
"src": "10219:34:0"
}
],
"id": 703,
"name": "FunctionDefinition",
"src": "10161:92:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "getMiningReward",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 704,
"name": "ParameterList",
"src": "10391:2:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 723,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 705,
"name": "ElementaryTypeName",
"src": "10419:4:0"
}
],
"id": 706,
"name": "VariableDeclaration",
"src": "10419:4:0"
}
],
"id": 707,
"name": "ParameterList",
"src": "10418:6:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 707
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "div",
"referencedDeclaration": 95,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "*",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3530",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 50",
"value": "50"
},
"id": 708,
"name": "Literal",
"src": "10570:2:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "3130",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 10",
"value": "10"
},
"id": 709,
"name": "Literal",
"src": "10575:2:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(uint256)",
"value": "uint"
},
"id": 710,
"name": "ElementaryTypeNameExpression",
"src": "10579:4:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 257,
"type": "uint8",
"value": "decimals"
},
"id": 711,
"name": "Identifier",
"src": "10584:8:0"
}
],
"id": 712,
"name": "FunctionCall",
"src": "10579:14:0"
}
],
"id": 713,
"name": "BinaryOperation",
"src": "10575:18:0"
}
],
"id": 714,
"name": "BinaryOperation",
"src": "10570:23:0"
}
],
"id": 715,
"name": "TupleExpression",
"src": "10569:26:0"
}
],
"id": 716,
"name": "MemberAccess",
"src": "10569:30:0"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "**",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 717,
"name": "Literal",
"src": "10601:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 282,
"type": "uint256",
"value": "rewardEra"
},
"id": 718,
"name": "Identifier",
"src": "10604:9:0"
}
],
"id": 719,
"name": "BinaryOperation",
"src": "10601:12:0"
}
],
"id": 720,
"name": "FunctionCall",
"src": "10569:46:0"
}
],
"id": 721,
"name": "Return",
"src": "10562:53:0"
}
],
"id": 722,
"name": "Block",
"src": "10425:199:0"
}
],
"id": 723,
"name": "FunctionDefinition",
"src": "10367:257:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "totalSupply",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": 101,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 724,
"name": "ParameterList",
"src": "10835:2:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 737,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 725,
"name": "ElementaryTypeName",
"src": "10863:4:0"
}
],
"id": 726,
"name": "VariableDeclaration",
"src": "10863:4:0"
}
],
"id": 727,
"name": "ParameterList",
"src": "10862:6:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 727
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "-",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 259,
"type": "uint256",
"value": "_totalSupply"
},
"id": 728,
"name": "Identifier",
"src": "10887:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 729,
"name": "Identifier",
"src": "10903:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "address",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)",
"value": "address"
},
"id": 730,
"name": "ElementaryTypeNameExpression",
"src": "10912:7:0"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 731,
"name": "Literal",
"src": "10920:1:0"
}
],
"id": 732,
"name": "FunctionCall",
"src": "10912:10:0"
}
],
"id": 733,
"name": "IndexAccess",
"src": "10903:20:0"
}
],
"id": 734,
"name": "BinaryOperation",
"src": "10887:36:0"
}
],
"id": 735,
"name": "Return",
"src": "10880:43:0"
}
],
"id": 736,
"name": "Block",
"src": "10869:62:0"
}
],
"id": 737,
"name": "FunctionDefinition",
"src": "10815:116:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "balanceOf",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": 108,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "tokenOwner",
"scope": 749,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 738,
"name": "ElementaryTypeName",
"src": "11175:7:0"
}
],
"id": 739,
"name": "VariableDeclaration",
"src": "11175:18:0"
}
],
"id": 740,
"name": "ParameterList",
"src": "11174:20:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "balance",
"scope": 749,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 741,
"name": "ElementaryTypeName",
"src": "11220:4:0"
}
],
"id": 742,
"name": "VariableDeclaration",
"src": "11220:12:0"
}
],
"id": 743,
"name": "ParameterList",
"src": "11219:14:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 743
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 744,
"name": "Identifier",
"src": "11252:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 739,
"type": "address",
"value": "tokenOwner"
},
"id": 745,
"name": "Identifier",
"src": "11261:10:0"
}
],
"id": 746,
"name": "IndexAccess",
"src": "11252:20:0"
}
],
"id": 747,
"name": "Return",
"src": "11245:27:0"
}
],
"id": 748,
"name": "Block",
"src": "11234:46:0"
}
],
"id": 749,
"name": "FunctionDefinition",
"src": "11156:124:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "transfer",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": 126,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "to",
"scope": 792,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 750,
"name": "ElementaryTypeName",
"src": "11647:7:0"
}
],
"id": 751,
"name": "VariableDeclaration",
"src": "11647:10:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 792,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 752,
"name": "ElementaryTypeName",
"src": "11659:4:0"
}
],
"id": 753,
"name": "VariableDeclaration",
"src": "11659:11:0"
}
],
"id": 754,
"name": "ParameterList",
"src": "11646:25:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 792,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 755,
"name": "ElementaryTypeName",
"src": "11688:4:0"
}
],
"id": 756,
"name": "VariableDeclaration",
"src": "11688:12:0"
}
],
"id": 757,
"name": "ParameterList",
"src": "11687:14:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 758,
"name": "Identifier",
"src": "11713:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 759,
"name": "Identifier",
"src": "11722:3:0"
}
],
"id": 760,
"name": "MemberAccess",
"src": "11722:10:0"
}
],
"id": 761,
"name": "IndexAccess",
"src": "11713:20:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sub",
"referencedDeclaration": 45,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 762,
"name": "Identifier",
"src": "11736:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 763,
"name": "Identifier",
"src": "11745:3:0"
}
],
"id": 764,
"name": "MemberAccess",
"src": "11745:10:0"
}
],
"id": 765,
"name": "IndexAccess",
"src": "11736:20:0"
}
],
"id": 766,
"name": "MemberAccess",
"src": "11736:24:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 753,
"type": "uint256",
"value": "tokens"
},
"id": 767,
"name": "Identifier",
"src": "11761:6:0"
}
],
"id": 768,
"name": "FunctionCall",
"src": "11736:32:0"
}
],
"id": 769,
"name": "Assignment",
"src": "11713:55:0"
}
],
"id": 770,
"name": "ExpressionStatement",
"src": "11713:55:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 771,
"name": "Identifier",
"src": "11779:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 751,
"type": "address",
"value": "to"
},
"id": 772,
"name": "Identifier",
"src": "11788:2:0"
}
],
"id": 773,
"name": "IndexAccess",
"src": "11779:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "add",
"referencedDeclaration": 23,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 774,
"name": "Identifier",
"src": "11794:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 751,
"type": "address",
"value": "to"
},
"id": 775,
"name": "Identifier",
"src": "11803:2:0"
}
],
"id": 776,
"name": "IndexAccess",
"src": "11794:12:0"
}
],
"id": 777,
"name": "MemberAccess",
"src": "11794:16:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 753,
"type": "uint256",
"value": "tokens"
},
"id": 778,
"name": "Identifier",
"src": "11811:6:0"
}
],
"id": 779,
"name": "FunctionCall",
"src": "11794:24:0"
}
],
"id": 780,
"name": "Assignment",
"src": "11779:39:0"
}
],
"id": 781,
"name": "ExpressionStatement",
"src": "11779:39:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 154,
"type": "function (address,address,uint256)",
"value": "Transfer"
},
"id": 782,
"name": "Identifier",
"src": "11829:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 783,
"name": "Identifier",
"src": "11838:3:0"
}
],
"id": 784,
"name": "MemberAccess",
"src": "11838:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 751,
"type": "address",
"value": "to"
},
"id": 785,
"name": "Identifier",
"src": "11850:2:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 753,
"type": "uint256",
"value": "tokens"
},
"id": 786,
"name": "Identifier",
"src": "11854:6:0"
}
],
"id": 787,
"name": "FunctionCall",
"src": "11829:32:0"
}
],
"id": 788,
"name": "ExpressionStatement",
"src": "11829:32:0"
},
{
"attributes": {
"functionReturnParameters": 757
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 789,
"name": "Literal",
"src": "11879:4:0"
}
],
"id": 790,
"name": "Return",
"src": "11872:11:0"
}
],
"id": 791,
"name": "Block",
"src": "11702:189:0"
}
],
"id": 792,
"name": "FunctionDefinition",
"src": "11629:262:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "approve",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": 135,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "spender",
"scope": 820,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 793,
"name": "ElementaryTypeName",
"src": "12422:7:0"
}
],
"id": 794,
"name": "VariableDeclaration",
"src": "12422:15:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 820,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 795,
"name": "ElementaryTypeName",
"src": "12439:4:0"
}
],
"id": 796,
"name": "VariableDeclaration",
"src": "12439:11:0"
}
],
"id": 797,
"name": "ParameterList",
"src": "12421:30:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 820,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 798,
"name": "ElementaryTypeName",
"src": "12468:4:0"
}
],
"id": 799,
"name": "VariableDeclaration",
"src": "12468:12:0"
}
],
"id": 800,
"name": "ParameterList",
"src": "12467:14:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 306,
"type": "mapping(address => mapping(address => uint256))",
"value": "allowed"
},
"id": 801,
"name": "Identifier",
"src": "12493:7:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 802,
"name": "Identifier",
"src": "12501:3:0"
}
],
"id": 803,
"name": "MemberAccess",
"src": "12501:10:0"
}
],
"id": 805,
"name": "IndexAccess",
"src": "12493:19:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 794,
"type": "address",
"value": "spender"
},
"id": 804,
"name": "Identifier",
"src": "12513:7:0"
}
],
"id": 806,
"name": "IndexAccess",
"src": "12493:28:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 796,
"type": "uint256",
"value": "tokens"
},
"id": 807,
"name": "Identifier",
"src": "12524:6:0"
}
],
"id": 808,
"name": "Assignment",
"src": "12493:37:0"
}
],
"id": 809,
"name": "ExpressionStatement",
"src": "12493:37:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 162,
"type": "function (address,address,uint256)",
"value": "Approval"
},
"id": 810,
"name": "Identifier",
"src": "12541:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 811,
"name": "Identifier",
"src": "12550:3:0"
}
],
"id": 812,
"name": "MemberAccess",
"src": "12550:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 794,
"type": "address",
"value": "spender"
},
"id": 813,
"name": "Identifier",
"src": "12562:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 796,
"type": "uint256",
"value": "tokens"
},
"id": 814,
"name": "Identifier",
"src": "12571:6:0"
}
],
"id": 815,
"name": "FunctionCall",
"src": "12541:37:0"
}
],
"id": 816,
"name": "ExpressionStatement",
"src": "12541:37:0"
},
{
"attributes": {
"functionReturnParameters": 800
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 817,
"name": "Literal",
"src": "12596:4:0"
}
],
"id": 818,
"name": "Return",
"src": "12589:11:0"
}
],
"id": 819,
"name": "Block",
"src": "12482:126:0"
}
],
"id": 820,
"name": "FunctionDefinition",
"src": "12405:203:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "transferFrom",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": 146,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "from",
"scope": 879,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 821,
"name": "ElementaryTypeName",
"src": "13171:7:0"
}
],
"id": 822,
"name": "VariableDeclaration",
"src": "13171:12:0"
},
{
"attributes": {
"constant": false,
"name": "to",
"scope": 879,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 823,
"name": "ElementaryTypeName",
"src": "13185:7:0"
}
],
"id": 824,
"name": "VariableDeclaration",
"src": "13185:10:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 879,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 825,
"name": "ElementaryTypeName",
"src": "13197:4:0"
}
],
"id": 826,
"name": "VariableDeclaration",
"src": "13197:11:0"
}
],
"id": 827,
"name": "ParameterList",
"src": "13170:39:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 879,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 828,
"name": "ElementaryTypeName",
"src": "13226:4:0"
}
],
"id": 829,
"name": "VariableDeclaration",
"src": "13226:12:0"
}
],
"id": 830,
"name": "ParameterList",
"src": "13225:14:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 831,
"name": "Identifier",
"src": "13251:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 822,
"type": "address",
"value": "from"
},
"id": 832,
"name": "Identifier",
"src": "13260:4:0"
}
],
"id": 833,
"name": "IndexAccess",
"src": "13251:14:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sub",
"referencedDeclaration": 45,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 834,
"name": "Identifier",
"src": "13268:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 822,
"type": "address",
"value": "from"
},
"id": 835,
"name": "Identifier",
"src": "13277:4:0"
}
],
"id": 836,
"name": "IndexAccess",
"src": "13268:14:0"
}
],
"id": 837,
"name": "MemberAccess",
"src": "13268:18:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 826,
"type": "uint256",
"value": "tokens"
},
"id": 838,
"name": "Identifier",
"src": "13287:6:0"
}
],
"id": 839,
"name": "FunctionCall",
"src": "13268:26:0"
}
],
"id": 840,
"name": "Assignment",
"src": "13251:43:0"
}
],
"id": 841,
"name": "ExpressionStatement",
"src": "13251:43:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 306,
"type": "mapping(address => mapping(address => uint256))",
"value": "allowed"
},
"id": 842,
"name": "Identifier",
"src": "13305:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 822,
"type": "address",
"value": "from"
},
"id": 843,
"name": "Identifier",
"src": "13313:4:0"
}
],
"id": 846,
"name": "IndexAccess",
"src": "13305:13:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 844,
"name": "Identifier",
"src": "13319:3:0"
}
],
"id": 845,
"name": "MemberAccess",
"src": "13319:10:0"
}
],
"id": 847,
"name": "IndexAccess",
"src": "13305:25:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sub",
"referencedDeclaration": 45,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 306,
"type": "mapping(address => mapping(address => uint256))",
"value": "allowed"
},
"id": 848,
"name": "Identifier",
"src": "13333:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 822,
"type": "address",
"value": "from"
},
"id": 849,
"name": "Identifier",
"src": "13341:4:0"
}
],
"id": 850,
"name": "IndexAccess",
"src": "13333:13:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 851,
"name": "Identifier",
"src": "13347:3:0"
}
],
"id": 852,
"name": "MemberAccess",
"src": "13347:10:0"
}
],
"id": 853,
"name": "IndexAccess",
"src": "13333:25:0"
}
],
"id": 854,
"name": "MemberAccess",
"src": "13333:29:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 826,
"type": "uint256",
"value": "tokens"
},
"id": 855,
"name": "Identifier",
"src": "13363:6:0"
}
],
"id": 856,
"name": "FunctionCall",
"src": "13333:37:0"
}
],
"id": 857,
"name": "Assignment",
"src": "13305:65:0"
}
],
"id": 858,
"name": "ExpressionStatement",
"src": "13305:65:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 859,
"name": "Identifier",
"src": "13381:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 824,
"type": "address",
"value": "to"
},
"id": 860,
"name": "Identifier",
"src": "13390:2:0"
}
],
"id": 861,
"name": "IndexAccess",
"src": "13381:12:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "add",
"referencedDeclaration": 23,
"type": "function (uint256,uint256) pure returns (uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 300,
"type": "mapping(address => uint256)",
"value": "balances"
},
"id": 862,
"name": "Identifier",
"src": "13396:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 824,
"type": "address",
"value": "to"
},
"id": 863,
"name": "Identifier",
"src": "13405:2:0"
}
],
"id": 864,
"name": "IndexAccess",
"src": "13396:12:0"
}
],
"id": 865,
"name": "MemberAccess",
"src": "13396:16:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 826,
"type": "uint256",
"value": "tokens"
},
"id": 866,
"name": "Identifier",
"src": "13413:6:0"
}
],
"id": 867,
"name": "FunctionCall",
"src": "13396:24:0"
}
],
"id": 868,
"name": "Assignment",
"src": "13381:39:0"
}
],
"id": 869,
"name": "ExpressionStatement",
"src": "13381:39:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 154,
"type": "function (address,address,uint256)",
"value": "Transfer"
},
"id": 870,
"name": "Identifier",
"src": "13431:8:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 822,
"type": "address",
"value": "from"
},
"id": 871,
"name": "Identifier",
"src": "13440:4:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 824,
"type": "address",
"value": "to"
},
"id": 872,
"name": "Identifier",
"src": "13446:2:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 826,
"type": "uint256",
"value": "tokens"
},
"id": 873,
"name": "Identifier",
"src": "13450:6:0"
}
],
"id": 874,
"name": "FunctionCall",
"src": "13431:26:0"
}
],
"id": 875,
"name": "ExpressionStatement",
"src": "13431:26:0"
},
{
"attributes": {
"functionReturnParameters": 830
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 876,
"name": "Literal",
"src": "13475:4:0"
}
],
"id": 877,
"name": "Return",
"src": "13468:11:0"
}
],
"id": 878,
"name": "Block",
"src": "13240:247:0"
}
],
"id": 879,
"name": "FunctionDefinition",
"src": "13149:338:0"
},
{
"attributes": {
"constant": true,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "allowance",
"payable": false,
"scope": 964,
"stateMutability": "view",
"superFunction": 117,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "tokenOwner",
"scope": 895,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 880,
"name": "ElementaryTypeName",
"src": "13792:7:0"
}
],
"id": 881,
"name": "VariableDeclaration",
"src": "13792:18:0"
},
{
"attributes": {
"constant": false,
"name": "spender",
"scope": 895,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 882,
"name": "ElementaryTypeName",
"src": "13812:7:0"
}
],
"id": 883,
"name": "VariableDeclaration",
"src": "13812:15:0"
}
],
"id": 884,
"name": "ParameterList",
"src": "13791:37:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "remaining",
"scope": 895,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 885,
"name": "ElementaryTypeName",
"src": "13854:4:0"
}
],
"id": 886,
"name": "VariableDeclaration",
"src": "13854:14:0"
}
],
"id": 887,
"name": "ParameterList",
"src": "13853:16:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 887
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 306,
"type": "mapping(address => mapping(address => uint256))",
"value": "allowed"
},
"id": 888,
"name": "Identifier",
"src": "13888:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 881,
"type": "address",
"value": "tokenOwner"
},
"id": 889,
"name": "Identifier",
"src": "13896:10:0"
}
],
"id": 890,
"name": "IndexAccess",
"src": "13888:19:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 883,
"type": "address",
"value": "spender"
},
"id": 891,
"name": "Identifier",
"src": "13908:7:0"
}
],
"id": 892,
"name": "IndexAccess",
"src": "13888:28:0"
}
],
"id": 893,
"name": "Return",
"src": "13881:35:0"
}
],
"id": 894,
"name": "Block",
"src": "13870:54:0"
}
],
"id": 895,
"name": "FunctionDefinition",
"src": "13773:151:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "approveAndCall",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "spender",
"scope": 936,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 896,
"name": "ElementaryTypeName",
"src": "14314:7:0"
}
],
"id": 897,
"name": "VariableDeclaration",
"src": "14314:15:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 936,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 898,
"name": "ElementaryTypeName",
"src": "14331:4:0"
}
],
"id": 899,
"name": "VariableDeclaration",
"src": "14331:11:0"
},
{
"attributes": {
"constant": false,
"name": "data",
"scope": 936,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes memory",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes storage pointer"
},
"id": 900,
"name": "ElementaryTypeName",
"src": "14344:5:0"
}
],
"id": 901,
"name": "VariableDeclaration",
"src": "14344:10:0"
}
],
"id": 902,
"name": "ParameterList",
"src": "14313:42:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 936,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 903,
"name": "ElementaryTypeName",
"src": "14372:4:0"
}
],
"id": 904,
"name": "VariableDeclaration",
"src": "14372:12:0"
}
],
"id": 905,
"name": "ParameterList",
"src": "14371:14:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "mapping(address => uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 306,
"type": "mapping(address => mapping(address => uint256))",
"value": "allowed"
},
"id": 906,
"name": "Identifier",
"src": "14397:7:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 907,
"name": "Identifier",
"src": "14405:3:0"
}
],
"id": 908,
"name": "MemberAccess",
"src": "14405:10:0"
}
],
"id": 910,
"name": "IndexAccess",
"src": "14397:19:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 897,
"type": "address",
"value": "spender"
},
"id": 909,
"name": "Identifier",
"src": "14417:7:0"
}
],
"id": 911,
"name": "IndexAccess",
"src": "14397:28:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 899,
"type": "uint256",
"value": "tokens"
},
"id": 912,
"name": "Identifier",
"src": "14428:6:0"
}
],
"id": 913,
"name": "Assignment",
"src": "14397:37:0"
}
],
"id": 914,
"name": "ExpressionStatement",
"src": "14397:37:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 162,
"type": "function (address,address,uint256)",
"value": "Approval"
},
"id": 915,
"name": "Identifier",
"src": "14445:8:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 916,
"name": "Identifier",
"src": "14454:3:0"
}
],
"id": 917,
"name": "MemberAccess",
"src": "14454:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 897,
"type": "address",
"value": "spender"
},
"id": 918,
"name": "Identifier",
"src": "14466:7:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 899,
"type": "uint256",
"value": "tokens"
},
"id": 919,
"name": "Identifier",
"src": "14475:6:0"
}
],
"id": 920,
"name": "FunctionCall",
"src": "14445:37:0"
}
],
"id": 921,
"name": "ExpressionStatement",
"src": "14445:37:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_contract$__0xBitcoinToken_$964",
"typeString": "contract _0xBitcoinToken"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "receiveApproval",
"referencedDeclaration": 174,
"type": "function (address,uint256,address,bytes memory) external"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "contract ApproveAndCallFallBack",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 175,
"type": "type(contract ApproveAndCallFallBack)",
"value": "ApproveAndCallFallBack"
},
"id": 922,
"name": "Identifier",
"src": "14493:22:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 897,
"type": "address",
"value": "spender"
},
"id": 923,
"name": "Identifier",
"src": "14516:7:0"
}
],
"id": 924,
"name": "FunctionCall",
"src": "14493:31:0"
}
],
"id": 925,
"name": "MemberAccess",
"src": "14493:47:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 976,
"type": "msg",
"value": "msg"
},
"id": 926,
"name": "Identifier",
"src": "14541:3:0"
}
],
"id": 927,
"name": "MemberAccess",
"src": "14541:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 899,
"type": "uint256",
"value": "tokens"
},
"id": 928,
"name": "Identifier",
"src": "14553:6:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 995,
"type": "contract _0xBitcoinToken",
"value": "this"
},
"id": 929,
"name": "Identifier",
"src": "14561:4:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 901,
"type": "bytes memory",
"value": "data"
},
"id": 930,
"name": "Identifier",
"src": "14567:4:0"
}
],
"id": 931,
"name": "FunctionCall",
"src": "14493:79:0"
}
],
"id": 932,
"name": "ExpressionStatement",
"src": "14493:79:0"
},
{
"attributes": {
"functionReturnParameters": 905
},
"children": [
{
"attributes": {
"argumentTypes": null,
"hexvalue": "74727565",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "bool",
"type": "bool",
"value": "true"
},
"id": 933,
"name": "Literal",
"src": "14590:4:0"
}
],
"id": 934,
"name": "Return",
"src": "14583:11:0"
}
],
"id": 935,
"name": "Block",
"src": "14386:216:0"
}
],
"id": 936,
"name": "FunctionDefinition",
"src": "14290:312:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "",
"payable": true,
"scope": 964,
"stateMutability": "payable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 937,
"name": "ParameterList",
"src": "14806:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 938,
"name": "ParameterList",
"src": "14824:0:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"arguments": [
null
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
null
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 980,
"type": "function () pure",
"value": "revert"
},
"id": 939,
"name": "Identifier",
"src": "14835:6:0"
}
],
"id": 940,
"name": "FunctionCall",
"src": "14835:8:0"
}
],
"id": 941,
"name": "ExpressionStatement",
"src": "14835:8:0"
}
],
"id": 942,
"name": "Block",
"src": "14824:27:0"
}
],
"id": 943,
"name": "FunctionDefinition",
"src": "14797:54:0"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"name": "transferAnyERC20Token",
"payable": false,
"scope": 964,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "tokenAddress",
"scope": 963,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 944,
"name": "ElementaryTypeName",
"src": "15118:7:0"
}
],
"id": 945,
"name": "VariableDeclaration",
"src": "15118:20:0"
},
{
"attributes": {
"constant": false,
"name": "tokens",
"scope": 963,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 946,
"name": "ElementaryTypeName",
"src": "15140:4:0"
}
],
"id": 947,
"name": "VariableDeclaration",
"src": "15140:11:0"
}
],
"id": 948,
"name": "ParameterList",
"src": "15117:35:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "success",
"scope": 963,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 951,
"name": "ElementaryTypeName",
"src": "15179:4:0"
}
],
"id": 952,
"name": "VariableDeclaration",
"src": "15179:12:0"
}
],
"id": 953,
"name": "ParameterList",
"src": "15178:14:0"
},
{
"attributes": {
"arguments": [
null
]
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 205,
"type": "modifier ()",
"value": "onlyOwner"
},
"id": 949,
"name": "Identifier",
"src": "15160:9:0"
}
],
"id": 950,
"name": "ModifierInvocation",
"src": "15160:9:0"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 953
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "bool",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "transfer",
"referencedDeclaration": 126,
"type": "function (address,uint256) external returns (bool)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "contract ERC20Interface",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 163,
"type": "type(contract ERC20Interface)",
"value": "ERC20Interface"
},
"id": 954,
"name": "Identifier",
"src": "15211:14:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 945,
"type": "address",
"value": "tokenAddress"
},
"id": 955,
"name": "Identifier",
"src": "15226:12:0"
}
],
"id": 956,
"name": "FunctionCall",
"src": "15211:28:0"
}
],
"id": 957,
"name": "MemberAccess",
"src": "15211:37:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 177,
"type": "address",
"value": "owner"
},
"id": 958,
"name": "Identifier",
"src": "15249:5:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 947,
"type": "uint256",
"value": "tokens"
},
"id": 959,
"name": "Identifier",
"src": "15256:6:0"
}
],
"id": 960,
"name": "FunctionCall",
"src": "15211:52:0"
}
],
"id": 961,
"name": "Return",
"src": "15204:59:0"
}
],
"id": 962,
"name": "Block",
"src": "15193:78:0"
}
],
"id": 963,
"name": "FunctionDefinition",
"src": "15087:184:0"
}
],
"id": 964,
"name": "ContractDefinition",
"src": "3478:11796:0"
}
],
"id": 965,
"name": "SourceUnit",
"src": "0:15275:0"
},
"compiler": {
"name": "solc",
"version": "0.4.18+commit.9cf6e910.Emscripten.clang"
},
"networks": {},
"schemaVersion": "1.0.1",
"updatedAt": "2018-02-03T22:55:50.574Z"
}
{
"networks": {
"mainnet": {
"contracts": {
"_0xbitcointoken": {"name":"0xBitcoinToken", "blockchain_address":"0xb6ed7644c69416d67b522e20bc294a9a9b405b31"},
"batchedpayments": {"name":"BatchedPayments", "blockchain_address":"0xebf6245689194a6e43096551567827c6726ede0b"},
"mintforwarder":{"name":"MintHelper", "blockchain_address":"0xf118fde3f634e5c47638030ab0514debf39465d1"}
}
},
"staging": {
"contracts": {
"_0xbitcointoken": {"name":"0xBitcoinToken", "blockchain_address":"0x176762d66f15ccdd0d3a1dc13040d794c9c93776"},
"batchedpayments": {"name":"BatchedPayments", "blockchain_address":"0xebf6245689194a6e43096551567827c6726ede0b"},
"mintforwarder":{"name":"MintHelper", "blockchain_address":"0xf118fde3f634e5c47638030ab0514debf39465d1"}
}
},
"testnet": {
"contracts": {
"_0xbitcointoken": {"name":"0xBitcoinToken", "blockchain_address":"0x9d2cc383e677292ed87f63586086cff62a009010"},
"batchedpayments": {"name":"BatchedPayments", "blockchain_address":"0x4d222439c623b10a0ad8f8eba3ebd8a48d3526f5"},
"mintforwarder":{"name":"MintHelper", "blockchain_address":"0xba657623001bc6f99eea165145cfeb18d4ac6539"}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment