UNPKG

cc-zos-vouching

Version:

Vouching logic for the EVM packages of the ZeppelinOS smart contract platform

1,245 lines 66.4 kB
{ "contractName": "SafeERC20", "abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c9eed896730f8568887550ad8b7cee0910f3f8436c08e1f771668f918e356fef0029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c9eed896730f8568887550ad8b7cee0910f3f8436c08e1f771668f918e356fef0029", "sourceMap": "342:489:11:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", "deployedSourceMap": "342:489:11:-;;;;;;;;", "source": "pragma solidity ^0.4.24;\n\nimport \"./ERC20.sol\";\nimport \"./IERC20.sol\";\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n )\n internal\n {\n require(token.transfer(to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n )\n internal\n {\n require(token.transferFrom(from, to, value));\n }\n\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n )\n internal\n {\n require(token.approve(spender, value));\n }\n}\n", "sourcePath": "openzeppelin-eth/contracts/token/ERC20/SafeERC20.sol", "ast": { "absolutePath": "openzeppelin-eth/contracts/token/ERC20/SafeERC20.sol", "exportedSymbols": { "SafeERC20": [ 1674 ] }, "id": 1675, "nodeType": "SourceUnit", "nodes": [ { "id": 1614, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:11" }, { "absolutePath": "openzeppelin-eth/contracts/token/ERC20/ERC20.sol", "file": "./ERC20.sol", "id": 1615, "nodeType": "ImportDirective", "scope": 1675, "sourceUnit": 1354, "src": "26:21:11", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-eth/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 1616, "nodeType": "ImportDirective", "scope": 1675, "sourceUnit": 1613, "src": "48:22:11", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", "fullyImplemented": true, "id": 1674, "linearizedBaseContracts": [ 1674 ], "name": "SafeERC20", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1633, "nodeType": "Block", "src": "458:45:11", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1628, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1620, "src": "487:2:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1629, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1622, "src": "491:5:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 1626, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1618, "src": "472:5:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "id": 1627, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1575, "src": "472:14:11", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 1630, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "472:25:11", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1625, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1936, 1937 ], "referencedDeclaration": 1936, "src": "464:7:11", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1631, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "464:34:11", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1632, "nodeType": "ExpressionStatement", "src": "464:34:11" } ] }, "documentation": null, "id": 1634, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "safeTransfer", "nodeType": "FunctionDefinition", "parameters": { "id": 1623, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1618, "name": "token", "nodeType": "VariableDeclaration", "scope": 1634, "src": "391:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 1617, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1612, "src": "391:6:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1620, "name": "to", "nodeType": "VariableDeclaration", "scope": 1634, "src": "409:10:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1619, "name": "address", "nodeType": "ElementaryTypeName", "src": "409:7:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1622, "name": "value", "nodeType": "VariableDeclaration", "scope": 1634, "src": "425:13:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1621, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "425:7:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "385:57:11" }, "payable": false, "returnParameters": { "id": 1624, "nodeType": "ParameterList", "parameters": [], "src": "458:0:11" }, "scope": 1674, "src": "364:139:11", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1654, "nodeType": "Block", "src": "623:55:11", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1648, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1638, "src": "656:4:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1649, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1640, "src": "662:2:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1650, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "666:5:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 1646, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1636, "src": "637:5:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "id": 1647, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1595, "src": "637:18:11", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,address,uint256) external returns (bool)" } }, "id": 1651, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "637:35:11", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1645, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1936, 1937 ], "referencedDeclaration": 1936, "src": "629:7:11", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1652, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "629:44:11", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1653, "nodeType": "ExpressionStatement", "src": "629:44:11" } ] }, "documentation": null, "id": 1655, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "safeTransferFrom", "nodeType": "FunctionDefinition", "parameters": { "id": 1643, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1636, "name": "token", "nodeType": "VariableDeclaration", "scope": 1655, "src": "538:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 1635, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1612, "src": "538:6:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1638, "name": "from", "nodeType": "VariableDeclaration", "scope": 1655, "src": "556:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1637, "name": "address", "nodeType": "ElementaryTypeName", "src": "556:7:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1640, "name": "to", "nodeType": "VariableDeclaration", "scope": 1655, "src": "574:10:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1639, "name": "address", "nodeType": "ElementaryTypeName", "src": "574:7:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1642, "name": "value", "nodeType": "VariableDeclaration", "scope": 1655, "src": "590:13:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1641, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "590:7:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "532:75:11" }, "payable": false, "returnParameters": { "id": 1644, "nodeType": "ParameterList", "parameters": [], "src": "623:0:11" }, "scope": 1674, "src": "507:171:11", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1672, "nodeType": "Block", "src": "780:49:11", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1667, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1659, "src": "808:7:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1668, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1661, "src": "817:5:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 1665, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1657, "src": "794:5:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "id": 1666, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1584, "src": "794:13:11", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 1669, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "794:29:11", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1664, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1936, 1937 ], "referencedDeclaration": 1936, "src": "786:7:11", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1670, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "786:38:11", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1671, "nodeType": "ExpressionStatement", "src": "786:38:11" } ] }, "documentation": null, "id": 1673, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "safeApprove", "nodeType": "FunctionDefinition", "parameters": { "id": 1662, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1657, "name": "token", "nodeType": "VariableDeclaration", "scope": 1673, "src": "708:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 1656, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1612, "src": "708:6:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1659, "name": "spender", "nodeType": "VariableDeclaration", "scope": 1673, "src": "726:15:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1658, "name": "address", "nodeType": "ElementaryTypeName", "src": "726:7:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1661, "name": "value", "nodeType": "VariableDeclaration", "scope": 1673, "src": "747:13:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1660, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "747:7:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "702:62:11" }, "payable": false, "returnParameters": { "id": 1663, "nodeType": "ParameterList", "parameters": [], "src": "780:0:11" }, "scope": 1674, "src": "682:147:11", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 1675, "src": "342:489:11" } ], "src": "0:832:11" }, "legacyAST": { "absolutePath": "openzeppelin-eth/contracts/token/ERC20/SafeERC20.sol", "exportedSymbols": { "SafeERC20": [ 1674 ] }, "id": 1675, "nodeType": "SourceUnit", "nodes": [ { "id": 1614, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:11" }, { "absolutePath": "openzeppelin-eth/contracts/token/ERC20/ERC20.sol", "file": "./ERC20.sol", "id": 1615, "nodeType": "ImportDirective", "scope": 1675, "sourceUnit": 1354, "src": "26:21:11", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-eth/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 1616, "nodeType": "ImportDirective", "scope": 1675, "sourceUnit": 1613, "src": "48:22:11", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", "fullyImplemented": true, "id": 1674, "linearizedBaseContracts": [ 1674 ], "name": "SafeERC20", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 1633, "nodeType": "Block", "src": "458:45:11", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1628, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1620, "src": "487:2:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1629, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1622, "src": "491:5:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 1626, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1618, "src": "472:5:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "id": 1627, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1575, "src": "472:14:11", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, "id": 1630, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "472:25:11", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1625, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1936, 1937 ], "referencedDeclaration": 1936, "src": "464:7:11", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1631, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "464:34:11", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1632, "nodeType": "ExpressionStatement", "src": "464:34:11" } ] }, "documentation": null, "id": 1634, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "safeTransfer", "nodeType": "FunctionDefinition", "parameters": { "id": 1623, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1618, "name": "token", "nodeType": "VariableDeclaration", "scope": 1634, "src": "391:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 1617, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1612, "src": "391:6:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1620, "name": "to", "nodeType": "VariableDeclaration", "scope": 1634, "src": "409:10:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1619, "name": "address", "nodeType": "ElementaryTypeName", "src": "409:7:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1622, "name": "value", "nodeType": "VariableDeclaration", "scope": 1634, "src": "425:13:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1621, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "425:7:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "385:57:11" }, "payable": false, "returnParameters": { "id": 1624, "nodeType": "ParameterList", "parameters": [], "src": "458:0:11" }, "scope": 1674, "src": "364:139:11", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": { "id": 1654, "nodeType": "Block", "src": "623:55:11", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1648, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1638, "src": "656:4:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1649, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1640, "src": "662:2:11", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1650, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "666:5:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 1646, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1636, "src": "637:5:11", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1612", "typeString": "contract IERC20" } }, "id": 1647, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1595, "src": "637:18:11", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,address,uint256) external returns (bool)" } }, "id": 1651, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "637:35:11", "typeDescriptions": { "typeIdentifier": "t_bool