Files
dodo-contractV2/build-v1/contracts/TestERC20.json
2020-11-10 18:38:34 +08:00

7880 lines
329 KiB
JSON

{
"contractName": "TestERC20",
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
}
],
"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": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"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"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"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\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"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\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/TestERC20.sol\":{\"keccak256\":\"0xc13acbc1f6185f191e7f9a3fee3900dfa87638c6cdfcbfa6c2bf0bf1a8721833\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://31f92675293b1eb0573e6be4b66d1ae6de482d90b2d0ac29b405159f555ef804\",\"dweb:/ipfs/QmaE3D4EktRykz6TPBFayxaSXTa1LuQRNWKRmHR2hbzWuS\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0x57d750628881687f826b54f60cbfd46c1a172433eed892bbb123f91869886af1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b40bd7946010ddae9679f36630510217dcaa9cb8643824f9edc8ef52bda95717\",\"dweb:/ipfs/QmZSjpfUGyrmokZyaMc74a8h6zy2qFVECPVP8VfTvzNEFb\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50604051610a03380380610a038339818101604052604081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b5060405260209081015184519093506100fb9250600091850190610116565b506001805460ff191660ff92909216919091179055506101b1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061015757805160ff1916838001178555610184565b82800160010185558215610184579182015b82811115610184578251825591602001919060010190610169565b50610190929150610194565b5090565b6101ae91905b80821115610190576000815560010161019a565b90565b610843806101c06000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806340c10f191161005b57806340c10f191461019e57806370a08231146101cc578063a9059cbb14610204578063dd62ed3e1461023057610088565b806306fdde031461008d578063095ea7b31461010a57806323b872dd1461014a578063313ce56714610180575b600080fd5b61009561025e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101366004803603604081101561012057600080fd5b506001600160a01b0381351690602001356102ec565b604080519115158252519081900360200190f35b6101366004803603606081101561016057600080fd5b506001600160a01b03813581169160208101359091169060400135610352565b610188610583565b6040805160ff9092168252519081900360200190f35b6101ca600480360360408110156101b457600080fd5b506001600160a01b03813516906020013561058c565b005b6101f2600480360360208110156101e257600080fd5b50356001600160a01b03166105d5565b60408051918252519081900360200190f35b6101366004803603604081101561021a57600080fd5b506001600160a01b0381351690602001356105f0565b6101f26004803603604081101561024657600080fd5b506001600160a01b038135811691602001351661074c565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102e45780601f106102b9576101008083540402835291602001916102e4565b820191906000526020600020905b8154815290600101906020018083116102c757829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60006001600160a01b0383166103a5576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b6001600160a01b038416600090815260026020526040902054821115610407576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b6001600160a01b0384166000908152600360209081526040808320338452909152902054821115610476576040805162461bcd60e51b815260206004820152601460248201527308298989eae829c868abe9c9ea8be8a9c9eaa8e960631b604482015290519081900360640190fd5b6001600160a01b03841660009081526002602052604090205461049f908363ffffffff61077716565b6001600160a01b0380861660009081526002602052604080822093909355908516815220546104d4908363ffffffff6107c016565b6001600160a01b038085166000908152600260209081526040808320949094559187168152600382528281203382529091522054610518908363ffffffff61077716565b6001600160a01b03808616600081815260036020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60015460ff1681565b6001600160a01b0382166000908152600260205260409020546105b5908263ffffffff6107c016565b6001600160a01b0390921660009081526002602052604090209190915550565b6001600160a01b031660009081526002602052604090205490565b60006001600160a01b038316610643576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b3360009081526002602052604090205482111561069c576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b336000908152600260205260409020546106bc908363ffffffff61077716565b33600090815260026020526040808220929092556001600160a01b038516815220546106ee908363ffffffff6107c016565b6001600160a01b0384166000818152600260209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6000828211156107ba576040805162461bcd60e51b815260206004820152600960248201526829aaa12fa2a92927a960b91b604482015290519081900360640190fd5b50900390565b600082820183811015610806576040805162461bcd60e51b815260206004820152600960248201526820a2222fa2a92927a960b91b604482015290519081900360640190fd5b939250505056fea26469706673582212209b4001f11f1ed42060bced92266b334f9bbd1d4e12dd53256158cb612df765f164736f6c63430006090033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806340c10f191161005b57806340c10f191461019e57806370a08231146101cc578063a9059cbb14610204578063dd62ed3e1461023057610088565b806306fdde031461008d578063095ea7b31461010a57806323b872dd1461014a578063313ce56714610180575b600080fd5b61009561025e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101366004803603604081101561012057600080fd5b506001600160a01b0381351690602001356102ec565b604080519115158252519081900360200190f35b6101366004803603606081101561016057600080fd5b506001600160a01b03813581169160208101359091169060400135610352565b610188610583565b6040805160ff9092168252519081900360200190f35b6101ca600480360360408110156101b457600080fd5b506001600160a01b03813516906020013561058c565b005b6101f2600480360360208110156101e257600080fd5b50356001600160a01b03166105d5565b60408051918252519081900360200190f35b6101366004803603604081101561021a57600080fd5b506001600160a01b0381351690602001356105f0565b6101f26004803603604081101561024657600080fd5b506001600160a01b038135811691602001351661074c565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102e45780601f106102b9576101008083540402835291602001916102e4565b820191906000526020600020905b8154815290600101906020018083116102c757829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60006001600160a01b0383166103a5576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b6001600160a01b038416600090815260026020526040902054821115610407576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b6001600160a01b0384166000908152600360209081526040808320338452909152902054821115610476576040805162461bcd60e51b815260206004820152601460248201527308298989eae829c868abe9c9ea8be8a9c9eaa8e960631b604482015290519081900360640190fd5b6001600160a01b03841660009081526002602052604090205461049f908363ffffffff61077716565b6001600160a01b0380861660009081526002602052604080822093909355908516815220546104d4908363ffffffff6107c016565b6001600160a01b038085166000908152600260209081526040808320949094559187168152600382528281203382529091522054610518908363ffffffff61077716565b6001600160a01b03808616600081815260036020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60015460ff1681565b6001600160a01b0382166000908152600260205260409020546105b5908263ffffffff6107c016565b6001600160a01b0390921660009081526002602052604090209190915550565b6001600160a01b031660009081526002602052604090205490565b60006001600160a01b038316610643576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b3360009081526002602052604090205482111561069c576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b336000908152600260205260409020546106bc908363ffffffff61077716565b33600090815260026020526040808220929092556001600160a01b038516815220546106ee908363ffffffff6107c016565b6001600160a01b0384166000818152600260209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6000828211156107ba576040805162461bcd60e51b815260206004820152600960248201526829aaa12fa2a92927a960b91b604482015290519081900360640190fd5b50900390565b600082820183811015610806576040805162461bcd60e51b815260206004820152600960248201526820a2222fa2a92927a960b91b604482015290519081900360640190fd5b939250505056fea26469706673582212209b4001f11f1ed42060bced92266b334f9bbd1d4e12dd53256158cb612df765f164736f6c63430006090033",
"immutableReferences": {},
"sourceMap": "149:2051:18:-:0;;;535:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;535:116:18;;;;;;;;;;-1:-1:-1;535:116:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;535:116:18;;;;;;;602:12;;535:116;;-1:-1:-1;602:12:18;;-1:-1:-1;602:4:18;;:12;;;;:::i;:::-;-1:-1:-1;624:8:18;:20;;-1:-1:-1;;624:20:18;;;;;;;;;;;;-1:-1:-1;149:2051:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;149:2051:18;;;-1:-1:-1;149:2051:18;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "149:2051:18:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;207:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1737:199;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1737:199:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1167:564;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1167:564:18;;;;;;;;;;;;;;;;;:::i;231:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2076:122;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2076:122:18;;;;;;;;:::i;:::-;;1050:111;;;;;;;;;;;;;;;;-1:-1:-1;1050:111:18;-1:-1:-1;;;;;1050:111:18;;:::i;:::-;;;;;;;;;;;;;;;;657:387;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;657:387:18;;;;;;;;:::i;1942:128::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1942:128:18;;;;;;;;;;:::i;207:18::-;;;;;;;;;;;;;;;-1:-1:-1;;207:18:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1737:199::-;1827:10;1803:4;1819:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;1819:28:18;;;;;;;;;;;:37;;;1871;;;;;;;1803:4;;1819:28;;1827:10;;1871:37;;;;;;;;-1:-1:-1;1925:4:18;1737:199;;;;:::o;1167:564::-;1277:4;-1:-1:-1;;;;;1301:16:18;;1293:48;;;;;-1:-1:-1;;;1293:48:18;;;;;;;;;;;;-1:-1:-1;;;1293:48:18;;;;;;;;;;;;;;;-1:-1:-1;;;;;1369:14:18;;;;;;:8;:14;;;;;;1359:24;;;1351:55;;;;;-1:-1:-1;;;1351:55:18;;;;;;;;;;;;-1:-1:-1;;;1351:55:18;;;;;;;;;;;;;;;-1:-1:-1;;;;;1434:13:18;;;;;;:7;:13;;;;;;;;1448:10;1434:25;;;;;;;;1424:35;;;1416:68;;;;;-1:-1:-1;;;1416:68:18;;;;;;;;;;;;-1:-1:-1;;;1416:68:18;;;;;;;;;;;;;;;-1:-1:-1;;;;;1512:14:18;;;;;;:8;:14;;;;;;:26;;1531:6;1512:26;:18;:26;:::i;:::-;-1:-1:-1;;;;;1495:14:18;;;;;;;:8;:14;;;;;;:43;;;;1563:12;;;;;;;:24;;1580:6;1563:24;:16;:24;:::i;:::-;-1:-1:-1;;;;;1548:12:18;;;;;;;:8;:12;;;;;;;;:39;;;;1625:13;;;;;:7;:13;;;;;1639:10;1625:25;;;;;;;:37;;1655:6;1625:37;:29;:37;:::i;:::-;-1:-1:-1;;;;;1597:13:18;;;;;;;:7;:13;;;;;;;;1611:10;1597:25;;;;;;;;:65;;;;1677:26;;;;;;;;;;;1597:13;;1677:26;;;;;;;;;;;-1:-1:-1;1720:4:18;1167:564;;;;;:::o;231:21::-;;;;;;:::o;2076:122::-;-1:-1:-1;;;;;2162:17:18;;;;;;:8;:17;;;;;;:29;;2184:6;2162:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;2142:17:18;;;;;;;:8;:17;;;;;:49;;;;-1:-1:-1;2076:122:18:o;1050:111::-;-1:-1:-1;;;;;1139:15:18;1105;1139;;;:8;:15;;;;;;;1050:111::o;657:387::-;719:4;-1:-1:-1;;;;;743:16:18;;735:48;;;;;-1:-1:-1;;;735:48:18;;;;;;;;;;;;-1:-1:-1;;;735:48:18;;;;;;;;;;;;;;;820:10;811:20;;;;:8;:20;;;;;;801:30;;;793:61;;;;;-1:-1:-1;;;793:61:18;;;;;;;;;;;;-1:-1:-1;;;793:61:18;;;;;;;;;;;;;;;897:10;888:20;;;;:8;:20;;;;;;:32;;913:6;888:32;:24;:32;:::i;:::-;874:10;865:20;;;;:8;:20;;;;;;:55;;;;-1:-1:-1;;;;;945:12:18;;;;;;:24;;962:6;945:24;:16;:24;:::i;:::-;-1:-1:-1;;;;;930:12:18;;;;;;:8;:12;;;;;;;;;:39;;;;984:32;;;;;;;930:12;;993:10;;984:32;;;;;;;;;;-1:-1:-1;1033:4:18;657:387;;;;:::o;1942:128::-;-1:-1:-1;;;;;2040:14:18;;;2014:7;2040:14;;;:7;:14;;;;;;;;:23;;;;;;;;;;;;;1942:128::o;934:134:41:-;992:7;1024:1;1019;:6;;1011:28;;;;;-1:-1:-1;;;1011:28:41;;;;;;;;;;;;-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;;;;;;;;;;;;-1:-1:-1;;;1178:28:41;;;;;;;;;;;;;;;1223:1;1074:157;-1:-1:-1;;;1074:157:41:o",
"source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\n\nimport {SafeMath} from \"../lib/SafeMath.sol\";\n\ncontract TestERC20 {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n\n mapping(address => uint256) balances;\n mapping(address => mapping(address => uint256)) internal allowed;\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n constructor(string memory _name, uint8 _decimals) public {\n name = _name;\n decimals = _decimals;\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n require(to != address(0), \"TO_ADDRESS_IS_EMPTY\");\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 function balanceOf(address owner) public view returns (uint256 balance) {\n return balances[owner];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public returns (bool) {\n require(to != address(0), \"TO_ADDRESS_IS_EMPTY\");\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 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 function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n function mint(address account, uint256 amount) external {\n balances[account] = balances[account].add(amount);\n }\n}\n",
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/TestERC20.sol",
"ast": {
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/TestERC20.sol",
"exportedSymbols": {
"TestERC20": [
3697
]
},
"id": 3698,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3417,
"literals": [
"solidity",
"0.6",
".9"
],
"nodeType": "PragmaDirective",
"src": "78:22:18"
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
"file": "../lib/SafeMath.sol",
"id": 3419,
"nodeType": "ImportDirective",
"scope": 3698,
"sourceUnit": 11624,
"src": "102:45:18",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 3418,
"name": "SafeMath",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "110:8:18",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 3697,
"linearizedBaseContracts": [
3697
],
"name": "TestERC20",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 3422,
"libraryName": {
"contractScope": null,
"id": 3420,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11623,
"src": "180:8:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$11623",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "174:27:18",
"typeName": {
"id": 3421,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "193:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"functionSelector": "06fdde03",
"id": 3424,
"mutability": "mutable",
"name": "name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "207:18:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 3423,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "207:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "313ce567",
"id": 3426,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "231:21:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3425,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "231:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3430,
"mutability": "mutable",
"name": "balances",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "259:36:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 3429,
"keyType": {
"id": 3427,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "267:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "259:27:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 3428,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "278:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3436,
"mutability": "mutable",
"name": "allowed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "301:64:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 3435,
"keyType": {
"id": 3431,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "309:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "301:47:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 3434,
"keyType": {
"id": 3432,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "328:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "320:27:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 3433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "339:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 3444,
"name": "Transfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 3443,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3438,
"indexed": true,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3444,
"src": "387:20:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3437,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "387:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3440,
"indexed": true,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3444,
"src": "409:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3439,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "409:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3442,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3444,
"src": "429:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3441,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "429:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "386:58:18"
},
"src": "372:73:18"
},
{
"anonymous": false,
"documentation": null,
"id": 3452,
"name": "Approval",
"nodeType": "EventDefinition",
"parameters": {
"id": 3451,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3446,
"indexed": true,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3452,
"src": "465:21:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3445,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "465:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3448,
"indexed": true,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3452,
"src": "488:23:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3447,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3450,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3452,
"src": "513:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3449,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "513:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "464:64:18"
},
"src": "450:79:18"
},
{
"body": {
"id": 3467,
"nodeType": "Block",
"src": "592:59:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3461,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3459,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3424,
"src": "602:4:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3460,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3454,
"src": "609:5:18",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "602:12:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 3462,
"nodeType": "ExpressionStatement",
"src": "602:12:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3465,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3463,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3426,
"src": "624:8:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3464,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3456,
"src": "635:9:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "624:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 3466,
"nodeType": "ExpressionStatement",
"src": "624:20:18"
}
]
},
"documentation": null,
"id": 3468,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3457,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3454,
"mutability": "mutable",
"name": "_name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3468,
"src": "547:19:18",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 3453,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "547:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3456,
"mutability": "mutable",
"name": "_decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3468,
"src": "568:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3455,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "568:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "546:38:18"
},
"returnParameters": {
"id": 3458,
"nodeType": "ParameterList",
"parameters": [],
"src": "592:0:18"
},
"scope": 3697,
"src": "535:116:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3530,
"nodeType": "Block",
"src": "725:319:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3478,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "743:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3481,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "757:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 3480,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "749:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 3479,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "749:7:18",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 3482,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "749:10:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "743:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "544f5f414444524553535f49535f454d505459",
"id": 3484,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "761:21:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
},
"value": "TO_ADDRESS_IS_EMPTY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
}
],
"id": 3477,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "735:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "735:48:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3486,
"nodeType": "ExpressionStatement",
"src": "735:48:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3493,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3488,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "801:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3489,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "811:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3492,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3490,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "820:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3491,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "820:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "811:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "801:30:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
"id": 3494,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "833:20:18",
"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": 3487,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "793:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "793:61:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3496,
"nodeType": "ExpressionStatement",
"src": "793:61:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3497,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "865:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3500,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3498,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "874:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3499,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "874:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "865:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3506,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "913:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3501,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "888:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3504,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3502,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "897:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3503,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "897:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "888:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3505,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 11557,
"src": "888:24:18",
"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": 3507,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "888:32:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "865:55:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3509,
"nodeType": "ExpressionStatement",
"src": "865:55:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3510,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "930:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3512,
"indexExpression": {
"argumentTypes": null,
"id": 3511,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "939:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "930:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3517,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "962:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3513,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "945:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3515,
"indexExpression": {
"argumentTypes": null,
"id": 3514,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "954:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "945:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3516,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 11582,
"src": "945:16:18",
"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": 3518,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "945:24:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "930:39:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3520,
"nodeType": "ExpressionStatement",
"src": "930:39:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3522,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "993:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3523,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "993:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3524,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "1005:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3525,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "1009:6:18",
"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": 3521,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3444,
"src": "984:8:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "984:32:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3527,
"nodeType": "EmitStatement",
"src": "979:37:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1033:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3476,
"id": 3529,
"nodeType": "Return",
"src": "1026:11:18"
}
]
},
"documentation": null,
"functionSelector": "a9059cbb",
"id": 3531,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transfer",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3473,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3470,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3531,
"src": "675:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3469,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "675:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3472,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3531,
"src": "687:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3471,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "687:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "674:28:18"
},
"returnParameters": {
"id": 3476,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3475,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3531,
"src": "719:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3474,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "719:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "718:6:18"
},
"scope": 3697,
"src": "657:387:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3542,
"nodeType": "Block",
"src": "1122:39:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3538,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1139:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3540,
"indexExpression": {
"argumentTypes": null,
"id": 3539,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3533,
"src": "1148:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1139:15:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3537,
"id": 3541,
"nodeType": "Return",
"src": "1132:22:18"
}
]
},
"documentation": null,
"functionSelector": "70a08231",
"id": 3543,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "balanceOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3533,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3543,
"src": "1069:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3532,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1069:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1068:15:18"
},
"returnParameters": {
"id": 3537,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3536,
"mutability": "mutable",
"name": "balance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3543,
"src": "1105:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3535,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1105:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1104:17:18"
},
"scope": 3697,
"src": "1050:111:18",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3632,
"nodeType": "Block",
"src": "1283:448:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3560,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3555,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1301:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3558,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1315:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 3557,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1307:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 3556,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1307:7:18",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 3559,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1307:10:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "1301:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "544f5f414444524553535f49535f454d505459",
"id": 3561,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1319:21:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
},
"value": "TO_ADDRESS_IS_EMPTY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
}
],
"id": 3554,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1293:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1293:48:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3563,
"nodeType": "ExpressionStatement",
"src": "1293:48:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3565,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1359:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3566,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1369:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3568,
"indexExpression": {
"argumentTypes": null,
"id": 3567,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1378:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1369:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1359:24:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
"id": 3570,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1385:20:18",
"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": 3564,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1351:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1351:55:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3572,
"nodeType": "ExpressionStatement",
"src": "1351:55:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3581,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3574,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1424:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3575,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1434:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3577,
"indexExpression": {
"argumentTypes": null,
"id": 3576,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1442:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1434:13:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3580,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3578,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1448:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3579,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1448:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1434:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1424:35:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "414c4c4f57414e43455f4e4f545f454e4f554748",
"id": 3582,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1461:22:18",
"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": 3573,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1416:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3583,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1416:68:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3584,
"nodeType": "ExpressionStatement",
"src": "1416:68:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3585,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1495:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3587,
"indexExpression": {
"argumentTypes": null,
"id": 3586,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1504:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1495:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3592,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1531:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3588,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1512:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3590,
"indexExpression": {
"argumentTypes": null,
"id": 3589,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1521:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1512:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 11557,
"src": "1512:18:18",
"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": 3593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1512:26:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1495:43:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3595,
"nodeType": "ExpressionStatement",
"src": "1495:43:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3596,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1548:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3598,
"indexExpression": {
"argumentTypes": null,
"id": 3597,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1557:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1548:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3603,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1580:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3599,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1563:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3601,
"indexExpression": {
"argumentTypes": null,
"id": 3600,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1572:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1563:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3602,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 11582,
"src": "1563:16:18",
"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": 3604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1563:24:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1548:39:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3606,
"nodeType": "ExpressionStatement",
"src": "1548:39:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3607,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1597:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3611,
"indexExpression": {
"argumentTypes": null,
"id": 3608,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1605:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1597:13:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3612,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3609,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1611:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1611:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1597:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3620,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1655:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3613,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1625:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3615,
"indexExpression": {
"argumentTypes": null,
"id": 3614,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1633:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1625:13:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3618,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3616,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1639:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1639:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1625:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 11557,
"src": "1625:29:18",
"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": 3621,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1625:37:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1597:65:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3623,
"nodeType": "ExpressionStatement",
"src": "1597:65:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3625,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1686:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3626,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1692:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3627,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1696:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3624,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3444,
"src": "1677:8:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3628,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1677:26:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3629,
"nodeType": "EmitStatement",
"src": "1672:31:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3630,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1720:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3553,
"id": 3631,
"nodeType": "Return",
"src": "1713:11:18"
}
]
},
"documentation": null,
"functionSelector": "23b872dd",
"id": 3633,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transferFrom",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3550,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3545,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1198:12:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3544,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1198:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3547,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1220:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3546,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1220:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3549,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1240:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3548,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1240:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1188:72:18"
},
"returnParameters": {
"id": 3553,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3552,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1277:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3551,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1277:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1276:6:18"
},
"scope": 3697,
"src": "1167:564:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3660,
"nodeType": "Block",
"src": "1809:127:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3649,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3642,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1819:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3646,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3643,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1827:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3644,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1827:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1819:19:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3647,
"indexExpression": {
"argumentTypes": null,
"id": 3645,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3635,
"src": "1839:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1819:28:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3648,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "1850:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1819:37:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3650,
"nodeType": "ExpressionStatement",
"src": "1819:37:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3652,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1880:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3653,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1880:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3654,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3635,
"src": "1892:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3655,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "1901:6:18",
"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": 3651,
"name": "Approval",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3452,
"src": "1871:8:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1871:37:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3657,
"nodeType": "EmitStatement",
"src": "1866:42:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3658,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1925:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3641,
"id": 3659,
"nodeType": "Return",
"src": "1918:11:18"
}
]
},
"documentation": null,
"functionSelector": "095ea7b3",
"id": 3661,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "approve",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3638,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3635,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3661,
"src": "1754:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3634,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1754:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3637,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3661,
"src": "1771:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3636,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1771:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1753:33:18"
},
"returnParameters": {
"id": 3641,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3640,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3661,
"src": "1803:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3639,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1803:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1802:6:18"
},
"scope": 3697,
"src": "1737:199:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3676,
"nodeType": "Block",
"src": "2023:47:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3670,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "2040:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3672,
"indexExpression": {
"argumentTypes": null,
"id": 3671,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3663,
"src": "2048:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2040:14:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3674,
"indexExpression": {
"argumentTypes": null,
"id": 3673,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3665,
"src": "2055:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2040:23:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3669,
"id": 3675,
"nodeType": "Return",
"src": "2033:30:18"
}
]
},
"documentation": null,
"functionSelector": "dd62ed3e",
"id": 3677,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "allowance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3666,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3663,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3677,
"src": "1961:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3662,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1961:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3665,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3677,
"src": "1976:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3664,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1976:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1960:32:18"
},
"returnParameters": {
"id": 3669,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3668,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3677,
"src": "2014:7:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3667,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2014:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2013:9:18"
},
"scope": 3697,
"src": "1942:128:18",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3695,
"nodeType": "Block",
"src": "2132:66:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3684,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "2142:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3686,
"indexExpression": {
"argumentTypes": null,
"id": 3685,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3679,
"src": "2151:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2142:17:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3691,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3681,
"src": "2184:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3687,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "2162:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3689,
"indexExpression": {
"argumentTypes": null,
"id": 3688,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3679,
"src": "2171:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2162:17:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3690,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 11582,
"src": "2162:21:18",
"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": 3692,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2162:29:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2142:49:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3694,
"nodeType": "ExpressionStatement",
"src": "2142:49:18"
}
]
},
"documentation": null,
"functionSelector": "40c10f19",
"id": 3696,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mint",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3682,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3679,
"mutability": "mutable",
"name": "account",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3696,
"src": "2090:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3678,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2090:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3681,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3696,
"src": "2107:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3680,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2107:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2089:33:18"
},
"returnParameters": {
"id": 3683,
"nodeType": "ParameterList",
"parameters": [],
"src": "2132:0:18"
},
"scope": 3697,
"src": "2076:122:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 3698,
"src": "149:2051:18"
}
],
"src": "78:2123:18"
},
"legacyAST": {
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/TestERC20.sol",
"exportedSymbols": {
"TestERC20": [
3697
]
},
"id": 3698,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3417,
"literals": [
"solidity",
"0.6",
".9"
],
"nodeType": "PragmaDirective",
"src": "78:22:18"
},
{
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol",
"file": "../lib/SafeMath.sol",
"id": 3419,
"nodeType": "ImportDirective",
"scope": 3698,
"sourceUnit": 11624,
"src": "102:45:18",
"symbolAliases": [
{
"foreign": {
"argumentTypes": null,
"id": 3418,
"name": "SafeMath",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": null,
"src": "110:8:18",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
},
"local": null
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 3697,
"linearizedBaseContracts": [
3697
],
"name": "TestERC20",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 3422,
"libraryName": {
"contractScope": null,
"id": 3420,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11623,
"src": "180:8:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$11623",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "174:27:18",
"typeName": {
"id": 3421,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "193:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"functionSelector": "06fdde03",
"id": 3424,
"mutability": "mutable",
"name": "name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "207:18:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 3423,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "207:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "313ce567",
"id": 3426,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "231:21:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3425,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "231:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3430,
"mutability": "mutable",
"name": "balances",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "259:36:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 3429,
"keyType": {
"id": 3427,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "267:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "259:27:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 3428,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "278:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3436,
"mutability": "mutable",
"name": "allowed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3697,
"src": "301:64:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 3435,
"keyType": {
"id": 3431,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "309:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "301:47:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 3434,
"keyType": {
"id": 3432,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "328:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "320:27:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 3433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "339:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 3444,
"name": "Transfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 3443,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3438,
"indexed": true,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3444,
"src": "387:20:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3437,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "387:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3440,
"indexed": true,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3444,
"src": "409:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3439,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "409:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3442,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3444,
"src": "429:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3441,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "429:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "386:58:18"
},
"src": "372:73:18"
},
{
"anonymous": false,
"documentation": null,
"id": 3452,
"name": "Approval",
"nodeType": "EventDefinition",
"parameters": {
"id": 3451,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3446,
"indexed": true,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3452,
"src": "465:21:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3445,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "465:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3448,
"indexed": true,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3452,
"src": "488:23:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3447,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3450,
"indexed": false,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3452,
"src": "513:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3449,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "513:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "464:64:18"
},
"src": "450:79:18"
},
{
"body": {
"id": 3467,
"nodeType": "Block",
"src": "592:59:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3461,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3459,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3424,
"src": "602:4:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3460,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3454,
"src": "609:5:18",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "602:12:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 3462,
"nodeType": "ExpressionStatement",
"src": "602:12:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3465,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3463,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3426,
"src": "624:8:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3464,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3456,
"src": "635:9:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "624:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 3466,
"nodeType": "ExpressionStatement",
"src": "624:20:18"
}
]
},
"documentation": null,
"id": 3468,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3457,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3454,
"mutability": "mutable",
"name": "_name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3468,
"src": "547:19:18",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 3453,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "547:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3456,
"mutability": "mutable",
"name": "_decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3468,
"src": "568:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 3455,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "568:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "546:38:18"
},
"returnParameters": {
"id": 3458,
"nodeType": "ParameterList",
"parameters": [],
"src": "592:0:18"
},
"scope": 3697,
"src": "535:116:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3530,
"nodeType": "Block",
"src": "725:319:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3478,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "743:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3481,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "757:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 3480,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "749:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 3479,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "749:7:18",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 3482,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "749:10:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "743:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "544f5f414444524553535f49535f454d505459",
"id": 3484,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "761:21:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
},
"value": "TO_ADDRESS_IS_EMPTY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
}
],
"id": 3477,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "735:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "735:48:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3486,
"nodeType": "ExpressionStatement",
"src": "735:48:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3493,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3488,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "801:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3489,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "811:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3492,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3490,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "820:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3491,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "820:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "811:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "801:30:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
"id": 3494,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "833:20:18",
"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": 3487,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "793:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "793:61:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3496,
"nodeType": "ExpressionStatement",
"src": "793:61:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3497,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "865:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3500,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3498,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "874:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3499,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "874:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "865:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3506,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "913:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3501,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "888:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3504,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3502,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "897:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3503,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "897:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "888:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3505,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 11557,
"src": "888:24:18",
"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": 3507,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "888:32:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "865:55:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3509,
"nodeType": "ExpressionStatement",
"src": "865:55:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3510,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "930:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3512,
"indexExpression": {
"argumentTypes": null,
"id": 3511,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "939:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "930:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3517,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "962:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3513,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "945:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3515,
"indexExpression": {
"argumentTypes": null,
"id": 3514,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "954:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "945:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3516,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 11582,
"src": "945:16:18",
"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": 3518,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "945:24:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "930:39:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3520,
"nodeType": "ExpressionStatement",
"src": "930:39:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3522,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "993:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3523,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "993:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3524,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3470,
"src": "1005:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3525,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3472,
"src": "1009:6:18",
"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": 3521,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3444,
"src": "984:8:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "984:32:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3527,
"nodeType": "EmitStatement",
"src": "979:37:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3528,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1033:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3476,
"id": 3529,
"nodeType": "Return",
"src": "1026:11:18"
}
]
},
"documentation": null,
"functionSelector": "a9059cbb",
"id": 3531,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transfer",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3473,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3470,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3531,
"src": "675:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3469,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "675:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3472,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3531,
"src": "687:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3471,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "687:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "674:28:18"
},
"returnParameters": {
"id": 3476,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3475,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3531,
"src": "719:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3474,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "719:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "718:6:18"
},
"scope": 3697,
"src": "657:387:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3542,
"nodeType": "Block",
"src": "1122:39:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3538,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1139:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3540,
"indexExpression": {
"argumentTypes": null,
"id": 3539,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3533,
"src": "1148:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1139:15:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3537,
"id": 3541,
"nodeType": "Return",
"src": "1132:22:18"
}
]
},
"documentation": null,
"functionSelector": "70a08231",
"id": 3543,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "balanceOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3533,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3543,
"src": "1069:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3532,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1069:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1068:15:18"
},
"returnParameters": {
"id": 3537,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3536,
"mutability": "mutable",
"name": "balance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3543,
"src": "1105:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3535,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1105:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1104:17:18"
},
"scope": 3697,
"src": "1050:111:18",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3632,
"nodeType": "Block",
"src": "1283:448:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3560,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3555,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1301:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3558,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1315:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 3557,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1307:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 3556,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1307:7:18",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 3559,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1307:10:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "1301:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "544f5f414444524553535f49535f454d505459",
"id": 3561,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1319:21:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
},
"value": "TO_ADDRESS_IS_EMPTY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_fce9c4217ab16f66c8c9e439976e964c9744fcc6b732bc83ede5eb9685cdc356",
"typeString": "literal_string \"TO_ADDRESS_IS_EMPTY\""
}
],
"id": 3554,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1293:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1293:48:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3563,
"nodeType": "ExpressionStatement",
"src": "1293:48:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3565,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1359:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3566,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1369:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3568,
"indexExpression": {
"argumentTypes": null,
"id": 3567,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1378:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1369:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1359:24:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "42414c414e43455f4e4f545f454e4f554748",
"id": 3570,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1385:20:18",
"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": 3564,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1351:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3571,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1351:55:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3572,
"nodeType": "ExpressionStatement",
"src": "1351:55:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3581,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3574,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1424:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3575,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1434:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3577,
"indexExpression": {
"argumentTypes": null,
"id": 3576,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1442:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1434:13:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3580,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3578,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1448:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3579,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1448:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1434:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1424:35:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "414c4c4f57414e43455f4e4f545f454e4f554748",
"id": 3582,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1461:22:18",
"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": 3573,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1416:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3583,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1416:68:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3584,
"nodeType": "ExpressionStatement",
"src": "1416:68:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3585,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1495:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3587,
"indexExpression": {
"argumentTypes": null,
"id": 3586,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1504:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1495:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3592,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1531:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3588,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1512:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3590,
"indexExpression": {
"argumentTypes": null,
"id": 3589,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1521:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1512:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 11557,
"src": "1512:18:18",
"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": 3593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1512:26:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1495:43:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3595,
"nodeType": "ExpressionStatement",
"src": "1495:43:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3596,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1548:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3598,
"indexExpression": {
"argumentTypes": null,
"id": 3597,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1557:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1548:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3603,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1580:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3599,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "1563:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3601,
"indexExpression": {
"argumentTypes": null,
"id": 3600,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1572:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1563:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3602,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 11582,
"src": "1563:16:18",
"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": 3604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1563:24:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1548:39:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3606,
"nodeType": "ExpressionStatement",
"src": "1548:39:18"
},
{
"expression": {
"argumentTypes": null,
"id": 3622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3607,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1597:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3611,
"indexExpression": {
"argumentTypes": null,
"id": 3608,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1605:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1597:13:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3612,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3609,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1611:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1611:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1597:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3620,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1655:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3613,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1625:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3615,
"indexExpression": {
"argumentTypes": null,
"id": 3614,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1633:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1625:13:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3618,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3616,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1639:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1639:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1625:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 11557,
"src": "1625:29:18",
"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": 3621,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1625:37:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1597:65:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3623,
"nodeType": "ExpressionStatement",
"src": "1597:65:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3625,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3545,
"src": "1686:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3626,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3547,
"src": "1692:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3627,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3549,
"src": "1696:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3624,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3444,
"src": "1677:8:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3628,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1677:26:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3629,
"nodeType": "EmitStatement",
"src": "1672:31:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3630,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1720:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3553,
"id": 3631,
"nodeType": "Return",
"src": "1713:11:18"
}
]
},
"documentation": null,
"functionSelector": "23b872dd",
"id": 3633,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transferFrom",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3550,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3545,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1198:12:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3544,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1198:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3547,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1220:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3546,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1220:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3549,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1240:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3548,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1240:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1188:72:18"
},
"returnParameters": {
"id": 3553,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3552,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3633,
"src": "1277:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3551,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1277:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1276:6:18"
},
"scope": 3697,
"src": "1167:564:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3660,
"nodeType": "Block",
"src": "1809:127:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3649,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3642,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "1819:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3646,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3643,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1827:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3644,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1827:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1819:19:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3647,
"indexExpression": {
"argumentTypes": null,
"id": 3645,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3635,
"src": "1839:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1819:28:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3648,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "1850:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1819:37:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3650,
"nodeType": "ExpressionStatement",
"src": "1819:37:18"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3652,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1880:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3653,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1880:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3654,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3635,
"src": "1892:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3655,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "1901:6:18",
"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": 3651,
"name": "Approval",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3452,
"src": "1871:8:18",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3656,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1871:37:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3657,
"nodeType": "EmitStatement",
"src": "1866:42:18"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3658,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1925:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3641,
"id": 3659,
"nodeType": "Return",
"src": "1918:11:18"
}
]
},
"documentation": null,
"functionSelector": "095ea7b3",
"id": 3661,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "approve",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3638,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3635,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3661,
"src": "1754:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3634,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1754:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3637,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3661,
"src": "1771:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3636,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1771:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1753:33:18"
},
"returnParameters": {
"id": 3641,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3640,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3661,
"src": "1803:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3639,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1803:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1802:6:18"
},
"scope": 3697,
"src": "1737:199:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3676,
"nodeType": "Block",
"src": "2023:47:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3670,
"name": "allowed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3436,
"src": "2040:7:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 3672,
"indexExpression": {
"argumentTypes": null,
"id": 3671,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3663,
"src": "2048:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2040:14:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3674,
"indexExpression": {
"argumentTypes": null,
"id": 3673,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3665,
"src": "2055:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2040:23:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3669,
"id": 3675,
"nodeType": "Return",
"src": "2033:30:18"
}
]
},
"documentation": null,
"functionSelector": "dd62ed3e",
"id": 3677,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "allowance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3666,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3663,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3677,
"src": "1961:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3662,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1961:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3665,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3677,
"src": "1976:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3664,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1976:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1960:32:18"
},
"returnParameters": {
"id": 3669,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3668,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3677,
"src": "2014:7:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3667,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2014:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2013:9:18"
},
"scope": 3697,
"src": "1942:128:18",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 3695,
"nodeType": "Block",
"src": "2132:66:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3693,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3684,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "2142:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3686,
"indexExpression": {
"argumentTypes": null,
"id": 3685,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3679,
"src": "2151:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2142:17:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3691,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3681,
"src": "2184:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3687,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3430,
"src": "2162:8:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3689,
"indexExpression": {
"argumentTypes": null,
"id": 3688,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3679,
"src": "2171:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2162:17:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3690,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 11582,
"src": "2162:21:18",
"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": 3692,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2162:29:18",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2142:49:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3694,
"nodeType": "ExpressionStatement",
"src": "2142:49:18"
}
]
},
"documentation": null,
"functionSelector": "40c10f19",
"id": 3696,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mint",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3682,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3679,
"mutability": "mutable",
"name": "account",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3696,
"src": "2090:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3678,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2090:7:18",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3681,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3696,
"src": "2107:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3680,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2107:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2089:33:18"
},
"returnParameters": {
"id": 3683,
"nodeType": "ParameterList",
"parameters": [],
"src": "2132:0:18"
},
"scope": 3697,
"src": "2076:122:18",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 3698,
"src": "149:2051:18"
}
],
"src": "78:2123:18"
},
"compiler": {
"name": "solc",
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-11-06T08:03:35.523Z",
"devdoc": {
"methods": {}
},
"userdoc": {
"methods": {}
}
}