UNPKG

@ethsub/sol

Version:
1,197 lines (1,196 loc) 85.4 kB
{ "contractName": "ERC20Burnable", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "burnFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Extension of {ERC20} that allows token holders to destroy both their own tokens and those that they have an allowance for, in a way that can be recognized off-chain (via event analysis).\",\"kind\":\"dev\",\"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}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"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.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"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 `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":\"ERC20Burnable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://991b44ff44e0496e8554a90f4c0512c28faed45104d40430019f3c67ea67740e\",\"dweb:/ipfs/Qmc3nRapVbcctELoZS5qe17zLkFB3bETBfwzCTMF1CSuGE\"]},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://99e4033d778624992e86f0b6d801a4f6d7b5c0cd5c79c1296be90a051ad5f5af\",\"dweb:/ipfs/QmShYmkUqh6pDEeoWadZ24icmCr4C2Xys1uE5boivPmbwf\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./ERC20.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is Context, ERC20 {\n using SafeMath for uint256;\n\n /**\n * @dev Destroys `amount` tokens from the caller.\n *\n * See {ERC20-_burn}.\n */\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n * allowance.\n *\n * See {ERC20-_burn} and {ERC20-allowance}.\n *\n * Requirements:\n *\n * - the caller must have allowance for ``accounts``'s tokens of at least\n * `amount`.\n */\n function burnFrom(address account, uint256 amount) public virtual {\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \"ERC20: burn amount exceeds allowance\");\n\n _approve(account, _msgSender(), decreasedAllowance);\n _burn(account, amount);\n }\n}\n", "sourcePath": "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol", "ast": { "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol", "exportedSymbols": { "ERC20Burnable": [ 3204 ] }, "id": 3205, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 3147, "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "33:31:17" }, { "absolutePath": "@openzeppelin/contracts/utils/Context.sol", "file": "../../utils/Context.sol", "id": 3148, "nodeType": "ImportDirective", "scope": 3205, "sourceUnit": 4842, "src": "66:33:17", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", "file": "./ERC20.sol", "id": 3149, "nodeType": "ImportDirective", "scope": 3205, "sourceUnit": 3146, "src": "100:21:17", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3151, "name": "Context", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4841, "src": "367:7:17", "typeDescriptions": { "typeIdentifier": "t_contract$_Context_$4841", "typeString": "contract Context" } }, "id": 3152, "nodeType": "InheritanceSpecifier", "src": "367:7:17" }, { "arguments": null, "baseName": { "contractScope": null, "id": 3153, "name": "ERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3145, "src": "376:5:17", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC20_$3145", "typeString": "contract ERC20" } }, "id": 3154, "nodeType": "InheritanceSpecifier", "src": "376:5:17" } ], "contractDependencies": [ 3145, 3319, 4841 ], "contractKind": "contract", "documentation": { "id": 3150, "nodeType": "StructuredDocumentation", "src": "123:208:17", "text": " @dev Extension of {ERC20} that allows token holders to destroy both their own\n tokens and those that they have an allowance for, in a way that can be\n recognized off-chain (via event analysis)." }, "fullyImplemented": false, "id": 3204, "linearizedBaseContracts": [ 3204, 3145, 3319, 4841 ], "name": "ERC20Burnable", "nodeType": "ContractDefinition", "nodes": [ { "id": 3157, "libraryName": { "contractScope": null, "id": 3155, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 937, "src": "394:8:17", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$937", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "388:27:17", "typeName": { "id": 3156, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "407:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "body": { "id": 3169, "nodeType": "Block", "src": "569:44:17", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 3164, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4829, "src": "585:10:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", "typeString": "function () view returns (address payable)" } }, "id": 3165, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "585:12:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 3166, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3160, "src": "599:6:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 3163, "name": "_burn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3077, "src": "579:5:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 3167, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "579:27:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3168, "nodeType": "ExpressionStatement", "src": "579:27:17" } ] }, "documentation": { "id": 3158, "nodeType": "StructuredDocumentation", "src": "421:98:17", "text": " @dev Destroys `amount` tokens from the caller.\n See {ERC20-_burn}." }, "functionSelector": "42966c68", "id": 3170, "implemented": true, "kind": "function", "modifiers": [], "name": "burn", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3161, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3160, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3170, "src": "538:14:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3159, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "538:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "537:16:17" }, "returnParameters": { "id": 3162, "nodeType": "ParameterList", "parameters": [], "src": "569:0:17" }, "scope": 3204, "src": "524:89:17", "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, { "body": { "id": 3202, "nodeType": "Block", "src": "985:224:17", "statements": [ { "assignments": [ 3179 ], "declarations": [ { "constant": false, "id": 3179, "mutability": "mutable", "name": "decreasedAllowance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3202, "src": "995:26:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3178, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "995:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 3189, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3186, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3175, "src": "1061:6:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365", "id": 3187, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1069:38:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" }, "value": "ERC20: burn amount exceeds allowance" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3181, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3173, "src": "1034:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 3182, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4829, "src": "1043:10:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", "typeString": "function () view returns (address payable)" } }, "id": 3183, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1043:12:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 3180, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2784, "src": "1024:9:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)" } }, "id": 3184, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1024:32:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3185, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 888, "src": "1024:36:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" } }, "id": 3188, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1024:84:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "995:113:17" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3191, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3173, "src": "1128:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 3192, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4829, "src": "1137:10:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", "typeString": "function () view returns (address payable)" } }, "id": 3193, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1137:12:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 3194, "name": "decreasedAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3179, "src": "1151:18:17", "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": 3190, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3122, "src": "1119:8:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 3195, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1119:51:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3196, "nodeType": "ExpressionStatement", "src": "1119:51:17" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3198, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3173, "src": "1186:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 3199, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3175, "src": "1195:6:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 3197, "name": "_burn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3077, "src": "1180:5:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 3200, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1180:22:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3201, "nodeType": "ExpressionStatement", "src": "1180:22:17" } ] }, "documentation": { "id": 3171, "nodeType": "StructuredDocumentation", "src": "619:295:17", "text": " @dev Destroys `amount` tokens from `account`, deducting from the caller's\n allowance.\n See {ERC20-_burn} and {ERC20-allowance}.\n Requirements:\n - the caller must have allowance for ``accounts``'s tokens of at least\n `amount`." }, "functionSelector": "79cc6790", "id": 3203, "implemented": true, "kind": "function", "modifiers": [], "name": "burnFrom", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3176, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3173, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3203, "src": "937:15:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3172, "name": "address", "nodeType": "ElementaryTypeName", "src": "937:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3175, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3203, "src": "954:14:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3174, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "954:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "936:33:17" }, "returnParameters": { "id": 3177, "nodeType": "ParameterList", "parameters": [], "src": "985:0:17" }, "scope": 3204, "src": "919:290:17", "stateMutability": "nonpayable", "virtual": true, "visibility": "public" } ], "scope": 3205, "src": "332:879:17" } ], "src": "33:1179:17" }, "legacyAST": { "attributes": { "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol", "exportedSymbols": { "ERC20Burnable": [ 3204 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.8", ".0" ] }, "id": 3147, "name": "PragmaDirective", "src": "33:31:17" }, { "attributes": { "SourceUnit": 4842, "absolutePath": "@openzeppelin/contracts/utils/Context.sol", "file": "../../utils/Context.sol", "scope": 3205, "symbolAliases": [ null ], "unitAlias": "" }, "id": 3148, "name": "ImportDirective", "src": "66:33:17" }, { "attributes": { "SourceUnit": 3146, "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", "file": "./ERC20.sol", "scope": 3205, "symbolAliases": [ null ], "unitAlias": "" }, "id": 3149, "name": "ImportDirective", "src": "100:21:17" }, { "attributes": { "abstract": true, "contractDependencies": [ 3145, 3319, 4841 ], "contractKind": "contract", "fullyImplemented": false, "linearizedBaseContracts": [ 3204, 3145, 3319, 4841 ], "name": "ERC20Burnable", "scope": 3205 }, "children": [ { "attributes": { "text": " @dev Extension of {ERC20} that allows token holders to destroy both their own\n tokens and those that they have an allowance for, in a way that can be\n recognized off-chain (via event analysis)." }, "id": 3150, "name": "StructuredDocumentation", "src": "123:208:17" }, { "attributes": { "arguments": null }, "children": [ { "attributes": { "contractScope": null, "name": "Context", "referencedDeclaration": 4841, "type": "contract Context" }, "id": 3151, "name": "UserDefinedTypeName", "src": "367:7:17" } ], "id": 3152, "name": "InheritanceSpecifier", "src": "367:7:17"