abi = [
  {
    "inputs": [
      {
        "internalType": "bool",
        "name": "nonUpgradable",
        "type": "bool"
      },
      {
        "internalType": "bool",
        "name": "appWhiteListingEnabled",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": False,
        "internalType": "bytes32",
        "name": "agreementType",
        "type": "bytes32"
      },
      {
        "indexed": False,
        "internalType": "address",
        "name": "code",
        "type": "address"
      }
    ],
    "name": "AgreementClassRegistered",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": False,
        "internalType": "bytes32",
        "name": "agreementType",
        "type": "bytes32"
      },
      {
        "indexed": False,
        "internalType": "address",
        "name": "code",
        "type": "address"
      }
    ],
    "name": "AgreementClassUpdated",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": True,
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      }
    ],
    "name": "AppRegistered",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": False,
        "internalType": "bytes32",
        "name": "uuid",
        "type": "bytes32"
      },
      {
        "indexed": False,
        "internalType": "address",
        "name": "codeAddress",
        "type": "address"
      }
    ],
    "name": "CodeUpdated",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": False,
        "internalType": "contract ISuperfluidGovernance",
        "name": "oldGov",
        "type": "address"
      },
      {
        "indexed": False,
        "internalType": "contract ISuperfluidGovernance",
        "name": "newGov",
        "type": "address"
      }
    ],
    "name": "GovernanceReplaced",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": True,
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "indexed": False,
        "internalType": "uint256",
        "name": "reason",
        "type": "uint256"
      }
    ],
    "name": "Jail",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": False,
        "internalType": "contract ISuperTokenFactory",
        "name": "newFactory",
        "type": "address"
      }
    ],
    "name": "SuperTokenFactoryUpdated",
    "type": "event"
  },
  {
    "anonymous": False,
    "inputs": [
      {
        "indexed": True,
        "internalType": "contract ISuperToken",
        "name": "token",
        "type": "address"
      },
      {
        "indexed": False,
        "internalType": "address",
        "name": "code",
        "type": "address"
      }
    ],
    "name": "SuperTokenLogicUpdated",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "APP_WHITE_LISTING_ENABLED",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "CALLBACK_GAS_LIMIT",
    "outputs": [
      {
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "MAX_APP_LEVEL",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "NON_UPGRADABLE_DEPLOYMENT",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "bitmap",
        "type": "uint256"
      },
      {
        "internalType": "bytes32",
        "name": "agreementType",
        "type": "bytes32"
      }
    ],
    "name": "addToAgreementClassesBitmap",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "newBitmap",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "targetApp",
        "type": "address"
      }
    ],
    "name": "allowCompositeApp",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      },
      {
        "internalType": "int256",
        "name": "appAllowanceUsedDelta",
        "type": "int256"
      }
    ],
    "name": "appCallbackPop",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "newCtx",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      },
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "appAllowanceGranted",
        "type": "uint256"
      },
      {
        "internalType": "int256",
        "name": "appAllowanceUsed",
        "type": "int256"
      },
      {
        "internalType": "contract ISuperfluidToken",
        "name": "appAllowanceToken",
        "type": "address"
      }
    ],
    "name": "appCallbackPush",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "appCtx",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "operationType",
            "type": "uint32"
          },
          {
            "internalType": "address",
            "name": "target",
            "type": "address"
          },
          {
            "internalType": "bytes",
            "name": "data",
            "type": "bytes"
          }
        ],
        "internalType": "struct ISuperfluid.Operation[]",
        "name": "operations",
        "type": "tuple[]"
      }
    ],
    "name": "batchCall",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperAgreement",
        "name": "agreementClass",
        "type": "address"
      },
      {
        "internalType": "bytes",
        "name": "callData",
        "type": "bytes"
      },
      {
        "internalType": "bytes",
        "name": "userData",
        "type": "bytes"
      }
    ],
    "name": "callAgreement",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "returnedData",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperAgreement",
        "name": "agreementClass",
        "type": "address"
      },
      {
        "internalType": "bytes",
        "name": "callData",
        "type": "bytes"
      },
      {
        "internalType": "bytes",
        "name": "userData",
        "type": "bytes"
      },
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      }
    ],
    "name": "callAgreementWithContext",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "newCtx",
        "type": "bytes"
      },
      {
        "internalType": "bytes",
        "name": "returnedData",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "bytes",
        "name": "callData",
        "type": "bytes"
      }
    ],
    "name": "callAppAction",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "returnedData",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "bytes",
        "name": "callData",
        "type": "bytes"
      },
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      }
    ],
    "name": "callAppActionWithContext",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "newCtx",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "bytes",
        "name": "callData",
        "type": "bytes"
      },
      {
        "internalType": "bool",
        "name": "isTermination",
        "type": "bool"
      },
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      }
    ],
    "name": "callAppAfterCallback",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "newCtx",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "bytes",
        "name": "callData",
        "type": "bytes"
      },
      {
        "internalType": "bool",
        "name": "isTermination",
        "type": "bool"
      },
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      }
    ],
    "name": "callAppBeforeCallback",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "cbdata",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      },
      {
        "internalType": "uint256",
        "name": "appAllowanceWantedMore",
        "type": "uint256"
      },
      {
        "internalType": "int256",
        "name": "appAllowanceUsedDelta",
        "type": "int256"
      }
    ],
    "name": "ctxUseAllowance",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "newCtx",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      }
    ],
    "name": "decodeCtx",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint8",
            "name": "appLevel",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "callType",
            "type": "uint8"
          },
          {
            "internalType": "uint256",
            "name": "timestamp",
            "type": "uint256"
          },
          {
            "internalType": "address",
            "name": "msgSender",
            "type": "address"
          },
          {
            "internalType": "bytes4",
            "name": "agreementSelector",
            "type": "bytes4"
          },
          {
            "internalType": "bytes",
            "name": "userData",
            "type": "bytes"
          },
          {
            "internalType": "uint256",
            "name": "appAllowanceGranted",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "appAllowanceWanted",
            "type": "uint256"
          },
          {
            "internalType": "int256",
            "name": "appAllowanceUsed",
            "type": "int256"
          },
          {
            "internalType": "address",
            "name": "appAddress",
            "type": "address"
          },
          {
            "internalType": "contract ISuperfluidToken",
            "name": "appAllowanceToken",
            "type": "address"
          }
        ],
        "internalType": "struct ISuperfluid.Context",
        "name": "context",
        "type": "tuple"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "operationType",
            "type": "uint32"
          },
          {
            "internalType": "address",
            "name": "target",
            "type": "address"
          },
          {
            "internalType": "bytes",
            "name": "data",
            "type": "bytes"
          }
        ],
        "internalType": "struct ISuperfluid.Operation[]",
        "name": "operations",
        "type": "tuple[]"
      }
    ],
    "name": "forwardBatchCall",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "agreementType",
        "type": "bytes32"
      }
    ],
    "name": "getAgreementClass",
    "outputs": [
      {
        "internalType": "contract ISuperAgreement",
        "name": "agreementClass",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "appAddr",
        "type": "address"
      }
    ],
    "name": "getAppLevel",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      }
    ],
    "name": "getAppManifest",
    "outputs": [
      {
        "internalType": "bool",
        "name": "isSuperApp",
        "type": "bool"
      },
      {
        "internalType": "bool",
        "name": "isJailed",
        "type": "bool"
      },
      {
        "internalType": "uint256",
        "name": "noopMask",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getCodeAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "codeAddress",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getGovernance",
    "outputs": [
      {
        "internalType": "contract ISuperfluidGovernance",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getSuperTokenFactory",
    "outputs": [
      {
        "internalType": "contract ISuperTokenFactory",
        "name": "factory",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getSuperTokenFactoryLogic",
    "outputs": [
      {
        "internalType": "address",
        "name": "logic",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperfluidGovernance",
        "name": "gov",
        "type": "address"
      }
    ],
    "name": "initialize",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperAgreement",
        "name": "agreementClass",
        "type": "address"
      }
    ],
    "name": "isAgreementClassListed",
    "outputs": [
      {
        "internalType": "bool",
        "name": "yes",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "agreementType",
        "type": "bytes32"
      }
    ],
    "name": "isAgreementTypeListed",
    "outputs": [
      {
        "internalType": "bool",
        "name": "yes",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      }
    ],
    "name": "isApp",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      }
    ],
    "name": "isAppJailed",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "contract ISuperApp",
        "name": "targetApp",
        "type": "address"
      }
    ],
    "name": "isCompositeAppAllowed",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      }
    ],
    "name": "isCtxValid",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "forwarder",
        "type": "address"
      }
    ],
    "name": "isTrustedForwarder",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "ctx",
        "type": "bytes"
      },
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "reason",
        "type": "uint256"
      }
    ],
    "name": "jailApp",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "newCtx",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "bitmap",
        "type": "uint256"
      }
    ],
    "name": "mapAgreementClasses",
    "outputs": [
      {
        "internalType": "contract ISuperAgreement[]",
        "name": "agreementClasses",
        "type": "address[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "proxiableUUID",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperAgreement",
        "name": "agreementClassLogic",
        "type": "address"
      }
    ],
    "name": "registerAgreementClass",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "configWord",
        "type": "uint256"
      }
    ],
    "name": "registerApp",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperApp",
        "name": "app",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "configWord",
        "type": "uint256"
      }
    ],
    "name": "registerAppByFactory",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "configWord",
        "type": "uint256"
      },
      {
        "internalType": "string",
        "name": "registrationKey",
        "type": "string"
      }
    ],
    "name": "registerAppWithKey",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "bitmap",
        "type": "uint256"
      },
      {
        "internalType": "bytes32",
        "name": "agreementType",
        "type": "bytes32"
      }
    ],
    "name": "removeFromAgreementClassesBitmap",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "newBitmap",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperfluidGovernance",
        "name": "newGov",
        "type": "address"
      }
    ],
    "name": "replaceGovernance",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperAgreement",
        "name": "agreementClassLogic",
        "type": "address"
      }
    ],
    "name": "updateAgreementClass",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newAddress",
        "type": "address"
      }
    ],
    "name": "updateCode",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperTokenFactory",
        "name": "newFactory",
        "type": "address"
      }
    ],
    "name": "updateSuperTokenFactory",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "contract ISuperToken",
        "name": "token",
        "type": "address"
      }
    ],
    "name": "updateSuperTokenLogic",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "versionRecipient",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  }
]