11052 lines
474 KiB
JSON
11052 lines
474 KiB
JSON
![]() |
{
|
||
|
"contractName": "ERC20",
|
||
|
"abi": [
|
||
|
{
|
||
|
"anonymous": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"indexed": true,
|
||
|
"name": "from",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"indexed": true,
|
||
|
"name": "to",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"indexed": false,
|
||
|
"name": "value",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "Transfer",
|
||
|
"type": "event"
|
||
|
},
|
||
|
{
|
||
|
"anonymous": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"indexed": true,
|
||
|
"name": "owner",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"indexed": true,
|
||
|
"name": "spender",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"indexed": false,
|
||
|
"name": "value",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "Approval",
|
||
|
"type": "event"
|
||
|
},
|
||
|
{
|
||
|
"constant": true,
|
||
|
"inputs": [],
|
||
|
"name": "totalSupply",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": true,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "account",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "balanceOf",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "recipient",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "amount",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "transfer",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": true,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "owner",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "spender",
|
||
|
"type": "address"
|
||
|
}
|
||
|
],
|
||
|
"name": "allowance",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "view",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "spender",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "value",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "approve",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "sender",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "recipient",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "amount",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "transferFrom",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "spender",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "addedValue",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "increaseAllowance",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "function"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"inputs": [
|
||
|
{
|
||
|
"name": "spender",
|
||
|
"type": "address"
|
||
|
},
|
||
|
{
|
||
|
"name": "subtractedValue",
|
||
|
"type": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"name": "decreaseAllowance",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "",
|
||
|
"type": "bool"
|
||
|
}
|
||
|
],
|
||
|
"payable": false,
|
||
|
"stateMutability": "nonpayable",
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"metadata": "{\"compiler\":{\"version\":\"0.5.2+commit.1df8f40c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"Implementation of the `IERC20` interface. * This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using `_mint`. For a generic mechanism see `ERC20Mintable`. * *For a detailed writeup see our guide [How to implement supply mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).* * We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. * Additionally, an `Approval` event is emitted on calls to `transferFrom`. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. * Finally, the non-standard `decreaseAllowance` and `increaseAllowance` functions have been added to mitigate the well-known issues around setting allowances. See `IERC20.approve`.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See `IERC20.allowance`.\"},\"approve(address,uint256)\":{\"details\":\"See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See `IERC20.balanceOf`.\"},\"de
|
||
|
"bytecode": "0x608060405234801561001057600080fd5b50610710806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610228565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a0381358116916020810135909116906040013561022e565b6100d66004803603604081101561015057600080fd5b50600160a060020a038135169060200135610285565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a03166102c1565b6100d6600480360360408110156101a257600080fd5b50600160a060020a0381351690602001356102dc565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610318565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a0381358116916020013516610325565b600061021f338484610350565b50600192915050565b60025490565b600061023b848484610446565b600160a060020a03841660009081526001602090815260408083203380855292529091205461027b918691610276908663ffffffff61059216565b610350565b5060019392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161021f918590610276908663ffffffff6105f216565b600160a060020a031660009081526020819052604090205490565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161021f918590610276908663ffffffff61059216565b600061021f338484610446565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600160a060020a038316151561039a5760405160e560020a62461bcd0281526004018080602001828103825260248152602001806106c16024913960400191505060405180910390fd5b600160a060020a03821615156103e45760405160e560020a62461bcd02815260040180806020018281038252602281526020018061067a6022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a03831615156104905760405160e560020a62461bcd02815260040180806020018281038252602581526020018061069c6025913960400191505060405180910390fd5b600160a060020a03821615156104da5760405160e560020a62461bcd0281526004018080602001828103825260238152602001806106576023913960400191505060405180910390fd5b600160a060020a038316600090815260208190526040902054610503908263ffffffff61059216565b600160a060020a038085166000908152602081905260408082209390935590841681522054610538908263ffffffff6105f216565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105ec576040805160e560020a62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561064f576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820d508fef87366948927f9a8d179b6e30108f6468136cc4c57105c9d5c35238b740029",
|
||
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610228565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a0381358116916020810135909116906040013561022e565b6100d66004803603604081101561015057600080fd5b50600160a060020a038135169060200135610285565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a03166102c1565b6100d6600480360360408110156101a257600080fd5b50600160a060020a0381351690602001356102dc565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610318565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a0381358116916020013516610325565b600061021f338484610350565b50600192915050565b60025490565b600061023b848484610446565b600160a060020a03841660009081526001602090815260408083203380855292529091205461027b918691610276908663ffffffff61059216565b610350565b5060019392505050565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161021f918590610276908663ffffffff6105f216565b600160a060020a031660009081526020819052604090205490565b336000818152600160209081526040808320600160a060020a0387168452909152812054909161021f918590610276908663ffffffff61059216565b600061021f338484610446565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600160a060020a038316151561039a5760405160e560020a62461bcd0281526004018080602001828103825260248152602001806106c16024913960400191505060405180910390fd5b600160a060020a03821615156103e45760405160e560020a62461bcd02815260040180806020018281038252602281526020018061067a6022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a03831615156104905760405160e560020a62461bcd02815260040180806020018281038252602581526020018061069c6025913960400191505060405180910390fd5b600160a060020a03821615156104da5760405160e560020a62461bcd0281526004018080602001828103825260238152602001806106576023913960400191505060405180910390fd5b600160a060020a038316600090815260208190526040902054610503908263ffffffff61059216565b600160a060020a038085166000908152602081905260408082209390935590841681522054610538908263ffffffff6105f216565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105ec576040805160e560020a62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561064f576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820d508fef87366948927f9a8d179b6e30108f6468136cc4c57105c9d5c35238b740029",
|
||
|
"sourceMap": "1232:6578:10:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1232:6578:10;;;;;;;",
|
||
|
"deployedSourceMap": "1232:6578:10:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1232:6578:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2453:145;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2453:145:10;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1514:89;;;:::i;:::-;;;;;;;;;;;;;;;;3055:252;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3055:252:10;;;;;;;;;;;;;;;;;:::i;3702:203::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3702:203:10;;;;;;;;:::i;1661:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1661:108:10;-1:-1:-1;;;;;1661:108:10;;:::i;4392:213::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4392:213:10;;;;;;;;:::i;1972:153::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1972:153:10;;;;;;;;:::i;2183:132::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2183:132:10;;;;;;;;;;:::i;2453:145::-;2518:4;2534:36;2543:10;2555:7;2564:5;2534:8;:36::i;:::-;-1:-1:-1;2587:4:10;2453:145;;;;:::o;1514:89::-;1584:12;;1514:89;:::o;3055:252::-;3144:4;3160:36;3170:6;3178:9;3189:6;3160:9;:36::i;:::-;-1:-1:-1;;;;;3235:19:10;;;;;;:11;:19;;;;;;;;3223:10;3235:31;;;;;;;;;3206:73;;3215:6;;3235:43;;3271:6;3235:43;:35;:43;:::i;:::-;3206:8;:73::i;:::-;-1:-1:-1;3296:4:10;3055:252;;;;;:::o;3702:203::-;3807:10;3782:4;3828:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;3828:32:10;;;;;;;;;;3782:4;;3798:79;;3819:7;;3828:48;;3865:10;3828:48;:36;:48;:::i;1661:108::-;-1:-1:-1;;;;;1744:18:10;1718:7;1744:18;;;;;;;;;;;;1661:108::o;4392:213::-;4502:10;4477:4;4523:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;4523:32:10;;;;;;;;;;4477:4;;4493:84;;4514:7;;4523:53;;4560:15;4523:53;:36;:53;:::i;1972:153::-;2041:4;2057:40;2067:10;2079:9;2090:6;2057:9;:40::i;2183:132::-;-1:-1:-1;;;;;2281:18:10;;;2255:7;2281:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2183:132::o;7117:329::-;-1:-1:-1;;;;;7209:19:10;;;;7201:68;;;;-1:-1:-1;;;;;7201:68:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7287:21:10;;;;7279:68;;;;-1:-1:-1;;;;;7279:68:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7358:18:10;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:35;;;7408:31;;;;;;;;;;;;;;;;;7117:329;;;:::o;5079:422::-;-1:-1:-1;;;;;5176:20:10;;;;5168:70;;;;-1:-1:-1;;;;;5168:70:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5256:23:10;;;;5248:71;;;;-1:-1:-1;;;;;5248:71:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5350:17:10;;:9;:17;;;;;;;;;;;:29;;5372:6;5350:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;5330:17:10;;;:9;:17;;;;;;;;;;;:49;;;;5412:20;;;;;;;:32;;5437:6;5412:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5389:20:10;;;:9;:20;;;;;;;;;;;;:55;;;;5459:35;;;;;;;5389:20;;5459:35;;;;;;;;;;;;;5079:422;;;:::o;1274:179:9:-;1332:7;1359:6;;;;1351:49;;;;;-1:-1:-1;;;;;1351:49:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:9;;;1274:179::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:9:o",
|
||
|
"source": "pragma solidity ^0.5.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the `IERC20` interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using `_mint`.\n * For a generic mechanism see `ERC20Mintable`.\n *\n * *For a detailed writeup see our guide [How to implement supply\n * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an `Approval` event is emitted on calls to `transferFrom`.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard `decreaseAllowance` and `increaseAllowance`\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See `IERC20.approve`.\n */\ncontract ERC20 is IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n /**\n * @dev See `IERC20.totalSupply`.\n */\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See `IERC20.balanceOf`.\n */\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See `IERC20.transfer`.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n /**\n * @dev See `IERC20.allowance`.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See `IERC20.approve`.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev See `IERC20.transferFrom`.\n *\n * Emits an `Approval` event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of `ERC20`;\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `value`.\n * - the caller must have allowance for `sender`'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to `approve` that can be used as a mitigation for\n * problems described in `IERC20.approve`.\n *\n * Emits an `Approval` event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowan
|
||
|
"sourcePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
|
||
|
"ast": {
|
||
|
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
|
||
|
"exportedSymbols": {
|
||
|
"ERC20": [
|
||
|
3520
|
||
|
]
|
||
|
},
|
||
|
"id": 3521,
|
||
|
"nodeType": "SourceUnit",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 3125,
|
||
|
"literals": [
|
||
|
"solidity",
|
||
|
"^",
|
||
|
"0.5",
|
||
|
".0"
|
||
|
],
|
||
|
"nodeType": "PragmaDirective",
|
||
|
"src": "0:23:10"
|
||
|
},
|
||
|
{
|
||
|
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
|
||
|
"file": "./IERC20.sol",
|
||
|
"id": 3126,
|
||
|
"nodeType": "ImportDirective",
|
||
|
"scope": 3521,
|
||
|
"sourceUnit": 3648,
|
||
|
"src": "25:22:10",
|
||
|
"symbolAliases": [],
|
||
|
"unitAlias": ""
|
||
|
},
|
||
|
{
|
||
|
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
|
||
|
"file": "../../math/SafeMath.sol",
|
||
|
"id": 3127,
|
||
|
"nodeType": "ImportDirective",
|
||
|
"scope": 3521,
|
||
|
"sourceUnit": 3124,
|
||
|
"src": "48:33:10",
|
||
|
"symbolAliases": [],
|
||
|
"unitAlias": ""
|
||
|
},
|
||
|
{
|
||
|
"baseContracts": [
|
||
|
{
|
||
|
"arguments": null,
|
||
|
"baseName": {
|
||
|
"contractScope": null,
|
||
|
"id": 3128,
|
||
|
"name": "IERC20",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 3647,
|
||
|
"src": "1250:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_IERC20_$3647",
|
||
|
"typeString": "contract IERC20"
|
||
|
}
|
||
|
},
|
||
|
"id": 3129,
|
||
|
"nodeType": "InheritanceSpecifier",
|
||
|
"src": "1250:6:10"
|
||
|
}
|
||
|
],
|
||
|
"contractDependencies": [
|
||
|
3647
|
||
|
],
|
||
|
"contractKind": "contract",
|
||
|
"documentation": "@dev Implementation of the `IERC20` interface.\n * This implementation is agnostic to the way tokens are created. This means\nthat a supply mechanism has to be added in a derived contract using `_mint`.\nFor a generic mechanism see `ERC20Mintable`.\n * *For a detailed writeup see our guide [How to implement supply\nmechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*\n * We have followed general OpenZeppelin guidelines: functions revert instead\nof returning `false` on failure. This behavior is nonetheless conventional\nand does not conflict with the expectations of ERC20 applications.\n * Additionally, an `Approval` event is emitted on calls to `transferFrom`.\nThis allows applications to reconstruct the allowance for all accounts just\nby listening to said events. Other implementations of the EIP may not emit\nthese events, as it isn't required by the specification.\n * Finally, the non-standard `decreaseAllowance` and `increaseAllowance`\nfunctions have been added to mitigate the well-known issues around setting\nallowances. See `IERC20.approve`.",
|
||
|
"fullyImplemented": true,
|
||
|
"id": 3520,
|
||
|
"linearizedBaseContracts": [
|
||
|
3520,
|
||
|
3647
|
||
|
],
|
||
|
"name": "ERC20",
|
||
|
"nodeType": "ContractDefinition",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 3132,
|
||
|
"libraryName": {
|
||
|
"contractScope": null,
|
||
|
"id": 3130,
|
||
|
"name": "SafeMath",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 3123,
|
||
|
"src": "1269:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_SafeMath_$3123",
|
||
|
"typeString": "library SafeMath"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "UsingForDirective",
|
||
|
"src": "1263:27:10",
|
||
|
"typeName": {
|
||
|
"id": 3131,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1282:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3136,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3520,
|
||
|
"src": "1296:46:10",
|
||
|
"stateVariable": true,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3135,
|
||
|
"keyType": {
|
||
|
"id": 3133,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1305:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Mapping",
|
||
|
"src": "1296:28:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
},
|
||
|
"valueType": {
|
||
|
"id": 3134,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1316:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "private"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3142,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3520,
|
||
|
"src": "1349:69:10",
|
||
|
"stateVariable": true,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3141,
|
||
|
"keyType": {
|
||
|
"id": 3137,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1358:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Mapping",
|
||
|
"src": "1349:49:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
},
|
||
|
"valueType": {
|
||
|
"id": 3140,
|
||
|
"keyType": {
|
||
|
"id": 3138,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1378:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Mapping",
|
||
|
"src": "1369:28:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
},
|
||
|
"valueType": {
|
||
|
"id": 3139,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1389:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "private"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3144,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3520,
|
||
|
"src": "1425:28:10",
|
||
|
"stateVariable": true,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3143,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1425:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "private"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3151,
|
||
|
"nodeType": "Block",
|
||
|
"src": "1567:36:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3149,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "1584:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 3148,
|
||
|
"id": 3150,
|
||
|
"nodeType": "Return",
|
||
|
"src": "1577:19:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.totalSupply`.",
|
||
|
"id": 3152,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "totalSupply",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3145,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "1534:2:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3148,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3147,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3152,
|
||
|
"src": "1558:7:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3146,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1558:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1557:9:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "1514:89:10",
|
||
|
"stateMutability": "view",
|
||
|
"superFunction": 3585,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3163,
|
||
|
"nodeType": "Block",
|
||
|
"src": "1727:42:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3159,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "1744:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3161,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3160,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3154,
|
||
|
"src": "1754:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "1744:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 3158,
|
||
|
"id": 3162,
|
||
|
"nodeType": "Return",
|
||
|
"src": "1737:25:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.balanceOf`.",
|
||
|
"id": 3164,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "balanceOf",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3155,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3154,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3164,
|
||
|
"src": "1680:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3153,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1680:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1679:17:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3158,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3157,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3164,
|
||
|
"src": "1718:7:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3156,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1718:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1717:9:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "1661:108:10",
|
||
|
"stateMutability": "view",
|
||
|
"superFunction": 3592,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3182,
|
||
|
"nodeType": "Block",
|
||
|
"src": "2047:78:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3174,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "2067:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3175,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "2067:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3176,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3166,
|
||
|
"src": "2079:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3177,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3168,
|
||
|
"src": "2090:6:10",
|
||
|
"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": 3173,
|
||
|
"name": "_transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3363,
|
||
|
"src": "2057:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3178,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "2057:40:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3179,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "2057:40:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3180,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "2114:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3172,
|
||
|
"id": 3181,
|
||
|
"nodeType": "Return",
|
||
|
"src": "2107:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.transfer`.\n * Requirements:\n * - `recipient` cannot be the zero address.\n- the caller must have a balance of at least `amount`.",
|
||
|
"id": 3183,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "transfer",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3169,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3166,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3183,
|
||
|
"src": "1990:17:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3165,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1990:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3168,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3183,
|
||
|
"src": "2009:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3167,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2009:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1989:35:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3172,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3171,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3183,
|
||
|
"src": "2041:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3170,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2041:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2040:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "1972:153:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": 3601,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3198,
|
||
|
"nodeType": "Block",
|
||
|
"src": "2264:51:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3192,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "2281:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3194,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3193,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3185,
|
||
|
"src": "2293:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "2281:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3196,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3195,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3187,
|
||
|
"src": "2300:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "2281:27:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 3191,
|
||
|
"id": 3197,
|
||
|
"nodeType": "Return",
|
||
|
"src": "2274:34:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.allowance`.",
|
||
|
"id": 3199,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "allowance",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3188,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3185,
|
||
|
"name": "owner",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3199,
|
||
|
"src": "2202:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3184,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2202:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3187,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3199,
|
||
|
"src": "2217:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3186,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2217:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2201:32:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3191,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3190,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3199,
|
||
|
"src": "2255:7:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3189,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2255:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2254:9:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "2183:132:10",
|
||
|
"stateMutability": "view",
|
||
|
"superFunction": 3610,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3217,
|
||
|
"nodeType": "Block",
|
||
|
"src": "2524:74:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3209,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "2543:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3210,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "2543:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3211,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3201,
|
||
|
"src": "2555:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3212,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3203,
|
||
|
"src": "2564:5:10",
|
||
|
"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": 3208,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "2534:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3213,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "2534:36:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3214,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "2534:36:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3215,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "2587:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3207,
|
||
|
"id": 3216,
|
||
|
"nodeType": "Return",
|
||
|
"src": "2580:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.approve`.\n * Requirements:\n * - `spender` cannot be the zero address.",
|
||
|
"id": 3218,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "approve",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3204,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3201,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3218,
|
||
|
"src": "2470:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3200,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2470:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3203,
|
||
|
"name": "value",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3218,
|
||
|
"src": "2487:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3202,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2487:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2469:32:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3207,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3206,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3218,
|
||
|
"src": "2518:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3205,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2518:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2517:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "2453:145:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": 3619,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3252,
|
||
|
"nodeType": "Block",
|
||
|
"src": "3150:157:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3230,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3220,
|
||
|
"src": "3170:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3231,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3222,
|
||
|
"src": "3178:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3232,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3224,
|
||
|
"src": "3189:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3229,
|
||
|
"name": "_transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3363,
|
||
|
"src": "3160:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3233,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3160:36:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3234,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "3160:36:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3236,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3220,
|
||
|
"src": "3215:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3237,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3223:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3238,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3223:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3246,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3224,
|
||
|
"src": "3271:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3239,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "3235:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3241,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3240,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3220,
|
||
|
"src": "3247:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3235:19:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3244,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3242,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3255:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3243,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3255:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3235:31:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3245,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "3235:35:10",
|
||
|
"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": 3247,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3235:43:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3235,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "3206:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3248,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3206:73:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3249,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "3206:73:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3250,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "3296:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3228,
|
||
|
"id": 3251,
|
||
|
"nodeType": "Return",
|
||
|
"src": "3289:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.transferFrom`.\n * Emits an `Approval` event indicating the updated allowance. This is not\nrequired by the EIP. See the note at the beginning of `ERC20`;\n * Requirements:\n- `sender` and `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `value`.\n- the caller must have allowance for `sender`'s tokens of at least\n`amount`.",
|
||
|
"id": 3253,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "transferFrom",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3225,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3220,
|
||
|
"name": "sender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3077:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3219,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3077:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3222,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3093:17:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3221,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3093:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3224,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3112:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3223,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3112:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3076:51:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3228,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3227,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3144:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3226,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3144:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3143:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "3055:252:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": 3630,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3279,
|
||
|
"nodeType": "Block",
|
||
|
"src": "3788:117:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3263,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3807:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3264,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3807:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3265,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3255,
|
||
|
"src": "3819:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3273,
|
||
|
"name": "addedValue",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3257,
|
||
|
"src": "3865:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3266,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "3828:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3269,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3267,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3840:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3268,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3840:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3828:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3271,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3270,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3255,
|
||
|
"src": "3852:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3828:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3272,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "3828:36:10",
|
||
|
"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": 3274,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3828:48:10",
|
||
|
"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": 3262,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "3798:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3275,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3798:79:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3276,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "3798:79:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3277,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "3894:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3261,
|
||
|
"id": 3278,
|
||
|
"nodeType": "Return",
|
||
|
"src": "3887:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Atomically increases the allowance granted to `spender` by the caller.\n * This is an alternative to `approve` that can be used as a mitigation for\nproblems described in `IERC20.approve`.\n * Emits an `Approval` event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.",
|
||
|
"id": 3280,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "increaseAllowance",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3258,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3255,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3280,
|
||
|
"src": "3729:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3254,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3729:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3257,
|
||
|
"name": "addedValue",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3280,
|
||
|
"src": "3746:18:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3256,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3746:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3728:37:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3261,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3260,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3280,
|
||
|
"src": "3782:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3259,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3782:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3781:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "3702:203:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3306,
|
||
|
"nodeType": "Block",
|
||
|
"src": "4483:122:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3290,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "4502:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3291,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "4502:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3292,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3282,
|
||
|
"src": "4514:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3300,
|
||
|
"name": "subtractedValue",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3284,
|
||
|
"src": "4560:15:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3293,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "4523:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3296,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3294,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "4535:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3295,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "4535:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "4523:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3298,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3297,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3282,
|
||
|
"src": "4547:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "4523:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3299,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "4523:36:10",
|
||
|
"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": 3301,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "4523:53:10",
|
||
|
"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": 3289,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "4493:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3302,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "4493:84:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3303,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "4493:84:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3304,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "4594:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3288,
|
||
|
"id": 3305,
|
||
|
"nodeType": "Return",
|
||
|
"src": "4587:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an alternative to `approve` that can be used as a mitigation for\nproblems described in `IERC20.approve`.\n * Emits an `Approval` event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.\n- `spender` must have allowance for the caller of at least\n`subtractedValue`.",
|
||
|
"id": 3307,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "decreaseAllowance",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3285,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3282,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3307,
|
||
|
"src": "4419:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3281,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "4419:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3284,
|
||
|
"name": "subtractedValue",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3307,
|
||
|
"src": "4436:23:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3283,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "4436:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "4418:42:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3288,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3287,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3307,
|
||
|
"src": "4477:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3286,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "4477:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "4476:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "4392:213:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3362,
|
||
|
"nodeType": "Block",
|
||
|
"src": "5158:343:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3321,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3317,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5176:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3319,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5194:1:10",
|
||
|
"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": 3318,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "5186:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3320,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5186:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "5176:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373",
|
||
|
"id": 3322,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5198:39:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea",
|
||
|
"typeString": "literal_string \"ERC20: transfer from the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: transfer from the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea",
|
||
|
"typeString": "literal_string \"ERC20: transfer from the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3316,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "5168:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3323,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5168:70:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3324,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5168:70:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3330,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3326,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5256:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3328,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5277:1:10",
|
||
|
"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": 3327,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "5269:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3329,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5269:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "5256:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373",
|
||
|
"id": 3331,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5281:37:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f",
|
||
|
"typeString": "literal_string \"ERC20: transfer to the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: transfer to the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f",
|
||
|
"typeString": "literal_string \"ERC20: transfer to the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3325,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "5248:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3332,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5248:71:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3333,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5248:71:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3343,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3334,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5330:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3336,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3335,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5340:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5330:17:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3341,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3313,
|
||
|
"src": "5372:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3337,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5350:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3339,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3338,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5360:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5350:17:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3340,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "5350:21:10",
|
||
|
"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": 3342,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5350:29:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5330:49:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3344,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5330:49:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3354,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3345,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5389:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3347,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3346,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5399:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5389:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3352,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3313,
|
||
|
"src": "5437:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3348,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5412:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3350,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3349,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5422:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5412:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3351,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "5412:24:10",
|
||
|
"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": 3353,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5412:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5389:55:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3355,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5389:55:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3357,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5468:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3358,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5476:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3359,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3313,
|
||
|
"src": "5487:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3356,
|
||
|
"name": "Transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3638,
|
||
|
"src": "5459:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3360,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5459:35:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3361,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "5454:40:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Moves tokens `amount` from `sender` to `recipient`.\n * This is internal function is equivalent to `transfer`, and can be used to\ne.g. implement automatic token fees, slashing mechanisms, etc.\n * Emits a `Transfer` event.\n * Requirements:\n * - `sender` cannot be the zero address.\n- `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.",
|
||
|
"id": 3363,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_transfer",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3314,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3309,
|
||
|
"name": "sender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3363,
|
||
|
"src": "5098:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3308,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5098:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3311,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3363,
|
||
|
"src": "5114:17:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3310,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5114:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3313,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3363,
|
||
|
"src": "5133:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3312,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5133:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "5097:51:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3315,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "5158:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "5079:422:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3405,
|
||
|
"nodeType": "Block",
|
||
|
"src": "5828:245:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3375,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3371,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "5846:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3373,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5865:1:10",
|
||
|
"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": 3372,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "5857:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3374,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5857:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "5846:21:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373",
|
||
|
"id": 3376,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5869:33:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e",
|
||
|
"typeString": "literal_string \"ERC20: mint to the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: mint to the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e",
|
||
|
"typeString": "literal_string \"ERC20: mint to the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3370,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "5838:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3377,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5838:65:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3378,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5838:65:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3384,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3379,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "5914:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3382,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3367,
|
||
|
"src": "5946:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3380,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "5929:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3381,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "5929:16:10",
|
||
|
"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": 3383,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5929:24:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5914:39:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3385,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5914:39:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3395,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3386,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5963:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3388,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3387,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "5973:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5963:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3393,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3367,
|
||
|
"src": "6007:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3389,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5984:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3391,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3390,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "5994:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5984:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3392,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "5984:22:10",
|
||
|
"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": 3394,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5984:30:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5963:51:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3396,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5963:51:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3399,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6046:1:10",
|
||
|
"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": 3398,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "6038:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3400,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6038:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3401,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "6050:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3402,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3367,
|
||
|
"src": "6059:6:10",
|
||
|
"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": 3397,
|
||
|
"name": "Transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3638,
|
||
|
"src": "6029:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3403,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6029:37:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3404,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "6024:42:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Creates `amount` tokens and assigns them to `account`, increasing\nthe total supply.\n * Emits a `Transfer` event with `from` set to the zero address.\n * Requirements\n * - `to` cannot be the zero address.",
|
||
|
"id": 3406,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_mint",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3368,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3365,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3406,
|
||
|
"src": "5786:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3364,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5786:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3367,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3406,
|
||
|
"src": "5803:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3366,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5803:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "5785:33:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3369,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "5828:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "5771:302:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3448,
|
||
|
"nodeType": "Block",
|
||
|
"src": "6448:244:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3418,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3414,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6466:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3416,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6485:1:10",
|
||
|
"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": 3415,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "6477:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3417,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6477:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "6466:21:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373",
|
||
|
"id": 3419,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6489:35:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f",
|
||
|
"typeString": "literal_string \"ERC20: burn from the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: burn from the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f",
|
||
|
"typeString": "literal_string \"ERC20: burn from the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3413,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "6458:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3420,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6458:67:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3421,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "6458:67:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3427,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3422,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "6536:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3425,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3410,
|
||
|
"src": "6568:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3423,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "6551:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3424,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "6551:16:10",
|
||
|
"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": 3426,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6551:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "6536:38:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3428,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "6536:38:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3438,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3429,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "6584:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3431,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3430,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6594:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "6584:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3436,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3410,
|
||
|
"src": "6628:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3432,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "6605:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3434,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3433,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6615:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "6605:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3435,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "6605:22:10",
|
||
|
"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": 3437,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6605:29:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "6584:50:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3439,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "6584:50:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3441,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6658:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3443,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6675:1:10",
|
||
|
"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": 3442,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "6667:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3444,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6667:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3445,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3410,
|
||
|
"src": "6679:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3440,
|
||
|
"name": "Transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3638,
|
||
|
"src": "6649:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3446,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6649:36:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3447,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "6644:41:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Destoys `amount` tokens from `account`, reducing the\ntotal supply.\n * Emits a `Transfer` event with `to` set to the zero address.\n * Requirements\n * - `account` cannot be the zero address.\n- `account` must have at least `amount` tokens.",
|
||
|
"id": 3449,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_burn",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3411,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3408,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3449,
|
||
|
"src": "6407:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3407,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "6407:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3410,
|
||
|
"name": "value",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3449,
|
||
|
"src": "6424:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3409,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "6424:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "6406:32:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3412,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "6448:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "6392:300:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3490,
|
||
|
"nodeType": "Block",
|
||
|
"src": "7191:255:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3463,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3459,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3451,
|
||
|
"src": "7209:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3461,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7226:1:10",
|
||
|
"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": 3460,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "7218:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3462,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7218:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "7209:19:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373",
|
||
|
"id": 3464,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7230:38:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208",
|
||
|
"typeString": "literal_string \"ERC20: approve from the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: approve from the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208",
|
||
|
"typeString": "literal_string \"ERC20: approve from the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3458,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "7201:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3465,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7201:68:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3466,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7201:68:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3472,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3468,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3453,
|
||
|
"src": "7287:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3470,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7306:1:10",
|
||
|
"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": 3469,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "7298:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3471,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7298:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "7287:21:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373",
|
||
|
"id": 3473,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7310:36:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029",
|
||
|
"typeString": "literal_string \"ERC20: approve to the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: approve to the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029",
|
||
|
"typeString": "literal_string \"ERC20: approve to the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3467,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "7279:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3474,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7279:68:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3475,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7279:68:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3482,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3476,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "7358:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3479,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3477,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3451,
|
||
|
"src": "7370:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7358:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3480,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3478,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3453,
|
||
|
"src": "7377:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7358:27:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3481,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3455,
|
||
|
"src": "7388:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "7358:35:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3483,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7358:35:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3485,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3451,
|
||
|
"src": "7417:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3486,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3453,
|
||
|
"src": "7424:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3487,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3455,
|
||
|
"src": "7433:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3484,
|
||
|
"name": "Approval",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3646,
|
||
|
"src": "7408:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3488,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7408:31:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3489,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "7403:36:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n * This is internal function is equivalent to `approve`, and can be used to\ne.g. set automatic allowances for certain subsystems, etc.\n * Emits an `Approval` event.\n * Requirements:\n * - `owner` cannot be the zero address.\n- `spender` cannot be the zero address.",
|
||
|
"id": 3491,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_approve",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3456,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3451,
|
||
|
"name": "owner",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3491,
|
||
|
"src": "7135:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3450,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7135:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3453,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3491,
|
||
|
"src": "7150:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3452,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7150:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3455,
|
||
|
"name": "value",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3491,
|
||
|
"src": "7167:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3454,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7167:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "7134:47:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3457,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "7191:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "7117:329:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3518,
|
||
|
"nodeType": "Block",
|
||
|
"src": "7684:124:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3499,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3493,
|
||
|
"src": "7700:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3500,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3495,
|
||
|
"src": "7709:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3498,
|
||
|
"name": "_burn",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3449,
|
||
|
"src": "7694:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3501,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7694:22:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3502,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7694:22:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3504,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3493,
|
||
|
"src": "7735:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3505,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "7744:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3506,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "7744:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3514,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3495,
|
||
|
"src": "7793:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3507,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "7756:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3509,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3508,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3493,
|
||
|
"src": "7768:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7756:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3512,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3510,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "7777:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3511,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "7777:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7756:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3513,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "7756:36:10",
|
||
|
"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": 3515,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7756:44:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3503,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "7726:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3516,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7726:75:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3517,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7726:75:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Destoys `amount` tokens from `account`.`amount` is then deducted\nfrom the caller's allowance.\n * See `_burn` and `_approve`.",
|
||
|
"id": 3519,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_burnFrom",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3496,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3493,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3519,
|
||
|
"src": "7642:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3492,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7642:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3495,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3519,
|
||
|
"src": "7659:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3494,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7659:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "7641:33:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3497,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "7684:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "7623:185:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"scope": 3521,
|
||
|
"src": "1232:6578:10"
|
||
|
}
|
||
|
],
|
||
|
"src": "0:7811:10"
|
||
|
},
|
||
|
"legacyAST": {
|
||
|
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
|
||
|
"exportedSymbols": {
|
||
|
"ERC20": [
|
||
|
3520
|
||
|
]
|
||
|
},
|
||
|
"id": 3521,
|
||
|
"nodeType": "SourceUnit",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 3125,
|
||
|
"literals": [
|
||
|
"solidity",
|
||
|
"^",
|
||
|
"0.5",
|
||
|
".0"
|
||
|
],
|
||
|
"nodeType": "PragmaDirective",
|
||
|
"src": "0:23:10"
|
||
|
},
|
||
|
{
|
||
|
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
|
||
|
"file": "./IERC20.sol",
|
||
|
"id": 3126,
|
||
|
"nodeType": "ImportDirective",
|
||
|
"scope": 3521,
|
||
|
"sourceUnit": 3648,
|
||
|
"src": "25:22:10",
|
||
|
"symbolAliases": [],
|
||
|
"unitAlias": ""
|
||
|
},
|
||
|
{
|
||
|
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
|
||
|
"file": "../../math/SafeMath.sol",
|
||
|
"id": 3127,
|
||
|
"nodeType": "ImportDirective",
|
||
|
"scope": 3521,
|
||
|
"sourceUnit": 3124,
|
||
|
"src": "48:33:10",
|
||
|
"symbolAliases": [],
|
||
|
"unitAlias": ""
|
||
|
},
|
||
|
{
|
||
|
"baseContracts": [
|
||
|
{
|
||
|
"arguments": null,
|
||
|
"baseName": {
|
||
|
"contractScope": null,
|
||
|
"id": 3128,
|
||
|
"name": "IERC20",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 3647,
|
||
|
"src": "1250:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_IERC20_$3647",
|
||
|
"typeString": "contract IERC20"
|
||
|
}
|
||
|
},
|
||
|
"id": 3129,
|
||
|
"nodeType": "InheritanceSpecifier",
|
||
|
"src": "1250:6:10"
|
||
|
}
|
||
|
],
|
||
|
"contractDependencies": [
|
||
|
3647
|
||
|
],
|
||
|
"contractKind": "contract",
|
||
|
"documentation": "@dev Implementation of the `IERC20` interface.\n * This implementation is agnostic to the way tokens are created. This means\nthat a supply mechanism has to be added in a derived contract using `_mint`.\nFor a generic mechanism see `ERC20Mintable`.\n * *For a detailed writeup see our guide [How to implement supply\nmechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*\n * We have followed general OpenZeppelin guidelines: functions revert instead\nof returning `false` on failure. This behavior is nonetheless conventional\nand does not conflict with the expectations of ERC20 applications.\n * Additionally, an `Approval` event is emitted on calls to `transferFrom`.\nThis allows applications to reconstruct the allowance for all accounts just\nby listening to said events. Other implementations of the EIP may not emit\nthese events, as it isn't required by the specification.\n * Finally, the non-standard `decreaseAllowance` and `increaseAllowance`\nfunctions have been added to mitigate the well-known issues around setting\nallowances. See `IERC20.approve`.",
|
||
|
"fullyImplemented": true,
|
||
|
"id": 3520,
|
||
|
"linearizedBaseContracts": [
|
||
|
3520,
|
||
|
3647
|
||
|
],
|
||
|
"name": "ERC20",
|
||
|
"nodeType": "ContractDefinition",
|
||
|
"nodes": [
|
||
|
{
|
||
|
"id": 3132,
|
||
|
"libraryName": {
|
||
|
"contractScope": null,
|
||
|
"id": 3130,
|
||
|
"name": "SafeMath",
|
||
|
"nodeType": "UserDefinedTypeName",
|
||
|
"referencedDeclaration": 3123,
|
||
|
"src": "1269:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_contract$_SafeMath_$3123",
|
||
|
"typeString": "library SafeMath"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "UsingForDirective",
|
||
|
"src": "1263:27:10",
|
||
|
"typeName": {
|
||
|
"id": 3131,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1282:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3136,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3520,
|
||
|
"src": "1296:46:10",
|
||
|
"stateVariable": true,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3135,
|
||
|
"keyType": {
|
||
|
"id": 3133,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1305:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Mapping",
|
||
|
"src": "1296:28:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
},
|
||
|
"valueType": {
|
||
|
"id": 3134,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1316:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "private"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3142,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3520,
|
||
|
"src": "1349:69:10",
|
||
|
"stateVariable": true,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3141,
|
||
|
"keyType": {
|
||
|
"id": 3137,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1358:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Mapping",
|
||
|
"src": "1349:49:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
},
|
||
|
"valueType": {
|
||
|
"id": 3140,
|
||
|
"keyType": {
|
||
|
"id": 3138,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1378:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Mapping",
|
||
|
"src": "1369:28:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
},
|
||
|
"valueType": {
|
||
|
"id": 3139,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1389:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "private"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3144,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3520,
|
||
|
"src": "1425:28:10",
|
||
|
"stateVariable": true,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3143,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1425:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "private"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3151,
|
||
|
"nodeType": "Block",
|
||
|
"src": "1567:36:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3149,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "1584:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 3148,
|
||
|
"id": 3150,
|
||
|
"nodeType": "Return",
|
||
|
"src": "1577:19:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.totalSupply`.",
|
||
|
"id": 3152,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "totalSupply",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3145,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "1534:2:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3148,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3147,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3152,
|
||
|
"src": "1558:7:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3146,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1558:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1557:9:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "1514:89:10",
|
||
|
"stateMutability": "view",
|
||
|
"superFunction": 3585,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3163,
|
||
|
"nodeType": "Block",
|
||
|
"src": "1727:42:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3159,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "1744:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3161,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3160,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3154,
|
||
|
"src": "1754:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "1744:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 3158,
|
||
|
"id": 3162,
|
||
|
"nodeType": "Return",
|
||
|
"src": "1737:25:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.balanceOf`.",
|
||
|
"id": 3164,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "balanceOf",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3155,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3154,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3164,
|
||
|
"src": "1680:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3153,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1680:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1679:17:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3158,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3157,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3164,
|
||
|
"src": "1718:7:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3156,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1718:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1717:9:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "1661:108:10",
|
||
|
"stateMutability": "view",
|
||
|
"superFunction": 3592,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3182,
|
||
|
"nodeType": "Block",
|
||
|
"src": "2047:78:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3174,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "2067:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3175,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "2067:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3176,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3166,
|
||
|
"src": "2079:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3177,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3168,
|
||
|
"src": "2090:6:10",
|
||
|
"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": 3173,
|
||
|
"name": "_transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3363,
|
||
|
"src": "2057:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3178,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "2057:40:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3179,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "2057:40:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3180,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "2114:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3172,
|
||
|
"id": 3181,
|
||
|
"nodeType": "Return",
|
||
|
"src": "2107:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.transfer`.\n * Requirements:\n * - `recipient` cannot be the zero address.\n- the caller must have a balance of at least `amount`.",
|
||
|
"id": 3183,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "transfer",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3169,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3166,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3183,
|
||
|
"src": "1990:17:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3165,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "1990:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3168,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3183,
|
||
|
"src": "2009:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3167,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2009:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "1989:35:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3172,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3171,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3183,
|
||
|
"src": "2041:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3170,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2041:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2040:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "1972:153:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": 3601,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3198,
|
||
|
"nodeType": "Block",
|
||
|
"src": "2264:51:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3192,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "2281:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3194,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3193,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3185,
|
||
|
"src": "2293:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "2281:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3196,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3195,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3187,
|
||
|
"src": "2300:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "2281:27:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"functionReturnParameters": 3191,
|
||
|
"id": 3197,
|
||
|
"nodeType": "Return",
|
||
|
"src": "2274:34:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.allowance`.",
|
||
|
"id": 3199,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "allowance",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3188,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3185,
|
||
|
"name": "owner",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3199,
|
||
|
"src": "2202:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3184,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2202:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3187,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3199,
|
||
|
"src": "2217:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3186,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2217:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2201:32:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3191,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3190,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3199,
|
||
|
"src": "2255:7:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3189,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2255:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2254:9:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "2183:132:10",
|
||
|
"stateMutability": "view",
|
||
|
"superFunction": 3610,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3217,
|
||
|
"nodeType": "Block",
|
||
|
"src": "2524:74:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3209,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "2543:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3210,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "2543:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3211,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3201,
|
||
|
"src": "2555:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3212,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3203,
|
||
|
"src": "2564:5:10",
|
||
|
"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": 3208,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "2534:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3213,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "2534:36:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3214,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "2534:36:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3215,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "2587:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3207,
|
||
|
"id": 3216,
|
||
|
"nodeType": "Return",
|
||
|
"src": "2580:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.approve`.\n * Requirements:\n * - `spender` cannot be the zero address.",
|
||
|
"id": 3218,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "approve",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3204,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3201,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3218,
|
||
|
"src": "2470:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3200,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2470:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3203,
|
||
|
"name": "value",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3218,
|
||
|
"src": "2487:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3202,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2487:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2469:32:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3207,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3206,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3218,
|
||
|
"src": "2518:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3205,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "2518:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "2517:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "2453:145:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": 3619,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3252,
|
||
|
"nodeType": "Block",
|
||
|
"src": "3150:157:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3230,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3220,
|
||
|
"src": "3170:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3231,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3222,
|
||
|
"src": "3178:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3232,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3224,
|
||
|
"src": "3189:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3229,
|
||
|
"name": "_transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3363,
|
||
|
"src": "3160:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3233,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3160:36:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3234,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "3160:36:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3236,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3220,
|
||
|
"src": "3215:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3237,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3223:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3238,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3223:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3246,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3224,
|
||
|
"src": "3271:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3239,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "3235:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3241,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3240,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3220,
|
||
|
"src": "3247:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3235:19:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3244,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3242,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3255:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3243,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3255:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3235:31:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3245,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "3235:35:10",
|
||
|
"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": 3247,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3235:43:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3235,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "3206:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3248,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3206:73:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3249,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "3206:73:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3250,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "3296:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3228,
|
||
|
"id": 3251,
|
||
|
"nodeType": "Return",
|
||
|
"src": "3289:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev See `IERC20.transferFrom`.\n * Emits an `Approval` event indicating the updated allowance. This is not\nrequired by the EIP. See the note at the beginning of `ERC20`;\n * Requirements:\n- `sender` and `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `value`.\n- the caller must have allowance for `sender`'s tokens of at least\n`amount`.",
|
||
|
"id": 3253,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "transferFrom",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3225,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3220,
|
||
|
"name": "sender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3077:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3219,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3077:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3222,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3093:17:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3221,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3093:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3224,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3112:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3223,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3112:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3076:51:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3228,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3227,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3253,
|
||
|
"src": "3144:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3226,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3144:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3143:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "3055:252:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": 3630,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3279,
|
||
|
"nodeType": "Block",
|
||
|
"src": "3788:117:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3263,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3807:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3264,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3807:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3265,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3255,
|
||
|
"src": "3819:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3273,
|
||
|
"name": "addedValue",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3257,
|
||
|
"src": "3865:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3266,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "3828:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3269,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3267,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "3840:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3268,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "3840:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3828:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3271,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3270,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3255,
|
||
|
"src": "3852:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "3828:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3272,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "3828:36:10",
|
||
|
"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": 3274,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3828:48:10",
|
||
|
"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": 3262,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "3798:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3275,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "3798:79:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3276,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "3798:79:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3277,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "3894:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3261,
|
||
|
"id": 3278,
|
||
|
"nodeType": "Return",
|
||
|
"src": "3887:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Atomically increases the allowance granted to `spender` by the caller.\n * This is an alternative to `approve` that can be used as a mitigation for\nproblems described in `IERC20.approve`.\n * Emits an `Approval` event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.",
|
||
|
"id": 3280,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "increaseAllowance",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3258,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3255,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3280,
|
||
|
"src": "3729:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3254,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3729:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3257,
|
||
|
"name": "addedValue",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3280,
|
||
|
"src": "3746:18:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3256,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3746:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3728:37:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3261,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3260,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3280,
|
||
|
"src": "3782:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3259,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "3782:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "3781:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "3702:203:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3306,
|
||
|
"nodeType": "Block",
|
||
|
"src": "4483:122:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3290,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "4502:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3291,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "4502:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3292,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3282,
|
||
|
"src": "4514:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3300,
|
||
|
"name": "subtractedValue",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3284,
|
||
|
"src": "4560:15:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3293,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "4523:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3296,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3294,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "4535:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3295,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "4535:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "4523:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3298,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3297,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3282,
|
||
|
"src": "4547:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "4523:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3299,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "4523:36:10",
|
||
|
"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": 3301,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "4523:53:10",
|
||
|
"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": 3289,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "4493:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3302,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "4493:84:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3303,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "4493:84:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "74727565",
|
||
|
"id": 3304,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "bool",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "4594:4:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"value": "true"
|
||
|
},
|
||
|
"functionReturnParameters": 3288,
|
||
|
"id": 3305,
|
||
|
"nodeType": "Return",
|
||
|
"src": "4587:11:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an alternative to `approve` that can be used as a mitigation for\nproblems described in `IERC20.approve`.\n * Emits an `Approval` event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.\n- `spender` must have allowance for the caller of at least\n`subtractedValue`.",
|
||
|
"id": 3307,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "decreaseAllowance",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3285,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3282,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3307,
|
||
|
"src": "4419:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3281,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "4419:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3284,
|
||
|
"name": "subtractedValue",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3307,
|
||
|
"src": "4436:23:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3283,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "4436:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "4418:42:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3288,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3287,
|
||
|
"name": "",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3307,
|
||
|
"src": "4477:4:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3286,
|
||
|
"name": "bool",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "4477:4:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "4476:6:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "4392:213:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "public"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3362,
|
||
|
"nodeType": "Block",
|
||
|
"src": "5158:343:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3321,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3317,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5176:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3319,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5194:1:10",
|
||
|
"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": 3318,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "5186:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3320,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5186:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "5176:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373",
|
||
|
"id": 3322,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5198:39:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea",
|
||
|
"typeString": "literal_string \"ERC20: transfer from the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: transfer from the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea",
|
||
|
"typeString": "literal_string \"ERC20: transfer from the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3316,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "5168:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3323,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5168:70:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3324,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5168:70:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3330,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3326,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5256:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3328,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5277:1:10",
|
||
|
"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": 3327,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "5269:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3329,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5269:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "5256:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373",
|
||
|
"id": 3331,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5281:37:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f",
|
||
|
"typeString": "literal_string \"ERC20: transfer to the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: transfer to the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f",
|
||
|
"typeString": "literal_string \"ERC20: transfer to the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3325,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "5248:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3332,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5248:71:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3333,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5248:71:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3343,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3334,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5330:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3336,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3335,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5340:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5330:17:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3341,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3313,
|
||
|
"src": "5372:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3337,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5350:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3339,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3338,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5360:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5350:17:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3340,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "5350:21:10",
|
||
|
"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": 3342,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5350:29:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5330:49:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3344,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5330:49:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3354,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3345,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5389:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3347,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3346,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5399:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5389:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3352,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3313,
|
||
|
"src": "5437:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3348,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5412:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3350,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3349,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5422:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5412:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3351,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "5412:24:10",
|
||
|
"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": 3353,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5412:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5389:55:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3355,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5389:55:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3357,
|
||
|
"name": "sender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3309,
|
||
|
"src": "5468:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3358,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3311,
|
||
|
"src": "5476:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3359,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3313,
|
||
|
"src": "5487:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3356,
|
||
|
"name": "Transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3638,
|
||
|
"src": "5459:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3360,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5459:35:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3361,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "5454:40:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Moves tokens `amount` from `sender` to `recipient`.\n * This is internal function is equivalent to `transfer`, and can be used to\ne.g. implement automatic token fees, slashing mechanisms, etc.\n * Emits a `Transfer` event.\n * Requirements:\n * - `sender` cannot be the zero address.\n- `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.",
|
||
|
"id": 3363,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_transfer",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3314,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3309,
|
||
|
"name": "sender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3363,
|
||
|
"src": "5098:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3308,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5098:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3311,
|
||
|
"name": "recipient",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3363,
|
||
|
"src": "5114:17:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3310,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5114:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3313,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3363,
|
||
|
"src": "5133:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3312,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5133:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "5097:51:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3315,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "5158:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "5079:422:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3405,
|
||
|
"nodeType": "Block",
|
||
|
"src": "5828:245:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3375,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3371,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "5846:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3373,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5865:1:10",
|
||
|
"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": 3372,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "5857:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3374,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5857:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "5846:21:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373",
|
||
|
"id": 3376,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "5869:33:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e",
|
||
|
"typeString": "literal_string \"ERC20: mint to the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: mint to the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e",
|
||
|
"typeString": "literal_string \"ERC20: mint to the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3370,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "5838:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3377,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5838:65:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3378,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5838:65:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3384,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3379,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "5914:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3382,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3367,
|
||
|
"src": "5946:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3380,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "5929:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3381,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "5929:16:10",
|
||
|
"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": 3383,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5929:24:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5914:39:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3385,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5914:39:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3395,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3386,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5963:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3388,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3387,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "5973:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5963:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3393,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3367,
|
||
|
"src": "6007:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3389,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "5984:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3391,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3390,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "5994:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "5984:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3392,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "add",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3017,
|
||
|
"src": "5984:22:10",
|
||
|
"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": 3394,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "5984:30:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "5963:51:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3396,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "5963:51:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3399,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6046:1:10",
|
||
|
"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": 3398,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "6038:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3400,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6038:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3401,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3365,
|
||
|
"src": "6050:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3402,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3367,
|
||
|
"src": "6059:6:10",
|
||
|
"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": 3397,
|
||
|
"name": "Transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3638,
|
||
|
"src": "6029:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3403,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6029:37:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3404,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "6024:42:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Creates `amount` tokens and assigns them to `account`, increasing\nthe total supply.\n * Emits a `Transfer` event with `from` set to the zero address.\n * Requirements\n * - `to` cannot be the zero address.",
|
||
|
"id": 3406,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_mint",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3368,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3365,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3406,
|
||
|
"src": "5786:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3364,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5786:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3367,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3406,
|
||
|
"src": "5803:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3366,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "5803:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "5785:33:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3369,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "5828:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "5771:302:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3448,
|
||
|
"nodeType": "Block",
|
||
|
"src": "6448:244:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3418,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3414,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6466:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3416,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6485:1:10",
|
||
|
"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": 3415,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "6477:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3417,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6477:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "6466:21:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373",
|
||
|
"id": 3419,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6489:35:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f",
|
||
|
"typeString": "literal_string \"ERC20: burn from the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: burn from the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f",
|
||
|
"typeString": "literal_string \"ERC20: burn from the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3413,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "6458:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3420,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6458:67:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3421,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "6458:67:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3427,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3422,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "6536:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3425,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3410,
|
||
|
"src": "6568:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3423,
|
||
|
"name": "_totalSupply",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3144,
|
||
|
"src": "6551:12:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3424,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "6551:16:10",
|
||
|
"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": 3426,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6551:23:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "6536:38:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3428,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "6536:38:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3438,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3429,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "6584:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3431,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3430,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6594:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "6584:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3436,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3410,
|
||
|
"src": "6628:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3432,
|
||
|
"name": "_balances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3136,
|
||
|
"src": "6605:9:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3434,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3433,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6615:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "6605:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3435,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "6605:22:10",
|
||
|
"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": 3437,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6605:29:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "6584:50:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3439,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "6584:50:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3441,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3408,
|
||
|
"src": "6658:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3443,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "6675:1:10",
|
||
|
"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": 3442,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "6667:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3444,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6667:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3445,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3410,
|
||
|
"src": "6679:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3440,
|
||
|
"name": "Transfer",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3638,
|
||
|
"src": "6649:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3446,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "6649:36:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3447,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "6644:41:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Destoys `amount` tokens from `account`, reducing the\ntotal supply.\n * Emits a `Transfer` event with `to` set to the zero address.\n * Requirements\n * - `account` cannot be the zero address.\n- `account` must have at least `amount` tokens.",
|
||
|
"id": 3449,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_burn",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3411,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3408,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3449,
|
||
|
"src": "6407:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3407,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "6407:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3410,
|
||
|
"name": "value",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3449,
|
||
|
"src": "6424:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3409,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "6424:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "6406:32:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3412,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "6448:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "6392:300:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3490,
|
||
|
"nodeType": "Block",
|
||
|
"src": "7191:255:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3463,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3459,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3451,
|
||
|
"src": "7209:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3461,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7226:1:10",
|
||
|
"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": 3460,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "7218:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3462,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7218:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "7209:19:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373",
|
||
|
"id": 3464,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7230:38:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208",
|
||
|
"typeString": "literal_string \"ERC20: approve from the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: approve from the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208",
|
||
|
"typeString": "literal_string \"ERC20: approve from the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3458,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "7201:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3465,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7201:68:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3466,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7201:68:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"commonType": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"id": 3472,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3468,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3453,
|
||
|
"src": "7287:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "BinaryOperation",
|
||
|
"operator": "!=",
|
||
|
"rightExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "30",
|
||
|
"id": 3470,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "number",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7306:1:10",
|
||
|
"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": 3469,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "ElementaryTypeNameExpression",
|
||
|
"src": "7298:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_type$_t_address_$",
|
||
|
"typeString": "type(address)"
|
||
|
},
|
||
|
"typeName": "address"
|
||
|
},
|
||
|
"id": 3471,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "typeConversion",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7298:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"src": "7287:21:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373",
|
||
|
"id": 3473,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": true,
|
||
|
"kind": "string",
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "Literal",
|
||
|
"src": "7310:36:10",
|
||
|
"subdenomination": null,
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029",
|
||
|
"typeString": "literal_string \"ERC20: approve to the zero address\""
|
||
|
},
|
||
|
"value": "ERC20: approve to the zero address"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_bool",
|
||
|
"typeString": "bool"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029",
|
||
|
"typeString": "literal_string \"ERC20: approve to the zero address\""
|
||
|
}
|
||
|
],
|
||
|
"id": 3467,
|
||
|
"name": "require",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [
|
||
|
3665,
|
||
|
3666
|
||
|
],
|
||
|
"referencedDeclaration": 3666,
|
||
|
"src": "7279:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
||
|
"typeString": "function (bool,string memory) pure"
|
||
|
}
|
||
|
},
|
||
|
"id": 3474,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7279:68:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3475,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7279:68:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3482,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"leftHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3476,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "7358:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3479,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3477,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3451,
|
||
|
"src": "7370:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7358:18:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3480,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3478,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3453,
|
||
|
"src": "7377:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": true,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7358:27:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"nodeType": "Assignment",
|
||
|
"operator": "=",
|
||
|
"rightHandSide": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3481,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3455,
|
||
|
"src": "7388:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"src": "7358:35:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3483,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7358:35:10"
|
||
|
},
|
||
|
{
|
||
|
"eventCall": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3485,
|
||
|
"name": "owner",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3451,
|
||
|
"src": "7417:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3486,
|
||
|
"name": "spender",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3453,
|
||
|
"src": "7424:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3487,
|
||
|
"name": "value",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3455,
|
||
|
"src": "7433:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3484,
|
||
|
"name": "Approval",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3646,
|
||
|
"src": "7408:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3488,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7408:31:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3489,
|
||
|
"nodeType": "EmitStatement",
|
||
|
"src": "7403:36:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n * This is internal function is equivalent to `approve`, and can be used to\ne.g. set automatic allowances for certain subsystems, etc.\n * Emits an `Approval` event.\n * Requirements:\n * - `owner` cannot be the zero address.\n- `spender` cannot be the zero address.",
|
||
|
"id": 3491,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_approve",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3456,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3451,
|
||
|
"name": "owner",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3491,
|
||
|
"src": "7135:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3450,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7135:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3453,
|
||
|
"name": "spender",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3491,
|
||
|
"src": "7150:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3452,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7150:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3455,
|
||
|
"name": "value",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3491,
|
||
|
"src": "7167:13:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3454,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7167:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "7134:47:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3457,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "7191:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "7117:329:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"body": {
|
||
|
"id": 3518,
|
||
|
"nodeType": "Block",
|
||
|
"src": "7684:124:10",
|
||
|
"statements": [
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3499,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3493,
|
||
|
"src": "7700:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3500,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3495,
|
||
|
"src": "7709:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3498,
|
||
|
"name": "_burn",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3449,
|
||
|
"src": "7694:5:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3501,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7694:22:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3502,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7694:22:10"
|
||
|
},
|
||
|
{
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3504,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3493,
|
||
|
"src": "7735:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3505,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "7744:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3506,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "7744:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"arguments": [
|
||
|
{
|
||
|
"argumentTypes": null,
|
||
|
"id": 3514,
|
||
|
"name": "amount",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3495,
|
||
|
"src": "7793:6:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"baseExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3507,
|
||
|
"name": "_allowances",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3142,
|
||
|
"src": "7756:11:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
|
||
|
"typeString": "mapping(address => mapping(address => uint256))"
|
||
|
}
|
||
|
},
|
||
|
"id": 3509,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3508,
|
||
|
"name": "account",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3493,
|
||
|
"src": "7768:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7756:20:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
||
|
"typeString": "mapping(address => uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3512,
|
||
|
"indexExpression": {
|
||
|
"argumentTypes": null,
|
||
|
"expression": {
|
||
|
"argumentTypes": null,
|
||
|
"id": 3510,
|
||
|
"name": "msg",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3662,
|
||
|
"src": "7777:3:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_magic_message",
|
||
|
"typeString": "msg"
|
||
|
}
|
||
|
},
|
||
|
"id": 3511,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sender",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": null,
|
||
|
"src": "7777:10:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
}
|
||
|
},
|
||
|
"isConstant": false,
|
||
|
"isLValue": true,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"nodeType": "IndexAccess",
|
||
|
"src": "7756:32:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"id": 3513,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"lValueRequested": false,
|
||
|
"memberName": "sub",
|
||
|
"nodeType": "MemberAccess",
|
||
|
"referencedDeclaration": 3042,
|
||
|
"src": "7756:36:10",
|
||
|
"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": 3515,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7756:44:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"expression": {
|
||
|
"argumentTypes": [
|
||
|
{
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_address_payable",
|
||
|
"typeString": "address payable"
|
||
|
},
|
||
|
{
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
],
|
||
|
"id": 3503,
|
||
|
"name": "_approve",
|
||
|
"nodeType": "Identifier",
|
||
|
"overloadedDeclarations": [],
|
||
|
"referencedDeclaration": 3491,
|
||
|
"src": "7726:8:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
||
|
"typeString": "function (address,address,uint256)"
|
||
|
}
|
||
|
},
|
||
|
"id": 3516,
|
||
|
"isConstant": false,
|
||
|
"isLValue": false,
|
||
|
"isPure": false,
|
||
|
"kind": "functionCall",
|
||
|
"lValueRequested": false,
|
||
|
"names": [],
|
||
|
"nodeType": "FunctionCall",
|
||
|
"src": "7726:75:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_tuple$__$",
|
||
|
"typeString": "tuple()"
|
||
|
}
|
||
|
},
|
||
|
"id": 3517,
|
||
|
"nodeType": "ExpressionStatement",
|
||
|
"src": "7726:75:10"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"documentation": "@dev Destoys `amount` tokens from `account`.`amount` is then deducted\nfrom the caller's allowance.\n * See `_burn` and `_approve`.",
|
||
|
"id": 3519,
|
||
|
"implemented": true,
|
||
|
"kind": "function",
|
||
|
"modifiers": [],
|
||
|
"name": "_burnFrom",
|
||
|
"nodeType": "FunctionDefinition",
|
||
|
"parameters": {
|
||
|
"id": 3496,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3493,
|
||
|
"name": "account",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3519,
|
||
|
"src": "7642:15:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3492,
|
||
|
"name": "address",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7642:7:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_address",
|
||
|
"typeString": "address"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
},
|
||
|
{
|
||
|
"constant": false,
|
||
|
"id": 3495,
|
||
|
"name": "amount",
|
||
|
"nodeType": "VariableDeclaration",
|
||
|
"scope": 3519,
|
||
|
"src": "7659:14:10",
|
||
|
"stateVariable": false,
|
||
|
"storageLocation": "default",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
},
|
||
|
"typeName": {
|
||
|
"id": 3494,
|
||
|
"name": "uint256",
|
||
|
"nodeType": "ElementaryTypeName",
|
||
|
"src": "7659:7:10",
|
||
|
"typeDescriptions": {
|
||
|
"typeIdentifier": "t_uint256",
|
||
|
"typeString": "uint256"
|
||
|
}
|
||
|
},
|
||
|
"value": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"src": "7641:33:10"
|
||
|
},
|
||
|
"returnParameters": {
|
||
|
"id": 3497,
|
||
|
"nodeType": "ParameterList",
|
||
|
"parameters": [],
|
||
|
"src": "7684:0:10"
|
||
|
},
|
||
|
"scope": 3520,
|
||
|
"src": "7623:185:10",
|
||
|
"stateMutability": "nonpayable",
|
||
|
"superFunction": null,
|
||
|
"visibility": "internal"
|
||
|
}
|
||
|
],
|
||
|
"scope": 3521,
|
||
|
"src": "1232:6578:10"
|
||
|
}
|
||
|
],
|
||
|
"src": "0:7811:10"
|
||
|
},
|
||
|
"compiler": {
|
||
|
"name": "solc",
|
||
|
"version": "0.5.2+commit.1df8f40c.Emscripten.clang"
|
||
|
},
|
||
|
"networks": {},
|
||
|
"schemaVersion": "3.0.16",
|
||
|
"updatedAt": "2019-10-23T07:58:23.286Z",
|
||
|
"devdoc": {
|
||
|
"details": "Implementation of the `IERC20` interface. * This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using `_mint`. For a generic mechanism see `ERC20Mintable`. * *For a detailed writeup see our guide [How to implement supply mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).* * We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. * Additionally, an `Approval` event is emitted on calls to `transferFrom`. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. * Finally, the non-standard `decreaseAllowance` and `increaseAllowance` functions have been added to mitigate the well-known issues around setting allowances. See `IERC20.approve`.",
|
||
|
"methods": {
|
||
|
"allowance(address,address)": {
|
||
|
"details": "See `IERC20.allowance`."
|
||
|
},
|
||
|
"approve(address,uint256)": {
|
||
|
"details": "See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address."
|
||
|
},
|
||
|
"balanceOf(address)": {
|
||
|
"details": "See `IERC20.balanceOf`."
|
||
|
},
|
||
|
"decreaseAllowance(address,uint256)": {
|
||
|
"details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
|
||
|
},
|
||
|
"increaseAllowance(address,uint256)": {
|
||
|
"details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to `approve` that can be used as a mitigation for problems described in `IERC20.approve`. * Emits an `Approval` event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address."
|
||
|
},
|
||
|
"totalSupply()": {
|
||
|
"details": "See `IERC20.totalSupply`."
|
||
|
},
|
||
|
"transfer(address,uint256)": {
|
||
|
"details": "See `IERC20.transfer`. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."
|
||
|
},
|
||
|
"transferFrom(address,address,uint256)": {
|
||
|
"details": "See `IERC20.transferFrom`. * Emits an `Approval` event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of `ERC20`; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `value`. - the caller must have allowance for `sender`'s tokens of at least `amount`."
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"userdoc": {
|
||
|
"methods": {}
|
||
|
}
|
||
|
}
|