{
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "bool",
          "name": "callSuccess",
          "type": "bool"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "returnDataLength",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "returnData",
          "type": "bytes"
        }
      ],
      "name": "LogTransferHelperCallFailed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "bool",
          "name": "tokenIsContract",
          "type": "bool"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        }
      ],
      "name": "LogTransferHelperInputValidation1Failed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "balance",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "allowance",
          "type": "uint256"
        }
      ],
      "name": "LogTransferHelperInputValidation2Failed",
      "type": "event"
    }
  ],
  "allSourcePaths": {
    "23": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/TransferHelper.sol",
    "4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol"
  },
  "ast": {
    "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/TransferHelper.sol",
    "exportedSymbols": {
      "IERC20": [
        15820
      ],
      "TransferHelper": [
        21821
      ]
    },
    "id": 21822,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 21651,
        "literals": [
          "solidity",
          "0.8",
          ".2"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:22:23"
      },
      {
        "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 21652,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 21822,
        "sourceUnit": 15821,
        "src": "63:56:23",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "fullyImplemented": true,
        "id": 21821,
        "linearizedBaseContracts": [
          21821
        ],
        "name": "TransferHelper",
        "nameLocation": "603:14:23",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "id": 21660,
            "name": "LogTransferHelperInputValidation1Failed",
            "nameLocation": "631:39:23",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 21659,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 21654,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "tokenIsContract",
                  "nameLocation": "676:15:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21660,
                  "src": "671:20:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 21653,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "671:4:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21656,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "from",
                  "nameLocation": "701:4:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21660,
                  "src": "693:12:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 21655,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "693:7:23",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21658,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "to",
                  "nameLocation": "715:2:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21660,
                  "src": "707:10:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 21657,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "707:7:23",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "670:48:23"
            },
            "src": "625:94:23"
          },
          {
            "anonymous": false,
            "id": 21666,
            "name": "LogTransferHelperInputValidation2Failed",
            "nameLocation": "730:39:23",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 21665,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 21662,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "balance",
                  "nameLocation": "778:7:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21666,
                  "src": "770:15:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 21661,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "770:7:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21664,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "allowance",
                  "nameLocation": "795:9:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21666,
                  "src": "787:17:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 21663,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "787:7:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "769:36:23"
            },
            "src": "724:82:23"
          },
          {
            "anonymous": false,
            "id": 21674,
            "name": "LogTransferHelperCallFailed",
            "nameLocation": "817:27:23",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 21673,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 21668,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "callSuccess",
                  "nameLocation": "850:11:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21674,
                  "src": "845:16:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 21667,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "845:4:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21670,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "returnDataLength",
                  "nameLocation": "871:16:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21674,
                  "src": "863:24:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 21669,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "863:7:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21672,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "returnData",
                  "nameLocation": "895:10:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21674,
                  "src": "889:16:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 21671,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "889:5:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "844:62:23"
            },
            "src": "811:96:23"
          },
          {
            "body": {
              "id": 21819,
              "nodeType": "Block",
              "src": "1086:1249:23",
              "statements": [
                {
                  "assignments": [
                    21689
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 21689,
                      "mutability": "mutable",
                      "name": "tokenAddress",
                      "nameLocation": "1139:12:23",
                      "nodeType": "VariableDeclaration",
                      "scope": 21819,
                      "src": "1131:20:23",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 21688,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1131:7:23",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 21694,
                  "initialValue": {
                    "arguments": [
                      {
                        "id": 21692,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21677,
                        "src": "1162:5:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$15820",
                          "typeString": "contract IERC20"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_IERC20_$15820",
                          "typeString": "contract IERC20"
                        }
                      ],
                      "id": 21691,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1154:7:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_address_$",
                        "typeString": "type(address)"
                      },
                      "typeName": {
                        "id": 21690,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1154:7:23",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 21693,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1154:14:23",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1131:37:23"
                },
                {
                  "assignments": [
                    21696
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 21696,
                      "mutability": "mutable",
                      "name": "tokenIsContract",
                      "nameLocation": "1183:15:23",
                      "nodeType": "VariableDeclaration",
                      "scope": 21819,
                      "src": "1178:20:23",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 21695,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "1178:4:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 21703,
                  "initialValue": {
                    "components": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 21701,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "expression": {
                              "id": 21697,
                              "name": "tokenAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21689,
                              "src": "1202:12:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "id": 21698,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "code",
                            "nodeType": "MemberAccess",
                            "src": "1202:17:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 21699,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "1202:24:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 21700,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1229:1:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1202:28:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "id": 21702,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "1201:30:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1178:53:23"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 21719,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "id": 21716,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 21709,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 21704,
                          "name": "from",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 21679,
                          "src": "1245:4:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "arguments": [
                            {
                              "hexValue": "30",
                              "id": 21707,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1261:1:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 21706,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1253:7:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 21705,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1253:7:23",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 21708,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1253:10:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1245:18:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "||",
                      "rightExpression": {
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 21715,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 21710,
                          "name": "to",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 21681,
                          "src": "1267:2:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "arguments": [
                            {
                              "hexValue": "30",
                              "id": 21713,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1282:1:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 21712,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1273:7:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 21711,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1273:7:23",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 21714,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1273:11:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1267:17:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "src": "1245:39:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "id": 21718,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "1288:16:23",
                      "subExpression": {
                        "id": 21717,
                        "name": "tokenIsContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21696,
                        "src": "1289:15:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1245:59:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 21729,
                  "nodeType": "IfStatement",
                  "src": "1241:187:23",
                  "trueBody": {
                    "id": 21728,
                    "nodeType": "Block",
                    "src": "1306:122:23",
                    "statements": [
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 21721,
                              "name": "tokenIsContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21696,
                              "src": "1365:15:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "id": 21722,
                              "name": "from",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21679,
                              "src": "1382:4:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 21723,
                              "name": "to",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21681,
                              "src": "1388:2:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 21720,
                            "name": "LogTransferHelperInputValidation1Failed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21660,
                            "src": "1325:39:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bool_$_t_address_$_t_address_$returns$__$",
                              "typeString": "function (bool,address,address)"
                            }
                          },
                          "id": 21724,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1325:66:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 21725,
                        "nodeType": "EmitStatement",
                        "src": "1320:71:23"
                      },
                      {
                        "expression": {
                          "hexValue": "66616c7365",
                          "id": 21726,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1412:5:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 21687,
                        "id": 21727,
                        "nodeType": "Return",
                        "src": "1405:12:23"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    21731
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 21731,
                      "mutability": "mutable",
                      "name": "balance",
                      "nameLocation": "1489:7:23",
                      "nodeType": "VariableDeclaration",
                      "scope": 21819,
                      "src": "1481:15:23",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21730,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1481:7:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 21736,
                  "initialValue": {
                    "arguments": [
                      {
                        "id": 21734,
                        "name": "from",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21679,
                        "src": "1515:4:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "id": 21732,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21677,
                        "src": "1499:5:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$15820",
                          "typeString": "contract IERC20"
                        }
                      },
                      "id": 21733,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 15777,
                      "src": "1499:15:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 21735,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1499:21:23",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1481:39:23"
                },
                {
                  "assignments": [
                    21738
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 21738,
                      "mutability": "mutable",
                      "name": "allowance",
                      "nameLocation": "1538:9:23",
                      "nodeType": "VariableDeclaration",
                      "scope": 21819,
                      "src": "1530:17:23",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21737,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1530:7:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 21747,
                  "initialValue": {
                    "arguments": [
                      {
                        "id": 21741,
                        "name": "from",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21679,
                        "src": "1566:4:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 21744,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -28,
                            "src": "1580:4:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_TransferHelper_$21821",
                              "typeString": "library TransferHelper"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_TransferHelper_$21821",
                              "typeString": "library TransferHelper"
                            }
                          ],
                          "id": 21743,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "1572:7:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 21742,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "1572:7:23",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 21745,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1572:13:23",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "id": 21739,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21677,
                        "src": "1550:5:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$15820",
                          "typeString": "contract IERC20"
                        }
                      },
                      "id": 21740,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "allowance",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 15797,
                      "src": "1550:15:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address,address) view external returns (uint256)"
                      }
                    },
                    "id": 21746,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1550:36:23",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1530:56:23"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 21754,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 21750,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 21748,
                        "name": "balance",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21731,
                        "src": "1600:7:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "id": 21749,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21683,
                        "src": "1610:5:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "1600:15:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 21753,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 21751,
                        "name": "allowance",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21738,
                        "src": "1619:9:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "id": 21752,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21683,
                        "src": "1631:5:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "1619:17:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1600:36:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 21763,
                  "nodeType": "IfStatement",
                  "src": "1596:157:23",
                  "trueBody": {
                    "id": 21762,
                    "nodeType": "Block",
                    "src": "1638:115:23",
                    "statements": [
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 21756,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21731,
                              "src": "1697:7:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 21757,
                              "name": "allowance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21738,
                              "src": "1706:9:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 21755,
                            "name": "LogTransferHelperInputValidation2Failed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21666,
                            "src": "1657:39:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256)"
                            }
                          },
                          "id": 21758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1657:59:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 21759,
                        "nodeType": "EmitStatement",
                        "src": "1652:64:23"
                      },
                      {
                        "expression": {
                          "hexValue": "66616c7365",
                          "id": 21760,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1737:5:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 21687,
                        "id": 21761,
                        "nodeType": "Return",
                        "src": "1730:12:23"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    21765,
                    21767
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 21765,
                      "mutability": "mutable",
                      "name": "callSuccess",
                      "nameLocation": "1889:11:23",
                      "nodeType": "VariableDeclaration",
                      "scope": 21819,
                      "src": "1884:16:23",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 21764,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "1884:4:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21767,
                      "mutability": "mutable",
                      "name": "data",
                      "nameLocation": "1915:4:23",
                      "nodeType": "VariableDeclaration",
                      "scope": 21819,
                      "src": "1902:17:23",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 21766,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1902:5:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 21781,
                  "initialValue": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "hexValue": "30783233623837326464",
                            "id": 21775,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1996:10:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_599290589_by_1",
                              "typeString": "int_const 599290589"
                            },
                            "value": "0x23b872dd"
                          },
                          {
                            "id": 21776,
                            "name": "from",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21679,
                            "src": "2025:4:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "id": 21777,
                            "name": "to",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21681,
                            "src": "2048:2:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "id": 21778,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21683,
                            "src": "2069:5:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_599290589_by_1",
                              "typeString": "int_const 599290589"
                            },
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "id": 21773,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -1,
                            "src": "1956:3:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 21774,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodeWithSelector",
                          "nodeType": "MemberAccess",
                          "src": "1956:22:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function (bytes4) pure returns (bytes memory)"
                          }
                        },
                        "id": 21779,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1956:119:23",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "expression": {
                        "arguments": [
                          {
                            "id": 21770,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21677,
                            "src": "1931:5:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$15820",
                              "typeString": "contract IERC20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_IERC20_$15820",
                              "typeString": "contract IERC20"
                            }
                          ],
                          "id": 21769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "1923:7:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 21768,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "1923:7:23",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 21771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1923:14:23",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "id": 21772,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "call",
                      "nodeType": "MemberAccess",
                      "src": "1923:19:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                      }
                    },
                    "id": 21780,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1923:153:23",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(bool,bytes memory)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1883:193:23"
                },
                {
                  "expression": {
                    "id": 21806,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 21782,
                      "name": "success",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 21686,
                      "src": "2087:7:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "commonType": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "id": 21805,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 21783,
                        "name": "callSuccess",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21765,
                        "src": "2097:11:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "&&",
                      "rightExpression": {
                        "components": [
                          {
                            "commonType": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "id": 21803,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 21789,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "hexValue": "66616c7365",
                                "id": 21784,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2113:5:23",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 21788,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 21785,
                                    "name": "data",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 21767,
                                    "src": "2134:4:23",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 21786,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "src": "2134:11:23",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 21787,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2149:1:23",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "2134:16:23",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "2113:37:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "||",
                            "rightExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "id": 21801,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 21793,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "id": 21790,
                                        "name": "data",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 21767,
                                        "src": "2168:4:23",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      "id": 21791,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "length",
                                      "nodeType": "MemberAccess",
                                      "src": "2168:11:23",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "hexValue": "3332",
                                      "id": 21792,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "2183:2:23",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_32_by_1",
                                        "typeString": "int_const 32"
                                      },
                                      "value": "32"
                                    },
                                    "src": "2168:17:23",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "&&",
                                  "rightExpression": {
                                    "arguments": [
                                      {
                                        "id": 21796,
                                        "name": "data",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 21767,
                                        "src": "2200:4:23",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        }
                                      },
                                      {
                                        "components": [
                                          {
                                            "id": 21798,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "nodeType": "ElementaryTypeNameExpression",
                                            "src": "2207:4:23",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_bool_$",
                                              "typeString": "type(bool)"
                                            },
                                            "typeName": {
                                              "id": 21797,
                                              "name": "bool",
                                              "nodeType": "ElementaryTypeName",
                                              "src": "2207:4:23",
                                              "typeDescriptions": {}
                                            }
                                          }
                                        ],
                                        "id": 21799,
                                        "isConstant": false,
                                        "isInlineArray": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "TupleExpression",
                                        "src": "2206:6:23",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_bool_$",
                                          "typeString": "type(bool)"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes_memory_ptr",
                                          "typeString": "bytes memory"
                                        },
                                        {
                                          "typeIdentifier": "t_type$_t_bool_$",
                                          "typeString": "type(bool)"
                                        }
                                      ],
                                      "expression": {
                                        "id": 21794,
                                        "name": "abi",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -1,
                                        "src": "2189:3:23",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_abi",
                                          "typeString": "abi"
                                        }
                                      },
                                      "id": 21795,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "memberName": "decode",
                                      "nodeType": "MemberAccess",
                                      "src": "2189:10:23",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                        "typeString": "function () pure"
                                      }
                                    },
                                    "id": 21800,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2189:24:23",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "src": "2168:45:23",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                }
                              ],
                              "id": 21802,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "2167:47:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "src": "2113:101:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "id": 21804,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "2112:103:23",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "src": "2097:118:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "2087:128:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 21807,
                  "nodeType": "ExpressionStatement",
                  "src": "2087:128:23"
                },
                {
                  "condition": {
                    "id": 21809,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "2230:8:23",
                    "subExpression": {
                      "id": 21808,
                      "name": "success",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 21686,
                      "src": "2231:7:23",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 21818,
                  "nodeType": "IfStatement",
                  "src": "2226:103:23",
                  "trueBody": {
                    "id": 21817,
                    "nodeType": "Block",
                    "src": "2240:89:23",
                    "statements": [
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 21811,
                              "name": "callSuccess",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21765,
                              "src": "2287:11:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 21812,
                                "name": "data",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21767,
                                "src": "2300:4:23",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 21813,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2300:11:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 21814,
                              "name": "data",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21767,
                              "src": "2313:4:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 21810,
                            "name": "LogTransferHelperCallFailed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21674,
                            "src": "2259:27:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bool_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
                              "typeString": "function (bool,uint256,bytes memory)"
                            }
                          },
                          "id": 21815,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2259:59:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 21816,
                        "nodeType": "EmitStatement",
                        "src": "2254:64:23"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 21820,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "unifiedTransferFrom",
            "nameLocation": "922:19:23",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 21684,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 21677,
                  "mutability": "mutable",
                  "name": "token",
                  "nameLocation": "958:5:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21820,
                  "src": "951:12:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$15820",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 21676,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 21675,
                      "name": "IERC20",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 15820,
                      "src": "951:6:23"
                    },
                    "referencedDeclaration": 15820,
                    "src": "951:6:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$15820",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21679,
                  "mutability": "mutable",
                  "name": "from",
                  "nameLocation": "981:4:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21820,
                  "src": "973:12:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 21678,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "973:7:23",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21681,
                  "mutability": "mutable",
                  "name": "to",
                  "nameLocation": "1003:2:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21820,
                  "src": "995:10:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 21680,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "995:7:23",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 21683,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "1023:5:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21820,
                  "src": "1015:13:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 21682,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1015:7:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "941:93:23"
            },
            "returnParameters": {
              "id": 21687,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 21686,
                  "mutability": "mutable",
                  "name": "success",
                  "nameLocation": "1073:7:23",
                  "nodeType": "VariableDeclaration",
                  "scope": 21820,
                  "src": "1068:12:23",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 21685,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1068:4:23",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1067:14:23"
            },
            "scope": 21821,
            "src": "913:1422:23",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 21822,
        "src": "595:1742:23"
      }
    ],
    "src": "39:2298:23"
  },
  "bytecode": "60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d3dcd36af7e3481083036cb114c2d277752d1ea3891fc2397652a8499982557664736f6c63430008020033",
  "bytecodeSha1": "1ce946f6a4eaa185320328620ccf999b9e86db7c",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.2+commit.661d1103"
  },
  "contractName": "TransferHelper",
  "coverageMap": {
    "branches": {
      "23": {},
      "4": {}
    },
    "statements": {
      "23": {},
      "4": {}
    }
  },
  "dependencies": [
    "OpenZeppelin/openzeppelin-contracts@4.7.3/IERC20"
  ],
  "deployedBytecode": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d3dcd36af7e3481083036cb114c2d277752d1ea3891fc2397652a8499982557664736f6c63430008020033",
  "deployedSourceMap": "595:1742:23:-:0;;;;;;;;",
  "language": "Solidity",
  "natspec": {
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "offset": [
    595,
    2337
  ],
  "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD3 0xDC 0xD3 PUSH11 0xF7E3481083036CB114C2D2 PUSH24 0x752D1EA3891FC2397652A8499982557664736F6C63430008 MUL STOP CALLER ",
  "pcMap": {
    "0": {
      "offset": [
        595,
        2337
      ],
      "op": "PUSH20",
      "path": "23",
      "value": "0x0"
    },
    "21": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "ADDRESS",
      "path": "23"
    },
    "22": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "EQ",
      "path": "23"
    },
    "23": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "PUSH1",
      "path": "23",
      "value": "0x80"
    },
    "25": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "PUSH1",
      "path": "23",
      "value": "0x40"
    },
    "27": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "MSTORE",
      "path": "23"
    },
    "28": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "PUSH1",
      "path": "23",
      "value": "0x0"
    },
    "30": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "DUP1",
      "path": "23"
    },
    "31": {
      "fn": null,
      "offset": [
        595,
        2337
      ],
      "op": "REVERT",
      "path": "23"
    }
  },
  "sha1": "ab55e52ea80afe522c3bd9f6cafb7331669798fc",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n// inspired/informed by\n// https://soliditydeveloper.com/safe-erc20\n// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.3/contracts/token/ERC20/ERC20.sol\n// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.3/contracts/token/ERC20/utils/SafeERC20.sol\n// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.3/contracts/utils/Address.sol\n// https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\nlibrary TransferHelper {\n\n    event LogTransferHelperInputValidation1Failed(bool tokenIsContract, address from, address to);\n    event LogTransferHelperInputValidation2Failed(uint256 balance, uint256 allowance);\n    event LogTransferHelperCallFailed(bool callSuccess, uint256 returnDataLength, bytes returnData);\n\n    function unifiedTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    )\n        internal\n        returns(bool success)\n    {\n        // input validation step 1\n        address tokenAddress = address(token);\n        bool tokenIsContract = (tokenAddress.code.length > 0);\n        if (from == address(0) || to == address (0) || !tokenIsContract) {\n            emit LogTransferHelperInputValidation1Failed(tokenIsContract, from, to);\n            return false;\n        }\n        \n        // input validation step 2\n        uint256 balance = token.balanceOf(from);\n        uint256 allowance = token.allowance(from, address(this));\n        if (balance < value || allowance < value) {\n            emit LogTransferHelperInputValidation2Failed(balance, allowance);\n            return false;\n        }\n\n        // low-level call to transferFrom\n        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n        (bool callSuccess, bytes memory data) = address(token).call(\n            abi.encodeWithSelector(\n                0x23b872dd, \n                from, \n                to, \n                value));\n\n        success = callSuccess && (false\n            || data.length == 0 \n            || (data.length == 32 && abi.decode(data, (bool))));\n\n        if (!success) {\n            emit LogTransferHelperCallFailed(callSuccess, data.length, data);\n        }\n    }\n}",
  "sourceMap": "595:1742:23:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;595:1742:23;;;;;;;;;;;;;;;;;",
  "sourcePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/TransferHelper.sol",
  "type": "library"
}