{
  "contractName": "SafeERC20",
  "abi": [],
  "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582043931729a8ae40cc159c0c5843c4d51934ef788104d3f4cce164709dd432e0b10029",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582043931729a8ae40cc159c0c5843c4d51934ef788104d3f4cce164709dd432e0b10029",
  "sourceMap": "376:5183:27:-;;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": "376:5183:27:-;;;;;;;;",
  "source": "// Inspired by AdEx (https://github.com/AdExNetwork/adex-protocol-eth/blob/b9df617829661a7518ee10f4cb6c4108659dd6d5/contracts/libs/SafeERC20.sol)\n// and 0x (https://github.com/0xProject/0x-monorepo/blob/737d1dc54d72872e24abce5a1dbe1b66d35fa21a/contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol#L143)\n\npragma solidity ^0.4.24;\n\nimport \"../lib/token/ERC20.sol\";\n\n\nlibrary SafeERC20 {\n    // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\n    // https://github.com/ethereum/solidity/issues/3544\n    bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\n\n    string private constant ERROR_TOKEN_BALANCE_REVERTED = \"SAFE_ERC_20_BALANCE_REVERTED\";\n    string private constant ERROR_TOKEN_ALLOWANCE_REVERTED = \"SAFE_ERC_20_ALLOWANCE_REVERTED\";\n\n    function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\n        private\n        returns (bool)\n    {\n        bool ret;\n        assembly {\n            let ptr := mload(0x40)    // free memory pointer\n\n            let success := call(\n                gas,                  // forward all gas\n                _addr,                // address\n                0,                    // no value\n                add(_calldata, 0x20), // calldata start\n                mload(_calldata),     // calldata length\n                ptr,                  // write output over free memory\n                0x20                  // uint256 return\n            )\n\n            if gt(success, 0) {\n                // Check number of bytes returned from last function call\n                switch returndatasize\n\n                // No bytes returned: assume success\n                case 0 {\n                    ret := 1\n                }\n\n                // 32 bytes returned: check if non-zero\n                case 0x20 {\n                    // Only return success if returned data was true\n                    // Already have output in ptr\n                    ret := eq(mload(ptr), 1)\n                }\n\n                // Not sure what was returned: don't mark as success\n                default { }\n            }\n        }\n        return ret;\n    }\n\n    function staticInvoke(address _addr, bytes memory _calldata)\n        private\n        view\n        returns (bool, uint256)\n    {\n        bool success;\n        uint256 ret;\n        assembly {\n            let ptr := mload(0x40)    // free memory pointer\n\n            success := staticcall(\n                gas,                  // forward all gas\n                _addr,                // address\n                add(_calldata, 0x20), // calldata start\n                mload(_calldata),     // calldata length\n                ptr,                  // write output over free memory\n                0x20                  // uint256 return\n            )\n\n            if gt(success, 0) {\n                ret := mload(ptr)\n            }\n        }\n        return (success, ret);\n    }\n\n    /**\n    * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\n    *      Note that this makes an external call to the token.\n    */\n    function safeTransfer(ERC20 _token, address _to, uint256 _amount) internal returns (bool) {\n        bytes memory transferCallData = abi.encodeWithSelector(\n            TRANSFER_SELECTOR,\n            _to,\n            _amount\n        );\n        return invokeAndCheckSuccess(_token, transferCallData);\n    }\n\n    /**\n    * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\n    *      Note that this makes an external call to the token.\n    */\n    function safeTransferFrom(ERC20 _token, address _from, address _to, uint256 _amount) internal returns (bool) {\n        bytes memory transferFromCallData = abi.encodeWithSelector(\n            _token.transferFrom.selector,\n            _from,\n            _to,\n            _amount\n        );\n        return invokeAndCheckSuccess(_token, transferFromCallData);\n    }\n\n    /**\n    * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\n    *      Note that this makes an external call to the token.\n    */\n    function safeApprove(ERC20 _token, address _spender, uint256 _amount) internal returns (bool) {\n        bytes memory approveCallData = abi.encodeWithSelector(\n            _token.approve.selector,\n            _spender,\n            _amount\n        );\n        return invokeAndCheckSuccess(_token, approveCallData);\n    }\n\n    /**\n    * @dev Static call into ERC20.balanceOf().\n    * Reverts if the call fails for some reason (should never fail).\n    */\n    function staticBalanceOf(ERC20 _token, address _owner) internal view returns (uint256) {\n        bytes memory balanceOfCallData = abi.encodeWithSelector(\n            _token.balanceOf.selector,\n            _owner\n        );\n\n        (bool success, uint256 tokenBalance) = staticInvoke(_token, balanceOfCallData);\n        require(success, ERROR_TOKEN_BALANCE_REVERTED);\n\n        return tokenBalance;\n    }\n\n    /**\n    * @dev Static call into ERC20.allowance().\n    * Reverts if the call fails for some reason (should never fail).\n    */\n    function staticAllowance(ERC20 _token, address _owner, address _spender) internal view returns (uint256) {\n        bytes memory allowanceCallData = abi.encodeWithSelector(\n            _token.allowance.selector,\n            _owner,\n            _spender\n        );\n\n        (bool success, uint256 allowance) = staticInvoke(_token, allowanceCallData);\n        require(success, ERROR_TOKEN_ALLOWANCE_REVERTED);\n\n        return allowance;\n    }\n}\n",
  "sourcePath": "@aragon/os/contracts/common/SafeERC20.sol",
  "ast": {
    "absolutePath": "@aragon/os/contracts/common/SafeERC20.sol",
    "exportedSymbols": {
      "SafeERC20": [
        5316
      ]
    },
    "id": 5317,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5106,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "315:24:27"
      },
      {
        "absolutePath": "@aragon/os/contracts/lib/token/ERC20.sol",
        "file": "../lib/token/ERC20.sol",
        "id": 5107,
        "nodeType": "ImportDirective",
        "scope": 5317,
        "sourceUnit": 7732,
        "src": "341:32:27",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 5316,
        "linearizedBaseContracts": [
          5316
        ],
        "name": "SafeERC20",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 5110,
            "name": "TRANSFER_SELECTOR",
            "nodeType": "VariableDeclaration",
            "scope": 5316,
            "src": "552:54:27",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes4",
              "typeString": "bytes4"
            },
            "typeName": {
              "id": 5108,
              "name": "bytes4",
              "nodeType": "ElementaryTypeName",
              "src": "552:6:27",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes4",
                "typeString": "bytes4"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "30786139303539636262",
              "id": 5109,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "596:10:27",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_2835717307_by_1",
                "typeString": "int_const 2835717307"
              },
              "value": "0xa9059cbb"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 5113,
            "name": "ERROR_TOKEN_BALANCE_REVERTED",
            "nodeType": "VariableDeclaration",
            "scope": 5316,
            "src": "613:85:27",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 5111,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "613:6:27",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "534146455f4552435f32305f42414c414e43455f5245564552544544",
              "id": 5112,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "668:30:27",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_e0d6f1573408f815b546b777c74de94d1685d3d390fbf5b918b2e1339b2ed2e7",
                "typeString": "literal_string \"SAFE_ERC_20_BALANCE_REVERTED\""
              },
              "value": "SAFE_ERC_20_BALANCE_REVERTED"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 5116,
            "name": "ERROR_TOKEN_ALLOWANCE_REVERTED",
            "nodeType": "VariableDeclaration",
            "scope": 5316,
            "src": "704:89:27",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 5114,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "704:6:27",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "534146455f4552435f32305f414c4c4f57414e43455f5245564552544544",
              "id": 5115,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "761:32:27",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_73432bcf14a5ead3ed39eed7e97b924b49d284054d4f8b41ba74ac90002bc239",
                "typeString": "literal_string \"SAFE_ERC_20_ALLOWANCE_REVERTED\""
              },
              "value": "SAFE_ERC_20_ALLOWANCE_REVERTED"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 5131,
              "nodeType": "Block",
              "src": "913:1229:27",
              "statements": [
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5126,
                      "name": "ret",
                      "nodeType": "VariableDeclaration",
                      "scope": 5132,
                      "src": "923:8:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5125,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "923:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5127,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "923:8:27"
                },
                {
                  "externalReferences": [
                    {
                      "_calldata": {
                        "declaration": 5120,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1281:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_calldata": {
                        "declaration": 5120,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1223:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "ret": {
                        "declaration": 5126,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1701:3:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_addr": {
                        "declaration": 5118,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1120:5:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "ret": {
                        "declaration": 5126,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1952:3:27",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 5128,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    let success := call(gas(), _addr, 0, add(_calldata, 0x20), mload(_calldata), ptr, 0x20)\n    if gt(success, 0)\n    {\n        switch returndatasize()\n        case 0 {\n            ret := 1\n        }\n        case 0x20 {\n            ret := eq(mload(ptr), 1)\n        }\n        default {\n        }\n    }\n}",
                  "src": "941:1190:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5129,
                    "name": "ret",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5126,
                    "src": "2132:3:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5124,
                  "id": 5130,
                  "nodeType": "Return",
                  "src": "2125:10:27"
                }
              ]
            },
            "documentation": null,
            "id": 5132,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "invokeAndCheckSuccess",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5121,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5118,
                  "name": "_addr",
                  "nodeType": "VariableDeclaration",
                  "scope": 5132,
                  "src": "831:13:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5117,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "831:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5120,
                  "name": "_calldata",
                  "nodeType": "VariableDeclaration",
                  "scope": 5132,
                  "src": "846:22:27",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 5119,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "846:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "830:39:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5124,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5123,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5132,
                  "src": "903:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5122,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "903:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "902:6:27"
            },
            "scope": 5316,
            "src": "800:1342:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 5154,
              "nodeType": "Block",
              "src": "2274:648:27",
              "statements": [
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5144,
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 5155,
                      "src": "2284:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5143,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "2284:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5145,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2284:12:27"
                },
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5147,
                      "name": "ret",
                      "nodeType": "VariableDeclaration",
                      "scope": 5155,
                      "src": "2306:11:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5146,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2306:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5148,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2306:11:27"
                },
                {
                  "externalReferences": [
                    {
                      "ret": {
                        "declaration": 5147,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2844:3:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_calldata": {
                        "declaration": 5136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2619:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_calldata": {
                        "declaration": 5136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2561:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "success": {
                        "declaration": 5144,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2412:7:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "success": {
                        "declaration": 5144,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2814:7:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_addr": {
                        "declaration": 5134,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2508:5:27",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 5149,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    success := staticcall(gas(), _addr, add(_calldata, 0x20), mload(_calldata), ptr, 0x20)\n    if gt(success, 0)\n    {\n        ret := mload(ptr)\n    }\n}",
                  "src": "2327:573:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 5150,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5144,
                        "src": "2902:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5151,
                        "name": "ret",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5147,
                        "src": "2911:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "id": 5152,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "2901:14:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
                      "typeString": "tuple(bool,uint256)"
                    }
                  },
                  "functionReturnParameters": 5142,
                  "id": 5153,
                  "nodeType": "Return",
                  "src": "2894:21:27"
                }
              ]
            },
            "documentation": null,
            "id": 5155,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "staticInvoke",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5137,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5134,
                  "name": "_addr",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2170:13:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5133,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2170:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5136,
                  "name": "_calldata",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2185:22:27",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 5135,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2185:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2169:39:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5139,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2255:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5138,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2255:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5141,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2261:7:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5140,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2261:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2254:15:27"
            },
            "scope": 5316,
            "src": "2148:774:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 5180,
              "nodeType": "Block",
              "src": "3190:214:27",
              "statements": [
                {
                  "assignments": [
                    5167
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5167,
                      "name": "transferCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5181,
                      "src": "3200:29:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5166,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "3200:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5174,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5170,
                        "name": "TRANSFER_SELECTOR",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5110,
                        "src": "3268:17:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5171,
                        "name": "_to",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5159,
                        "src": "3299:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5172,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5161,
                        "src": "3316:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5168,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "3232:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5169,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3232:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5173,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3232:101:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3200:133:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5176,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5157,
                        "src": "3372:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5177,
                        "name": "transferCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5167,
                        "src": "3380:16:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5175,
                      "name": "invokeAndCheckSuccess",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5132,
                      "src": "3350:21:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes memory) returns (bool)"
                      }
                    },
                    "id": 5178,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3350:47:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5165,
                  "id": 5179,
                  "nodeType": "Return",
                  "src": "3343:54:27"
                }
              ]
            },
            "documentation": "@dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\n     Note that this makes an external call to the token.",
            "id": 5181,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "safeTransfer",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5162,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5157,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3122:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5156,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "3122:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5159,
                  "name": "_to",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3136:11:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5158,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3136:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5161,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3149:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5160,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3149:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3121:44:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5165,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5164,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3184:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5163,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3184:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3183:6:27"
            },
            "scope": 5316,
            "src": "3100:304:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5211,
              "nodeType": "Block",
              "src": "3695:252:27",
              "statements": [
                {
                  "assignments": [
                    5195
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5195,
                      "name": "transferFromCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5212,
                      "src": "3705:33:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5194,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "3705:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5205,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5198,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5183,
                            "src": "3777:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5199,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transferFrom",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7714,
                          "src": "3777:19:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,address,uint256) external returns (bool)"
                          }
                        },
                        "id": 5200,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3777:28:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5201,
                        "name": "_from",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5185,
                        "src": "3819:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5202,
                        "name": "_to",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5187,
                        "src": "3838:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5203,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5189,
                        "src": "3855:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5196,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "3741:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5197,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3741:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5204,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3741:131:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3705:167:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5207,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5183,
                        "src": "3911:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5208,
                        "name": "transferFromCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5195,
                        "src": "3919:20:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5206,
                      "name": "invokeAndCheckSuccess",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5132,
                      "src": "3889:21:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes memory) returns (bool)"
                      }
                    },
                    "id": 5209,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3889:51:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5193,
                  "id": 5210,
                  "nodeType": "Return",
                  "src": "3882:58:27"
                }
              ]
            },
            "documentation": "@dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\n     Note that this makes an external call to the token.",
            "id": 5212,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "safeTransferFrom",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5190,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5183,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3612:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5182,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "3612:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5185,
                  "name": "_from",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3626:13:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5184,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3626:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5187,
                  "name": "_to",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3641:11:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5186,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3641:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5189,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3654:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5188,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3654:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3611:59:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5193,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5192,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3689:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5191,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3689:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3688:6:27"
            },
            "scope": 5316,
            "src": "3586:361:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5239,
              "nodeType": "Block",
              "src": "4218:223:27",
              "statements": [
                {
                  "assignments": [
                    5224
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5224,
                      "name": "approveCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5240,
                      "src": "4228:28:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5223,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "4228:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5233,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5227,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5214,
                            "src": "4295:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5228,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "approve",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7703,
                          "src": "4295:14:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 5229,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4295:23:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5230,
                        "name": "_spender",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5216,
                        "src": "4332:8:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5231,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5218,
                        "src": "4354:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5225,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "4259:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5226,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "4259:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5232,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4259:112:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4228:143:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5235,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5214,
                        "src": "4410:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5236,
                        "name": "approveCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5224,
                        "src": "4418:15:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5234,
                      "name": "invokeAndCheckSuccess",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5132,
                      "src": "4388:21:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes memory) returns (bool)"
                      }
                    },
                    "id": 5237,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4388:46:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5222,
                  "id": 5238,
                  "nodeType": "Return",
                  "src": "4381:53:27"
                }
              ]
            },
            "documentation": "@dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\n     Note that this makes an external call to the token.",
            "id": 5240,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "safeApprove",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5219,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5214,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4145:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5213,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "4145:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5216,
                  "name": "_spender",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4159:16:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5215,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4159:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5218,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4177:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5217,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4177:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4144:49:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5222,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5221,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4212:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5220,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4212:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4211:6:27"
            },
            "scope": 5316,
            "src": "4124:317:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5275,
              "nodeType": "Block",
              "src": "4665:316:27",
              "statements": [
                {
                  "assignments": [
                    5250
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5250,
                      "name": "balanceOfCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5276,
                      "src": "4675:30:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5249,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "4675:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5258,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5253,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5242,
                            "src": "4744:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5254,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "balanceOf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7676,
                          "src": "4744:16:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                            "typeString": "function (address) view external returns (uint256)"
                          }
                        },
                        "id": 5255,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4744:25:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5256,
                        "name": "_owner",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5244,
                        "src": "4783:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5251,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "4708:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5252,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "4708:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5257,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4708:91:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4675:124:27"
                },
                {
                  "assignments": [
                    5260,
                    5262
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5260,
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 5276,
                      "src": "4811:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5259,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "4811:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 5262,
                      "name": "tokenBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 5276,
                      "src": "4825:20:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5261,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4825:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5267,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5264,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5242,
                        "src": "4862:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5265,
                        "name": "balanceOfCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5250,
                        "src": "4870:17:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5263,
                      "name": "staticInvoke",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5155,
                      "src": "4849:12:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_uint256_$",
                        "typeString": "function (address,bytes memory) view returns (bool,uint256)"
                      }
                    },
                    "id": 5266,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4849:39:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
                      "typeString": "tuple(bool,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4810:78:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5269,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5260,
                        "src": "4906:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5270,
                        "name": "ERROR_TOKEN_BALANCE_REVERTED",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5113,
                        "src": "4915:28:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 5268,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        8631,
                        8632
                      ],
                      "referencedDeclaration": 8632,
                      "src": "4898:7:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4898:46:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5272,
                  "nodeType": "ExpressionStatement",
                  "src": "4898:46:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5273,
                    "name": "tokenBalance",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5262,
                    "src": "4962:12:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5248,
                  "id": 5274,
                  "nodeType": "Return",
                  "src": "4955:19:27"
                }
              ]
            },
            "documentation": "@dev Static call into ERC20.balanceOf().\nReverts if the call fails for some reason (should never fail).",
            "id": 5276,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "staticBalanceOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5245,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5242,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5276,
                  "src": "4603:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5241,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "4603:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5244,
                  "name": "_owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 5276,
                  "src": "4617:14:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5243,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4617:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4602:30:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5248,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5247,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5276,
                  "src": "4656:7:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5246,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4656:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4655:9:27"
            },
            "scope": 5316,
            "src": "4578:403:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5314,
              "nodeType": "Block",
              "src": "5223:334:27",
              "statements": [
                {
                  "assignments": [
                    5288
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5288,
                      "name": "allowanceCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5315,
                      "src": "5233:30:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5287,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "5233:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5297,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5291,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5278,
                            "src": "5302:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5292,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "allowance",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7685,
                          "src": "5302:16:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
                            "typeString": "function (address,address) view external returns (uint256)"
                          }
                        },
                        "id": 5293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5302:25:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5294,
                        "name": "_owner",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5280,
                        "src": "5341:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5295,
                        "name": "_spender",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5282,
                        "src": "5361:8:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5289,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "5266:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5290,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5266:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5296,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5266:113:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5233:146:27"
                },
                {
                  "assignments": [
                    5299,
                    5301
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5299,
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 5315,
                      "src": "5391:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5298,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "5391:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 5301,
                      "name": "allowance",
                      "nodeType": "VariableDeclaration",
                      "scope": 5315,
                      "src": "5405:17:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5300,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5405:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5306,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5303,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5278,
                        "src": "5439:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5304,
                        "name": "allowanceCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5288,
                        "src": "5447:17:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5302,
                      "name": "staticInvoke",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5155,
                      "src": "5426:12:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_uint256_$",
                        "typeString": "function (address,bytes memory) view returns (bool,uint256)"
                      }
                    },
                    "id": 5305,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5426:39:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
                      "typeString": "tuple(bool,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5390:75:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5308,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5299,
                        "src": "5483:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5309,
                        "name": "ERROR_TOKEN_ALLOWANCE_REVERTED",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5116,
                        "src": "5492:30:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 5307,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        8631,
                        8632
                      ],
                      "referencedDeclaration": 8632,
                      "src": "5475:7:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5310,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5475:48:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5311,
                  "nodeType": "ExpressionStatement",
                  "src": "5475:48:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5312,
                    "name": "allowance",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5301,
                    "src": "5541:9:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5286,
                  "id": 5313,
                  "nodeType": "Return",
                  "src": "5534:16:27"
                }
              ]
            },
            "documentation": "@dev Static call into ERC20.allowance().\nReverts if the call fails for some reason (should never fail).",
            "id": 5315,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "staticAllowance",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5283,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5278,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5143:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5277,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "5143:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5280,
                  "name": "_owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5157:14:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5279,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5157:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5282,
                  "name": "_spender",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5173:16:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5281,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5173:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5142:48:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5286,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5285,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5214:7:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5284,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5214:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5213:9:27"
            },
            "scope": 5316,
            "src": "5118:439:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 5317,
        "src": "376:5183:27"
      }
    ],
    "src": "315:5245:27"
  },
  "legacyAST": {
    "absolutePath": "@aragon/os/contracts/common/SafeERC20.sol",
    "exportedSymbols": {
      "SafeERC20": [
        5316
      ]
    },
    "id": 5317,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5106,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "315:24:27"
      },
      {
        "absolutePath": "@aragon/os/contracts/lib/token/ERC20.sol",
        "file": "../lib/token/ERC20.sol",
        "id": 5107,
        "nodeType": "ImportDirective",
        "scope": 5317,
        "sourceUnit": 7732,
        "src": "341:32:27",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 5316,
        "linearizedBaseContracts": [
          5316
        ],
        "name": "SafeERC20",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 5110,
            "name": "TRANSFER_SELECTOR",
            "nodeType": "VariableDeclaration",
            "scope": 5316,
            "src": "552:54:27",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes4",
              "typeString": "bytes4"
            },
            "typeName": {
              "id": 5108,
              "name": "bytes4",
              "nodeType": "ElementaryTypeName",
              "src": "552:6:27",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes4",
                "typeString": "bytes4"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "30786139303539636262",
              "id": 5109,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "596:10:27",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_2835717307_by_1",
                "typeString": "int_const 2835717307"
              },
              "value": "0xa9059cbb"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 5113,
            "name": "ERROR_TOKEN_BALANCE_REVERTED",
            "nodeType": "VariableDeclaration",
            "scope": 5316,
            "src": "613:85:27",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 5111,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "613:6:27",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "534146455f4552435f32305f42414c414e43455f5245564552544544",
              "id": 5112,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "668:30:27",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_e0d6f1573408f815b546b777c74de94d1685d3d390fbf5b918b2e1339b2ed2e7",
                "typeString": "literal_string \"SAFE_ERC_20_BALANCE_REVERTED\""
              },
              "value": "SAFE_ERC_20_BALANCE_REVERTED"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 5116,
            "name": "ERROR_TOKEN_ALLOWANCE_REVERTED",
            "nodeType": "VariableDeclaration",
            "scope": 5316,
            "src": "704:89:27",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 5114,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "704:6:27",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "534146455f4552435f32305f414c4c4f57414e43455f5245564552544544",
              "id": 5115,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "761:32:27",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_73432bcf14a5ead3ed39eed7e97b924b49d284054d4f8b41ba74ac90002bc239",
                "typeString": "literal_string \"SAFE_ERC_20_ALLOWANCE_REVERTED\""
              },
              "value": "SAFE_ERC_20_ALLOWANCE_REVERTED"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 5131,
              "nodeType": "Block",
              "src": "913:1229:27",
              "statements": [
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5126,
                      "name": "ret",
                      "nodeType": "VariableDeclaration",
                      "scope": 5132,
                      "src": "923:8:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5125,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "923:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5127,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "923:8:27"
                },
                {
                  "externalReferences": [
                    {
                      "_calldata": {
                        "declaration": 5120,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1281:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_calldata": {
                        "declaration": 5120,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1223:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "ret": {
                        "declaration": 5126,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1701:3:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_addr": {
                        "declaration": 5118,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1120:5:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "ret": {
                        "declaration": 5126,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1952:3:27",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 5128,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    let success := call(gas(), _addr, 0, add(_calldata, 0x20), mload(_calldata), ptr, 0x20)\n    if gt(success, 0)\n    {\n        switch returndatasize()\n        case 0 {\n            ret := 1\n        }\n        case 0x20 {\n            ret := eq(mload(ptr), 1)\n        }\n        default {\n        }\n    }\n}",
                  "src": "941:1190:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5129,
                    "name": "ret",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5126,
                    "src": "2132:3:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5124,
                  "id": 5130,
                  "nodeType": "Return",
                  "src": "2125:10:27"
                }
              ]
            },
            "documentation": null,
            "id": 5132,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "invokeAndCheckSuccess",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5121,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5118,
                  "name": "_addr",
                  "nodeType": "VariableDeclaration",
                  "scope": 5132,
                  "src": "831:13:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5117,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "831:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5120,
                  "name": "_calldata",
                  "nodeType": "VariableDeclaration",
                  "scope": 5132,
                  "src": "846:22:27",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 5119,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "846:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "830:39:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5124,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5123,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5132,
                  "src": "903:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5122,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "903:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "902:6:27"
            },
            "scope": 5316,
            "src": "800:1342:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 5154,
              "nodeType": "Block",
              "src": "2274:648:27",
              "statements": [
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5144,
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 5155,
                      "src": "2284:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5143,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "2284:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5145,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2284:12:27"
                },
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5147,
                      "name": "ret",
                      "nodeType": "VariableDeclaration",
                      "scope": 5155,
                      "src": "2306:11:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5146,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2306:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5148,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2306:11:27"
                },
                {
                  "externalReferences": [
                    {
                      "ret": {
                        "declaration": 5147,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2844:3:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_calldata": {
                        "declaration": 5136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2619:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_calldata": {
                        "declaration": 5136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2561:9:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "success": {
                        "declaration": 5144,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2412:7:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "success": {
                        "declaration": 5144,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2814:7:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_addr": {
                        "declaration": 5134,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2508:5:27",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 5149,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    success := staticcall(gas(), _addr, add(_calldata, 0x20), mload(_calldata), ptr, 0x20)\n    if gt(success, 0)\n    {\n        ret := mload(ptr)\n    }\n}",
                  "src": "2327:573:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 5150,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5144,
                        "src": "2902:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5151,
                        "name": "ret",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5147,
                        "src": "2911:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "id": 5152,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "2901:14:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
                      "typeString": "tuple(bool,uint256)"
                    }
                  },
                  "functionReturnParameters": 5142,
                  "id": 5153,
                  "nodeType": "Return",
                  "src": "2894:21:27"
                }
              ]
            },
            "documentation": null,
            "id": 5155,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "staticInvoke",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5137,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5134,
                  "name": "_addr",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2170:13:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5133,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2170:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5136,
                  "name": "_calldata",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2185:22:27",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 5135,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2185:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2169:39:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5139,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2255:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5138,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2255:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5141,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5155,
                  "src": "2261:7:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5140,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2261:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2254:15:27"
            },
            "scope": 5316,
            "src": "2148:774:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 5180,
              "nodeType": "Block",
              "src": "3190:214:27",
              "statements": [
                {
                  "assignments": [
                    5167
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5167,
                      "name": "transferCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5181,
                      "src": "3200:29:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5166,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "3200:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5174,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5170,
                        "name": "TRANSFER_SELECTOR",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5110,
                        "src": "3268:17:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5171,
                        "name": "_to",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5159,
                        "src": "3299:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5172,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5161,
                        "src": "3316:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5168,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "3232:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5169,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3232:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5173,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3232:101:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3200:133:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5176,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5157,
                        "src": "3372:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5177,
                        "name": "transferCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5167,
                        "src": "3380:16:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5175,
                      "name": "invokeAndCheckSuccess",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5132,
                      "src": "3350:21:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes memory) returns (bool)"
                      }
                    },
                    "id": 5178,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3350:47:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5165,
                  "id": 5179,
                  "nodeType": "Return",
                  "src": "3343:54:27"
                }
              ]
            },
            "documentation": "@dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\n     Note that this makes an external call to the token.",
            "id": 5181,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "safeTransfer",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5162,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5157,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3122:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5156,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "3122:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5159,
                  "name": "_to",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3136:11:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5158,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3136:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5161,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3149:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5160,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3149:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3121:44:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5165,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5164,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5181,
                  "src": "3184:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5163,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3184:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3183:6:27"
            },
            "scope": 5316,
            "src": "3100:304:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5211,
              "nodeType": "Block",
              "src": "3695:252:27",
              "statements": [
                {
                  "assignments": [
                    5195
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5195,
                      "name": "transferFromCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5212,
                      "src": "3705:33:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5194,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "3705:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5205,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5198,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5183,
                            "src": "3777:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5199,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transferFrom",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7714,
                          "src": "3777:19:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,address,uint256) external returns (bool)"
                          }
                        },
                        "id": 5200,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3777:28:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5201,
                        "name": "_from",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5185,
                        "src": "3819:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5202,
                        "name": "_to",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5187,
                        "src": "3838:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5203,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5189,
                        "src": "3855:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5196,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "3741:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5197,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "3741:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5204,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3741:131:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3705:167:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5207,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5183,
                        "src": "3911:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5208,
                        "name": "transferFromCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5195,
                        "src": "3919:20:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5206,
                      "name": "invokeAndCheckSuccess",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5132,
                      "src": "3889:21:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes memory) returns (bool)"
                      }
                    },
                    "id": 5209,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3889:51:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5193,
                  "id": 5210,
                  "nodeType": "Return",
                  "src": "3882:58:27"
                }
              ]
            },
            "documentation": "@dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\n     Note that this makes an external call to the token.",
            "id": 5212,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "safeTransferFrom",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5190,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5183,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3612:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5182,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "3612:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5185,
                  "name": "_from",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3626:13:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5184,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3626:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5187,
                  "name": "_to",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3641:11:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5186,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3641:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5189,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3654:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5188,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3654:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3611:59:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5193,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5192,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5212,
                  "src": "3689:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5191,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3689:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3688:6:27"
            },
            "scope": 5316,
            "src": "3586:361:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5239,
              "nodeType": "Block",
              "src": "4218:223:27",
              "statements": [
                {
                  "assignments": [
                    5224
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5224,
                      "name": "approveCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5240,
                      "src": "4228:28:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5223,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "4228:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5233,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5227,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5214,
                            "src": "4295:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5228,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "approve",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7703,
                          "src": "4295:14:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 5229,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4295:23:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5230,
                        "name": "_spender",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5216,
                        "src": "4332:8:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5231,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5218,
                        "src": "4354:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5225,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "4259:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5226,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "4259:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5232,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4259:112:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4228:143:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5235,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5214,
                        "src": "4410:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5236,
                        "name": "approveCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5224,
                        "src": "4418:15:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5234,
                      "name": "invokeAndCheckSuccess",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5132,
                      "src": "4388:21:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes memory) returns (bool)"
                      }
                    },
                    "id": 5237,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4388:46:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 5222,
                  "id": 5238,
                  "nodeType": "Return",
                  "src": "4381:53:27"
                }
              ]
            },
            "documentation": "@dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\n     Note that this makes an external call to the token.",
            "id": 5240,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "safeApprove",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5219,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5214,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4145:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5213,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "4145:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5216,
                  "name": "_spender",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4159:16:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5215,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4159:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5218,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4177:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5217,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4177:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4144:49:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5222,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5221,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5240,
                  "src": "4212:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5220,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4212:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4211:6:27"
            },
            "scope": 5316,
            "src": "4124:317:27",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5275,
              "nodeType": "Block",
              "src": "4665:316:27",
              "statements": [
                {
                  "assignments": [
                    5250
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5250,
                      "name": "balanceOfCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5276,
                      "src": "4675:30:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5249,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "4675:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5258,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5253,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5242,
                            "src": "4744:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5254,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "balanceOf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7676,
                          "src": "4744:16:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                            "typeString": "function (address) view external returns (uint256)"
                          }
                        },
                        "id": 5255,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4744:25:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5256,
                        "name": "_owner",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5244,
                        "src": "4783:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5251,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "4708:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5252,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "4708:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5257,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4708:91:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4675:124:27"
                },
                {
                  "assignments": [
                    5260,
                    5262
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5260,
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 5276,
                      "src": "4811:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5259,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "4811:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 5262,
                      "name": "tokenBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 5276,
                      "src": "4825:20:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5261,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4825:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5267,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5264,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5242,
                        "src": "4862:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5265,
                        "name": "balanceOfCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5250,
                        "src": "4870:17:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5263,
                      "name": "staticInvoke",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5155,
                      "src": "4849:12:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_uint256_$",
                        "typeString": "function (address,bytes memory) view returns (bool,uint256)"
                      }
                    },
                    "id": 5266,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4849:39:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
                      "typeString": "tuple(bool,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4810:78:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5269,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5260,
                        "src": "4906:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5270,
                        "name": "ERROR_TOKEN_BALANCE_REVERTED",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5113,
                        "src": "4915:28:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 5268,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        8631,
                        8632
                      ],
                      "referencedDeclaration": 8632,
                      "src": "4898:7:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4898:46:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5272,
                  "nodeType": "ExpressionStatement",
                  "src": "4898:46:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5273,
                    "name": "tokenBalance",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5262,
                    "src": "4962:12:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5248,
                  "id": 5274,
                  "nodeType": "Return",
                  "src": "4955:19:27"
                }
              ]
            },
            "documentation": "@dev Static call into ERC20.balanceOf().\nReverts if the call fails for some reason (should never fail).",
            "id": 5276,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "staticBalanceOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5245,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5242,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5276,
                  "src": "4603:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5241,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "4603:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5244,
                  "name": "_owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 5276,
                  "src": "4617:14:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5243,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4617:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4602:30:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5248,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5247,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5276,
                  "src": "4656:7:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5246,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4656:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4655:9:27"
            },
            "scope": 5316,
            "src": "4578:403:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5314,
              "nodeType": "Block",
              "src": "5223:334:27",
              "statements": [
                {
                  "assignments": [
                    5288
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5288,
                      "name": "allowanceCallData",
                      "nodeType": "VariableDeclaration",
                      "scope": 5315,
                      "src": "5233:30:27",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 5287,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "5233:5:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5297,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5291,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5278,
                            "src": "5302:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7731",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 5292,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "allowance",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7685,
                          "src": "5302:16:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
                            "typeString": "function (address,address) view external returns (uint256)"
                          }
                        },
                        "id": 5293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selector",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5302:25:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5294,
                        "name": "_owner",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5280,
                        "src": "5341:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5295,
                        "name": "_spender",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5282,
                        "src": "5361:8:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 5289,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8615,
                        "src": "5266:3:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 5290,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5266:22:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 5296,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5266:113:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5233:146:27"
                },
                {
                  "assignments": [
                    5299,
                    5301
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5299,
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 5315,
                      "src": "5391:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 5298,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "5391:4:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 5301,
                      "name": "allowance",
                      "nodeType": "VariableDeclaration",
                      "scope": 5315,
                      "src": "5405:17:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5300,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5405:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5306,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5303,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5278,
                        "src": "5439:6:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5304,
                        "name": "allowanceCallData",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5288,
                        "src": "5447:17:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_ERC20_$7731",
                          "typeString": "contract ERC20"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5302,
                      "name": "staticInvoke",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5155,
                      "src": "5426:12:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_uint256_$",
                        "typeString": "function (address,bytes memory) view returns (bool,uint256)"
                      }
                    },
                    "id": 5305,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5426:39:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$",
                      "typeString": "tuple(bool,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5390:75:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5308,
                        "name": "success",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5299,
                        "src": "5483:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5309,
                        "name": "ERROR_TOKEN_ALLOWANCE_REVERTED",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5116,
                        "src": "5492:30:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 5307,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        8631,
                        8632
                      ],
                      "referencedDeclaration": 8632,
                      "src": "5475:7:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5310,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5475:48:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5311,
                  "nodeType": "ExpressionStatement",
                  "src": "5475:48:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5312,
                    "name": "allowance",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5301,
                    "src": "5541:9:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5286,
                  "id": 5313,
                  "nodeType": "Return",
                  "src": "5534:16:27"
                }
              ]
            },
            "documentation": "@dev Static call into ERC20.allowance().\nReverts if the call fails for some reason (should never fail).",
            "id": 5315,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "staticAllowance",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5283,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5278,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5143:12:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$7731",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5277,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7731,
                    "src": "5143:5:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$7731",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5280,
                  "name": "_owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5157:14:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5279,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5157:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5282,
                  "name": "_spender",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5173:16:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5281,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5173:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5142:48:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 5286,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5285,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5315,
                  "src": "5214:7:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5284,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5214:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5213:9:27"
            },
            "scope": 5316,
            "src": "5118:439:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 5317,
        "src": "376:5183:27"
      }
    ],
    "src": "315:5245:27"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "2.0.1",
  "updatedAt": "2019-04-16T08:24:52.815Z"
}