7127 lines
300 KiB
JSON
7127 lines
300 KiB
JSON
{
|
|
"contractName": "DODOToken",
|
|
"abi": [
|
|
{
|
|
"inputs": [],
|
|
"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": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"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": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "decimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"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": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "balanceOf",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "balance",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "allowance",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"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\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"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\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"amount\",\"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\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"DODO Breeder\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner allowed to a spender.\",\"params\":{\"owner\":\"address The address which owns the funds.\",\"spender\":\"address The address which will spend the funds.\"},\"returns\":{\"_0\":\"A uint256 specifying the amount of tokens still available for the spender.\"}},\"approve(address,uint256)\":{\"details\":\"Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\",\"params\":{\"amount\":\"The amount of tokens to be spent.\",\"spender\":\"The address which will spend the funds.\"}},\"balanceOf(address)\":{\"details\":\"Gets the balance of the specified address.\",\"params\":{\"owner\":\"The address to query the the balance of.\"},\"returns\":{\"balance\":\"An uint256 representing the amount owned by the passed address.\"}},\"transfer(address,uint256)\":{\"details\":\"transfer token for a specified address\",\"params\":{\"amount\":\"The amount to be transferred.\",\"to\":\"The address to transfer to.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfer tokens from one address to another\",\"params\":{\"amount\":\"uint256 the amount of tokens to be transferred\",\"from\":\"address The address which you want to send tokens from\",\"to\":\"address The address which you want to transfer to\"}}},\"title\":\"DODO Token\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOToken.sol\":\"DODOToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0x57d750628881687f826b54f60cbfd46c1a172433eed892bbb123f91869886af1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b40bd7946010ddae9679f36630510217dcaa9cb8643824f9edc8ef52bda95717\",\"dweb:/ipfs/QmZSjpfUGyrmokZyaMc74a8h6zy2qFVECPVP8VfTvzNEFb\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOToken.sol\":{\"keccak256\":\"0xb04850d5e89e97ca51756b998152561ba9f4d284ab60cd8cc0be27b14d8d79af\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f515f4fd75c74f81c1f187982b8d0143d6bf8876602d97857b9706f92f402540\",\"dweb:/ipfs/QmPECJfxAuRzXdCTtr76yg5URmdThzPHpDG65zfYgwLtAd\"]}},\"version\":1}",
|
|
"bytecode": "0x60c06040526004608081905263444f444f60e01b60a09081526100259160009190610091565b50604080518082019091526009808252681113d113c8189a5c9960ba1b602090920191825261005691600191610091565b5060126002556b033b2e3c9fd0803ce800000060035534801561007857600080fd5b506003543360009081526004602052604090205561012c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d257805160ff19168380011785556100ff565b828001600101855582156100ff579182015b828111156100ff5782518255916020019190600101906100e4565b5061010b92915061010f565b5090565b61012991905b8082111561010b5760008155600101610115565b90565b6107cb8061013b6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461010657806395d89b4114610119578063a9059cbb14610121578063dd62ed3e1461013457610093565b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d657806323b872dd146100eb575b600080fd5b6100a0610147565b6040516100ad9190610681565b60405180910390f35b6100c96100c436600461064c565b6101d4565b6040516100ad9190610676565b6100de61023f565b6040516100ad9190610774565b6100c96100f936600461060c565b610245565b6100de6103db565b6100de6101143660046105bd565b6103e1565b6100a06103fc565b6100c961012f36600461064c565b610457565b6100de6101423660046105d8565b610527565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156101cc5780601f106101a1576101008083540402835291602001916101cc565b820191906000526020600020905b8154815290600101906020018083116101af57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061022d908690610774565b60405180910390a35060015b92915050565b60035481565b6001600160a01b0383166000908152600460205260408120548211156102865760405162461bcd60e51b815260040161027d90610725565b60405180910390fd5b6001600160a01b03841660009081526005602090815260408083203384529091529020548211156102c95760405162461bcd60e51b815260040161027d906106d4565b6001600160a01b0384166000908152600460205260409020546102f2908363ffffffff61055216565b6001600160a01b038086166000908152600460205260408082209390935590851681522054610327908363ffffffff61057a16565b6001600160a01b03808516600090815260046020908152604080832094909455918716815260058252828120338252909152205461036b908363ffffffff61055216565b6001600160a01b0380861660008181526005602090815260408083203384529091529081902093909355915190851691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103c9908690610774565b60405180910390a35060019392505050565b60025481565b6001600160a01b031660009081526004602052604090205490565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156101cc5780601f106101a1576101008083540402835291602001916101cc565b336000908152600460205260408120548211156104865760405162461bcd60e51b815260040161027d90610725565b336000908152600460205260409020546104a6908363ffffffff61055216565b33600090815260046020526040808220929092556001600160a01b038516815220546104d8908363ffffffff61057a16565b6001600160a01b0384166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061022d908690610774565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6000828211156105745760405162461bcd60e51b815260040161027d90610702565b50900390565b60008282018381101561059f5760405162461bcd60e51b815260040161027d90610751565b9392505050565b80356001600160a01b038116811461023957600080fd5b6000602082840312156105ce578081fd5b61059f83836105a6565b600080604083850312156105ea578081fd5b6105f484846105a6565b915061060384602085016105a6565b90509250929050565b600080600060608486031215610620578081fd5b833561062b8161077d565b9250602084013561063b8161077d565b929592945050506040919091013590565b6000806040838503121561065e578182fd5b61066884846105a6565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156106ad57858101830151858201604001528201610691565b818111156106be5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527308298989eae829c868abe9c9ea8be8a9c9eaa8e960631b604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601290820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b90815260200190565b6001600160a01b038116811461079257600080fd5b5056fea2646970667358221220bafeb3afc7adfd898ddcf112e8acd950deaa5b7758f6617aa358132e9a8795b064736f6c63430006090033",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461010657806395d89b4114610119578063a9059cbb14610121578063dd62ed3e1461013457610093565b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d657806323b872dd146100eb575b600080fd5b6100a0610147565b6040516100ad9190610681565b60405180910390f35b6100c96100c436600461064c565b6101d4565b6040516100ad9190610676565b6100de61023f565b6040516100ad9190610774565b6100c96100f936600461060c565b610245565b6100de6103db565b6100de6101143660046105bd565b6103e1565b6100a06103fc565b6100c961012f36600461064c565b610457565b6100de6101423660046105d8565b610527565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156101cc5780601f106101a1576101008083540402835291602001916101cc565b820191906000526020600020905b8154815290600101906020018083116101af57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061022d908690610774565b60405180910390a35060015b92915050565b60035481565b6001600160a01b0383166000908152600460205260408120548211156102865760405162461bcd60e51b815260040161027d90610725565b60405180910390fd5b6001600160a01b03841660009081526005602090815260408083203384529091529020548211156102c95760405162461bcd60e51b815260040161027d906106d4565b6001600160a01b0384166000908152600460205260409020546102f2908363ffffffff61055216565b6001600160a01b038086166000908152600460205260408082209390935590851681522054610327908363ffffffff61057a16565b6001600160a01b03808516600090815260046020908152604080832094909455918716815260058252828120338252909152205461036b908363ffffffff61055216565b6001600160a01b0380861660008181526005602090815260408083203384529091529081902093909355915190851691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103c9908690610774565b60405180910390a35060019392505050565b60025481565b6001600160a01b031660009081526004602052604090205490565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156101cc5780601f106101a1576101008083540402835291602001916101cc565b336000908152600460205260408120548211156104865760405162461bcd60e51b815260040161027d90610725565b336000908152600460205260409020546104a6908363ffffffff61055216565b33600090815260046020526040808220929092556001600160a01b038516815220546104d8908363ffffffff61057a16565b6001600160a01b0384166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061022d908690610774565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6000828211156105745760405162461bcd60e51b815260040161027d90610702565b50900390565b60008282018381101561059f5760405162461bcd60e51b815260040161027d90610751565b9392505050565b80356001600160a01b038116811461023957600080fd5b6000602082840312156105ce578081fd5b61059f83836105a6565b600080604083850312156105ea578081fd5b6105f484846105a6565b915061060384602085016105a6565b90509250929050565b600080600060608486031215610620578081fd5b833561062b8161077d565b9250602084013561063b8161077d565b929592945050506040919091013590565b6000806040838503121561065e578182fd5b61066884846105a6565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156106ad57858101830151858201604001528201610691565b818111156106be5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527308298989eae829c868abe9c9ea8be8a9c9eaa8e960631b604082015260600190565b60208082526009908201526829aaa12fa2a92927a960b91b604082015260600190565b6020808252601290820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604082015260600190565b60208082526009908201526820a2222fa2a92927a960b91b604082015260600190565b90815260200190565b6001600160a01b038116811461079257600080fd5b5056fea2646970667358221220bafeb3afc7adfd898ddcf112e8acd950deaa5b7758f6617aa358132e9a8795b064736f6c63430006090033",
|
|
"immutableReferences": {},
|
|
"sourceMap": "295:29:46:-:0;237:3209;295:29;;237:3209;295:29;;;-1:-1:-1;;;295:29:46;;;;;;-1:-1:-1;;295:29:46;;:::i;:::-;-1:-1:-1;330:32:46;;;;;;;;;;;;;-1:-1:-1;;;330:32:46;;;;;;;;;;;;:::i;:::-;;395:2;369:28;;432:19;403:48;;842:72;;;;;;;;;-1:-1:-1;896:11:46;;882:10;873:20;;;;:8;:20;;;;;:34;237:3209;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;237:3209:46;;;-1:-1:-1;237:3209:46;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
|
|
"deployedSourceMap": "237:3209:46:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;330:32;;;:::i;:::-;;;;;;;;;;;;;;;;2786:199;;;;;;;;;:::i;:::-;;;;;;;;403:48;;;:::i;:::-;;;;;;;;2037:506;;;;;;;;;:::i;369:28::-;;;:::i;1637:113::-;;;;;;;;;:::i;295:29::-;;;:::i;1083:329::-;;;;;;;;;:::i;3316:128::-;;;;;;;;;:::i;330:32::-;;;;;;;;;;;;;;;-1:-1:-1;;330:32:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2786:199::-;2876:10;2852:4;2868:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;2868:28:46;;;;;;;;;;:37;;;2920;2852:4;;2868:28;;2920:37;;;;2899:6;;2920:37;;;;;;;;;;-1:-1:-1;2974:4:46;2786:199;;;;;:::o;403:48::-;;;;:::o;2037:506::-;-1:-1:-1;;;;;2181:14:46;;2147:4;2181:14;;;:8;:14;;;;;;2171:24;;;2163:55;;;;-1:-1:-1;;;2163:55:46;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2246:13:46;;;;;;:7;:13;;;;;;;;2260:10;2246:25;;;;;;;;2236:35;;;2228:68;;;;-1:-1:-1;;;2228:68:46;;;;;;;;;-1:-1:-1;;;;;2324:14:46;;;;;;:8;:14;;;;;;:26;;2343:6;2324:26;:18;:26;:::i;:::-;-1:-1:-1;;;;;2307:14:46;;;;;;;:8;:14;;;;;;:43;;;;2375:12;;;;;;;:24;;2392:6;2375:24;:16;:24;:::i;:::-;-1:-1:-1;;;;;2360:12:46;;;;;;;:8;:12;;;;;;;;:39;;;;2437:13;;;;;:7;:13;;;;;2451:10;2437:25;;;;;;;:37;;2467:6;2437:37;:29;:37;:::i;:::-;-1:-1:-1;;;;;2409:13:46;;;;;;;:7;:13;;;;;;;;2423:10;2409:25;;;;;;;;;:65;;;;2489:26;;;;;;2409:13;2489:26;;;;2508:6;;2489:26;;;;;;;;;;-1:-1:-1;2532:4:46;2037:506;;;;;:::o;369:28::-;;;;:::o;1637:113::-;-1:-1:-1;;;;;1728:15:46;1694;1728;;;:8;:15;;;;;;;1637:113::o;295:29::-;;;;;;;;;;;;;;;-1:-1:-1;;295:29:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:329;1188:10;1145:4;1179:20;;;:8;:20;;;;;;1169:30;;;1161:61;;;;-1:-1:-1;;;1161:61:46;;;;;;;;;1265:10;1256:20;;;;:8;:20;;;;;;:32;;1281:6;1256:32;:24;:32;:::i;:::-;1242:10;1233:20;;;;:8;:20;;;;;;:55;;;;-1:-1:-1;;;;;1313:12:46;;;;;;:24;;1330:6;1313:24;:16;:24;:::i;:::-;-1:-1:-1;;;;;1298:12:46;;;;;;:8;:12;;;;;;;:39;;;;1352:32;;1361:10;;1352:32;;;;1377:6;;1352:32;;3316:128;-1:-1:-1;;;;;3414:14:46;;;3388:7;3414:14;;;:7;:14;;;;;;;;:23;;;;;;;;;;;;;3316:128::o;934:134:41:-;992:7;1024:1;1019;:6;;1011:28;;;;-1:-1:-1;;;1011:28:41;;;;;;;;;-1:-1:-1;1056:5:41;;;934:134::o;1074:157::-;1132:7;1163:5;;;1186:6;;;;1178:28;;;;-1:-1:-1;;;1178:28:41;;;;;;;;;1223:1;1074:157;-1:-1:-1;;;1074:157:41:o;5:130:-1:-;72:20;;-1:-1;;;;;6654:54;;7240:35;;7230:2;;7289:1;;7279:12;279:241;;383:2;371:9;362:7;358:23;354:32;351:2;;;-1:-1;;389:12;351:2;451:53;496:7;472:22;451:53;;527:366;;;648:2;636:9;627:7;623:23;619:32;616:2;;;-1:-1;;654:12;616:2;716:53;761:7;737:22;716:53;;;706:63;;824:53;869:7;806:2;849:9;845:22;824:53;;;814:63;;610:283;;;;;;900:491;;;;1038:2;1026:9;1017:7;1013:23;1009:32;1006:2;;;-1:-1;;1044:12;1006:2;85:6;72:20;97:33;124:5;97:33;;;1096:63;-1:-1;1196:2;1235:22;;72:20;97:33;72:20;97:33;;;1000:391;;1204:63;;-1:-1;;;1304:2;1343:22;;;;209:20;;1000:391;1398:366;;;1519:2;1507:9;1498:7;1494:23;1490:32;1487:2;;;-1:-1;;1525:12;1487:2;1587:53;1632:7;1608:22;1587:53;;;1577:63;1677:2;1716:22;;;;209:20;;-1:-1;;;1481:283;3646:210;6566:13;;6559:21;1836:34;;3767:2;3752:18;;3738:118;3863:310;;4010:2;;4031:17;4024:47;2027:5;6189:12;6346:6;4010:2;3999:9;3995:18;6334:19;-1:-1;6872:101;6886:6;6883:1;6880:13;6872:101;;;6953:11;;;;;6947:18;6934:11;;;6374:14;6934:11;6927:39;6901:10;;6872:101;;;6988:6;6985:1;6982:13;6979:2;;;-1:-1;6374:14;7044:6;3999:9;7035:16;;7028:27;6979:2;-1:-1;7160:7;7144:14;-1:-1;;7140:28;2185:39;;;;6374:14;2185:39;;3981:192;-1:-1;;;3981:192;4180:416;4380:2;4394:47;;;2461:2;4365:18;;;6334:19;-1:-1;;;6374:14;;;2477:43;2539:12;;;4351:245;4603:416;4803:2;4817:47;;;2790:1;4788:18;;;6334:19;-1:-1;;;6374:14;;;2805:32;2856:12;;;4774:245;5026:416;5226:2;5240:47;;;3107:2;5211:18;;;6334:19;-1:-1;;;6374:14;;;3123:41;3183:12;;;5197:245;5449:416;5649:2;5663:47;;;3434:1;5634:18;;;6334:19;-1:-1;;;6374:14;;;3449:32;3500:12;;;5620:245;5872:222;3597:37;;;5999:2;5984:18;;5970:124;7181:117;-1:-1;;;;;6654:54;;7240:35;;7230:2;;7289:1;;7279:12;7230:2;7224:74;",
|
|
"source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\nimport {SafeMath} from \"../lib/SafeMath.sol\";\n\n\n/**\n * @title DODO Token\n * @author DODO Breeder\n */\ncontract DODOToken {\n using SafeMath for uint256;\n\n string public symbol = \"DODO\";\n string public name = \"DODO bird\";\n\n uint256 public decimals = 18;\n uint256 public totalSupply = 1000000000 * 10**18; // 1 Billion\n\n mapping(address => uint256) internal balances;\n mapping(address => mapping(address => uint256)) internal allowed;\n\n // ============ Events ============\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n // ============ Functions ============\n\n constructor() public {\n balances[msg.sender] = totalSupply;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param to The address to transfer to.\n * @param amount The amount to be transferred.\n */\n function transfer(address to, uint256 amount) public returns (bool) {\n require(amount <= balances[msg.sender], \"BALANCE_NOT_ENOUGH\");\n\n balances[msg.sender] = balances[msg.sender].sub(amount);\n balances[to] = balances[to].add(amount);\n emit Transfer(msg.sender, to, amount);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the the balance of.\n * @return balance An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) external view returns (uint256 balance) {\n return balances[owner];\n }\n\n /**\n * @dev Transfer tokens from one address to another\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param amount uint256 the amount of tokens to be transferred\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public returns (bool) {\n require(amount <= balances[from], \"BALANCE_NOT_ENOUGH\");\n require(amount <= allowed[from][msg.sender], \"ALLOWANCE_NOT_ENOUGH\");\n\n balances[from] = balances[from].sub(amount);\n balances[to] = balances[to].add(amount);\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(amount);\n emit Transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n * @param spender The address which will spend the funds.\n * @param amount The amount of tokens to be spent.\n */\n function approve(address spender, uint256 amount) public returns (bool) {\n allowed[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n}\n",
|
|
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOToken.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOToken.sol",
|
|
"exportedSymbols": {
|
|
"DODOToken": [
|
|
13255
|
|
]
|
|
},
|
|
"id": 13256,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 13000,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:46"
|
|
},
|
|
{
|
|
"id": 13001,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:46"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
|
|
"file": "../lib/SafeMath.sol",
|
|
"id": 13003,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 13256,
|
|
"sourceUnit": 11624,
|
|
"src": "136:45:46",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 13002,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 13004,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "184:52:46",
|
|
"text": " @title DODO Token\n @author DODO Breeder"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 13255,
|
|
"linearizedBaseContracts": [
|
|
13255
|
|
],
|
|
"name": "DODOToken",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 13007,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 13005,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11623,
|
|
"src": "268:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$11623",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "262:27:46",
|
|
"typeName": {
|
|
"id": 13006,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "281:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "95d89b41",
|
|
"id": 13010,
|
|
"mutability": "mutable",
|
|
"name": "symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "295:29:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 13008,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "295:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "444f444f",
|
|
"id": 13009,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "318:6:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_0585588d96cfcc93db303104eb4624df4d2a6f3cba84f792e748a1abd81a131e",
|
|
"typeString": "literal_string \"DODO\""
|
|
},
|
|
"value": "DODO"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "06fdde03",
|
|
"id": 13013,
|
|
"mutability": "mutable",
|
|
"name": "name",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "330:32:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 13011,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "330:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "444f444f2062697264",
|
|
"id": 13012,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "351:11:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_27ec73aa01f11312bc6e67cb818a8c37d36dbc3067474dbbe24066fb81b76e94",
|
|
"typeString": "literal_string \"DODO bird\""
|
|
},
|
|
"value": "DODO bird"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "313ce567",
|
|
"id": 13016,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "369:28:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13014,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "369:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 13015,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "395:2:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "18160ddd",
|
|
"id": 13023,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "403:48:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13017,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "403:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_1000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000000000000"
|
|
},
|
|
"id": 13022,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31303030303030303030",
|
|
"id": 13018,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "432:10:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000_by_1",
|
|
"typeString": "int_const 1000000000"
|
|
},
|
|
"value": "1000000000"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
},
|
|
"id": 13021,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 13019,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "445:2:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 13020,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "449:2:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"src": "445:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
}
|
|
},
|
|
"src": "432:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000000000000"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13027,
|
|
"mutability": "mutable",
|
|
"name": "balances",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "471:45:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 13026,
|
|
"keyType": {
|
|
"id": 13024,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "479:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "471:27:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 13025,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "490:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13033,
|
|
"mutability": "mutable",
|
|
"name": "allowed",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "522:64:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"typeName": {
|
|
"id": 13032,
|
|
"keyType": {
|
|
"id": 13028,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "530:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "522:47:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"valueType": {
|
|
"id": 13031,
|
|
"keyType": {
|
|
"id": 13029,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "549:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "541:27:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 13030,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "560:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 13041,
|
|
"name": "Transfer",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 13040,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13035,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13041,
|
|
"src": "649:20:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13034,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "649:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13037,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13041,
|
|
"src": "671:18:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13036,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "671:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13039,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13041,
|
|
"src": "691:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13038,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "691:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "648:58:46"
|
|
},
|
|
"src": "634:73:46"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 13049,
|
|
"name": "Approval",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 13048,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13043,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13049,
|
|
"src": "728:21:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13042,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "728:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13045,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13049,
|
|
"src": "751:23:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13044,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "751:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13047,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13049,
|
|
"src": "776:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13046,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "776:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "727:64:46"
|
|
},
|
|
"src": "713:79:46"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13059,
|
|
"nodeType": "Block",
|
|
"src": "863:51:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13057,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13052,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "873:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13055,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13053,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "882:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13054,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "882:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "873:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 13056,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13023,
|
|
"src": "896:11:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "873:34:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13058,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "873:34:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 13060,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13050,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "853:2:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13051,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "863:0:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "842:72:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13113,
|
|
"nodeType": "Block",
|
|
"src": "1151:261:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 13076,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13071,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1169:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13072,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1179:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13075,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13073,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1188:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13074,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1188:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1179:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1169:30:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
|
|
"id": 13077,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1201:20:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
},
|
|
"value": "BALANCE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 13070,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1161:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 13078,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1161:61:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13079,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1161:61:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13091,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13080,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1233:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13083,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13081,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1242:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13082,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1242:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1233:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13089,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1281:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13084,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1256:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13087,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13085,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1265:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13086,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1265:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1256:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "1256:24:46",
|
|
"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": 13090,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1256:32:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1233:55:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13092,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1233:55:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13102,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13093,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1298:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13095,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13094,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13063,
|
|
"src": "1307:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1298:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13100,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1330:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13096,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1313:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13098,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13097,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13063,
|
|
"src": "1322:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1313:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13099,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "1313:16:46",
|
|
"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": 13101,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1313:24:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1298:39:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13103,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1298:39:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13105,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1361:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13106,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1361:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13107,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13063,
|
|
"src": "1373:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13108,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1377:6:46",
|
|
"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": 13104,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13041,
|
|
"src": "1352:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 13109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1352:32:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13110,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1347:37:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 13111,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1401:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 13069,
|
|
"id": 13112,
|
|
"nodeType": "Return",
|
|
"src": "1394:11:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13061,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "920:158:46",
|
|
"text": " @dev transfer token for a specified address\n @param to The address to transfer to.\n @param amount The amount to be transferred."
|
|
},
|
|
"functionSelector": "a9059cbb",
|
|
"id": 13114,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transfer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13066,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13063,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13114,
|
|
"src": "1101:10:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13062,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1101:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13065,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13114,
|
|
"src": "1113:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13064,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1113:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1100:28:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13069,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13068,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13114,
|
|
"src": "1145:4:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 13067,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1145:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1144:6:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "1083:329:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13126,
|
|
"nodeType": "Block",
|
|
"src": "1711:39:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13122,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1728:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13124,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13123,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13117,
|
|
"src": "1737:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1728:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 13121,
|
|
"id": 13125,
|
|
"nodeType": "Return",
|
|
"src": "1721:22:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13115,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1418:214:46",
|
|
"text": " @dev Gets the balance of the specified address.\n @param owner The address to query the the balance of.\n @return balance An uint256 representing the amount owned by the passed address."
|
|
},
|
|
"functionSelector": "70a08231",
|
|
"id": 13127,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "balanceOf",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13118,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13117,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13127,
|
|
"src": "1656:13:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13116,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1656:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1655:15:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13121,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13120,
|
|
"mutability": "mutable",
|
|
"name": "balance",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13127,
|
|
"src": "1694:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13119,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1694:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1693:17:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "1637:113:46",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13207,
|
|
"nodeType": "Block",
|
|
"src": "2153:390:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 13144,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13140,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2171:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13141,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2181:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13143,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13142,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2190:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2181:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2171:24:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
|
|
"id": 13145,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2197:20:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
},
|
|
"value": "BALANCE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 13139,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "2163:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 13146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2163:55:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13147,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2163:55:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 13156,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13149,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2236:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13150,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2246:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13152,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13151,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2254:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2246:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13155,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13153,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2260:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13154,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2260:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2246:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2236:35:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "414c4c4f57414e43455f4e4f545f454e4f554748",
|
|
"id": 13157,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2273:22:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_28638f118cb48e54afcdd39bdb97baeb95a670cffee1fd95f73350a923dc1c6f",
|
|
"typeString": "literal_string \"ALLOWANCE_NOT_ENOUGH\""
|
|
},
|
|
"value": "ALLOWANCE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_28638f118cb48e54afcdd39bdb97baeb95a670cffee1fd95f73350a923dc1c6f",
|
|
"typeString": "literal_string \"ALLOWANCE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 13148,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "2228:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 13158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2228:68:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13159,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2228:68:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13169,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13160,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2307:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13162,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13161,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2316:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2307:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13167,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2343:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13163,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2324:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13165,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13164,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2333:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2324:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13166,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "2324:18:46",
|
|
"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": 13168,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2324:26:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2307:43:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13170,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2307:43:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13180,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13171,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2360:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13173,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13172,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13132,
|
|
"src": "2369:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2360:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13178,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2392:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13174,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2375:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13176,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13175,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13132,
|
|
"src": "2384:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2375:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13177,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "2375:16:46",
|
|
"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": 13179,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2375:24:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2360:39:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13181,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2360:39:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13197,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13182,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2409:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13186,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13183,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2417:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2409:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13187,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13184,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2423:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13185,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2423:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2409:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13195,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2467:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13188,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2437:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13190,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13189,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2445:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2437:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13193,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13191,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2451:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13192,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2451:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2437:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13194,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "2437:29:46",
|
|
"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": 13196,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2437:37:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2409:65:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13198,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2409:65:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13200,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2498:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13201,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13132,
|
|
"src": "2504:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13202,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2508:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 13199,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13041,
|
|
"src": "2489:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 13203,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2489:26:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13204,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2484:31:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 13205,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2532:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 13138,
|
|
"id": 13206,
|
|
"nodeType": "Return",
|
|
"src": "2525:11:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13128,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1756:276:46",
|
|
"text": " @dev Transfer tokens from one address to another\n @param from address The address which you want to send tokens from\n @param to address The address which you want to transfer to\n @param amount uint256 the amount of tokens to be transferred"
|
|
},
|
|
"functionSelector": "23b872dd",
|
|
"id": 13208,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transferFrom",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13135,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13130,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2068:12:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13129,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2068:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13132,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2090:10:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13131,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2090:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13134,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2110:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13133,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2110:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2058:72:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13138,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13137,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2147:4:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 13136,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2147:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2146:6:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "2037:506:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13236,
|
|
"nodeType": "Block",
|
|
"src": "2858:127:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13225,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13218,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2868:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13222,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13219,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2876:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13220,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2876:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2868:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13223,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13221,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13211,
|
|
"src": "2888:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2868:28:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 13224,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13213,
|
|
"src": "2899:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2868:37:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13226,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2868:37:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13228,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2929:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13229,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2929:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13230,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13211,
|
|
"src": "2941:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13231,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13213,
|
|
"src": "2950:6:46",
|
|
"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": 13227,
|
|
"name": "Approval",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13049,
|
|
"src": "2920:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 13232,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2920:37:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13233,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2915:42:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 13234,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2974:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 13217,
|
|
"id": 13235,
|
|
"nodeType": "Return",
|
|
"src": "2967:11:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13209,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2549:232:46",
|
|
"text": " @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n @param spender The address which will spend the funds.\n @param amount The amount of tokens to be spent."
|
|
},
|
|
"functionSelector": "095ea7b3",
|
|
"id": 13237,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "approve",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13214,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13211,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13237,
|
|
"src": "2803:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13210,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2803:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13213,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13237,
|
|
"src": "2820:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13212,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2820:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2802:33:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13217,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13216,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13237,
|
|
"src": "2852:4:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 13215,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2852:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2851:6:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "2786:199:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13253,
|
|
"nodeType": "Block",
|
|
"src": "3397:47:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13247,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "3414:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13249,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13248,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13240,
|
|
"src": "3422:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3414:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13251,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13250,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13242,
|
|
"src": "3429:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3414:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 13246,
|
|
"id": 13252,
|
|
"nodeType": "Return",
|
|
"src": "3407:30:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13238,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2991:320:46",
|
|
"text": " @dev Function to check the amount of tokens that an owner allowed to a spender.\n @param owner address The address which owns the funds.\n @param spender address The address which will spend the funds.\n @return A uint256 specifying the amount of tokens still available for the spender."
|
|
},
|
|
"functionSelector": "dd62ed3e",
|
|
"id": 13254,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "allowance",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13243,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13240,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13254,
|
|
"src": "3335:13:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13239,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3335:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13242,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13254,
|
|
"src": "3350:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13241,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3350:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3334:32:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13246,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13245,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13254,
|
|
"src": "3388:7:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13244,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3388:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3387:9:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "3316:128:46",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 13256,
|
|
"src": "237:3209:46"
|
|
}
|
|
],
|
|
"src": "78:3369:46"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODOToken.sol",
|
|
"exportedSymbols": {
|
|
"DODOToken": [
|
|
13255
|
|
]
|
|
},
|
|
"id": 13256,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 13000,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:46"
|
|
},
|
|
{
|
|
"id": 13001,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:46"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
|
|
"file": "../lib/SafeMath.sol",
|
|
"id": 13003,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 13256,
|
|
"sourceUnit": 11624,
|
|
"src": "136:45:46",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 13002,
|
|
"name": "SafeMath",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 13004,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "184:52:46",
|
|
"text": " @title DODO Token\n @author DODO Breeder"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 13255,
|
|
"linearizedBaseContracts": [
|
|
13255
|
|
],
|
|
"name": "DODOToken",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 13007,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 13005,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11623,
|
|
"src": "268:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$11623",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "262:27:46",
|
|
"typeName": {
|
|
"id": 13006,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "281:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "95d89b41",
|
|
"id": 13010,
|
|
"mutability": "mutable",
|
|
"name": "symbol",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "295:29:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 13008,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "295:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "444f444f",
|
|
"id": 13009,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "318:6:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_0585588d96cfcc93db303104eb4624df4d2a6f3cba84f792e748a1abd81a131e",
|
|
"typeString": "literal_string \"DODO\""
|
|
},
|
|
"value": "DODO"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "06fdde03",
|
|
"id": 13013,
|
|
"mutability": "mutable",
|
|
"name": "name",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "330:32:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 13011,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "330:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "444f444f2062697264",
|
|
"id": 13012,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "351:11:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_27ec73aa01f11312bc6e67cb818a8c37d36dbc3067474dbbe24066fb81b76e94",
|
|
"typeString": "literal_string \"DODO bird\""
|
|
},
|
|
"value": "DODO bird"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "313ce567",
|
|
"id": 13016,
|
|
"mutability": "mutable",
|
|
"name": "decimals",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "369:28:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13014,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "369:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 13015,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "395:2:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "18160ddd",
|
|
"id": 13023,
|
|
"mutability": "mutable",
|
|
"name": "totalSupply",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "403:48:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13017,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "403:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_1000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000000000000"
|
|
},
|
|
"id": 13022,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31303030303030303030",
|
|
"id": 13018,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "432:10:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000_by_1",
|
|
"typeString": "int_const 1000000000"
|
|
},
|
|
"value": "1000000000"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "*",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
},
|
|
"id": 13021,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3130",
|
|
"id": 13019,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "445:2:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_10_by_1",
|
|
"typeString": "int_const 10"
|
|
},
|
|
"value": "10"
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "**",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "3138",
|
|
"id": 13020,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "449:2:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_18_by_1",
|
|
"typeString": "int_const 18"
|
|
},
|
|
"value": "18"
|
|
},
|
|
"src": "445:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000"
|
|
}
|
|
},
|
|
"src": "432:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1000000000000000000000000000_by_1",
|
|
"typeString": "int_const 1000000000000000000000000000"
|
|
}
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13027,
|
|
"mutability": "mutable",
|
|
"name": "balances",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "471:45:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 13026,
|
|
"keyType": {
|
|
"id": 13024,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "479:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "471:27:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 13025,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "490:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13033,
|
|
"mutability": "mutable",
|
|
"name": "allowed",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13255,
|
|
"src": "522:64:46",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"typeName": {
|
|
"id": 13032,
|
|
"keyType": {
|
|
"id": 13028,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "530:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "522:47:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
},
|
|
"valueType": {
|
|
"id": 13031,
|
|
"keyType": {
|
|
"id": 13029,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "549:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "541:27:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 13030,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "560:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 13041,
|
|
"name": "Transfer",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 13040,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13035,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13041,
|
|
"src": "649:20:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13034,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "649:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13037,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13041,
|
|
"src": "671:18:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13036,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "671:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13039,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13041,
|
|
"src": "691:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13038,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "691:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "648:58:46"
|
|
},
|
|
"src": "634:73:46"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": null,
|
|
"id": 13049,
|
|
"name": "Approval",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 13048,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13043,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13049,
|
|
"src": "728:21:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13042,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "728:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13045,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13049,
|
|
"src": "751:23:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13044,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "751:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13047,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13049,
|
|
"src": "776:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13046,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "776:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "727:64:46"
|
|
},
|
|
"src": "713:79:46"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13059,
|
|
"nodeType": "Block",
|
|
"src": "863:51:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13057,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13052,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "873:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13055,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13053,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "882:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13054,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "882:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "873:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 13056,
|
|
"name": "totalSupply",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13023,
|
|
"src": "896:11:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "873:34:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13058,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "873:34:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 13060,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13050,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "853:2:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13051,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "863:0:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "842:72:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13113,
|
|
"nodeType": "Block",
|
|
"src": "1151:261:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 13076,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13071,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1169:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13072,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1179:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13075,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13073,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1188:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13074,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1188:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1179:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1169:30:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
|
|
"id": 13077,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1201:20:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
},
|
|
"value": "BALANCE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 13070,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1161:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 13078,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1161:61:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13079,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1161:61:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13091,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13080,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1233:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13083,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13081,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1242:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13082,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1242:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1233:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13089,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1281:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13084,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1256:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13087,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13085,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1265:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13086,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1265:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1256:20:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13088,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "1256:24:46",
|
|
"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": 13090,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1256:32:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1233:55:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13092,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1233:55:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13102,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13093,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1298:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13095,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13094,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13063,
|
|
"src": "1307:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1298:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13100,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1330:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13096,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1313:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13098,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13097,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13063,
|
|
"src": "1322:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1313:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13099,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "1313:16:46",
|
|
"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": 13101,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1313:24:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1298:39:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13103,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1298:39:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13105,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "1361:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13106,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1361:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13107,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13063,
|
|
"src": "1373:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13108,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13065,
|
|
"src": "1377:6:46",
|
|
"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": 13104,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13041,
|
|
"src": "1352:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 13109,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1352:32:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13110,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1347:37:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 13111,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1401:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 13069,
|
|
"id": 13112,
|
|
"nodeType": "Return",
|
|
"src": "1394:11:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13061,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "920:158:46",
|
|
"text": " @dev transfer token for a specified address\n @param to The address to transfer to.\n @param amount The amount to be transferred."
|
|
},
|
|
"functionSelector": "a9059cbb",
|
|
"id": 13114,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transfer",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13066,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13063,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13114,
|
|
"src": "1101:10:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13062,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1101:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13065,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13114,
|
|
"src": "1113:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13064,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1113:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1100:28:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13069,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13068,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13114,
|
|
"src": "1145:4:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 13067,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1145:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1144:6:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "1083:329:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13126,
|
|
"nodeType": "Block",
|
|
"src": "1711:39:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13122,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "1728:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13124,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13123,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13117,
|
|
"src": "1737:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1728:15:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 13121,
|
|
"id": 13125,
|
|
"nodeType": "Return",
|
|
"src": "1721:22:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13115,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1418:214:46",
|
|
"text": " @dev Gets the balance of the specified address.\n @param owner The address to query the the balance of.\n @return balance An uint256 representing the amount owned by the passed address."
|
|
},
|
|
"functionSelector": "70a08231",
|
|
"id": 13127,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "balanceOf",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13118,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13117,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13127,
|
|
"src": "1656:13:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13116,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1656:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1655:15:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13121,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13120,
|
|
"mutability": "mutable",
|
|
"name": "balance",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13127,
|
|
"src": "1694:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13119,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1694:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1693:17:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "1637:113:46",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13207,
|
|
"nodeType": "Block",
|
|
"src": "2153:390:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 13144,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13140,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2171:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13141,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2181:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13143,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13142,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2190:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2181:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2171:24:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
|
|
"id": 13145,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2197:20:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
},
|
|
"value": "BALANCE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cdd726e298d9165e3d91fe96d56676b5342c508882ebbe585be31adbc426425d",
|
|
"typeString": "literal_string \"BALANCE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 13139,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "2163:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 13146,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2163:55:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13147,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2163:55:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 13156,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13149,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2236:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13150,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2246:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13152,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13151,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2254:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2246:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13155,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13153,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2260:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13154,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2260:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2246:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2236:35:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "414c4c4f57414e43455f4e4f545f454e4f554748",
|
|
"id": 13157,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2273:22:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_28638f118cb48e54afcdd39bdb97baeb95a670cffee1fd95f73350a923dc1c6f",
|
|
"typeString": "literal_string \"ALLOWANCE_NOT_ENOUGH\""
|
|
},
|
|
"value": "ALLOWANCE_NOT_ENOUGH"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_28638f118cb48e54afcdd39bdb97baeb95a670cffee1fd95f73350a923dc1c6f",
|
|
"typeString": "literal_string \"ALLOWANCE_NOT_ENOUGH\""
|
|
}
|
|
],
|
|
"id": 13148,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "2228:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 13158,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2228:68:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13159,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2228:68:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13169,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13160,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2307:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13162,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13161,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2316:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2307:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13167,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2343:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13163,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2324:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13165,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13164,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2333:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2324:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13166,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "2324:18:46",
|
|
"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": 13168,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2324:26:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2307:43:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13170,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2307:43:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13180,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13171,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2360:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13173,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13172,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13132,
|
|
"src": "2369:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2360:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13178,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2392:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13174,
|
|
"name": "balances",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13027,
|
|
"src": "2375:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13176,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13175,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13132,
|
|
"src": "2384:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2375:12:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13177,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11582,
|
|
"src": "2375:16:46",
|
|
"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": 13179,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2375:24:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2360:39:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13181,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2360:39:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13197,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13182,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2409:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13186,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13183,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2417:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2409:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13187,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13184,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2423:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13185,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2423:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2409:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13195,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2467:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13188,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2437:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13190,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13189,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2445:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2437:13:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13193,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13191,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2451:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13192,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2451:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2437:25:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13194,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11557,
|
|
"src": "2437:29:46",
|
|
"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": 13196,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2437:37:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2409:65:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13198,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2409:65:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13200,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13130,
|
|
"src": "2498:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13201,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13132,
|
|
"src": "2504:2:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13202,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13134,
|
|
"src": "2508:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 13199,
|
|
"name": "Transfer",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13041,
|
|
"src": "2489:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 13203,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2489:26:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13204,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2484:31:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 13205,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2532:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 13138,
|
|
"id": 13206,
|
|
"nodeType": "Return",
|
|
"src": "2525:11:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13128,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1756:276:46",
|
|
"text": " @dev Transfer tokens from one address to another\n @param from address The address which you want to send tokens from\n @param to address The address which you want to transfer to\n @param amount uint256 the amount of tokens to be transferred"
|
|
},
|
|
"functionSelector": "23b872dd",
|
|
"id": 13208,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transferFrom",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13135,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13130,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2068:12:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13129,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2068:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13132,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2090:10:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13131,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2090:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13134,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2110:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13133,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2110:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2058:72:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13138,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13137,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13208,
|
|
"src": "2147:4:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 13136,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2147:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2146:6:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "2037:506:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13236,
|
|
"nodeType": "Block",
|
|
"src": "2858:127:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13225,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13218,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "2868:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13222,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13219,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2876:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13220,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2876:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2868:19:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13223,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13221,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13211,
|
|
"src": "2888:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2868:28:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 13224,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13213,
|
|
"src": "2899:6:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2868:37:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 13226,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2868:37:46"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 13228,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": -15,
|
|
"src": "2929:3:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 13229,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2929:10:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13230,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13211,
|
|
"src": "2941:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 13231,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13213,
|
|
"src": "2950:6:46",
|
|
"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": 13227,
|
|
"name": "Approval",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13049,
|
|
"src": "2920:8:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 13232,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2920:37:46",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 13233,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2915:42:46"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 13234,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2974:4:46",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 13217,
|
|
"id": 13235,
|
|
"nodeType": "Return",
|
|
"src": "2967:11:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13209,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2549:232:46",
|
|
"text": " @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n @param spender The address which will spend the funds.\n @param amount The amount of tokens to be spent."
|
|
},
|
|
"functionSelector": "095ea7b3",
|
|
"id": 13237,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "approve",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13214,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13211,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13237,
|
|
"src": "2803:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13210,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2803:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13213,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13237,
|
|
"src": "2820:14:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13212,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2820:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2802:33:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13217,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13216,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13237,
|
|
"src": "2852:4:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 13215,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2852:4:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2851:6:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "2786:199:46",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 13253,
|
|
"nodeType": "Block",
|
|
"src": "3397:47:46",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13247,
|
|
"name": "allowed",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13033,
|
|
"src": "3414:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
|
"typeString": "mapping(address => mapping(address => uint256))"
|
|
}
|
|
},
|
|
"id": 13249,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13248,
|
|
"name": "owner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13240,
|
|
"src": "3422:5:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3414:14:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 13251,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 13250,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 13242,
|
|
"src": "3429:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "3414:23:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 13246,
|
|
"id": 13252,
|
|
"nodeType": "Return",
|
|
"src": "3407:30:46"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 13238,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2991:320:46",
|
|
"text": " @dev Function to check the amount of tokens that an owner allowed to a spender.\n @param owner address The address which owns the funds.\n @param spender address The address which will spend the funds.\n @return A uint256 specifying the amount of tokens still available for the spender."
|
|
},
|
|
"functionSelector": "dd62ed3e",
|
|
"id": 13254,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "allowance",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 13243,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13240,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13254,
|
|
"src": "3335:13:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13239,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3335:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 13242,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13254,
|
|
"src": "3350:15:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 13241,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3350:7:46",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3334:32:46"
|
|
},
|
|
"returnParameters": {
|
|
"id": 13246,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 13245,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 13254,
|
|
"src": "3388:7:46",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13244,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3388:7:46",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3387:9:46"
|
|
},
|
|
"scope": 13255,
|
|
"src": "3316:128:46",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 13256,
|
|
"src": "237:3209:46"
|
|
}
|
|
],
|
|
"src": "78:3369:46"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-06T08:03:35.740Z",
|
|
"devdoc": {
|
|
"author": "DODO Breeder",
|
|
"methods": {
|
|
"allowance(address,address)": {
|
|
"details": "Function to check the amount of tokens that an owner allowed to a spender.",
|
|
"params": {
|
|
"owner": "address The address which owns the funds.",
|
|
"spender": "address The address which will spend the funds."
|
|
},
|
|
"returns": {
|
|
"_0": "A uint256 specifying the amount of tokens still available for the spender."
|
|
}
|
|
},
|
|
"approve(address,uint256)": {
|
|
"details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.",
|
|
"params": {
|
|
"amount": "The amount of tokens to be spent.",
|
|
"spender": "The address which will spend the funds."
|
|
}
|
|
},
|
|
"balanceOf(address)": {
|
|
"details": "Gets the balance of the specified address.",
|
|
"params": {
|
|
"owner": "The address to query the the balance of."
|
|
},
|
|
"returns": {
|
|
"balance": "An uint256 representing the amount owned by the passed address."
|
|
}
|
|
},
|
|
"transfer(address,uint256)": {
|
|
"details": "transfer token for a specified address",
|
|
"params": {
|
|
"amount": "The amount to be transferred.",
|
|
"to": "The address to transfer to."
|
|
}
|
|
},
|
|
"transferFrom(address,address,uint256)": {
|
|
"details": "Transfer tokens from one address to another",
|
|
"params": {
|
|
"amount": "uint256 the amount of tokens to be transferred",
|
|
"from": "address The address which you want to send tokens from",
|
|
"to": "address The address which you want to transfer to"
|
|
}
|
|
}
|
|
},
|
|
"title": "DODO Token"
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |