9682 lines
402 KiB
JSON
9682 lines
402 KiB
JSON
{
|
|
"contractName": "GiftableToken",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "_name",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "_symbol",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "_decimals",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_initialSupply",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "allowance",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function",
|
|
"constant": true
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "balanceOf",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function",
|
|
"constant": true
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "decimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function",
|
|
"constant": true
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "name",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function",
|
|
"constant": true
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "symbol",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function",
|
|
"constant": true
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "totalSupply",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function",
|
|
"constant": true
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "gift",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_oldTotal\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newTotal\",\"type\":\"uint256\"}],\"name\":\"ChangedSupply\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"gift\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"triggered when a wallet allows another wallet to transfer tokens from on its behalf\",\"params\":{\"_owner\":\"wallet that approves the allowance\",\"_spender\":\"wallet that receives the allowance\",\"_value\":\"allowance amount\"}},\"Transfer(address,address,uint256)\":{\"details\":\"triggered when tokens are transferred between wallets\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"}}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\",\"params\":{\"_spender\":\"approved address\",\"_value\":\"allowance amount\"},\"returns\":{\"_0\":\"true if the approval was successful, false if it wasn't\"}},\"constructor\":{\"details\":\"initializes a new ERC20Token instance\",\"params\":{\"_decimals\":\"decimal points, for display purposes\",\"_initialSupply\":\"total supply of token units\",\"_name\":\"token name\",\"_symbol\":\"token symbol\"}},\"transfer(address,uint256)\":{\"details\":\"transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol\":\"GiftableToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol\":{\"keccak256\":\"0x0d4d8909d3720b29564992be7d8438d920407d801d8c0775e9556f556279b0be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a63d9486f37b7c5b31b517fb3322c0858a2e69f28338f0253497d48ffb0e17a4\",\"dweb:/ipfs/QmWNig4757rhjS4yKSqezvm85TYtSS7gfGnh1oBFaKTpTu\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}",
|
|
"bytecode": "0x608060405234801561001057600080fd5b5060405162000b5e38038062000b5e8339818101604052608081101561003557600080fd5b810190808051604051939291908464010000000082111561005557600080fd5b90830190602082018581111561006a57600080fd5b825164010000000081118282018810171561008457600080fd5b82525081516020918201929091019080838360005b838110156100b1578181015183820152602001610099565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b506040526020018051604051939291908464010000000082111561010157600080fd5b90830190602082018581111561011657600080fd5b825164010000000081118282018810171561013057600080fd5b82525081516020918201929091019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b5060409081526020820151910151855191935091506101e3576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b600083511161022e576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b8351610241906000906020870190610288565b508251610255906001906020860190610288565b506002805460ff191660ff93909316929092179091556003819055336000908152600460205260409020555061031b9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102c957805160ff19168380011785556102f6565b828001600101855582156102f6579182015b828111156102f65782518255916020019190600101906102db565b50610302929150610306565b5090565b5b808211156103025760008155600101610307565b610833806200032b6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a08231146101ce57806395d89b41146101f4578063a9059cbb146101fc578063cbce4c9714610228578063dd62ed3e146102545761009e565b806306fdde03146100a3578063095ea7b31461012057806318160ddd1461016057806323b872dd1461017a578063313ce567146101b0575b600080fd5b6100ab610282565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100e55781810151838201526020016100cd565b50505050905090810190601f1680156101125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014c6004803603604081101561013657600080fd5b506001600160a01b038135169060200135610310565b604080519115158252519081900360200190f35b6101686103f8565b60408051918252519081900360200190f35b61014c6004803603606081101561019057600080fd5b506001600160a01b038135811691602081013590911690604001356103fe565b6101b861050f565b6040805160ff9092168252519081900360200190f35b610168600480360360208110156101e457600080fd5b50356001600160a01b0316610518565b6100ab61052a565b61014c6004803603604081101561021257600080fd5b506001600160a01b038135169060200135610584565b61014c6004803603604081101561023e57600080fd5b506001600160a01b038135169060200135610635565b6101686004803603604081101561026a57600080fd5b506001600160a01b03813581169160200135166106ef565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b820191906000526020600020905b8154815290600101906020018083116102eb57829003601f168201915b505050505081565b60008261031c8161070c565b82158061034a57503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610390576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b60008361040a8161070c565b836104148161070c565b6001600160a01b03861660009081526005602090815260408083203384529091529020546104429085610760565b6001600160a01b03871660008181526005602090815260408083203384528252808320949094559181526004909152205461047d9085610760565b6001600160a01b0380881660009081526004602052604080822093909355908716815220546104ac90856107ad565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b6000826105908161070c565b336000908152600460205260409020546105aa9084610760565b33600090815260046020526040808220929092556001600160a01b038616815220546105d690846107ad565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b6000826106418161070c565b60038054840190556001600160a01b038416600090815260046020908152604091829020805480870191829055835181815292830191909152825190927f5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e928290030190a16040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505092915050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661075d576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156107a7576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156107f6576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220644eb3a30aaa221921cdec2760f5f3994cae5532951555edfed3499ba643345e64736f6c634300060c0033",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a08231146101ce57806395d89b41146101f4578063a9059cbb146101fc578063cbce4c9714610228578063dd62ed3e146102545761009e565b806306fdde03146100a3578063095ea7b31461012057806318160ddd1461016057806323b872dd1461017a578063313ce567146101b0575b600080fd5b6100ab610282565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100e55781810151838201526020016100cd565b50505050905090810190601f1680156101125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014c6004803603604081101561013657600080fd5b506001600160a01b038135169060200135610310565b604080519115158252519081900360200190f35b6101686103f8565b60408051918252519081900360200190f35b61014c6004803603606081101561019057600080fd5b506001600160a01b038135811691602081013590911690604001356103fe565b6101b861050f565b6040805160ff9092168252519081900360200190f35b610168600480360360208110156101e457600080fd5b50356001600160a01b0316610518565b6100ab61052a565b61014c6004803603604081101561021257600080fd5b506001600160a01b038135169060200135610584565b61014c6004803603604081101561023e57600080fd5b506001600160a01b038135169060200135610635565b6101686004803603604081101561026a57600080fd5b506001600160a01b03813581169160200135166106ef565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b820191906000526020600020905b8154815290600101906020018083116102eb57829003601f168201915b505050505081565b60008261031c8161070c565b82158061034a57503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610390576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b60008361040a8161070c565b836104148161070c565b6001600160a01b03861660009081526005602090815260408083203384529091529020546104429085610760565b6001600160a01b03871660008181526005602090815260408083203384528252808320949094559181526004909152205461047d9085610760565b6001600160a01b0380881660009081526004602052604080822093909355908716815220546104ac90856107ad565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b6000826105908161070c565b336000908152600460205260409020546105aa9084610760565b33600090815260046020526040808220929092556001600160a01b038616815220546105d690846107ad565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b6000826106418161070c565b60038054840190556001600160a01b038416600090815260046020908152604091829020805480870191829055835181815292830191909152825190927f5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e928290030190a16040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505092915050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661075d576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156107a7576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156107f6576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220644eb3a30aaa221921cdec2760f5f3994cae5532951555edfed3499ba643345e64736f6c634300060c0033",
|
|
"immutableReferences": {},
|
|
"sourceMap": "307:4981:50:-:0;;;1714:440;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;;1864:19;;1714:440;;-1:-1:-1;1714:440:50;-1:-1:-1;1856:52:50;;;;;-1:-1:-1;;;1856:52:50;;;;;;;;;;;;-1:-1:-1;;;1856:52:50;;;;;;;;;;;;;;;1951:1;1933:7;1927:21;:25;1919:56;;;;;-1:-1:-1;;;1919:56:50;;;;;;;;;;;;-1:-1:-1;;;1919:56:50;;;;;;;;;;;;;;;1988:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;2011:16:50;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;2038:8:50;:20;;-1:-1:-1;;2038:20:50;;;;;;;;;;;;;2069:11;:28;;;2118:10;-1:-1:-1;2108:21:50;;;:9;:21;;;;;:38;-1:-1:-1;307:4981:50;;-1:-1:-1;307:4981:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;307:4981:50;;;-1:-1:-1;307:4981:50;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;",
|
|
"deployedSourceMap": "307:4981:50:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;396:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4766:519;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4766:519:50;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;503:35;;;:::i;:::-;;;;;;;;;;;;;;;;3581:470;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3581:470:50;;;;;;;;;;;;;;;;;:::i;466:30::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;545:54;;;;;;;;;;;;;;;;-1:-1:-1;545:54:50;-1:-1:-1;;;;;545:54:50;;:::i;430:29::-;;;:::i;2825:355::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2825:355:50;;;;;;;;:::i;2162:331::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2162:331:50;;;;;;;;:::i;606:75::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;606:75:50;;;;;;;;;;:::i;396:27::-;;;;;;;;;;;;;;;-1:-1:-1;;396:27:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4766:519::-;4918:4;4890:8;594:23:65;608:8;594:13;:23::i;:::-;5074:11:50;;;:51:::1;;-1:-1:-1::0;5099:10:50::1;5089:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;5089:31:50;::::1;::::0;;;;;;;;:36;5074:51:::1;5066:82;;;::::0;;-1:-1:-1;;;5066:82:50;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;5066:82:50;;;;;;;;;;;;;::::1;;5171:10;5161:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;5161:31:50;::::1;::::0;;;;;;;;;;:40;;;5217:38;;;;;;;5161:31;;5171:10;5217:38:::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;5273:4:50::1;::::0;4766:519;-1:-1:-1;;;4766:519:50:o;503:35::-;;;;:::o;3581:470::-;3772:4;3720:5;594:23:65;608:8;594:13;:23::i;:::-;3749:3:50::1;594:23:65;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;3825:16:50;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3842:10:::2;3825:28:::0;;;;;;;;:40:::2;::::0;3858:6;3825:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;3794:16:50;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3811:10:::2;3794:28:::0;;;;;;;:71;;;;3895:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;3916:6;3895:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;3876:16:50;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;3951:14;;::::2;::::0;;;;:26:::2;::::0;3970:6;3951:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;3934:14:50;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;3993:28;;;;;;;3934:14;;3993:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;-1:-1:-1::0;4039:4:50::2;::::0;3581:470;-1:-1:-1;;;;;3581:470:50:o;466:30::-;;;;;;:::o;545:54::-;;;;;;;;;;;;;:::o;430:29::-;;;;;;;;;;;;;;;-1:-1:-1;;430:29:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2825:355;2968:4;2945:3;594:23:65;608:8;594:13;:23::i;:::-;3024:10:50::1;3014:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;3040:6;3014:25:::1;:33::i;:::-;3000:10;2990:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;3075:14:50;::::1;::::0;;;;:26:::1;::::0;3094:6;3075:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;3058:14:50;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;3117:33;;;;;;;3058:14;;3126:10:::1;::::0;3117:33:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;3168:4:50::1;::::0;2825:355;-1:-1:-1;;;2825:355:50:o;2162:331::-;2256:4;2240:3;594:23:65;608:8;594:13;:23::i;:::-;2289:11:50::1;::::0;;:20;::::1;2275:34:::0;;-1:-1:-1;;;;;2333:14:50;::::1;-1:-1:-1::0;2333:14:50;;;:9:::1;:14;::::0;;;;;;;;;;2368:23;;::::1;2351:40:::0;;;;2400;;;;;;;::::1;::::0;;;;;;2333:14;;2400:40:::1;::::0;;;;;;::::1;2449:36;::::0;;;;;;;-1:-1:-1;;;;;2449:36:50;::::1;::::0;2466:4:::1;::::0;2449:36:::1;::::0;;;;::::1;::::0;;::::1;628:1:65;2162:331:50::0;;;;;:::o;606:75::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;778:147:61:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:61:o",
|
|
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IERC20Token.sol\";\r\nimport \"../utility/Utils.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\n\r\n/*\r\n * This is a MOCK token used for DEVELOPMENT PURPOSES ONLY.\r\n *\r\n * @dev ERC20 Standard Token implementation\r\n*/\r\ncontract GiftableToken is IERC20Token, Utils {\r\n using SafeMath for uint256;\r\n\r\n\r\n string public override name;\r\n string public override symbol;\r\n uint8 public override decimals;\r\n uint256 public override totalSupply;\r\n mapping (address => uint256) public override balanceOf;\r\n mapping (address => mapping (address => uint256)) public override allowance;\r\n\r\n /**\r\n * @dev triggered when tokens are transferred between wallets\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n */\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n\r\n /**\r\n * @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\r\n *\r\n * @param _owner wallet that approves the allowance\r\n * @param _spender wallet that receives the allowance\r\n * @param _value allowance amount\r\n */\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n\r\n event ChangedSupply(uint256 _oldTotal, uint256 _newTotal);\r\n\r\n /**\r\n * @dev initializes a new ERC20Token instance\r\n *\r\n * @param _name token name\r\n * @param _symbol token symbol\r\n * @param _decimals decimal points, for display purposes\r\n * @param _initialSupply total supply of token units\r\n */\r\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _initialSupply) public {\r\n // validate input\r\n require(bytes(_name).length > 0, \"ERR_INVALID_NAME\");\r\n require(bytes(_symbol).length > 0, \"ERR_INVALID_SYMBOL\");\r\n\r\n name = _name;\r\n symbol = _symbol;\r\n decimals = _decimals;\r\n totalSupply = _initialSupply;\r\n balanceOf[msg.sender] = _initialSupply;\r\n }\r\n\r\n function gift(address _to, uint256 _value) \r\n\tpublic\r\n\tvirtual\r\n\tvalidAddress(_to)\r\n\treturns (bool)\r\n {\r\n\ttotalSupply = totalSupply + _value;\r\n\tuint256 oldSupply = balanceOf[_to];\r\n\tbalanceOf[_to] = balanceOf[_to] + _value;\r\n\temit ChangedSupply(oldSupply, balanceOf[_to]);\r\n\temit Transfer(address(0x00), _to, _value);\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transfer(address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(msg.sender, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address on behalf of another address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transferFrom(address _from, address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_from)\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\r\n balanceOf[_from] = balanceOf[_from].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(_from, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev allows another account/contract to transfers tokens on behalf of the caller\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * also, to minimize the risk of the approve/transferFrom attack vector\r\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\r\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\r\n *\r\n * @param _spender approved address\r\n * @param _value allowance amount\r\n *\r\n * @return true if the approval was successful, false if it wasn't\r\n */\r\n function approve(address _spender, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_spender)\r\n returns (bool)\r\n {\r\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\r\n require(_value == 0 || allowance[msg.sender][_spender] == 0, \"ERR_INVALID_AMOUNT\");\r\n\r\n allowance[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value);\r\n return true;\r\n }\r\n}\r\n",
|
|
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol",
|
|
"exportedSymbols": {
|
|
"GiftableToken": [
|
|
21171
|
|
]
|
|
},
|
|
"id": 21172,
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 20839,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".12"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "52:23:50"
|
|
},
|
|
{
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
|
"file": "./interfaces/IERC20Token.sol",
|
|
"id": 20840,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 21172,
|
|
"sourceUnit": 21462,
|
|
"src": "77:38:50",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
|
|
"file": "../utility/Utils.sol",
|
|
"id": 20841,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 21172,
|
|
"sourceUnit": 22996,
|
|
"src": "117:30:50",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol",
|
|
"file": "../utility/SafeMath.sol",
|
|
"id": 20842,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 21172,
|
|
"sourceUnit": 22689,
|
|
"src": "149:33:50",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 20843,
|
|
"name": "IERC20Token",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 21461,
|
|
"src": "333:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20Token_$21461",
|
|
"typeString": "contract IERC20Token"
|
|
}
|
|
},
|
|
"id": 20844,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "333:11:50"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 20845,
|
|
"name": "Utils",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 22995,
|
|
"src": "346:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Utils_$22995",
|
|
"typeString": "contract Utils"
|
|
}
|
|
},
|
|
"id": 20846,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "346:5:50"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
21461,
|
|
22995
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 21171,
|
|
"linearizedBaseContracts": [
|
|
21171,
|
|
22995,
|
|
21461
|
|
],
|
|
"name": "GiftableToken",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 20849,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 20847,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 22688,
|
|
"src": "365:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$22688",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "359:27:50",
|
|
"typeName": {
|
|
"id": 20848,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "378:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21400
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "06fdde03",
|
|
"id": 20852,
|
|
"mutability": "mutable",
|
|
"name": "name",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20851,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "410:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "396:27:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20850,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "396:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21405
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "95d89b41",
|
|
"id": 20855,
|
|
"mutability": "mutable",
|
|
"name": "symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20854,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "444:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "430:29:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20853,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "430:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21410
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "313ce567",
|
|
"id": 20858,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20857,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "479:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "466:30:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 20856,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "466:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21415
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "18160ddd",
|
|
"id": 20861,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20860,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "518:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "503:35:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20859,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "503:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21422
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "70a08231",
|
|
"id": 20866,
|
|
"mutability": "mutable",
|
|
"name": "balanceOf",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20865,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "581:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "545:54:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 20864,
|
|
"keyType": {
|
|
"id": 20862,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "554:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "545:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 20863,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "565:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21431
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "dd62ed3e",
|
|
"id": 20873,
|
|
"mutability": "mutable",
|
|
"name": "allowance",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20872,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "663:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "606:75:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"typeName": {
|
|
"id": 20871,
|
|
"keyType": {
|
|
"id": 20867,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "615:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "606:49:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"valueType": {
|
|
"id": 20870,
|
|
"keyType": {
|
|
"id": 20868,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "635:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "626:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 20869,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "646:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 20874,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "690:209:50",
|
|
"text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount"
|
|
},
|
|
"id": 20882,
|
|
"name": "Transfer",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 20881,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20876,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20882,
|
|
"src": "920:21:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20875,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "920:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20878,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20882,
|
|
"src": "943:19:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20877,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "943:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20880,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20882,
|
|
"src": "964:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20879,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "964:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "919:60:50"
|
|
},
|
|
"src": "905:75:50"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 20883,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "988:280:50",
|
|
"text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount"
|
|
},
|
|
"id": 20891,
|
|
"name": "Approval",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 20890,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20885,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20891,
|
|
"src": "1289:22:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20884,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1289:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20887,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20891,
|
|
"src": "1313:24:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20886,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1313:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20889,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20891,
|
|
"src": "1339:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20888,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1339:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1288:66:50"
|
|
},
|
|
"src": "1274:81:50"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 20897,
|
|
"name": "ChangedSupply",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 20896,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20893,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_oldTotal",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20897,
|
|
"src": "1383:17:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20892,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1383:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20895,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_newTotal",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20897,
|
|
"src": "1402:17:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20894,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1402:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1382:38:50"
|
|
},
|
|
"src": "1363:58:50"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 20954,
|
|
"nodeType": "Block",
|
|
"src": "1818:336:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20916,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20912,
|
|
"name": "_name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20900,
|
|
"src": "1870:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 20911,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1864:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
"typeString": "type(bytes storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 20910,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1864:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 20913,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1864:12:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 20914,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1864:19:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 20915,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1886:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1864:23:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4552525f494e56414c49445f4e414d45",
|
|
"id": 20917,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1889:18:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
|
|
"typeString": "literal_string \"ERR_INVALID_NAME\""
|
|
},
|
|
"value": "ERR_INVALID_NAME"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
|
|
"typeString": "literal_string \"ERR_INVALID_NAME\""
|
|
}
|
|
],
|
|
"id": 20909,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1856:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 20918,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1856:52:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 20919,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1856:52:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20927,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20923,
|
|
"name": "_symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20902,
|
|
"src": "1933:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 20922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1927:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
"typeString": "type(bytes storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 20921,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1927:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 20924,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1927:14:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 20925,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1927:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 20926,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1951:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1927:25:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4552525f494e56414c49445f53594d424f4c",
|
|
"id": 20928,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1954:20:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
|
|
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
|
|
},
|
|
"value": "ERR_INVALID_SYMBOL"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
|
|
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
|
|
}
|
|
],
|
|
"id": 20920,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1919:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 20929,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1919:56:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 20930,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1919:56:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20933,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20931,
|
|
"name": "name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20852,
|
|
"src": "1988:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20932,
|
|
"name": "_name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20900,
|
|
"src": "1995:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"src": "1988:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"id": 20934,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1988:12:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20937,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20935,
|
|
"name": "symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20855,
|
|
"src": "2011:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20936,
|
|
"name": "_symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20902,
|
|
"src": "2020:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"src": "2011:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"id": 20938,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2011:16:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20939,
|
|
"name": "decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20858,
|
|
"src": "2038:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20940,
|
|
"name": "_decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20904,
|
|
"src": "2049:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "2038:20:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"id": 20942,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2038:20:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20945,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20943,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20861,
|
|
"src": "2069:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20944,
|
|
"name": "_initialSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20906,
|
|
"src": "2083:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2069:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20946,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2069:28:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20952,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20947,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2108:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20950,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20948,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2118:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 20949,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2118:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2108:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20951,
|
|
"name": "_initialSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20906,
|
|
"src": "2132:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2108:38:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20953,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2108:38:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 20898,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1429:279:50",
|
|
"text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _initialSupply total supply of token units"
|
|
},
|
|
"id": 20955,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 20907,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20900,
|
|
"mutability": "mutable",
|
|
"name": "_name",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1726:19:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20899,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1726:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20902,
|
|
"mutability": "mutable",
|
|
"name": "_symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1747:21:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20901,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1747:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20904,
|
|
"mutability": "mutable",
|
|
"name": "_decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1770:15:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 20903,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1770:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20906,
|
|
"mutability": "mutable",
|
|
"name": "_initialSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1787:22:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20905,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1787:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1725:85:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 20908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1818:0:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "1714:440:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 21005,
|
|
"nodeType": "Block",
|
|
"src": "2271:222:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20967,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20861,
|
|
"src": "2275:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20968,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20861,
|
|
"src": "2289:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20969,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20959,
|
|
"src": "2303:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2289:20:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2275:34:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20972,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2275:34:50"
|
|
},
|
|
{
|
|
"assignments": [
|
|
20974
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 20974,
|
|
"mutability": "mutable",
|
|
"name": "oldSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21005,
|
|
"src": "2313:17:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20973,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2313:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 20978,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20975,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2333:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20977,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20976,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2343:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2333:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2313:34:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20987,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20979,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2351:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20981,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20980,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2361:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2351:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20986,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20982,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2368:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20984,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20983,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2378:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2368:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20985,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20959,
|
|
"src": "2385:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2368:23:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2351:40:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20988,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2351:40:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20990,
|
|
"name": "oldSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20974,
|
|
"src": "2414:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20991,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2425:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20993,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20992,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2435:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2425:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 20989,
|
|
"name": "ChangedSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20897,
|
|
"src": "2400:13:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 20994,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2400:40:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 20995,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2395:45:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30783030",
|
|
"id": 20999,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2466:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0x00"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 20998,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2458:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 20997,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2458:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 21000,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2458:13:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21001,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2473:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21002,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20959,
|
|
"src": "2478:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 20996,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20882,
|
|
"src": "2449:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21003,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2449:36:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21004,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2444:41:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "cbce4c97",
|
|
"id": 21006,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20962,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2240:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 20963,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 20961,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "2227:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2227:17:50"
|
|
}
|
|
],
|
|
"name": "gift",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 20960,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20957,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21006,
|
|
"src": "2176:11:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20956,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2176:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20959,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21006,
|
|
"src": "2189:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20958,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2189:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2175:29:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 20966,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20965,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21006,
|
|
"src": "2256:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 20964,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2256:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2255:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "2162:331:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21440
|
|
],
|
|
"body": {
|
|
"id": 21053,
|
|
"nodeType": "Block",
|
|
"src": "2979:201:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21031,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21020,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2990:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21023,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21021,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3000:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21022,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3000:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2990:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21029,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21011,
|
|
"src": "3040:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21024,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3014:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21027,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21025,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3024:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21026,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3024:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3014:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21028,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22627,
|
|
"src": "3014:25:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21030,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3014:33:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2990:57:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21032,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2990:57:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21042,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21033,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3058:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21035,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21034,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "3068:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3058:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21040,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21011,
|
|
"src": "3094:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21036,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3075:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21038,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21037,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "3085:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3075:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21039,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22605,
|
|
"src": "3075:18:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21041,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3075:26:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3058:43:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21043,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3058:43:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21045,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3126:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21046,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3126:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21047,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "3138:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21048,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21011,
|
|
"src": "3143:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 21044,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20882,
|
|
"src": "3117:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21049,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3117:33:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21050,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3112:38:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 21051,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3168:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 21019,
|
|
"id": 21052,
|
|
"nodeType": "Return",
|
|
"src": "3161:11:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 21007,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2501:318:50",
|
|
"text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
|
|
},
|
|
"functionSelector": "a9059cbb",
|
|
"id": 21054,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21015,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "2945:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21016,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21014,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "2932:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2932:17:50"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 21013,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "2914:8:50"
|
|
},
|
|
"parameters": {
|
|
"id": 21012,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21009,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21054,
|
|
"src": "2843:11:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21008,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2843:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21011,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21054,
|
|
"src": "2856:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 21010,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2856:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2842:29:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21019,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21018,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21054,
|
|
"src": "2968:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 21017,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2968:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2967:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "2825:355:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21451
|
|
],
|
|
"body": {
|
|
"id": 21120,
|
|
"nodeType": "Block",
|
|
"src": "3783:268:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21073,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "3794:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21077,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21074,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3804:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3794:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21078,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21075,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3811:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21076,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3811:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3794:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21086,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "3858:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21079,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "3825:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21081,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21080,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3835:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3825:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21084,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21082,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3842:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21083,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3842:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3825:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21085,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22627,
|
|
"src": "3825:32:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21087,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3825:40:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3794:71:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21089,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3794:71:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21099,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21090,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3876:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21092,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21091,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3886:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3876:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21097,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "3916:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21093,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3895:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21095,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21094,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3905:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3895:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21096,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22627,
|
|
"src": "3895:20:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21098,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3895:28:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3876:47:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21100,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3876:47:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21110,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21101,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3934:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21103,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21102,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "3944:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3934:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21108,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "3970:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21104,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3951:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21106,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21105,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "3961:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3951:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21107,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22605,
|
|
"src": "3951:18:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3951:26:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3934:43:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21111,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3934:43:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21113,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "4002:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21114,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "4009:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21115,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "4014:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 21112,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20882,
|
|
"src": "3993:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3993:28:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21117,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3988:33:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 21118,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4039:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 21072,
|
|
"id": 21119,
|
|
"nodeType": "Return",
|
|
"src": "4032:11:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 21055,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3188:387:50",
|
|
"text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
|
|
},
|
|
"functionSelector": "23b872dd",
|
|
"id": 21121,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21065,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3720:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21066,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21064,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "3707:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3707:19:50"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21068,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "3749:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21069,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21067,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "3736:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3736:17:50"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 21063,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "3689:8:50"
|
|
},
|
|
"parameters": {
|
|
"id": 21062,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21057,
|
|
"mutability": "mutable",
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3603:13:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21056,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3603:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21059,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3618:11:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21058,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3618:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21061,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3631:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 21060,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3631:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3602:44:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21072,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21071,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3772:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 21070,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3772:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3771:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "3581:470:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21460
|
|
],
|
|
"body": {
|
|
"id": 21169,
|
|
"nodeType": "Block",
|
|
"src": "4929:356:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 21147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 21138,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21136,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21126,
|
|
"src": "5074:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 21137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5084:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5074:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 21146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21139,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "5089:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21142,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21140,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "5099:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21141,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5099:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5089:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21144,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21143,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "5111:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5089:31:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 21145,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5124:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5089:36:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "5074:51:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4552525f494e56414c49445f414d4f554e54",
|
|
"id": 21148,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5127:20:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
|
|
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
|
|
},
|
|
"value": "ERR_INVALID_AMOUNT"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
|
|
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
|
|
}
|
|
],
|
|
"id": 21135,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "5066:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 21149,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5066:82:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21150,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5066:82:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21151,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "5161:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21155,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21152,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "5171:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21153,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5171:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5161:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21156,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21154,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "5183:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5161:31:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 21157,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21126,
|
|
"src": "5195:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5161:40:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21159,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5161:40:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21161,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "5226:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21162,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5226:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21163,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "5238:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21164,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21126,
|
|
"src": "5248:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 21160,
|
|
"name": "Approval",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20891,
|
|
"src": "5217:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21165,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5217:38:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21166,
|
|
"nodeType": "EmitStatement",
|
|
"src": "5212:43:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 21167,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5273:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 21134,
|
|
"id": 21168,
|
|
"nodeType": "Return",
|
|
"src": "5266:11:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 21122,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4059:701:50",
|
|
"text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't"
|
|
},
|
|
"functionSelector": "095ea7b3",
|
|
"id": 21170,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21130,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "4890:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21131,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21129,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "4877:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "4877:22:50"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 21128,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "4859:8:50"
|
|
},
|
|
"parameters": {
|
|
"id": 21127,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21124,
|
|
"mutability": "mutable",
|
|
"name": "_spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21170,
|
|
"src": "4783:16:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21123,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4783:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21126,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21170,
|
|
"src": "4801:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 21125,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4801:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4782:34:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21134,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21133,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21170,
|
|
"src": "4918:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 21132,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4918:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4917:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "4766:519:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 21172,
|
|
"src": "307:4981:50"
|
|
}
|
|
],
|
|
"src": "52:5238:50"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol",
|
|
"exportedSymbols": {
|
|
"GiftableToken": [
|
|
21171
|
|
]
|
|
},
|
|
"id": 21172,
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 20839,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".12"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "52:23:50"
|
|
},
|
|
{
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
|
"file": "./interfaces/IERC20Token.sol",
|
|
"id": 20840,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 21172,
|
|
"sourceUnit": 21462,
|
|
"src": "77:38:50",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
|
|
"file": "../utility/Utils.sol",
|
|
"id": 20841,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 21172,
|
|
"sourceUnit": 22996,
|
|
"src": "117:30:50",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol",
|
|
"file": "../utility/SafeMath.sol",
|
|
"id": 20842,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 21172,
|
|
"sourceUnit": 22689,
|
|
"src": "149:33:50",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 20843,
|
|
"name": "IERC20Token",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 21461,
|
|
"src": "333:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20Token_$21461",
|
|
"typeString": "contract IERC20Token"
|
|
}
|
|
},
|
|
"id": 20844,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "333:11:50"
|
|
},
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 20845,
|
|
"name": "Utils",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 22995,
|
|
"src": "346:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Utils_$22995",
|
|
"typeString": "contract Utils"
|
|
}
|
|
},
|
|
"id": 20846,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "346:5:50"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
21461,
|
|
22995
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 21171,
|
|
"linearizedBaseContracts": [
|
|
21171,
|
|
22995,
|
|
21461
|
|
],
|
|
"name": "GiftableToken",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 20849,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 20847,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 22688,
|
|
"src": "365:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$22688",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "359:27:50",
|
|
"typeName": {
|
|
"id": 20848,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "378:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21400
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "06fdde03",
|
|
"id": 20852,
|
|
"mutability": "mutable",
|
|
"name": "name",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20851,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "410:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "396:27:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20850,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "396:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21405
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "95d89b41",
|
|
"id": 20855,
|
|
"mutability": "mutable",
|
|
"name": "symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20854,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "444:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "430:29:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20853,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "430:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21410
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "313ce567",
|
|
"id": 20858,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20857,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "479:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "466:30:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 20856,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "466:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21415
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "18160ddd",
|
|
"id": 20861,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20860,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "518:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "503:35:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20859,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "503:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21422
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "70a08231",
|
|
"id": 20866,
|
|
"mutability": "mutable",
|
|
"name": "balanceOf",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20865,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "581:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "545:54:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 20864,
|
|
"keyType": {
|
|
"id": 20862,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "554:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "545:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 20863,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "565:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21431
|
|
],
|
|
"constant": false,
|
|
"functionSelector": "dd62ed3e",
|
|
"id": 20873,
|
|
"mutability": "mutable",
|
|
"name": "allowance",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": {
|
|
"id": 20872,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "663:8:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "606:75:50",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"typeName": {
|
|
"id": 20871,
|
|
"keyType": {
|
|
"id": 20867,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "615:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "606:49:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"valueType": {
|
|
"id": 20870,
|
|
"keyType": {
|
|
"id": 20868,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "635:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "626:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 20869,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "646:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 20874,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "690:209:50",
|
|
"text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount"
|
|
},
|
|
"id": 20882,
|
|
"name": "Transfer",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 20881,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20876,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20882,
|
|
"src": "920:21:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20875,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "920:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20878,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20882,
|
|
"src": "943:19:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20877,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "943:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20880,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20882,
|
|
"src": "964:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20879,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "964:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "919:60:50"
|
|
},
|
|
"src": "905:75:50"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 20883,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "988:280:50",
|
|
"text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount"
|
|
},
|
|
"id": 20891,
|
|
"name": "Approval",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 20890,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20885,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20891,
|
|
"src": "1289:22:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20884,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1289:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20887,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "_spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20891,
|
|
"src": "1313:24:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20886,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1313:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20889,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20891,
|
|
"src": "1339:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20888,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1339:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1288:66:50"
|
|
},
|
|
"src": "1274:81:50"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 20897,
|
|
"name": "ChangedSupply",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 20896,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20893,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_oldTotal",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20897,
|
|
"src": "1383:17:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20892,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1383:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20895,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "_newTotal",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20897,
|
|
"src": "1402:17:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20894,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1402:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1382:38:50"
|
|
},
|
|
"src": "1363:58:50"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 20954,
|
|
"nodeType": "Block",
|
|
"src": "1818:336:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20916,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20912,
|
|
"name": "_name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20900,
|
|
"src": "1870:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 20911,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1864:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
"typeString": "type(bytes storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 20910,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1864:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 20913,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1864:12:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 20914,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1864:19:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 20915,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1886:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1864:23:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4552525f494e56414c49445f4e414d45",
|
|
"id": 20917,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1889:18:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
|
|
"typeString": "literal_string \"ERR_INVALID_NAME\""
|
|
},
|
|
"value": "ERR_INVALID_NAME"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
|
|
"typeString": "literal_string \"ERR_INVALID_NAME\""
|
|
}
|
|
],
|
|
"id": 20909,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1856:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 20918,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1856:52:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 20919,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1856:52:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20927,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20923,
|
|
"name": "_symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20902,
|
|
"src": "1933:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 20922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1927:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
"typeString": "type(bytes storage pointer)"
|
|
},
|
|
"typeName": {
|
|
"id": 20921,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1927:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 20924,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1927:14:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 20925,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1927:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 20926,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1951:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1927:25:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4552525f494e56414c49445f53594d424f4c",
|
|
"id": 20928,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1954:20:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
|
|
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
|
|
},
|
|
"value": "ERR_INVALID_SYMBOL"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
|
|
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
|
|
}
|
|
],
|
|
"id": 20920,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1919:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 20929,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1919:56:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 20930,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1919:56:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20933,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20931,
|
|
"name": "name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20852,
|
|
"src": "1988:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20932,
|
|
"name": "_name",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20900,
|
|
"src": "1995:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"src": "1988:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"id": 20934,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1988:12:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20937,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20935,
|
|
"name": "symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20855,
|
|
"src": "2011:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20936,
|
|
"name": "_symbol",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20902,
|
|
"src": "2020:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
},
|
|
"src": "2011:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string storage ref"
|
|
}
|
|
},
|
|
"id": 20938,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2011:16:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20939,
|
|
"name": "decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20858,
|
|
"src": "2038:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20940,
|
|
"name": "_decimals",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20904,
|
|
"src": "2049:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"src": "2038:20:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"id": 20942,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2038:20:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20945,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20943,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20861,
|
|
"src": "2069:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20944,
|
|
"name": "_initialSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20906,
|
|
"src": "2083:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2069:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20946,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2069:28:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20952,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20947,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2108:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20950,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20948,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2118:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 20949,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2118:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2108:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20951,
|
|
"name": "_initialSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20906,
|
|
"src": "2132:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2108:38:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20953,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2108:38:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 20898,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1429:279:50",
|
|
"text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _initialSupply total supply of token units"
|
|
},
|
|
"id": 20955,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 20907,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20900,
|
|
"mutability": "mutable",
|
|
"name": "_name",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1726:19:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20899,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1726:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20902,
|
|
"mutability": "mutable",
|
|
"name": "_symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1747:21:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 20901,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1747:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20904,
|
|
"mutability": "mutable",
|
|
"name": "_decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1770:15:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
},
|
|
"typeName": {
|
|
"id": 20903,
|
|
"name": "uint8",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1770:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint8",
|
|
"typeString": "uint8"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20906,
|
|
"mutability": "mutable",
|
|
"name": "_initialSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 20955,
|
|
"src": "1787:22:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20905,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1787:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1725:85:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 20908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1818:0:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "1714:440:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 21005,
|
|
"nodeType": "Block",
|
|
"src": "2271:222:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20971,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 20967,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20861,
|
|
"src": "2275:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20970,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20968,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20861,
|
|
"src": "2289:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20969,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20959,
|
|
"src": "2303:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2289:20:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2275:34:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20972,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2275:34:50"
|
|
},
|
|
{
|
|
"assignments": [
|
|
20974
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 20974,
|
|
"mutability": "mutable",
|
|
"name": "oldSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21005,
|
|
"src": "2313:17:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20973,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2313:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 20978,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20975,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2333:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20977,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20976,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2343:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2333:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2313:34:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 20987,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20979,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2351:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20981,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20980,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2361:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2351:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 20986,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20982,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2368:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20984,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20983,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2378:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2368:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20985,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20959,
|
|
"src": "2385:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2368:23:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2351:40:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 20988,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2351:40:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20990,
|
|
"name": "oldSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20974,
|
|
"src": "2414:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20991,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2425:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 20993,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 20992,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2435:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2425:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 20989,
|
|
"name": "ChangedSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20897,
|
|
"src": "2400:13:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256,uint256)"
|
|
}
|
|
},
|
|
"id": 20994,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2400:40:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 20995,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2395:45:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30783030",
|
|
"id": 20999,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2466:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0x00"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 20998,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2458:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 20997,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2458:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 21000,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2458:13:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21001,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2473:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21002,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20959,
|
|
"src": "2478:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 20996,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20882,
|
|
"src": "2449:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21003,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2449:36:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21004,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2444:41:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "cbce4c97",
|
|
"id": 21006,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 20962,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20957,
|
|
"src": "2240:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 20963,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 20961,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "2227:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2227:17:50"
|
|
}
|
|
],
|
|
"name": "gift",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 20960,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20957,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21006,
|
|
"src": "2176:11:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 20956,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2176:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 20959,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21006,
|
|
"src": "2189:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20958,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2189:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2175:29:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 20966,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 20965,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21006,
|
|
"src": "2256:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 20964,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2256:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2255:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "2162:331:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21440
|
|
],
|
|
"body": {
|
|
"id": 21053,
|
|
"nodeType": "Block",
|
|
"src": "2979:201:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21031,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21020,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "2990:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21023,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21021,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3000:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21022,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3000:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2990:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21029,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21011,
|
|
"src": "3040:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21024,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3014:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21027,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21025,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3024:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21026,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3024:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3014:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21028,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22627,
|
|
"src": "3014:25:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21030,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3014:33:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2990:57:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21032,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2990:57:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21042,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21033,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3058:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21035,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21034,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "3068:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3058:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21040,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21011,
|
|
"src": "3094:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21036,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3075:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21038,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21037,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "3085:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3075:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21039,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22605,
|
|
"src": "3075:18:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21041,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3075:26:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3058:43:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21043,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3058:43:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21045,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3126:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21046,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3126:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21047,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "3138:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21048,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21011,
|
|
"src": "3143:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 21044,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20882,
|
|
"src": "3117:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21049,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3117:33:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21050,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3112:38:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 21051,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3168:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 21019,
|
|
"id": 21052,
|
|
"nodeType": "Return",
|
|
"src": "3161:11:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 21007,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2501:318:50",
|
|
"text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
|
|
},
|
|
"functionSelector": "a9059cbb",
|
|
"id": 21054,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21015,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21009,
|
|
"src": "2945:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21016,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21014,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "2932:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "2932:17:50"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 21013,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "2914:8:50"
|
|
},
|
|
"parameters": {
|
|
"id": 21012,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21009,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21054,
|
|
"src": "2843:11:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21008,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2843:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21011,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21054,
|
|
"src": "2856:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 21010,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2856:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2842:29:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21019,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21018,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21054,
|
|
"src": "2968:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 21017,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2968:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2967:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "2825:355:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21451
|
|
],
|
|
"body": {
|
|
"id": 21120,
|
|
"nodeType": "Block",
|
|
"src": "3783:268:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21073,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "3794:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21077,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21074,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3804:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3794:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21078,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21075,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3811:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21076,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3811:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3794:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21086,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "3858:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21079,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "3825:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21081,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21080,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3835:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3825:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21084,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21082,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "3842:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21083,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "3842:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3825:28:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21085,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22627,
|
|
"src": "3825:32:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21087,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3825:40:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3794:71:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21089,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3794:71:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21099,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21090,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3876:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21092,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21091,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3886:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3876:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21097,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "3916:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21093,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3895:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21095,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21094,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3905:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3895:16:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21096,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22627,
|
|
"src": "3895:20:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21098,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3895:28:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3876:47:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21100,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3876:47:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21110,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21101,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3934:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21103,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21102,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "3944:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3934:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21108,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "3970:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21104,
|
|
"name": "balanceOf",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20866,
|
|
"src": "3951:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21106,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21105,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "3961:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3951:14:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21107,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 22605,
|
|
"src": "3951:18:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 21109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3951:26:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3934:43:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21111,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3934:43:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21113,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "4002:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21114,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "4009:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21115,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21061,
|
|
"src": "4014:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 21112,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20882,
|
|
"src": "3993:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3993:28:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21117,
|
|
"nodeType": "EmitStatement",
|
|
"src": "3988:33:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 21118,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4039:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 21072,
|
|
"id": 21119,
|
|
"nodeType": "Return",
|
|
"src": "4032:11:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 21055,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3188:387:50",
|
|
"text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
|
|
},
|
|
"functionSelector": "23b872dd",
|
|
"id": 21121,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21065,
|
|
"name": "_from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21057,
|
|
"src": "3720:5:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21066,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21064,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "3707:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3707:19:50"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21068,
|
|
"name": "_to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21059,
|
|
"src": "3749:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21069,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21067,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "3736:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "3736:17:50"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 21063,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "3689:8:50"
|
|
},
|
|
"parameters": {
|
|
"id": 21062,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21057,
|
|
"mutability": "mutable",
|
|
"name": "_from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3603:13:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21056,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3603:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21059,
|
|
"mutability": "mutable",
|
|
"name": "_to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3618:11:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21058,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3618:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21061,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3631:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 21060,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3631:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3602:44:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21072,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21071,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21121,
|
|
"src": "3772:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 21070,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3772:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3771:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "3581:470:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
21460
|
|
],
|
|
"body": {
|
|
"id": 21169,
|
|
"nodeType": "Block",
|
|
"src": "4929:356:50",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 21147,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 21138,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21136,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21126,
|
|
"src": "5074:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 21137,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5084:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5074:11:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 21146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21139,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "5089:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21142,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21140,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "5099:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21141,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5099:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5089:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21144,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21143,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "5111:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5089:31:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 21145,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5124:1:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "5089:36:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "5074:51:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "4552525f494e56414c49445f414d4f554e54",
|
|
"id": 21148,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5127:20:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
|
|
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
|
|
},
|
|
"value": "ERR_INVALID_AMOUNT"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
|
|
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
|
|
}
|
|
],
|
|
"id": 21135,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "5066:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 21149,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5066:82:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21150,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5066:82:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21151,
|
|
"name": "allowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20873,
|
|
"src": "5161:9:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 21155,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21152,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "5171:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21153,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5171:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5161:21:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 21156,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 21154,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "5183:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "5161:31:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 21157,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21126,
|
|
"src": "5195:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5161:40:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 21159,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5161:40:50"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 21161,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "5226:3:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 21162,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "5226:10:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21163,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "5238:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21164,
|
|
"name": "_value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21126,
|
|
"src": "5248:6:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 21160,
|
|
"name": "Approval",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 20891,
|
|
"src": "5217:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 21165,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5217:38:50",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 21166,
|
|
"nodeType": "EmitStatement",
|
|
"src": "5212:43:50"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 21167,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5273:4:50",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 21134,
|
|
"id": 21168,
|
|
"nodeType": "Return",
|
|
"src": "5266:11:50"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 21122,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4059:701:50",
|
|
"text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't"
|
|
},
|
|
"functionSelector": "095ea7b3",
|
|
"id": 21170,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 21130,
|
|
"name": "_spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 21124,
|
|
"src": "4890:8:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"id": 21131,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 21129,
|
|
"name": "validAddress",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 22952,
|
|
"src": "4877:12:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$_t_address_$",
|
|
"typeString": "modifier (address)"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "4877:22:50"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 21128,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "4859:8:50"
|
|
},
|
|
"parameters": {
|
|
"id": 21127,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21124,
|
|
"mutability": "mutable",
|
|
"name": "_spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21170,
|
|
"src": "4783:16:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 21123,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4783:7:50",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21126,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21170,
|
|
"src": "4801:14:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 21125,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4801:7:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4782:34:50"
|
|
},
|
|
"returnParameters": {
|
|
"id": 21134,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 21133,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 21170,
|
|
"src": "4918:4:50",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 21132,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4918:4:50",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4917:6:50"
|
|
},
|
|
"scope": 21171,
|
|
"src": "4766:519:50",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 21172,
|
|
"src": "307:4981:50"
|
|
}
|
|
],
|
|
"src": "52:5238:50"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
|
},
|
|
"networks": {
|
|
"42": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0x36Bd1f197E2b3D2b8213d4A1Dc20a6d949B8C273",
|
|
"transactionHash": "0x5e0087e503ed1cc3355766d1a602280bebab8a890a5bc21f48be592f9d42c117"
|
|
},
|
|
"8995": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0x36Bd1f197E2b3D2b8213d4A1Dc20a6d949B8C273",
|
|
"transactionHash": "0x5e0087e503ed1cc3355766d1a602280bebab8a890a5bc21f48be592f9d42c117"
|
|
},
|
|
"1604965528035": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0x4311840b91390d4eD6fC416FcF32Eaf46674eA4e",
|
|
"transactionHash": "0x6cfdc8c53a7ee778906525bbb725dddbccaea9d223377a811aec26effa04ce7a"
|
|
},
|
|
"1604965645554": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0xf31c222514B2CE1942A9FA6c520Ca7f2010Ee02c",
|
|
"transactionHash": "0xa9b401c404db3bd7e34695a2464a0a3fe20086f982d0ccce4203b732cb13e2dc"
|
|
},
|
|
"1604965679541": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0x691073f906c9d3B310a1794019FD2B400fEaf066",
|
|
"transactionHash": "0xc08502d20e63f29510f0eaf06350221395d2880130f53cead379d884fbe60e22"
|
|
},
|
|
"1604965719492": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0x77d44866C0D23C093C22f8BBAbE58c8bb3901056",
|
|
"transactionHash": "0x78fb6185d5e09dcab8b0ace28dc2459d96111121fa46a9c9801ed0f6214ed663"
|
|
},
|
|
"1604965760834": {
|
|
"events": {
|
|
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
"0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_oldTotal",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_newTotal",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChangedSupply",
|
|
"type": "event"
|
|
},
|
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "_to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "_value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
}
|
|
},
|
|
"links": {},
|
|
"address": "0x9a355cAc652e473E31673Af852D31946B83Af60A",
|
|
"transactionHash": "0xd380af58b57596ba08c775d7d333862779a3e0e3f897626c6c22838f194f76e4"
|
|
}
|
|
},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-10T14:20:44.724Z",
|
|
"networkType": "ethereum",
|
|
"devdoc": {
|
|
"events": {
|
|
"Approval(address,address,uint256)": {
|
|
"details": "triggered when a wallet allows another wallet to transfer tokens from on its behalf",
|
|
"params": {
|
|
"_owner": "wallet that approves the allowance",
|
|
"_spender": "wallet that receives the allowance",
|
|
"_value": "allowance amount"
|
|
}
|
|
},
|
|
"Transfer(address,address,uint256)": {
|
|
"details": "triggered when tokens are transferred between wallets",
|
|
"params": {
|
|
"_from": "source address",
|
|
"_to": "target address",
|
|
"_value": "transfer amount"
|
|
}
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"approve(address,uint256)": {
|
|
"details": "allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value",
|
|
"params": {
|
|
"_spender": "approved address",
|
|
"_value": "allowance amount"
|
|
},
|
|
"returns": {
|
|
"_0": "true if the approval was successful, false if it wasn't"
|
|
}
|
|
},
|
|
"constructor": {
|
|
"details": "initializes a new ERC20Token instance",
|
|
"params": {
|
|
"_decimals": "decimal points, for display purposes",
|
|
"_initialSupply": "total supply of token units",
|
|
"_name": "token name",
|
|
"_symbol": "token symbol"
|
|
}
|
|
},
|
|
"transfer(address,uint256)": {
|
|
"details": "transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors",
|
|
"params": {
|
|
"_to": "target address",
|
|
"_value": "transfer amount"
|
|
},
|
|
"returns": {
|
|
"_0": "true if the transfer was successful, false if it wasn't"
|
|
}
|
|
},
|
|
"transferFrom(address,address,uint256)": {
|
|
"details": "transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors",
|
|
"params": {
|
|
"_from": "source address",
|
|
"_to": "target address",
|
|
"_value": "transfer amount"
|
|
},
|
|
"returns": {
|
|
"_0": "true if the transfer was successful, false if it wasn't"
|
|
}
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
} |