{
  "address": "0x88F896E7667e01E0e8b27a5E39076B020318EF51",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "contract IComptroller",
          "name": "_comptroller",
          "type": "address"
        },
        {
          "internalType": "contract SwapHelper",
          "name": "_swapHelper",
          "type": "address"
        },
        {
          "internalType": "contract IVToken",
          "name": "_vBNB",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "errorCode",
          "type": "uint256"
        }
      ],
      "name": "AccrueInterestFailed",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "errorCode",
          "type": "uint256"
        }
      ],
      "name": "BorrowBehalfFailed",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "err",
          "type": "uint256"
        }
      ],
      "name": "EnterMarketFailed",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "FlashLoanAssetOrAmountMismatch",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "IdenticalMarkets",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InitiatorMismatch",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InsufficientFundsToRepayFlashloan",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InvalidExecuteOperation",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "market",
          "type": "address"
        }
      ],
      "name": "MarketNotListed",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "errorCode",
          "type": "uint256"
        }
      ],
      "name": "MintBehalfFailed",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "NotAnApprovedDelegate",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "OnBehalfMismatch",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "errorCode",
          "type": "uint256"
        }
      ],
      "name": "OperationCausesLiquidation",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "errorCode",
          "type": "uint256"
        }
      ],
      "name": "RedeemBehalfFailed",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "errorCode",
          "type": "uint256"
        }
      ],
      "name": "RepayBehalfFailed",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "SlippageExceeded",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "TokenSwapCallFailed",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "UnauthorizedExecutor",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "VBNBNotSupported",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "ZeroAddress",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "ZeroFlashLoanAmount",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "DustTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "collateralMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmountSeed",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "borrowedMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "borrowedAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "LeverageEntered",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "collateralMarket",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "borrowedMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "borrowedAmountSeed",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "borrowedAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "LeverageEnteredFromBorrow",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "collateralMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmountToRedeemForSwap",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "borrowedMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "borrowedAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "LeverageExited",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferStarted",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "collateralMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmountSeed",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "SingleAssetLeverageEntered",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IVToken",
          "name": "collateralMarket",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "collateralAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "SingleAssetLeverageExited",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "COMPTROLLER",
      "outputs": [
        {
          "internalType": "contract IComptroller",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "acceptOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IVToken",
          "name": "_collateralMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_collateralAmountSeed",
          "type": "uint256"
        },
        {
          "internalType": "contract IVToken",
          "name": "_borrowedMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_borrowedAmountToFlashLoan",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_minAmountOutAfterSwap",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "_swapData",
          "type": "bytes"
        }
      ],
      "name": "enterLeverage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IVToken",
          "name": "_collateralMarket",
          "type": "address"
        },
        {
          "internalType": "contract IVToken",
          "name": "_borrowedMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_borrowedAmountSeed",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_borrowedAmountToFlashLoan",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_minAmountOutAfterSwap",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "_swapData",
          "type": "bytes"
        }
      ],
      "name": "enterLeverageFromBorrow",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IVToken",
          "name": "_collateralMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_collateralAmountSeed",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_collateralAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "enterSingleAssetLeverage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IVToken[]",
          "name": "vTokens",
          "type": "address[]"
        },
        {
          "internalType": "uint256[]",
          "name": "amounts",
          "type": "uint256[]"
        },
        {
          "internalType": "uint256[]",
          "name": "premiums",
          "type": "uint256[]"
        },
        {
          "internalType": "address",
          "name": "initiator",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "onBehalf",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "param",
          "type": "bytes"
        }
      ],
      "name": "executeOperation",
      "outputs": [
        {
          "internalType": "bool",
          "name": "success",
          "type": "bool"
        },
        {
          "internalType": "uint256[]",
          "name": "repayAmounts",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IVToken",
          "name": "_collateralMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_collateralAmountToRedeemForSwap",
          "type": "uint256"
        },
        {
          "internalType": "contract IVToken",
          "name": "_borrowedMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_borrowedAmountToFlashLoan",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_minAmountOutAfterSwap",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "_swapData",
          "type": "bytes"
        }
      ],
      "name": "exitLeverage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IVToken",
          "name": "_collateralMarket",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_collateralAmountToFlashLoan",
          "type": "uint256"
        }
      ],
      "name": "exitSingleAssetLeverage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pendingOwner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "swapHelper",
      "outputs": [
        {
          "internalType": "contract SwapHelper",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "vBNB",
      "outputs": [
        {
          "internalType": "contract IVToken",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "transactionHash": "0xff40d0a8d01c40896cfec006af72a0c7d6c76d5b5f90ca2b74edd19d3970384d",
  "receipt": {
    "to": null,
    "from": "0x7A27Eb983eABc20CC68759Ec89227f4ae5656347",
    "contractAddress": "0x88F896E7667e01E0e8b27a5E39076B020318EF51",
    "transactionIndex": 51,
    "gasUsed": "3074935",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000020000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000",
    "blockHash": "0x03f31c8f89c7b028a296ccef7a58f3162a8d7024a2b06f408b9602a80be96927",
    "transactionHash": "0xff40d0a8d01c40896cfec006af72a0c7d6c76d5b5f90ca2b74edd19d3970384d",
    "logs": [
      {
        "transactionIndex": 51,
        "blockNumber": 71258949,
        "transactionHash": "0xff40d0a8d01c40896cfec006af72a0c7d6c76d5b5f90ca2b74edd19d3970384d",
        "address": "0x88F896E7667e01E0e8b27a5E39076B020318EF51",
        "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
        "data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
        "logIndex": 226,
        "blockHash": "0x03f31c8f89c7b028a296ccef7a58f3162a8d7024a2b06f408b9602a80be96927"
      }
    ],
    "blockNumber": 71258949,
    "cumulativeGasUsed": "10115278",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0xfD36E2c2a6789Db23113685031d7F16329158384",
    "0xD79be25aEe798Aa34A9Ba1230003d7499be29A24",
    "0xA07c5b74C9B40447a954e1466938b865b6BBea36"
  ],
  "numDeployments": 1,
  "solcInputHash": "d278850a06faca1b8b1765b7862740a2",
  "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IComptroller\",\"name\":\"_comptroller\",\"type\":\"address\"},{\"internalType\":\"contract SwapHelper\",\"name\":\"_swapHelper\",\"type\":\"address\"},{\"internalType\":\"contract IVToken\",\"name\":\"_vBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorCode\",\"type\":\"uint256\"}],\"name\":\"AccrueInterestFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorCode\",\"type\":\"uint256\"}],\"name\":\"BorrowBehalfFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"err\",\"type\":\"uint256\"}],\"name\":\"EnterMarketFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FlashLoanAssetOrAmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IdenticalMarkets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitiatorMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFundsToRepayFlashloan\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExecuteOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"}],\"name\":\"MarketNotListed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorCode\",\"type\":\"uint256\"}],\"name\":\"MintBehalfFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAnApprovedDelegate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnBehalfMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorCode\",\"type\":\"uint256\"}],\"name\":\"OperationCausesLiquidation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorCode\",\"type\":\"uint256\"}],\"name\":\"RedeemBehalfFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorCode\",\"type\":\"uint256\"}],\"name\":\"RepayBehalfFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SlippageExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenSwapCallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedExecutor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VBNBNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroFlashLoanAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DustTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"collateralMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"borrowedMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowedAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"LeverageEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"collateralMarket\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"borrowedMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowedAmountSeed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowedAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"LeverageEnteredFromBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"collateralMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountToRedeemForSwap\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"borrowedMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowedAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"LeverageExited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"collateralMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountSeed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"SingleAssetLeverageEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IVToken\",\"name\":\"collateralMarket\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"SingleAssetLeverageExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COMPTROLLER\",\"outputs\":[{\"internalType\":\"contract IComptroller\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IVToken\",\"name\":\"_collateralMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralAmountSeed\",\"type\":\"uint256\"},{\"internalType\":\"contract IVToken\",\"name\":\"_borrowedMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_borrowedAmountToFlashLoan\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountOutAfterSwap\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_swapData\",\"type\":\"bytes\"}],\"name\":\"enterLeverage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IVToken\",\"name\":\"_collateralMarket\",\"type\":\"address\"},{\"internalType\":\"contract IVToken\",\"name\":\"_borrowedMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_borrowedAmountSeed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_borrowedAmountToFlashLoan\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountOutAfterSwap\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_swapData\",\"type\":\"bytes\"}],\"name\":\"enterLeverageFromBorrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IVToken\",\"name\":\"_collateralMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralAmountSeed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_collateralAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"enterSingleAssetLeverage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IVToken[]\",\"name\":\"vTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"premiums\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"onBehalf\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"param\",\"type\":\"bytes\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"repayAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IVToken\",\"name\":\"_collateralMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralAmountToRedeemForSwap\",\"type\":\"uint256\"},{\"internalType\":\"contract IVToken\",\"name\":\"_borrowedMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_borrowedAmountToFlashLoan\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountOutAfterSwap\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_swapData\",\"type\":\"bytes\"}],\"name\":\"exitLeverage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IVToken\",\"name\":\"_collateralMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralAmountToFlashLoan\",\"type\":\"uint256\"}],\"name\":\"exitSingleAssetLeverage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapHelper\",\"outputs\":[{\"internalType\":\"contract SwapHelper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract IVToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus Protocol\",\"errors\":{\"AccrueInterestFailed(uint256)\":[{\"custom:error\":\"AccrueInterestFailed accrueInterest on a vToken market returned a non-zero error code\"}],\"BorrowBehalfFailed(uint256)\":[{\"custom:error\":\"BorrowBehalfFailed borrowBehalf on a vToken market returned a non-zero error code\"}],\"EnterMarketFailed(uint256)\":[{\"custom:error\":\"EnterMarketFailed Comptroller.enterMarketBehalf returned a non-zero error code\"}],\"FlashLoanAssetOrAmountMismatch()\":[{\"custom:error\":\"FlashLoanAssetOrAmountMismatch Invalid flash loan arrays length or >1 elements\"}],\"IdenticalMarkets()\":[{\"custom:error\":\"IdenticalMarkets Collateral and borrow markets cannot be the same\"}],\"InitiatorMismatch()\":[{\"custom:error\":\"InitiatorMismatch Invalid initiator address in flash loan callback\"}],\"InsufficientFundsToRepayFlashloan()\":[{\"custom:error\":\"InsufficientFundsToRepayFlashloan Not enough proceeds to repay flash loan plus fees\"}],\"InvalidExecuteOperation()\":[{\"custom:error\":\"InvalidExecuteOperation Unknown operation type in flash loan callback\"}],\"MarketNotListed(address)\":[{\"custom:error\":\"MarketNotListed Provided vToken market is not listed in Comptroller\"}],\"MintBehalfFailed(uint256)\":[{\"custom:error\":\"MintBehalfFailed mintBehalf on a vToken market returned a non-zero error code\"}],\"NotAnApprovedDelegate()\":[{\"custom:error\":\"NotAnApprovedDelegate User has not approved this contract as a delegate\"}],\"OnBehalfMismatch()\":[{\"custom:error\":\"OnBehalfMismatch Invalid onBehalf address in flash loan callback\"}],\"OperationCausesLiquidation(uint256)\":[{\"custom:error\":\"OperationCausesLiquidation Operation would put the account at risk (undercollateralized) returns a non-zero error code from getBorrowingPower\"}],\"RedeemBehalfFailed(uint256)\":[{\"custom:error\":\"RedeemBehalfFailed redeemBehalf on a vToken market returned a non-zero error code\"}],\"RepayBehalfFailed(uint256)\":[{\"custom:error\":\"RepayBehalfFailed repayBehalf on a vToken market returned a non-zero error code\"}],\"SlippageExceeded()\":[{\"custom:error\":\"SlippageExceeded Swap output lower than required minimum\"}],\"TokenSwapCallFailed()\":[{\"custom:error\":\"TokenSwapCallFailed Swap helper call reverted or returned false\"}],\"UnauthorizedExecutor()\":[{\"custom:error\":\"UnauthorizedExecutor Caller is not the expected Comptroller\"}],\"VBNBNotSupported()\":[{\"custom:error\":\"VBNBNotSupported vBNB market is not supported for leverage operations\"}],\"ZeroAddress()\":[{\"custom:error\":\"ZeroAddress One of the required addresses is zero\"}],\"ZeroFlashLoanAmount()\":[{\"custom:error\":\"ZeroFlashLoanAmount Flash loan amount cannot be zero\"}]},\"events\":{\"DustTransferred(address,address,uint256)\":{\"params\":{\"amount\":\"The amount of dust transferred\",\"recipient\":\"The address receiving the dust (user or protocol share reserve)\",\"token\":\"The underlying token address\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LeverageEntered(address,address,uint256,address,uint256)\":{\"params\":{\"borrowedAmountToFlashLoan\":\"The amount being flash loaned\",\"borrowedMarket\":\"The vToken market being borrowed from\",\"collateralAmountSeed\":\"The initial collateral amount provided by the user\",\"collateralMarket\":\"The vToken market used as collateral\",\"user\":\"The address of the user entering the position\"}},\"LeverageEnteredFromBorrow(address,address,address,uint256,uint256)\":{\"params\":{\"borrowedAmountSeed\":\"The initial borrowed asset amount provided by the user\",\"borrowedAmountToFlashLoan\":\"The amount being flash loaned\",\"borrowedMarket\":\"The vToken market being borrowed from\",\"collateralMarket\":\"The vToken market used as collateral\",\"user\":\"The address of the user entering the position\"}},\"LeverageExited(address,address,uint256,address,uint256)\":{\"params\":{\"borrowedAmountToFlashLoan\":\"The amount being flash loaned\",\"borrowedMarket\":\"The vToken market being repaid\",\"collateralAmountToRedeemForSwap\":\"The amount of collateral being redeemed for swap\",\"collateralMarket\":\"The vToken market being redeemed\",\"user\":\"The address of the user exiting the position\"}},\"SingleAssetLeverageEntered(address,address,uint256,uint256)\":{\"params\":{\"collateralAmountSeed\":\"The initial collateral amount provided by the user\",\"collateralAmountToFlashLoan\":\"The amount being flash loaned\",\"collateralMarket\":\"The vToken market used as collateral\",\"user\":\"The address of the user entering the position\"}},\"SingleAssetLeverageExited(address,address,uint256)\":{\"params\":{\"collateralAmountToFlashLoan\":\"The amount being flash loaned\",\"collateralMarket\":\"The vToken market used for both collateral and borrowed asset\",\"user\":\"The address of the user exiting the position\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"details\":\"Sets immutable variables and disables initializers for the implementation contract\",\"params\":{\"_comptroller\":\"The Venus comptroller contract address\",\"_swapHelper\":\"The swap helper contract address\",\"_vBNB\":\"The vBNB market address (not supported for leverage operations)\"}},\"enterLeverage(address,uint256,address,uint256,uint256,bytes)\":{\"details\":\"This function uses flash loans to borrow assets, swaps them for collateral tokens,      and supplies the collateral to the Venus protocol to amplify the user's position.      The user must have delegated permission to this contract via the comptroller.      Any remaining dust (both collateral and borrowed assets) after the operation is returned to the user.\",\"params\":{\"borrowedAmountToFlashLoan\":\"The amount to borrow via flash loan for leverage\",\"borrowedMarket\":\"The vToken market from which assets will be borrowed via flash loan (must not be vBNB)\",\"collateralAmountSeed\":\"The initial amount of collateral the user provides (can be 0)\",\"collateralMarket\":\"The vToken market where collateral will be supplied (must not be vBNB)\",\"minAmountOutAfterSwap\":\"The minimum amount of collateral expected after swap (for slippage protection)\",\"swapData\":\"Bytes containing swap instructions for converting borrowed assets to collateral\"}},\"enterLeverageFromBorrow(address,address,uint256,uint256,uint256,bytes)\":{\"details\":\"This function uses flash loans to borrow additional assets, swaps the total borrowed amount      for collateral tokens, and supplies the collateral to the Venus protocol to amplify the user's position.      The user must have delegated permission to this contract via the comptroller.      Any remaining dust (both collateral and borrowed assets) after the operation is returned to the user.\",\"params\":{\"borrowedAmountSeed\":\"The initial amount of borrowed assets the user provides (can be 0)\",\"borrowedAmountToFlashLoan\":\"The additional amount to borrow via flash loan for leverage\",\"borrowedMarket\":\"The vToken market from which assets will be borrowed via flash loan (must not be vBNB)\",\"collateralMarket\":\"The vToken market where collateral will be supplied (must not be vBNB)\",\"minAmountOutAfterSwap\":\"The minimum amount of collateral expected after swap (for slippage protection)\",\"swapData\":\"Bytes containing swap instructions for converting borrowed assets to collateral\"}},\"enterSingleAssetLeverage(address,uint256,uint256)\":{\"details\":\"This function flash loans additional collateral assets, amplifying the user's supplied collateral      in the Venus protocol. The user must have delegated permission to this contract via the comptroller.      Any remaining collateral dust after the operation is returned to the user.\",\"params\":{\"collateralAmountSeed\":\"The initial amount of collateral the user provides (can be 0)\",\"collateralAmountToFlashLoan\":\"The amount to borrow via flash loan for leverage\",\"collateralMarket\":\"The vToken market where collateral will be supplied (must not be vBNB)\"}},\"executeOperation(address[],uint256[],uint256[],address,address,bytes)\":{\"custom:error\":\"InitiatorMismatch When initiator is not this contractOnBehalfMismatch When onBehalf is not the operation initiatorUnauthorizedExecutor When caller is not the ComptrollerFlashLoanAssetOrAmountMismatch When array lengths mismatch or > 1 elementInvalidExecuteOperation When operation type is unknown\",\"details\":\"Protected by nonReentrant modifier to prevent reentrancy attacks during flash loan execution\",\"params\":{\"amounts\":\"Array with the borrowed underlying amount (single element)\",\"initiator\":\"The address that initiated the flash loan (must be this contract)\",\"onBehalf\":\"The user for whom debt will be opened\",\"param\":\"Encoded auxiliary data for the operation (e.g., swap multicall)\",\"premiums\":\"Array with the flash loan fee amount (single element)\",\"vTokens\":\"Array with the borrowed vToken market (single element)\"},\"returns\":{\"repayAmounts\":\"Amounts to approve for flash loan repayment\",\"success\":\"Whether the execution succeeded\"}},\"exitLeverage(address,uint256,address,uint256,uint256,bytes)\":{\"details\":\"This function uses flash loans to temporarily repay debt, redeems collateral,      swaps collateral for borrowed assets, and repays the flash loan. Any remaining      dust (both collateral and borrowed assets) is returned to the user. This ensures      users who swap more than required as protection against price volatility receive      their excess tokens back.      The flash loan amount can exceed actual debt to account for interest accrual      between transaction creation and mining. The contract caps repayment to actual      debt and uses leftover funds toward flash loan repayment.      NOTE: No pre-operation safety check is performed because exiting leverage reduces      debt exposure, which can only improve account health. Post-operation safety is      still validated to ensure the final position is healthy.      IMPORTANT: If treasuryPercent() is nonzero, the user must provide a      collateralAmountToRedeemForSwap that accounts for the treasury fee. Only      (1 - treasuryPercent/1e18) of the redeemed amount is transferred to this contract.      Required gross amount = netAmountNeeded * 1e18 / (1e18 - treasuryPercent)\",\"params\":{\"borrowedAmountToFlashLoan\":\"The amount to borrow via flash loan for debt repayment (can exceed actual debt)\",\"borrowedMarket\":\"The vToken market where debt will be repaid via flash loan (must not be vBNB)\",\"collateralAmountToRedeemForSwap\":\"The gross amount of collateral to redeem (must account for treasury fee if nonzero)\",\"collateralMarket\":\"The vToken market from which collateral will be redeemed (must not be vBNB)\",\"minAmountOutAfterSwap\":\"The minimum amount of borrowed asset expected after swap (for slippage protection)\",\"swapData\":\"Bytes containing swap instructions for converting collateral to borrowed assets\"}},\"exitSingleAssetLeverage(address,uint256)\":{\"details\":\"This function uses flash loans to temporarily repay debt, redeems collateral,      and repays the flash loan without requiring token swaps. This is more gas-efficient      than exitLeverage when dealing with single-asset positions. Any remaining collateral      dust after the operation is returned to the user.      The flash loan amount can exceed actual debt to account for interest accrual      between transaction creation and mining. The contract caps repayment to actual      debt and uses leftover funds toward flash loan repayment.      If treasuryPercent() is nonzero, the contract automatically adjusts the redeem      amount to ensure sufficient funds are received to repay the flash loan after the      treasury fee deduction.      NOTE: No pre-operation safety check is performed because exiting leverage reduces      debt exposure, which can only improve account health. Post-operation safety is      still validated to ensure the final position is healthy.\",\"params\":{\"collateralAmountToFlashLoan\":\"The amount to borrow via flash loan for debt repayment (can exceed actual debt)\",\"collateralMarket\":\"The vToken market for both collateral and borrowed asset (must not be vBNB)\"}},\"initialize()\":{\"details\":\"Sets up the Ownable2Step functionality. Can only be called once.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"}},\"stateVariables\":{\"MANTISSA_ONE\":{\"details\":\"Mantissa for fixed-point arithmetic (1e18 = 100%)\"},\"SUCCESS\":{\"details\":\"Success return value for VToken operations (mint, borrow, repay, redeem)\"},\"borrowedAmountSeed\":{\"details\":\"Transient (EIP-1153): Cleared at transaction end. Stores borrowed amount seed for enterLeverageFromBorrow.\"},\"collateralAmount\":{\"details\":\"Transient (EIP-1153): Cleared at transaction end. Stores collateral seed (enter) or redeem amount (exit).\"},\"collateralMarket\":{\"details\":\"Transient (EIP-1153): Cleared at transaction end. Stores collateral market for flash loan callback.\"},\"minAmountOutAfterSwap\":{\"details\":\"Transient (EIP-1153): Cleared at transaction end. Stores minimum expected output after swap.\"},\"operationInitiator\":{\"details\":\"Transient (EIP-1153): Cleared at transaction end. Stores msg.sender for flash loan callback context.\"},\"operationType\":{\"details\":\"Transient (EIP-1153): Cleared at transaction end. Tracks operation type during flash loan callback.\"}},\"title\":\"LeverageStrategiesManager\",\"version\":1},\"userdoc\":{\"events\":{\"DustTransferred(address,address,uint256)\":{\"notice\":\"Emitted when dust amounts are transferred after a leverage operation\"},\"LeverageEntered(address,address,uint256,address,uint256)\":{\"notice\":\"Emitted when a user enters a leveraged position with collateral seed\"},\"LeverageEnteredFromBorrow(address,address,address,uint256,uint256)\":{\"notice\":\"Emitted when a user enters a leveraged position with borrowed asset seed\"},\"LeverageExited(address,address,uint256,address,uint256)\":{\"notice\":\"Emitted when a user exits a leveraged position\"},\"SingleAssetLeverageEntered(address,address,uint256,uint256)\":{\"notice\":\"Emitted when a user enters a leveraged position with single collateral asset\"},\"SingleAssetLeverageExited(address,address,uint256)\":{\"notice\":\"Emitted when a user exits a leveraged position with single collateral asset\"}},\"kind\":\"user\",\"methods\":{\"COMPTROLLER()\":{\"notice\":\"The Venus comptroller contract for market interactions and flash loans execution\"},\"constructor\":{\"notice\":\"Contract constructor\"},\"enterLeverage(address,uint256,address,uint256,uint256,bytes)\":{\"notice\":\"Enters a leveraged position by borrowing assets and converting them to collateral\"},\"enterLeverageFromBorrow(address,address,uint256,uint256,uint256,bytes)\":{\"notice\":\"Enters a leveraged position by using existing borrowed assets and converting them to collateral\"},\"enterSingleAssetLeverage(address,uint256,uint256)\":{\"notice\":\"Enters a leveraged position using only collateral provided by the user\"},\"executeOperation(address[],uint256[],uint256[],address,address,bytes)\":{\"notice\":\"Flash loan callback entrypoint called by Comptroller\"},\"exitLeverage(address,uint256,address,uint256,uint256,bytes)\":{\"notice\":\"Exits a leveraged position by redeeming collateral and repaying borrowed assets\"},\"exitSingleAssetLeverage(address,uint256)\":{\"notice\":\"Exits a leveraged position when collateral and borrowed assets are the same token\"},\"initialize()\":{\"notice\":\"Initializes the contract\"},\"swapHelper()\":{\"notice\":\"The swap helper contract for executing token swaps during leverage operations\"},\"vBNB()\":{\"notice\":\"The vBNB market address (not supported for leverage operations)\"}},\"notice\":\"Contract for managing leveraged positions using flash loans and token swaps\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LeverageManager/LeverageStrategiesManager.sol\":\"LeverageStrategiesManager\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n    address private _pendingOwner;\\n\\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n    function __Ownable2Step_init() internal onlyInitializing {\\n        __Ownable_init_unchained();\\n    }\\n\\n    function __Ownable2Step_init_unchained() internal onlyInitializing {\\n    }\\n    /**\\n     * @dev Returns the address of the pending owner.\\n     */\\n    function pendingOwner() public view virtual returns (address) {\\n        return _pendingOwner;\\n    }\\n\\n    /**\\n     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual override onlyOwner {\\n        _pendingOwner = newOwner;\\n        emit OwnershipTransferStarted(owner(), newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual override {\\n        delete _pendingOwner;\\n        super._transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev The new owner accepts the ownership transfer.\\n     */\\n    function acceptOwnership() public virtual {\\n        address sender = _msgSender();\\n        require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n        _transferOwnership(sender);\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x9140dabc466abab21b48b72dbda26736b1183a310d0e677d3719d201df026510\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    function __Ownable_init() internal onlyInitializing {\\n        __Ownable_init_unchained();\\n    }\\n\\n    function __Ownable_init_unchained() internal onlyInitializing {\\n        _transferOwnership(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        _checkOwner();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if the sender is not the owner.\\n     */\\n    function _checkOwner() internal view virtual {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby disabling any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _transferOwnership(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x359a1ab89b46b9aba7bcad3fb651924baf4893d15153049b9976b0fc9be1358e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n *     function initialize() initializer public {\\n *         __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n *     }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n *     function initializeV2() reinitializer(2) public {\\n *         __ERC20Permit_init(\\\"MyToken\\\");\\n *     }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n *     _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n    /**\\n     * @dev Indicates that the contract has been initialized.\\n     * @custom:oz-retyped-from bool\\n     */\\n    uint8 private _initialized;\\n\\n    /**\\n     * @dev Indicates that the contract is in the process of being initialized.\\n     */\\n    bool private _initializing;\\n\\n    /**\\n     * @dev Triggered when the contract has been initialized or reinitialized.\\n     */\\n    event Initialized(uint8 version);\\n\\n    /**\\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n     * `onlyInitializing` functions can be used to initialize parent contracts.\\n     *\\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n     * constructor.\\n     *\\n     * Emits an {Initialized} event.\\n     */\\n    modifier initializer() {\\n        bool isTopLevelCall = !_initializing;\\n        require(\\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n            \\\"Initializable: contract is already initialized\\\"\\n        );\\n        _initialized = 1;\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(1);\\n        }\\n    }\\n\\n    /**\\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n     * used to initialize parent contracts.\\n     *\\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n     * are added through upgrades and that require initialization.\\n     *\\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\\n     *\\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n     * a contract, executing them in the right order is up to the developer or operator.\\n     *\\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\\n     *\\n     * Emits an {Initialized} event.\\n     */\\n    modifier reinitializer(uint8 version) {\\n        require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n        _initialized = version;\\n        _initializing = true;\\n        _;\\n        _initializing = false;\\n        emit Initialized(version);\\n    }\\n\\n    /**\\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n     */\\n    modifier onlyInitializing() {\\n        require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n     * through proxies.\\n     *\\n     * Emits an {Initialized} event the first time it is successfully executed.\\n     */\\n    function _disableInitializers() internal virtual {\\n        require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n        if (_initialized != type(uint8).max) {\\n            _initialized = type(uint8).max;\\n            emit Initialized(type(uint8).max);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n     */\\n    function _getInitializedVersion() internal view returns (uint8) {\\n        return _initialized;\\n    }\\n\\n    /**\\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n     */\\n    function _isInitializing() internal view returns (bool) {\\n        return _initializing;\\n    }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    function __ReentrancyGuard_init() internal onlyInitializing {\\n        __ReentrancyGuard_init_unchained();\\n    }\\n\\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and making it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _nonReentrantBefore();\\n        _;\\n        _nonReentrantAfter();\\n    }\\n\\n    function _nonReentrantBefore() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _nonReentrantAfter() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n     * `nonReentrant` function in the call stack.\\n     */\\n    function _reentrancyGuardEntered() internal view returns (bool) {\\n        return _status == _ENTERED;\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2025ccf05f6f1f2fd4e078e552836f525a1864e3854ed555047cd732320ab29b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `from` to `to` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n *     doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n *     token.safeTransferFrom(msg.sender, address(this), value);\\n *     ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20PermitUpgradeable {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n     * given ``owner``'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     *\\n     * CAUTION: See Security Considerations above.\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x07e881de3b9f6d2c07909f193f24b96c7fe4ea60013260f3f25aecd8bab3c2f8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n    using AddressUpgradeable for address;\\n\\n    /**\\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful.\\n     */\\n    function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    /**\\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n     */\\n    function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Deprecated. This function has issues similar to the ones found in\\n     * {IERC20-approve}, and its usage is discouraged.\\n     *\\n     * Whenever possible, use {safeIncreaseAllowance} and\\n     * {safeDecreaseAllowance} instead.\\n     */\\n    function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n        // safeApprove should only be called when setting an initial allowance,\\n        // or when resetting it to zero. To increase and decrease it, use\\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n        require(\\n            (value == 0) || (token.allowance(address(this), spender) == 0),\\n            \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n        );\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n    }\\n\\n    /**\\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful.\\n     */\\n    function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n        uint256 oldAllowance = token.allowance(address(this), spender);\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n    }\\n\\n    /**\\n     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful.\\n     */\\n    function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n        unchecked {\\n            uint256 oldAllowance = token.allowance(address(this), spender);\\n            require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n        }\\n    }\\n\\n    /**\\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n     * to be set to zero before setting it to a non-zero value, such as USDT.\\n     */\\n    function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n        if (!_callOptionalReturnBool(token, approvalCall)) {\\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n            _callOptionalReturn(token, approvalCall);\\n        }\\n    }\\n\\n    /**\\n     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n     * Revert on invalid signature.\\n     */\\n    function safePermit(\\n        IERC20PermitUpgradeable token,\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) internal {\\n        uint256 nonceBefore = token.nonces(owner);\\n        token.permit(owner, spender, value, deadline, v, r, s);\\n        uint256 nonceAfter = token.nonces(owner);\\n        require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     */\\n    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n        // the target address contains contract code and also asserts for success in the low-level call.\\n\\n        bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n        require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     *\\n     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n     */\\n    function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n        // and not revert is the subcall reverts.\\n\\n        (bool success, bytes memory returndata) = address(token).call(data);\\n        return\\n            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     *\\n     * Furthermore, `isContract` will also return true if the target contract within\\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n     * which only has an effect at the end of a transaction.\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        (bool success, bytes memory returndata) = target.delegatecall(data);\\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n     *\\n     * _Available since v4.8._\\n     */\\n    function verifyCallResultFromTarget(\\n        address target,\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        if (success) {\\n            if (returndata.length == 0) {\\n                // only check isContract if the call was successful and the return data is empty\\n                // otherwise we already know that it was a contract\\n                require(isContract(target), \\\"Address: call to non-contract\\\");\\n            }\\n            return returndata;\\n        } else {\\n            _revert(returndata, errorMessage);\\n        }\\n    }\\n\\n    /**\\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason or using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            _revert(returndata, errorMessage);\\n        }\\n    }\\n\\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n        // Look for revert reason and bubble it up if present\\n        if (returndata.length > 0) {\\n            // The easiest way to bubble the revert reason is using memory via assembly\\n            /// @solidity memory-safe-assembly\\n            assembly {\\n                let returndata_size := mload(returndata)\\n                revert(add(32, returndata), returndata_size)\\n            }\\n        } else {\\n            revert(errorMessage);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n    function __Context_init() internal onlyInitializing {\\n    }\\n\\n    function __Context_init_unchained() internal onlyInitializing {\\n    }\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n\\n    function _contextSuffixLength() internal view virtual returns (uint256) {\\n        return 0;\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x75097e35253e7fb282ee4d7f27a80eaacfa759923185bf17302a89cbc059c5ef\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    constructor() {\\n        _transferOwnership(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        _checkOwner();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if the sender is not the owner.\\n     */\\n    function _checkOwner() internal view virtual {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby disabling any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _transferOwnership(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable2Step.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Ownable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2Step is Ownable {\\n    address private _pendingOwner;\\n\\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Returns the address of the pending owner.\\n     */\\n    function pendingOwner() public view virtual returns (address) {\\n        return _pendingOwner;\\n    }\\n\\n    /**\\n     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual override onlyOwner {\\n        _pendingOwner = newOwner;\\n        emit OwnershipTransferStarted(owner(), newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual override {\\n        delete _pendingOwner;\\n        super._transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev The new owner accepts the ownership transfer.\\n     */\\n    function acceptOwnership() public virtual {\\n        address sender = _msgSender();\\n        require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n        _transferOwnership(sender);\\n    }\\n}\\n\",\"keccak256\":\"0xde231558366826d7cb61725af8147965a61c53b77a352cc8c9af38fc5a92ac3c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC5267 {\\n    /**\\n     * @dev MAY be emitted to signal that the domain could have changed.\\n     */\\n    event EIP712DomainChanged();\\n\\n    /**\\n     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n     * signature.\\n     */\\n    function eip712Domain()\\n        external\\n        view\\n        returns (\\n            bytes1 fields,\\n            string memory name,\\n            string memory version,\\n            uint256 chainId,\\n            address verifyingContract,\\n            bytes32 salt,\\n            uint256[] memory extensions\\n        );\\n}\\n\",\"keccak256\":\"0xac6c2efc64baccbde4904ae18ed45139c9aa8cff96d6888344d1e4d2eb8b659f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and making it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _nonReentrantBefore();\\n        _;\\n        _nonReentrantAfter();\\n    }\\n\\n    function _nonReentrantBefore() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _nonReentrantAfter() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n     * `nonReentrant` function in the call stack.\\n     */\\n    function _reentrancyGuardEntered() internal view returns (bool) {\\n        return _status == _ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n\\n    function _contextSuffixLength() internal view virtual returns (uint256) {\\n        return 0;\\n    }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./StorageSlot.sol\\\";\\n\\n// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |\\n// | length  | 0x                                                              BB |\\ntype ShortString is bytes32;\\n\\n/**\\n * @dev This library provides functions to convert short memory strings\\n * into a `ShortString` type that can be used as an immutable variable.\\n *\\n * Strings of arbitrary length can be optimized using this library if\\n * they are short enough (up to 31 bytes) by packing them with their\\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\\n * fallback mechanism can be used for every other case.\\n *\\n * Usage example:\\n *\\n * ```solidity\\n * contract Named {\\n *     using ShortStrings for *;\\n *\\n *     ShortString private immutable _name;\\n *     string private _nameFallback;\\n *\\n *     constructor(string memory contractName) {\\n *         _name = contractName.toShortStringWithFallback(_nameFallback);\\n *     }\\n *\\n *     function name() external view returns (string memory) {\\n *         return _name.toStringWithFallback(_nameFallback);\\n *     }\\n * }\\n * ```\\n */\\nlibrary ShortStrings {\\n    // Used as an identifier for strings longer than 31 bytes.\\n    bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\\n\\n    error StringTooLong(string str);\\n    error InvalidShortString();\\n\\n    /**\\n     * @dev Encode a string of at most 31 chars into a `ShortString`.\\n     *\\n     * This will trigger a `StringTooLong` error is the input string is too long.\\n     */\\n    function toShortString(string memory str) internal pure returns (ShortString) {\\n        bytes memory bstr = bytes(str);\\n        if (bstr.length > 31) {\\n            revert StringTooLong(str);\\n        }\\n        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\\n    }\\n\\n    /**\\n     * @dev Decode a `ShortString` back to a \\\"normal\\\" string.\\n     */\\n    function toString(ShortString sstr) internal pure returns (string memory) {\\n        uint256 len = byteLength(sstr);\\n        // using `new string(len)` would work locally but is not memory safe.\\n        string memory str = new string(32);\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            mstore(str, len)\\n            mstore(add(str, 0x20), sstr)\\n        }\\n        return str;\\n    }\\n\\n    /**\\n     * @dev Return the length of a `ShortString`.\\n     */\\n    function byteLength(ShortString sstr) internal pure returns (uint256) {\\n        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\\n        if (result > 31) {\\n            revert InvalidShortString();\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\\n     */\\n    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\\n        if (bytes(value).length < 32) {\\n            return toShortString(value);\\n        } else {\\n            StorageSlot.getStringSlot(store).value = value;\\n            return ShortString.wrap(_FALLBACK_SENTINEL);\\n        }\\n    }\\n\\n    /**\\n     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.\\n     */\\n    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\\n        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {\\n            return toString(value);\\n        } else {\\n            return store;\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.\\n     *\\n     * WARNING: This will return the \\\"byte length\\\" of the string. This may not reflect the actual length in terms of\\n     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\\n     */\\n    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\\n        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {\\n            return byteLength(value);\\n        } else {\\n            return bytes(store).length;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xc0e310c163edf15db45d4ff938113ab357f94fa86e61ea8e790853c4d2e13256\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```solidity\\n * contract ERC1967 {\\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n *     function _getImplementation() internal view returns (address) {\\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n *     }\\n *\\n *     function _setImplementation(address newImplementation) internal {\\n *         require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n *     }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\n */\\nlibrary StorageSlot {\\n    struct AddressSlot {\\n        address value;\\n    }\\n\\n    struct BooleanSlot {\\n        bool value;\\n    }\\n\\n    struct Bytes32Slot {\\n        bytes32 value;\\n    }\\n\\n    struct Uint256Slot {\\n        uint256 value;\\n    }\\n\\n    struct StringSlot {\\n        string value;\\n    }\\n\\n    struct BytesSlot {\\n        bytes value;\\n    }\\n\\n    /**\\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n     */\\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n     */\\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n     */\\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n     */\\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n     */\\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n     */\\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := store.slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n     */\\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := slot\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n     */\\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            r.slot := store.slot\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n    bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n    uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n     */\\n    function toString(uint256 value) internal pure returns (string memory) {\\n        unchecked {\\n            uint256 length = Math.log10(value) + 1;\\n            string memory buffer = new string(length);\\n            uint256 ptr;\\n            /// @solidity memory-safe-assembly\\n            assembly {\\n                ptr := add(buffer, add(32, length))\\n            }\\n            while (true) {\\n                ptr--;\\n                /// @solidity memory-safe-assembly\\n                assembly {\\n                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n                }\\n                value /= 10;\\n                if (value == 0) break;\\n            }\\n            return buffer;\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n     */\\n    function toString(int256 value) internal pure returns (string memory) {\\n        return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n    }\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n     */\\n    function toHexString(uint256 value) internal pure returns (string memory) {\\n        unchecked {\\n            return toHexString(value, Math.log256(value) + 1);\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n     */\\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n        bytes memory buffer = new bytes(2 * length + 2);\\n        buffer[0] = \\\"0\\\";\\n        buffer[1] = \\\"x\\\";\\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\\n            buffer[i] = _SYMBOLS[value & 0xf];\\n            value >>= 4;\\n        }\\n        require(value == 0, \\\"Strings: hex length insufficient\\\");\\n        return string(buffer);\\n    }\\n\\n    /**\\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n     */\\n    function toHexString(address addr) internal pure returns (string memory) {\\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n    }\\n\\n    /**\\n     * @dev Returns true if the two strings are equal.\\n     */\\n    function equal(string memory a, string memory b) internal pure returns (bool) {\\n        return keccak256(bytes(a)) == keccak256(bytes(b));\\n    }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n    enum RecoverError {\\n        NoError,\\n        InvalidSignature,\\n        InvalidSignatureLength,\\n        InvalidSignatureS,\\n        InvalidSignatureV // Deprecated in v4.8\\n    }\\n\\n    function _throwError(RecoverError error) private pure {\\n        if (error == RecoverError.NoError) {\\n            return; // no error: do nothing\\n        } else if (error == RecoverError.InvalidSignature) {\\n            revert(\\\"ECDSA: invalid signature\\\");\\n        } else if (error == RecoverError.InvalidSignatureLength) {\\n            revert(\\\"ECDSA: invalid signature length\\\");\\n        } else if (error == RecoverError.InvalidSignatureS) {\\n            revert(\\\"ECDSA: invalid signature 's' value\\\");\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the address that signed a hashed message (`hash`) with\\n     * `signature` or error string. This address can then be used for verification purposes.\\n     *\\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n     * this function rejects them by requiring the `s` value to be in the lower\\n     * half order, and the `v` value to be either 27 or 28.\\n     *\\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n     * verification to be secure: it is possible to craft signatures that\\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n     * this is by receiving a hash of the original message (which may otherwise\\n     * be too long), and then calling {toEthSignedMessageHash} on it.\\n     *\\n     * Documentation for signature generation:\\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n     *\\n     * _Available since v4.3._\\n     */\\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n        if (signature.length == 65) {\\n            bytes32 r;\\n            bytes32 s;\\n            uint8 v;\\n            // ecrecover takes the signature parameters, and the only way to get them\\n            // currently is to use assembly.\\n            /// @solidity memory-safe-assembly\\n            assembly {\\n                r := mload(add(signature, 0x20))\\n                s := mload(add(signature, 0x40))\\n                v := byte(0, mload(add(signature, 0x60)))\\n            }\\n            return tryRecover(hash, v, r, s);\\n        } else {\\n            return (address(0), RecoverError.InvalidSignatureLength);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the address that signed a hashed message (`hash`) with\\n     * `signature`. This address can then be used for verification purposes.\\n     *\\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n     * this function rejects them by requiring the `s` value to be in the lower\\n     * half order, and the `v` value to be either 27 or 28.\\n     *\\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n     * verification to be secure: it is possible to craft signatures that\\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n     * this is by receiving a hash of the original message (which may otherwise\\n     * be too long), and then calling {toEthSignedMessageHash} on it.\\n     */\\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\\n        _throwError(error);\\n        return recovered;\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n     *\\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n     *\\n     * _Available since v4.3._\\n     */\\n    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n        uint8 v = uint8((uint256(vs) >> 255) + 27);\\n        return tryRecover(hash, v, r, s);\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n     *\\n     * _Available since v4.2._\\n     */\\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n        _throwError(error);\\n        return recovered;\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n     * `r` and `s` signature fields separately.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n        // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n        //\\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n        // these malleable signatures as well.\\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n            return (address(0), RecoverError.InvalidSignatureS);\\n        }\\n\\n        // If the signature is valid (and not malleable), return the signer address\\n        address signer = ecrecover(hash, v, r, s);\\n        if (signer == address(0)) {\\n            return (address(0), RecoverError.InvalidSignature);\\n        }\\n\\n        return (signer, RecoverError.NoError);\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\\n     * `r` and `s` signature fields separately.\\n     */\\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n        _throwError(error);\\n        return recovered;\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n     * produces hash corresponding to the one signed with the\\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n     * JSON-RPC method as part of EIP-191.\\n     *\\n     * See {recover}.\\n     */\\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n        // 32 is the length in bytes of hash,\\n        // enforced by the type signature above\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n            mstore(0x1c, hash)\\n            message := keccak256(0x00, 0x3c)\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\\n     * produces hash corresponding to the one signed with the\\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n     * JSON-RPC method as part of EIP-191.\\n     *\\n     * See {recover}.\\n     */\\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Typed Data, created from a\\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\\n     * to the one signed with the\\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n     * JSON-RPC method as part of EIP-712.\\n     *\\n     * See {recover}.\\n     */\\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            let ptr := mload(0x40)\\n            mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n            mstore(add(ptr, 0x02), domainSeparator)\\n            mstore(add(ptr, 0x22), structHash)\\n            data := keccak256(ptr, 0x42)\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n     * `validator` and `data` according to the version 0 of EIP-191.\\n     *\\n     * See {recover}.\\n     */\\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n    }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../ShortStrings.sol\\\";\\nimport \\\"../../interfaces/IERC5267.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n */\\nabstract contract EIP712 is IERC5267 {\\n    using ShortStrings for *;\\n\\n    bytes32 private constant _TYPE_HASH =\\n        keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n    // invalidate the cached domain separator if the chain id changes.\\n    bytes32 private immutable _cachedDomainSeparator;\\n    uint256 private immutable _cachedChainId;\\n    address private immutable _cachedThis;\\n\\n    bytes32 private immutable _hashedName;\\n    bytes32 private immutable _hashedVersion;\\n\\n    ShortString private immutable _name;\\n    ShortString private immutable _version;\\n    string private _nameFallback;\\n    string private _versionFallback;\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _name = name.toShortStringWithFallback(_nameFallback);\\n        _version = version.toShortStringWithFallback(_versionFallback);\\n        _hashedName = keccak256(bytes(name));\\n        _hashedVersion = keccak256(bytes(version));\\n\\n        _cachedChainId = block.chainid;\\n        _cachedDomainSeparator = _buildDomainSeparator();\\n        _cachedThis = address(this);\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view returns (bytes32) {\\n        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\\n            return _cachedDomainSeparator;\\n        } else {\\n            return _buildDomainSeparator();\\n        }\\n    }\\n\\n    function _buildDomainSeparator() private view returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n    }\\n\\n    /**\\n     * @dev See {EIP-5267}.\\n     *\\n     * _Available since v4.9._\\n     */\\n    function eip712Domain()\\n        public\\n        view\\n        virtual\\n        override\\n        returns (\\n            bytes1 fields,\\n            string memory name,\\n            string memory version,\\n            uint256 chainId,\\n            address verifyingContract,\\n            bytes32 salt,\\n            uint256[] memory extensions\\n        )\\n    {\\n        return (\\n            hex\\\"0f\\\", // 01111\\n            _name.toStringWithFallback(_nameFallback),\\n            _version.toStringWithFallback(_versionFallback),\\n            block.chainid,\\n            address(this),\\n            bytes32(0),\\n            new uint256[](0)\\n        );\\n    }\\n}\\n\",\"keccak256\":\"0x8432884527a7ad91e6eed1cfc5a0811ae2073e5bca107bd0ca442e9236b03dbd\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n    enum Rounding {\\n        Down, // Toward negative infinity\\n        Up, // Toward infinity\\n        Zero // Toward zero\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a > b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the average of two numbers. The result is rounded towards\\n     * zero.\\n     */\\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // (a + b) / 2 can overflow.\\n        return (a & b) + (a ^ b) / 2;\\n    }\\n\\n    /**\\n     * @dev Returns the ceiling of the division of two numbers.\\n     *\\n     * This differs from standard division with `/` in that it rounds up instead\\n     * of rounding down.\\n     */\\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // (a + b - 1) / b can overflow on addition, so we distribute.\\n        return a == 0 ? 0 : (a - 1) / b + 1;\\n    }\\n\\n    /**\\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n     * with further edits by Uniswap Labs also under MIT license.\\n     */\\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n        unchecked {\\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n            // variables such that product = prod1 * 2^256 + prod0.\\n            uint256 prod0; // Least significant 256 bits of the product\\n            uint256 prod1; // Most significant 256 bits of the product\\n            assembly {\\n                let mm := mulmod(x, y, not(0))\\n                prod0 := mul(x, y)\\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n            }\\n\\n            // Handle non-overflow cases, 256 by 256 division.\\n            if (prod1 == 0) {\\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n                // The surrounding unchecked block does not change this fact.\\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n                return prod0 / denominator;\\n            }\\n\\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n            require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n            ///////////////////////////////////////////////\\n            // 512 by 256 division.\\n            ///////////////////////////////////////////////\\n\\n            // Make division exact by subtracting the remainder from [prod1 prod0].\\n            uint256 remainder;\\n            assembly {\\n                // Compute remainder using mulmod.\\n                remainder := mulmod(x, y, denominator)\\n\\n                // Subtract 256 bit number from 512 bit number.\\n                prod1 := sub(prod1, gt(remainder, prod0))\\n                prod0 := sub(prod0, remainder)\\n            }\\n\\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n            // See https://cs.stackexchange.com/q/138556/92363.\\n\\n            // Does not overflow because the denominator cannot be zero at this stage in the function.\\n            uint256 twos = denominator & (~denominator + 1);\\n            assembly {\\n                // Divide denominator by twos.\\n                denominator := div(denominator, twos)\\n\\n                // Divide [prod1 prod0] by twos.\\n                prod0 := div(prod0, twos)\\n\\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n                twos := add(div(sub(0, twos), twos), 1)\\n            }\\n\\n            // Shift in bits from prod1 into prod0.\\n            prod0 |= prod1 * twos;\\n\\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n            // four bits. That is, denominator * inv = 1 mod 2^4.\\n            uint256 inverse = (3 * denominator) ^ 2;\\n\\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n            // in modular arithmetic, doubling the correct bits in each step.\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n            // is no longer required.\\n            result = prod0 * inverse;\\n            return result;\\n        }\\n    }\\n\\n    /**\\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n     */\\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n        uint256 result = mulDiv(x, y, denominator);\\n        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n            result += 1;\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n     *\\n     * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n     */\\n    function sqrt(uint256 a) internal pure returns (uint256) {\\n        if (a == 0) {\\n            return 0;\\n        }\\n\\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n        //\\n        // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n        //\\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n        // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n        // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n        //\\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n        uint256 result = 1 << (log2(a) >> 1);\\n\\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n        // into the expected uint128 result.\\n        unchecked {\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            return min(result, a / result);\\n        }\\n    }\\n\\n    /**\\n     * @notice Calculates sqrt(a), following the selected rounding direction.\\n     */\\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = sqrt(a);\\n            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the log in base 2, rounded down, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log2(uint256 value) internal pure returns (uint256) {\\n        uint256 result = 0;\\n        unchecked {\\n            if (value >> 128 > 0) {\\n                value >>= 128;\\n                result += 128;\\n            }\\n            if (value >> 64 > 0) {\\n                value >>= 64;\\n                result += 64;\\n            }\\n            if (value >> 32 > 0) {\\n                value >>= 32;\\n                result += 32;\\n            }\\n            if (value >> 16 > 0) {\\n                value >>= 16;\\n                result += 16;\\n            }\\n            if (value >> 8 > 0) {\\n                value >>= 8;\\n                result += 8;\\n            }\\n            if (value >> 4 > 0) {\\n                value >>= 4;\\n                result += 4;\\n            }\\n            if (value >> 2 > 0) {\\n                value >>= 2;\\n                result += 2;\\n            }\\n            if (value >> 1 > 0) {\\n                result += 1;\\n            }\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = log2(value);\\n            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the log in base 10, rounded down, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log10(uint256 value) internal pure returns (uint256) {\\n        uint256 result = 0;\\n        unchecked {\\n            if (value >= 10 ** 64) {\\n                value /= 10 ** 64;\\n                result += 64;\\n            }\\n            if (value >= 10 ** 32) {\\n                value /= 10 ** 32;\\n                result += 32;\\n            }\\n            if (value >= 10 ** 16) {\\n                value /= 10 ** 16;\\n                result += 16;\\n            }\\n            if (value >= 10 ** 8) {\\n                value /= 10 ** 8;\\n                result += 8;\\n            }\\n            if (value >= 10 ** 4) {\\n                value /= 10 ** 4;\\n                result += 4;\\n            }\\n            if (value >= 10 ** 2) {\\n                value /= 10 ** 2;\\n                result += 2;\\n            }\\n            if (value >= 10 ** 1) {\\n                result += 1;\\n            }\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = log10(value);\\n            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the log in base 256, rounded down, of a positive value.\\n     * Returns 0 if given 0.\\n     *\\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n     */\\n    function log256(uint256 value) internal pure returns (uint256) {\\n        uint256 result = 0;\\n        unchecked {\\n            if (value >> 128 > 0) {\\n                value >>= 128;\\n                result += 16;\\n            }\\n            if (value >> 64 > 0) {\\n                value >>= 64;\\n                result += 8;\\n            }\\n            if (value >> 32 > 0) {\\n                value >>= 32;\\n                result += 4;\\n            }\\n            if (value >> 16 > 0) {\\n                value >>= 16;\\n                result += 2;\\n            }\\n            if (value >> 8 > 0) {\\n                result += 1;\\n            }\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = log256(value);\\n            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n    /**\\n     * @dev Returns the largest of two signed numbers.\\n     */\\n    function max(int256 a, int256 b) internal pure returns (int256) {\\n        return a > b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two signed numbers.\\n     */\\n    function min(int256 a, int256 b) internal pure returns (int256) {\\n        return a < b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the average of two signed numbers without overflow.\\n     * The result is rounded towards zero.\\n     */\\n    function average(int256 a, int256 b) internal pure returns (int256) {\\n        // Formula from the book \\\"Hacker's Delight\\\"\\n        int256 x = (a & b) + ((a ^ b) >> 1);\\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\\n    }\\n\\n    /**\\n     * @dev Returns the absolute unsigned value of a signed value.\\n     */\\n    function abs(int256 n) internal pure returns (uint256) {\\n        unchecked {\\n            // must be unchecked in order to support `n = type(int256).min`\\n            return uint256(n >= 0 ? n : -n);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n    function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n    function updatePrice(address vToken) external;\\n\\n    function updateAssetPrice(address asset) external;\\n\\n    function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n    function validatePriceWithAnchorPrice(\\n        address asset,\\n        uint256 reporterPrice,\\n        uint256 anchorPrice\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd3bbb7c9eef19e8f467342df6034ef95399a00964646fb8c82b438968ae3a8c0\",\"license\":\"BSD-3-Clause\"},\"contracts/Interfaces.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport { IERC20Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\n\\ninterface IVToken is IERC20Upgradeable {\\n    function accrueInterest() external returns (uint256);\\n\\n    function redeem(uint256 redeemTokens) external returns (uint256);\\n\\n    function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\\n\\n    function borrowBalanceCurrent(address borrower) external returns (uint256);\\n\\n    function balanceOfUnderlying(address owner) external returns (uint256);\\n\\n    function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\\n\\n    function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n    function borrowBehalf(address borrower, uint borrowAmount) external returns (uint256);\\n\\n    function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint256);\\n\\n    function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint);\\n\\n    function comptroller() external view returns (IComptroller);\\n\\n    function borrowBalanceStored(address account) external view returns (uint256);\\n\\n    function underlying() external view returns (address);\\n}\\n\\ninterface IVBNB is IVToken {\\n    function repayBorrowBehalf(address borrower) external payable;\\n\\n    function liquidateBorrow(address borrower, IVToken vTokenCollateral) external payable;\\n}\\n\\ninterface IComptroller {\\n    enum Action {\\n        MINT,\\n        REDEEM,\\n        BORROW,\\n        REPAY,\\n        SEIZE,\\n        LIQUIDATE,\\n        TRANSFER,\\n        ENTER_MARKET,\\n        EXIT_MARKET\\n    }\\n\\n    function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external;\\n\\n    function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\\n\\n    function enterMarketBehalf(address onBehalf, address vToken) external returns (uint256);\\n\\n    function enterMarket(address user, address vToken) external returns (uint256);\\n\\n    function liquidationIncentiveMantissa() external view returns (uint256);\\n\\n    function vaiController() external view returns (address);\\n\\n    function liquidatorContract() external view returns (address);\\n\\n    function oracle() external view returns (ResilientOracleInterface);\\n\\n    function actionPaused(address market, Action action) external view returns (bool);\\n\\n    function markets(address) external view returns (bool, uint256, bool);\\n\\n    function isForcedLiquidationEnabled(address) external view returns (bool);\\n\\n    function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n    function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\\n\\n    function checkMembership(address account, IVToken vToken) external view returns (bool);\\n\\n    function getBorrowingPower(\\n        address account\\n    ) external view returns (uint256 error, uint256 liquidity, uint256 shortfall);\\n\\n    function treasuryPercent() external view returns (uint256);\\n\\n    function executeFlashLoan(\\n        address payable onBehalf,\\n        address payable receiver,\\n        IVToken[] memory vTokens,\\n        uint256[] memory underlyingAmounts,\\n        bytes memory param\\n    ) external;\\n}\\n\\ninterface IFlashLoanReceiver {\\n    /**\\n     * @notice Executes an operation after receiving the flash-borrowed assets.\\n     * @dev Implementation of this function must ensure at least the premium (fee) is repaid within the same transaction.\\n     *      Any unpaid balance (principal + premium - repaid amount) will be added to the onBehalf address's borrow balance.\\n     * @param vTokens The vToken contracts corresponding to the flash-borrowed underlying assets.\\n     * @param amounts The amounts of each underlying asset that were flash-borrowed.\\n     * @param premiums The premiums (fees) associated with each flash-borrowed asset.\\n     * @param initiator The address that initiated the flash loan.\\n     * @param onBehalf The address of the user whose debt position will be used for any unpaid flash loan balance.\\n     * @param param Additional parameters encoded as bytes. These can be used to pass custom data to the receiver contract.\\n     * @return success True if the operation succeeds (regardless of repayment amount), false if the operation fails.\\n     * @return repayAmounts Array of uint256 representing the amounts to be repaid for each asset. The receiver contract\\n     *         must approve these amounts to the respective vToken contracts before this function returns.\\n     */\\n    function executeOperation(\\n        IVToken[] calldata vTokens,\\n        uint256[] calldata amounts,\\n        uint256[] calldata premiums,\\n        address initiator,\\n        address onBehalf,\\n        bytes calldata param\\n    ) external returns (bool success, uint256[] memory repayAmounts);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\\ninterface IProtocolShareReserve {\\n    enum IncomeType {\\n        SPREAD,\\n        LIQUIDATION,\\n        ERC4626_WRAPPER_REWARDS,\\n        FLASHLOAN\\n    }\\n\\n    function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\",\"keccak256\":\"0x05825bb795ff9a56832449324737a282a3cc523697d5897ac8c3e7a43455942a\",\"license\":\"BSD-3-Clause\"},\"contracts/LeverageManager/ILeverageStrategiesManager.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.28;\\n\\nimport { IVToken } from \\\"../Interfaces.sol\\\";\\n\\n/**\\n * @title ILeverageStrategiesManager\\n * @author Venus Protocol\\n * @notice Interface for the Leverage Strategies Manager contract\\n * @dev This interface defines the functionality for entering and exiting leveraged positions\\n *      using flash loans and token swaps. The contract allows users to amplify their exposure\\n *      to specific assets by borrowing against their collateral and reinvesting the borrowed funds.\\n */\\ninterface ILeverageStrategiesManager {\\n    /// @custom:error MintBehalfFailed mintBehalf on a vToken market returned a non-zero error code\\n    error MintBehalfFailed(uint256 errorCode);\\n\\n    /// @custom:error BorrowBehalfFailed borrowBehalf on a vToken market returned a non-zero error code\\n    error BorrowBehalfFailed(uint256 errorCode);\\n\\n    /// @custom:error RepayBehalfFailed repayBehalf on a vToken market returned a non-zero error code\\n    error RepayBehalfFailed(uint256 errorCode);\\n\\n    /// @custom:error RedeemBehalfFailed redeemBehalf on a vToken market returned a non-zero error code\\n    error RedeemBehalfFailed(uint256 errorCode);\\n\\n    /// @custom:error OperationCausesLiquidation Operation would put the account at risk (undercollateralized) returns a non-zero error code from getBorrowingPower\\n    error OperationCausesLiquidation(uint256 errorCode);\\n\\n    /// @custom:error TokenSwapCallFailed Swap helper call reverted or returned false\\n    error TokenSwapCallFailed();\\n\\n    /// @custom:error FlashLoanAssetOrAmountMismatch Invalid flash loan arrays length or >1 elements\\n    error FlashLoanAssetOrAmountMismatch();\\n\\n    /// @custom:error UnauthorizedExecutor Caller is not the expected Comptroller\\n    error UnauthorizedExecutor();\\n\\n    /// @custom:error InvalidExecuteOperation Unknown operation type in flash loan callback\\n    error InvalidExecuteOperation();\\n\\n    /// @custom:error SlippageExceeded Swap output lower than required minimum\\n    error SlippageExceeded();\\n\\n    /// @custom:error InsufficientFundsToRepayFlashloan Not enough proceeds to repay flash loan plus fees\\n    error InsufficientFundsToRepayFlashloan();\\n\\n    /// @custom:error InitiatorMismatch Invalid initiator address in flash loan callback\\n    error InitiatorMismatch();\\n\\n    /// @custom:error OnBehalfMismatch Invalid onBehalf address in flash loan callback\\n    error OnBehalfMismatch();\\n\\n    /// @custom:error EnterMarketFailed Comptroller.enterMarketBehalf returned a non-zero error code\\n    error EnterMarketFailed(uint256 err);\\n\\n    /// @custom:error MarketNotListed Provided vToken market is not listed in Comptroller\\n    error MarketNotListed(address market);\\n\\n    /// @custom:error VBNBNotSupported vBNB market is not supported for leverage operations\\n    error VBNBNotSupported();\\n\\n    /// @custom:error ZeroAddress One of the required addresses is zero\\n    error ZeroAddress();\\n\\n    /// @custom:error NotAnApprovedDelegate User has not approved this contract as a delegate\\n    error NotAnApprovedDelegate();\\n\\n    /// @custom:error ZeroFlashLoanAmount Flash loan amount cannot be zero\\n    error ZeroFlashLoanAmount();\\n\\n    /// @custom:error AccrueInterestFailed accrueInterest on a vToken market returned a non-zero error code\\n    error AccrueInterestFailed(uint256 errorCode);\\n\\n    /// @custom:error IdenticalMarkets Collateral and borrow markets cannot be the same\\n    error IdenticalMarkets();\\n\\n    /// @notice Emitted when dust amounts are transferred after a leverage operation\\n    /// @param recipient The address receiving the dust (user or protocol share reserve)\\n    /// @param token The underlying token address\\n    /// @param amount The amount of dust transferred\\n    event DustTransferred(address indexed recipient, address indexed token, uint256 amount);\\n\\n    /// @notice Emitted when a user enters a leveraged position with single collateral asset\\n    /// @param user The address of the user entering the position\\n    /// @param collateralMarket The vToken market used as collateral\\n    /// @param collateralAmountSeed The initial collateral amount provided by the user\\n    /// @param collateralAmountToFlashLoan The amount being flash loaned\\n    event SingleAssetLeverageEntered(\\n        address indexed user,\\n        IVToken indexed collateralMarket,\\n        uint256 collateralAmountSeed,\\n        uint256 collateralAmountToFlashLoan\\n    );\\n\\n    /// @notice Emitted when a user enters a leveraged position with collateral seed\\n    /// @param user The address of the user entering the position\\n    /// @param collateralMarket The vToken market used as collateral\\n    /// @param collateralAmountSeed The initial collateral amount provided by the user\\n    /// @param borrowedMarket The vToken market being borrowed from\\n    /// @param borrowedAmountToFlashLoan The amount being flash loaned\\n    event LeverageEntered(\\n        address indexed user,\\n        IVToken indexed collateralMarket,\\n        uint256 collateralAmountSeed,\\n        IVToken indexed borrowedMarket,\\n        uint256 borrowedAmountToFlashLoan\\n    );\\n\\n    /// @notice Emitted when a user enters a leveraged position with borrowed asset seed\\n    /// @param user The address of the user entering the position\\n    /// @param collateralMarket The vToken market used as collateral\\n    /// @param borrowedMarket The vToken market being borrowed from\\n    /// @param borrowedAmountSeed The initial borrowed asset amount provided by the user\\n    /// @param borrowedAmountToFlashLoan The amount being flash loaned\\n    event LeverageEnteredFromBorrow(\\n        address indexed user,\\n        IVToken indexed collateralMarket,\\n        IVToken indexed borrowedMarket,\\n        uint256 borrowedAmountSeed,\\n        uint256 borrowedAmountToFlashLoan\\n    );\\n\\n    /// @notice Emitted when a user exits a leveraged position\\n    /// @param user The address of the user exiting the position\\n    /// @param collateralMarket The vToken market being redeemed\\n    /// @param collateralAmountToRedeemForSwap The amount of collateral being redeemed for swap\\n    /// @param borrowedMarket The vToken market being repaid\\n    /// @param borrowedAmountToFlashLoan The amount being flash loaned\\n    event LeverageExited(\\n        address indexed user,\\n        IVToken indexed collateralMarket,\\n        uint256 collateralAmountToRedeemForSwap,\\n        IVToken indexed borrowedMarket,\\n        uint256 borrowedAmountToFlashLoan\\n    );\\n\\n    /// @notice Emitted when a user exits a leveraged position with single collateral asset\\n    /// @param user The address of the user exiting the position\\n    /// @param collateralMarket The vToken market used for both collateral and borrowed asset\\n    /// @param collateralAmountToFlashLoan The amount being flash loaned\\n    event SingleAssetLeverageExited(\\n        address indexed user,\\n        IVToken indexed collateralMarket,\\n        uint256 collateralAmountToFlashLoan\\n    );\\n\\n    /**\\n     * @notice Enumeration of operation types for flash loan callbacks\\n     * @param NONE Default value indicating no operation set\\n     * @param ENTER_SINGLE_ASSET Operation for entering a leveraged position using single asset (no swap)\\n     * @param ENTER_COLLATERAL Operation for entering a leveraged position with collateral seed\\n     * @param ENTER_BORROW Operation for entering a leveraged position with borrowed asset seed\\n     * @param EXIT_COLLATERAL Operation for exiting a leveraged position with swap\\n     * @param EXIT_SINGLE_ASSET Operation for exiting a leveraged position using single asset (no swap)\\n     */\\n    enum OperationType {\\n        NONE,\\n        ENTER_SINGLE_ASSET,\\n        ENTER_COLLATERAL,\\n        ENTER_BORROW,\\n        EXIT_COLLATERAL,\\n        EXIT_SINGLE_ASSET\\n    }\\n\\n    /**\\n     * @notice Enters a leveraged position using only collateral provided by the user\\n     * @dev This function flash loans additional collateral assets, amplifying the user's supplied collateral\\n     *      in the Venus protocol. The user must have delegated permission to this contract via the comptroller.\\n     *      Any remaining collateral dust after the operation is returned to the user.\\n     * @param collateralMarket The vToken market where collateral will be supplied (must not be vBNB)\\n     * @param collateralAmountSeed The initial amount of collateral the user provides (can be 0)\\n     * @param collateralAmountToFlashLoan The amount to borrow via flash loan for leverage\\n     * @custom:emits SingleAssetLeverageEntered\\n     * @custom:error NotAnApprovedDelegate if caller has not delegated to this contract\\n     * @custom:error AccrueInterestFailed if interest accrual fails on the collateral market\\n     * @custom:error MarketNotListed if the market is not listed in Comptroller\\n     * @custom:error VBNBNotSupported if the market is vBNB\\n     * @custom:error OperationCausesLiquidation if the operation would make the account unsafe\\n     * @custom:error TransferFromUserFailed if seed amount transfer from user fails\\n     * @custom:error MintBehalfFailed if mint behalf operation fails\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     */\\n    function enterSingleAssetLeverage(\\n        IVToken collateralMarket,\\n        uint256 collateralAmountSeed,\\n        uint256 collateralAmountToFlashLoan\\n    ) external;\\n\\n    /**\\n     * @notice Enters a leveraged position by borrowing assets and converting them to collateral\\n     * @dev This function uses flash loans to borrow assets, swaps them for collateral tokens,\\n     *      and supplies the collateral to the Venus protocol to amplify the user's position.\\n     *      The user must have delegated permission to this contract via the comptroller.\\n     *      Any remaining dust (both collateral and borrowed assets) after the operation is returned to the user.\\n     * @param collateralMarket The vToken market where collateral will be supplied (must not be vBNB)\\n     * @param collateralAmountSeed The initial amount of collateral the user provides (can be 0)\\n     * @param borrowedMarket The vToken market from which assets will be borrowed via flash loan (must not be vBNB)\\n     * @param borrowedAmountToFlashLoan The amount to borrow via flash loan for leverage\\n     * @param minAmountOutAfterSwap The minimum amount of collateral expected after swap (for slippage protection)\\n     * @param swapData Bytes containing swap instructions for converting borrowed assets to collateral\\n     * @custom:emits LeverageEntered\\n     * @custom:error IdenticalMarkets if collateral and borrow markets are the same\\n     * @custom:error NotAnApprovedDelegate if caller has not delegated to this contract\\n     * @custom:error AccrueInterestFailed if interest accrual fails on any market\\n     * @custom:error MarketNotListed if any market is not listed in Comptroller\\n     * @custom:error VBNBNotSupported if collateral or borrow market is vBNB\\n     * @custom:error OperationCausesLiquidation if the operation would make the account unsafe\\n     * @custom:error TransferFromUserFailed if seed amount transfer from user fails\\n     * @custom:error MintBehalfFailed if mint behalf operation fails\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     * @custom:error TokenSwapCallFailed if token swap execution fails\\n     * @custom:error SlippageExceeded if collateral balance after swap is below minimum\\n     */\\n    function enterLeverage(\\n        IVToken collateralMarket,\\n        uint256 collateralAmountSeed,\\n        IVToken borrowedMarket,\\n        uint256 borrowedAmountToFlashLoan,\\n        uint256 minAmountOutAfterSwap,\\n        bytes calldata swapData\\n    ) external;\\n\\n    /**\\n     * @notice Enters a leveraged position by using existing borrowed assets and converting them to collateral\\n     * @dev This function uses flash loans to borrow additional assets, swaps the total borrowed amount\\n     *      for collateral tokens, and supplies the collateral to the Venus protocol to amplify the user's position.\\n     *      The user must have delegated permission to this contract via the comptroller.\\n     *      Any remaining dust (both collateral and borrowed assets) after the operation is returned to the user.\\n     * @param collateralMarket The vToken market where collateral will be supplied (must not be vBNB)\\n     * @param borrowedMarket The vToken market from which assets will be borrowed via flash loan (must not be vBNB)\\n     * @param borrowedAmountSeed The initial amount of borrowed assets the user provides (can be 0)\\n     * @param borrowedAmountToFlashLoan The additional amount to borrow via flash loan for leverage\\n     * @param minAmountOutAfterSwap The minimum amount of collateral expected after swap (for slippage protection)\\n     * @param swapData Bytes containing swap instructions for converting borrowed assets to collateral\\n     * @custom:emits LeverageEnteredFromBorrow\\n     * @custom:error IdenticalMarkets if collateral and borrow markets are the same\\n     * @custom:error NotAnApprovedDelegate if caller has not delegated to this contract\\n     * @custom:error AccrueInterestFailed if interest accrual fails on any market\\n     * @custom:error MarketNotListed if any market is not listed in Comptroller\\n     * @custom:error VBNBNotSupported if collateral or borrow market is vBNB\\n     * @custom:error OperationCausesLiquidation if the operation would make the account unsafe\\n     * @custom:error TransferFromUserFailed if seed amount transfer from user fails\\n     * @custom:error MintBehalfFailed if mint behalf operation fails\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     * @custom:error TokenSwapCallFailed if token swap execution fails\\n     * @custom:error SlippageExceeded if collateral balance after swap is below minimum\\n     */\\n    function enterLeverageFromBorrow(\\n        IVToken collateralMarket,\\n        IVToken borrowedMarket,\\n        uint256 borrowedAmountSeed,\\n        uint256 borrowedAmountToFlashLoan,\\n        uint256 minAmountOutAfterSwap,\\n        bytes calldata swapData\\n    ) external;\\n\\n    /**\\n     * @notice Exits a leveraged position by redeeming collateral and repaying borrowed assets\\n     * @dev This function uses flash loans to temporarily repay debt, redeems collateral,\\n     *      swaps collateral for borrowed assets, and repays the flash loan. Any remaining\\n     *      dust (both collateral and borrowed assets) is returned to the user. This ensures\\n     *      users who swap more than required as protection against price volatility receive\\n     *      their excess tokens back.\\n     *\\n     *      The flash loan amount can exceed actual debt to account for interest accrual\\n     *      between transaction creation and mining. The contract caps repayment to actual\\n     *      debt and uses leftover funds toward flash loan repayment.\\n     *\\n     *      NOTE: No pre-operation safety check is performed because exiting leverage reduces\\n     *      debt exposure, which can only improve account health. Post-operation safety is\\n     *      still validated to ensure the final position is healthy.\\n     *\\n     *      IMPORTANT: If treasuryPercent() is nonzero, the user must provide a\\n     *      collateralAmountToRedeemForSwap that accounts for the treasury fee. Only\\n     *      (1 - treasuryPercent/1e18) of the redeemed amount is transferred to this contract.\\n     *      Required gross amount = netAmountNeeded * 1e18 / (1e18 - treasuryPercent)\\n     * @param collateralMarket The vToken market from which collateral will be redeemed (must not be vBNB)\\n     * @param collateralAmountToRedeemForSwap The gross amount of collateral to redeem (must account for treasury fee if nonzero)\\n     * @param borrowedMarket The vToken market where debt will be repaid via flash loan (must not be vBNB)\\n     * @param borrowedAmountToFlashLoan The amount to borrow via flash loan for debt repayment (can exceed actual debt)\\n     * @param minAmountOutAfterSwap The minimum amount of borrowed asset expected after swap (for slippage protection)\\n     * @param swapData Bytes containing swap instructions for converting collateral to borrowed assets\\n     * @custom:emits LeverageExited\\n     * @custom:error IdenticalMarkets if collateral and borrow markets are the same\\n     * @custom:error NotAnApprovedDelegate if caller has not delegated to this contract\\n     * @custom:error MarketNotListed if any market is not listed in Comptroller\\n     * @custom:error VBNBNotSupported if collateral or borrow market is vBNB\\n     * @custom:error OperationCausesLiquidation if the operation would make the account unsafe\\n     * @custom:error RepayBehalfFailed if repay operation fails\\n     * @custom:error RedeemBehalfFailed if redeem operation fails\\n     * @custom:error TokenSwapCallFailed if token swap execution fails\\n     * @custom:error SlippageExceeded if swap output is below minimum required\\n     * @custom:error InsufficientFundsToRepayFlashloan if insufficient funds to repay flash loan\\n     */\\n    function exitLeverage(\\n        IVToken collateralMarket,\\n        uint256 collateralAmountToRedeemForSwap,\\n        IVToken borrowedMarket,\\n        uint256 borrowedAmountToFlashLoan,\\n        uint256 minAmountOutAfterSwap,\\n        bytes calldata swapData\\n    ) external;\\n\\n    /**\\n     * @notice Exits a leveraged position when collateral and borrowed assets are the same token\\n     * @dev This function uses flash loans to temporarily repay debt, redeems collateral,\\n     *      and repays the flash loan without requiring token swaps. This is more gas-efficient\\n     *      than exitLeverage when dealing with single-asset positions. Any remaining collateral\\n     *      dust after the operation is returned to the user.\\n     *\\n     *      The flash loan amount can exceed actual debt to account for interest accrual\\n     *      between transaction creation and mining. The contract caps repayment to actual\\n     *      debt and uses leftover funds toward flash loan repayment.\\n     *\\n     *      If treasuryPercent() is nonzero, the contract automatically adjusts the redeem\\n     *      amount to ensure sufficient funds are received to repay the flash loan after the\\n     *      treasury fee deduction.\\n     *\\n     *      NOTE: No pre-operation safety check is performed because exiting leverage reduces\\n     *      debt exposure, which can only improve account health. Post-operation safety is\\n     *      still validated to ensure the final position is healthy.\\n     * @param collateralMarket The vToken market for both collateral and borrowed asset (must not be vBNB)\\n     * @param collateralAmountToFlashLoan The amount to borrow via flash loan for debt repayment (can exceed actual debt)\\n     * @custom:emits SingleAssetLeverageExited\\n     * @custom:error NotAnApprovedDelegate if caller has not delegated to this contract\\n     * @custom:error MarketNotListed if the market is not listed in Comptroller\\n     * @custom:error VBNBNotSupported if the market is vBNB\\n     * @custom:error OperationCausesLiquidation if the operation would make the account unsafe\\n     * @custom:error RepayBehalfFailed if repay operation fails\\n     * @custom:error RedeemBehalfFailed if redeem operation fails\\n     * @custom:error InsufficientFundsToRepayFlashloan if insufficient funds to repay flash loan\\n     */\\n    function exitSingleAssetLeverage(IVToken collateralMarket, uint256 collateralAmountToFlashLoan) external;\\n}\\n\",\"keccak256\":\"0x3f23cd2776950188bfe1e3f32a77ad71860cf2996c0df1abff87f86e3da4b4f9\",\"license\":\"BSD-3-Clause\"},\"contracts/LeverageManager/LeverageStrategiesManager.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.28;\\n\\nimport { Ownable2StepUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport {\\n    SafeERC20Upgradeable,\\n    IERC20Upgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\nimport { IVToken, IComptroller, IFlashLoanReceiver } from \\\"../Interfaces.sol\\\";\\nimport { SwapHelper } from \\\"../SwapHelper/SwapHelper.sol\\\";\\n\\nimport { ILeverageStrategiesManager } from \\\"./ILeverageStrategiesManager.sol\\\";\\n\\n/**\\n * @title LeverageStrategiesManager\\n * @author Venus Protocol\\n * @notice Contract for managing leveraged positions using flash loans and token swaps\\n */\\ncontract LeverageStrategiesManager is\\n    Ownable2StepUpgradeable,\\n    ReentrancyGuardUpgradeable,\\n    IFlashLoanReceiver,\\n    ILeverageStrategiesManager\\n{\\n    using SafeERC20Upgradeable for IERC20Upgradeable;\\n\\n    /// @dev Success return value for VToken operations (mint, borrow, repay, redeem)\\n    uint256 private constant SUCCESS = 0;\\n\\n    /// @dev Mantissa for fixed-point arithmetic (1e18 = 100%)\\n    uint256 private constant MANTISSA_ONE = 1e18;\\n\\n    /// @notice The Venus comptroller contract for market interactions and flash loans execution\\n    IComptroller public immutable COMPTROLLER;\\n\\n    /// @notice The swap helper contract for executing token swaps during leverage operations\\n    SwapHelper public immutable swapHelper;\\n\\n    /// @notice The vBNB market address (not supported for leverage operations)\\n    IVToken public immutable vBNB;\\n\\n    /// @dev Transient (EIP-1153): Cleared at transaction end. Tracks operation type during flash loan callback.\\n    OperationType transient operationType;\\n\\n    /// @dev Transient (EIP-1153): Cleared at transaction end. Stores msg.sender for flash loan callback context.\\n    address transient operationInitiator;\\n\\n    /// @dev Transient (EIP-1153): Cleared at transaction end. Stores collateral market for flash loan callback.\\n    IVToken transient collateralMarket;\\n\\n    /// @dev Transient (EIP-1153): Cleared at transaction end. Stores collateral seed (enter) or redeem amount (exit).\\n    uint256 transient collateralAmount;\\n\\n    /// @dev Transient (EIP-1153): Cleared at transaction end. Stores borrowed amount seed for enterLeverageFromBorrow.\\n    uint256 transient borrowedAmountSeed;\\n\\n    /// @dev Transient (EIP-1153): Cleared at transaction end. Stores minimum expected output after swap.\\n    uint256 transient minAmountOutAfterSwap;\\n\\n    /**\\n     * @notice Contract constructor\\n     * @dev Sets immutable variables and disables initializers for the implementation contract\\n     * @param _comptroller The Venus comptroller contract address\\n     * @param _swapHelper The swap helper contract address\\n     * @param _vBNB The vBNB market address (not supported for leverage operations)\\n     * @custom:oz-upgrades-unsafe-allow constructor\\n     */\\n    constructor(IComptroller _comptroller, SwapHelper _swapHelper, IVToken _vBNB) {\\n        if (address(_comptroller) == address(0) || address(_swapHelper) == address(0) || address(_vBNB) == address(0)) {\\n            revert ZeroAddress();\\n        }\\n\\n        COMPTROLLER = _comptroller;\\n        swapHelper = _swapHelper;\\n        vBNB = _vBNB;\\n        _disableInitializers();\\n    }\\n\\n    /**\\n     * @notice Initializes the contract\\n     * @dev Sets up the Ownable2Step functionality. Can only be called once.\\n     */\\n    function initialize() external initializer {\\n        __Ownable2Step_init();\\n        __ReentrancyGuard_init();\\n    }\\n\\n    /// @inheritdoc ILeverageStrategiesManager\\n    function enterSingleAssetLeverage(\\n        IVToken _collateralMarket,\\n        uint256 _collateralAmountSeed,\\n        uint256 _collateralAmountToFlashLoan\\n    ) external {\\n        if (_collateralAmountToFlashLoan == 0) revert ZeroFlashLoanAmount();\\n        _checkMarketSupported(_collateralMarket);\\n\\n        _checkUserDelegated();\\n\\n        _accrueInterest(_collateralMarket);\\n\\n        _validateAndEnterMarket(msg.sender, _collateralMarket);\\n        _checkAccountSafe(msg.sender);\\n\\n        _transferSeedAmountFromUser(_collateralMarket, msg.sender, _collateralAmountSeed);\\n\\n        operationInitiator = msg.sender;\\n        operationType = OperationType.ENTER_SINGLE_ASSET;\\n        collateralAmount = _collateralAmountSeed;\\n\\n        IVToken[] memory borrowedMarkets = new IVToken[](1);\\n        borrowedMarkets[0] = _collateralMarket;\\n        uint256[] memory flashLoanAmounts = new uint256[](1);\\n        flashLoanAmounts[0] = _collateralAmountToFlashLoan;\\n\\n        COMPTROLLER.executeFlashLoan(\\n            payable(msg.sender),\\n            payable(address(this)),\\n            borrowedMarkets,\\n            flashLoanAmounts,\\n            \\\"\\\"\\n        );\\n\\n        _checkAccountSafe(msg.sender);\\n\\n        emit SingleAssetLeverageEntered(\\n            msg.sender,\\n            _collateralMarket,\\n            _collateralAmountSeed,\\n            _collateralAmountToFlashLoan\\n        );\\n\\n        _transferDustToInitiator(_collateralMarket);\\n    }\\n\\n    /// @inheritdoc ILeverageStrategiesManager\\n    function enterLeverage(\\n        IVToken _collateralMarket,\\n        uint256 _collateralAmountSeed,\\n        IVToken _borrowedMarket,\\n        uint256 _borrowedAmountToFlashLoan,\\n        uint256 _minAmountOutAfterSwap,\\n        bytes calldata _swapData\\n    ) external {\\n        if (_borrowedAmountToFlashLoan == 0) revert ZeroFlashLoanAmount();\\n        if (_collateralMarket == _borrowedMarket) revert IdenticalMarkets();\\n        _checkMarketSupported(_collateralMarket);\\n        _checkMarketSupported(_borrowedMarket);\\n\\n        _checkUserDelegated();\\n\\n        _accrueInterest(_collateralMarket);\\n        _accrueInterest(_borrowedMarket);\\n\\n        _validateAndEnterMarket(msg.sender, _collateralMarket);\\n        _checkAccountSafe(msg.sender);\\n\\n        _transferSeedAmountFromUser(_collateralMarket, msg.sender, _collateralAmountSeed);\\n\\n        operationInitiator = msg.sender;\\n        collateralMarket = _collateralMarket;\\n        collateralAmount = _collateralAmountSeed;\\n        minAmountOutAfterSwap = _minAmountOutAfterSwap;\\n        operationType = OperationType.ENTER_COLLATERAL;\\n\\n        IVToken[] memory borrowedMarkets = new IVToken[](1);\\n        borrowedMarkets[0] = _borrowedMarket;\\n        uint256[] memory flashLoanAmounts = new uint256[](1);\\n        flashLoanAmounts[0] = _borrowedAmountToFlashLoan;\\n\\n        COMPTROLLER.executeFlashLoan(\\n            payable(msg.sender),\\n            payable(address(this)),\\n            borrowedMarkets,\\n            flashLoanAmounts,\\n            _swapData\\n        );\\n\\n        _checkAccountSafe(msg.sender);\\n\\n        emit LeverageEntered(\\n            msg.sender,\\n            _collateralMarket,\\n            _collateralAmountSeed,\\n            _borrowedMarket,\\n            _borrowedAmountToFlashLoan\\n        );\\n\\n        _transferDustToInitiator(_collateralMarket);\\n        _transferDustToInitiator(_borrowedMarket);\\n    }\\n\\n    /// @inheritdoc ILeverageStrategiesManager\\n    function enterLeverageFromBorrow(\\n        IVToken _collateralMarket,\\n        IVToken _borrowedMarket,\\n        uint256 _borrowedAmountSeed,\\n        uint256 _borrowedAmountToFlashLoan,\\n        uint256 _minAmountOutAfterSwap,\\n        bytes calldata _swapData\\n    ) external {\\n        if (_borrowedAmountToFlashLoan == 0) revert ZeroFlashLoanAmount();\\n        if (_collateralMarket == _borrowedMarket) revert IdenticalMarkets();\\n        _checkMarketSupported(_collateralMarket);\\n        _checkMarketSupported(_borrowedMarket);\\n\\n        _checkUserDelegated();\\n\\n        _accrueInterest(_collateralMarket);\\n        _accrueInterest(_borrowedMarket);\\n\\n        _validateAndEnterMarket(msg.sender, _collateralMarket);\\n        _checkAccountSafe(msg.sender);\\n\\n        _transferSeedAmountFromUser(_borrowedMarket, msg.sender, _borrowedAmountSeed);\\n\\n        operationInitiator = msg.sender;\\n        collateralMarket = _collateralMarket;\\n        borrowedAmountSeed = _borrowedAmountSeed;\\n        minAmountOutAfterSwap = _minAmountOutAfterSwap;\\n        operationType = OperationType.ENTER_BORROW;\\n\\n        IVToken[] memory borrowedMarkets = new IVToken[](1);\\n        borrowedMarkets[0] = _borrowedMarket;\\n        uint256[] memory flashLoanAmounts = new uint256[](1);\\n        flashLoanAmounts[0] = _borrowedAmountToFlashLoan;\\n\\n        COMPTROLLER.executeFlashLoan(\\n            payable(msg.sender),\\n            payable(address(this)),\\n            borrowedMarkets,\\n            flashLoanAmounts,\\n            _swapData\\n        );\\n\\n        _checkAccountSafe(msg.sender);\\n\\n        emit LeverageEnteredFromBorrow(\\n            msg.sender,\\n            _collateralMarket,\\n            _borrowedMarket,\\n            _borrowedAmountSeed,\\n            _borrowedAmountToFlashLoan\\n        );\\n\\n        _transferDustToInitiator(_collateralMarket);\\n        _transferDustToInitiator(_borrowedMarket);\\n    }\\n\\n    /// @inheritdoc ILeverageStrategiesManager\\n    function exitLeverage(\\n        IVToken _collateralMarket,\\n        uint256 _collateralAmountToRedeemForSwap,\\n        IVToken _borrowedMarket,\\n        uint256 _borrowedAmountToFlashLoan,\\n        uint256 _minAmountOutAfterSwap,\\n        bytes calldata _swapData\\n    ) external {\\n        if (_borrowedAmountToFlashLoan == 0) revert ZeroFlashLoanAmount();\\n        if (_collateralMarket == _borrowedMarket) revert IdenticalMarkets();\\n        _checkMarketSupported(_collateralMarket);\\n        _checkMarketSupported(_borrowedMarket);\\n\\n        _checkUserDelegated();\\n\\n        operationInitiator = msg.sender;\\n        collateralMarket = _collateralMarket;\\n        collateralAmount = _collateralAmountToRedeemForSwap;\\n        minAmountOutAfterSwap = _minAmountOutAfterSwap;\\n        operationType = OperationType.EXIT_COLLATERAL;\\n\\n        IVToken[] memory borrowedMarkets = new IVToken[](1);\\n        borrowedMarkets[0] = _borrowedMarket;\\n        uint256[] memory flashLoanAmounts = new uint256[](1);\\n        flashLoanAmounts[0] = _borrowedAmountToFlashLoan;\\n\\n        COMPTROLLER.executeFlashLoan(\\n            payable(msg.sender),\\n            payable(address(this)),\\n            borrowedMarkets,\\n            flashLoanAmounts,\\n            _swapData\\n        );\\n\\n        _checkAccountSafe(msg.sender);\\n\\n        emit LeverageExited(\\n            msg.sender,\\n            _collateralMarket,\\n            _collateralAmountToRedeemForSwap,\\n            _borrowedMarket,\\n            _borrowedAmountToFlashLoan\\n        );\\n\\n        _transferDustToInitiator(_collateralMarket);\\n        _transferDustToInitiator(_borrowedMarket);\\n    }\\n\\n    /// @inheritdoc ILeverageStrategiesManager\\n    function exitSingleAssetLeverage(IVToken _collateralMarket, uint256 _collateralAmountToFlashLoan) external {\\n        if (_collateralAmountToFlashLoan == 0) revert ZeroFlashLoanAmount();\\n        _checkMarketSupported(_collateralMarket);\\n        _checkUserDelegated();\\n\\n        operationInitiator = msg.sender;\\n        collateralMarket = _collateralMarket;\\n        operationType = OperationType.EXIT_SINGLE_ASSET;\\n\\n        IVToken[] memory borrowedMarkets = new IVToken[](1);\\n        borrowedMarkets[0] = _collateralMarket;\\n        uint256[] memory flashLoanAmounts = new uint256[](1);\\n        flashLoanAmounts[0] = _collateralAmountToFlashLoan;\\n\\n        COMPTROLLER.executeFlashLoan(\\n            payable(msg.sender),\\n            payable(address(this)),\\n            borrowedMarkets,\\n            flashLoanAmounts,\\n            \\\"\\\"\\n        );\\n\\n        _checkAccountSafe(msg.sender);\\n\\n        emit SingleAssetLeverageExited(msg.sender, _collateralMarket, _collateralAmountToFlashLoan);\\n\\n        _transferDustToInitiator(_collateralMarket);\\n    }\\n\\n    /**\\n     * @notice Flash loan callback entrypoint called by Comptroller\\n     * @dev Protected by nonReentrant modifier to prevent reentrancy attacks during flash loan execution\\n     * @param vTokens Array with the borrowed vToken market (single element)\\n     * @param amounts Array with the borrowed underlying amount (single element)\\n     * @param premiums Array with the flash loan fee amount (single element)\\n     * @param initiator The address that initiated the flash loan (must be this contract)\\n     * @param onBehalf The user for whom debt will be opened\\n     * @param param Encoded auxiliary data for the operation (e.g., swap multicall)\\n     * @return success Whether the execution succeeded\\n     * @return repayAmounts Amounts to approve for flash loan repayment\\n     * @custom:error InitiatorMismatch When initiator is not this contract\\n     * @custom:error OnBehalfMismatch When onBehalf is not the operation initiator\\n     * @custom:error UnauthorizedExecutor When caller is not the Comptroller\\n     * @custom:error FlashLoanAssetOrAmountMismatch When array lengths mismatch or > 1 element\\n     * @custom:error InvalidExecuteOperation When operation type is unknown\\n     */\\n    function executeOperation(\\n        IVToken[] calldata vTokens,\\n        uint256[] calldata amounts,\\n        uint256[] calldata premiums,\\n        address initiator,\\n        address onBehalf,\\n        bytes calldata param\\n    ) external override nonReentrant returns (bool success, uint256[] memory repayAmounts) {\\n        // Only the Comptroller can invoke this callback during flash loan execution\\n        if (msg.sender != address(COMPTROLLER)) {\\n            revert UnauthorizedExecutor();\\n        }\\n\\n        // Flash loan must be initiated by this contract to prevent unauthorized callbacks\\n        if (initiator != address(this)) {\\n            revert InitiatorMismatch();\\n        }\\n\\n        // The flash loan beneficiary must match the user who called the entry function\\n        if (onBehalf != operationInitiator) {\\n            revert OnBehalfMismatch();\\n        }\\n\\n        // This contract only supports single-market flash loans\\n        if (vTokens.length != 1 || amounts.length != 1 || premiums.length != 1) {\\n            revert FlashLoanAssetOrAmountMismatch();\\n        }\\n\\n        repayAmounts = new uint256[](1);\\n        if (operationType == OperationType.ENTER_SINGLE_ASSET) {\\n            repayAmounts[0] = _handleEnterSingleAsset(onBehalf, vTokens[0], amounts[0], premiums[0]);\\n        } else if (operationType == OperationType.ENTER_COLLATERAL) {\\n            repayAmounts[0] = _handleEnterCollateral(onBehalf, vTokens[0], amounts[0], premiums[0], param);\\n        } else if (operationType == OperationType.ENTER_BORROW) {\\n            repayAmounts[0] = _handleEnterBorrow(onBehalf, vTokens[0], amounts[0], premiums[0], param);\\n        } else if (operationType == OperationType.EXIT_COLLATERAL) {\\n            repayAmounts[0] = _handleExitCollateral(onBehalf, vTokens[0], amounts[0], premiums[0], param);\\n        } else if (operationType == OperationType.EXIT_SINGLE_ASSET) {\\n            repayAmounts[0] = _handleExitSingleAsset(onBehalf, vTokens[0], amounts[0], premiums[0]);\\n        } else {\\n            revert InvalidExecuteOperation();\\n        }\\n\\n        return (true, repayAmounts);\\n    }\\n\\n    /**\\n     * @notice Executes the enter leveraged position with single collateral operation during flash loan callback\\n     * @dev This function performs the following steps:\\n     *      1. Combines flash loaned collateral with user's seed collateral\\n     *      2. Supplies all collateral to the Venus market on behalf of the user\\n     *      3. Borrows the repayment amount (fees) on behalf of the user\\n     *      4. Approves the collateral asset for repayment to the flash loan\\n     * @param onBehalf Address on whose behalf the operation is performed\\n     * @param market The vToken market for the collateral asset\\n     * @param flashloanedCollateralAmount The amount of collateral assets received from flash loan\\n     * @param collateralAmountFees The fees to be paid on the flash loaned collateral amount\\n     * @return flashLoanRepayAmount The total amount of collateral assets to repay (fees only)\\n     * @custom:error MintBehalfFailed if mint behalf operation fails\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     * @custom:error InsufficientFundsToRepayFlashloan if insufficient funds are available to repay the flash loan\\n     */\\n    function _handleEnterSingleAsset(\\n        address onBehalf,\\n        IVToken market,\\n        uint256 flashloanedCollateralAmount,\\n        uint256 collateralAmountFees\\n    ) internal returns (uint256 flashLoanRepayAmount) {\\n        IERC20Upgradeable collateralAsset = IERC20Upgradeable(market.underlying());\\n\\n        uint256 totalCollateralAmountToMint = flashloanedCollateralAmount + collateralAmount;\\n        collateralAsset.forceApprove(address(market), totalCollateralAmountToMint);\\n\\n        uint256 err = market.mintBehalf(onBehalf, totalCollateralAmountToMint);\\n        if (err != SUCCESS) {\\n            revert MintBehalfFailed(err);\\n        }\\n\\n        flashLoanRepayAmount = _borrowAndRepayFlashLoanFee(onBehalf, market, collateralAsset, collateralAmountFees);\\n    }\\n\\n    /**\\n     * @notice Executes the enter leveraged position operation during flash loan callback\\n     * @dev This function performs the following steps:\\n     *      1. Swaps flash loaned borrowed assets for collateral assets\\n     *      2. Supplies all collateral received from swap plus seed to the Venus market on behalf of the user\\n     *      3. Borrows the repayment amount on behalf of the user\\n     *      4. Approves the borrowed asset for repayment to the flash loan\\n     * @param onBehalf Address on whose behalf the operation is performed\\n     * @param borrowMarket The vToken market from which assets were borrowed\\n     * @param borrowedAssetAmount The amount of borrowed assets received from flash loan\\n     * @param borrowedAssetFees The fees to be paid on the borrowed asset amount\\n     * @param swapCallData The encoded swap instructions for converting borrowed to collateral assets\\n     * @return flashLoanRepayAmount The total amount of borrowed assets to repay (fees only)\\n     * @custom:error MintBehalfFailed if mint behalf operation fails\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     * @custom:error TokenSwapCallFailed if token swap execution fails\\n     * @custom:error SlippageExceeded if collateral balance after swap is below minimum\\n     */\\n    function _handleEnterCollateral(\\n        address onBehalf,\\n        IVToken borrowMarket,\\n        uint256 borrowedAssetAmount,\\n        uint256 borrowedAssetFees,\\n        bytes calldata swapCallData\\n    ) internal returns (uint256 flashLoanRepayAmount) {\\n        IERC20Upgradeable borrowedAsset = IERC20Upgradeable(borrowMarket.underlying());\\n\\n        // Cache transient storage reads for variables used more than once to save gas\\n        IVToken _collateralMarket = collateralMarket;\\n        uint256 _minAmountOutAfterSwap = minAmountOutAfterSwap;\\n\\n        IERC20Upgradeable collateralAsset = IERC20Upgradeable(_collateralMarket.underlying());\\n        uint256 swappedCollateralAmountOut = _performSwap(\\n            borrowedAsset,\\n            borrowedAssetAmount,\\n            collateralAsset,\\n            _minAmountOutAfterSwap,\\n            swapCallData\\n        );\\n\\n        uint256 collateralAmountToMint = swappedCollateralAmountOut + collateralAmount;\\n        collateralAsset.forceApprove(address(_collateralMarket), collateralAmountToMint);\\n\\n        uint256 err = _collateralMarket.mintBehalf(onBehalf, collateralAmountToMint);\\n        if (err != SUCCESS) {\\n            revert MintBehalfFailed(err);\\n        }\\n\\n        flashLoanRepayAmount = _borrowAndRepayFlashLoanFee(onBehalf, borrowMarket, borrowedAsset, borrowedAssetFees);\\n    }\\n\\n    /**\\n     * @notice Executes the enter leveraged position with borrowed assets operation during flash loan callback\\n     * @dev This function performs the following steps:\\n     *      1. Swaps the total borrowed assets (seed + flash loan) for collateral assets\\n     *      2. Supplies all collateral received from swap to the Venus market on behalf of the user\\n     *      3. Borrows the repayment amount on behalf of the user\\n     *      4. Approves the borrowed asset for repayment to the flash loan\\n     * @param onBehalf Address on whose behalf the operation is performed\\n     * @param borrowMarket The vToken market from which assets were borrowed\\n     * @param borrowedAssetAmount The amount of borrowed assets received from flash loan\\n     * @param borrowedAssetFees The fees to be paid on the borrowed asset amount\\n     * @param swapCallData The encoded swap instructions for converting borrowed to collateral assets\\n     * @return flashLoanRepayAmount The total amount of borrowed assets to repay (fees only)\\n     * @custom:error MintBehalfFailed if mint behalf operation fails\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     * @custom:error TokenSwapCallFailed if token swap execution fails\\n     * @custom:error SlippageExceeded if collateral balance after swap is below minimum\\n     */\\n    function _handleEnterBorrow(\\n        address onBehalf,\\n        IVToken borrowMarket,\\n        uint256 borrowedAssetAmount,\\n        uint256 borrowedAssetFees,\\n        bytes calldata swapCallData\\n    ) internal returns (uint256 flashLoanRepayAmount) {\\n        IERC20Upgradeable borrowedAsset = IERC20Upgradeable(borrowMarket.underlying());\\n\\n        // Cache transient storage reads for variables used more than once to save gas\\n        IVToken _collateralMarket = collateralMarket;\\n        uint256 _minAmountOutAfterSwap = minAmountOutAfterSwap;\\n\\n        IERC20Upgradeable collateralAsset = IERC20Upgradeable(_collateralMarket.underlying());\\n\\n        uint256 totalBorrowedAmountToSwap = borrowedAmountSeed + borrowedAssetAmount;\\n\\n        uint256 swappedCollateralAmountOut = _performSwap(\\n            borrowedAsset,\\n            totalBorrowedAmountToSwap,\\n            collateralAsset,\\n            _minAmountOutAfterSwap,\\n            swapCallData\\n        );\\n\\n        collateralAsset.forceApprove(address(_collateralMarket), swappedCollateralAmountOut);\\n\\n        uint256 err = _collateralMarket.mintBehalf(onBehalf, swappedCollateralAmountOut);\\n        if (err != SUCCESS) {\\n            revert MintBehalfFailed(err);\\n        }\\n\\n        flashLoanRepayAmount = _borrowAndRepayFlashLoanFee(onBehalf, borrowMarket, borrowedAsset, borrowedAssetFees);\\n    }\\n\\n    /**\\n     * @notice Executes the exit leveraged position operation during flash loan callback\\n     * @dev This function performs the following steps:\\n     *      1. Queries actual debt and caps repayment to min(flashLoanAmount, actualDebt)\\n     *         to handle cases where UI flash loans slightly more than current debt\\n     *      2. Repays user's debt (up to actual debt amount) in the borrowed market\\n     *      3. Calculates redeem amount accounting for treasury fee (if any)\\n     *      4. Redeems specified amount of collateral from the Venus market\\n     *      5. Swaps actual received collateral (after treasury fee) for borrowed assets\\n     *      6. Validates total borrowed asset balance (swap output + excess flash loan funds)\\n     *         is sufficient to repay flash loan, then approves repayment\\n     *\\n     * @param onBehalf Address on whose behalf the operation is performed\\n     * @param borrowMarket The vToken market from which assets were borrowed via flash loan\\n     * @param borrowedAssetAmountToRepayFromFlashLoan The amount borrowed via flash loan for debt repayment\\n     * @param borrowedAssetFees The fees to be paid on the borrowed asset amount\\n     * @param swapCallData The encoded swap instructions for converting collateral to borrowed assets\\n     * @return flashLoanRepayAmount The total amount of borrowed assets to repay\\n     * @custom:error RepayBehalfFailed if repayment of borrowed assets fails\\n     * @custom:error RedeemBehalfFailed if redeem operations fail\\n     * @custom:error TokenSwapCallFailed if token swap execution fails\\n     * @custom:error SlippageExceeded if swap output is below minimum required\\n     * @custom:error InsufficientFundsToRepayFlashloan if insufficient funds are available to repay the flash loan\\n     */\\n    function _handleExitCollateral(\\n        address onBehalf,\\n        IVToken borrowMarket,\\n        uint256 borrowedAssetAmountToRepayFromFlashLoan,\\n        uint256 borrowedAssetFees,\\n        bytes calldata swapCallData\\n    ) internal returns (uint256 flashLoanRepayAmount) {\\n        IERC20Upgradeable borrowedAsset = IERC20Upgradeable(borrowMarket.underlying());\\n\\n        {\\n            uint256 borrowedTotalDebtAmount = borrowMarket.borrowBalanceCurrent(onBehalf);\\n            uint256 repayAmount = borrowedAssetAmountToRepayFromFlashLoan > borrowedTotalDebtAmount\\n                ? borrowedTotalDebtAmount\\n                : borrowedAssetAmountToRepayFromFlashLoan;\\n\\n            borrowedAsset.forceApprove(address(borrowMarket), repayAmount);\\n            uint256 err = borrowMarket.repayBorrowBehalf(onBehalf, repayAmount);\\n\\n            if (err != SUCCESS) {\\n                revert RepayBehalfFailed(err);\\n            }\\n        }\\n\\n        // Cache transient storage reads for variables used more than once to save gas\\n        IVToken _collateralMarket = collateralMarket;\\n        uint256 collateralAmountToRedeem = collateralAmount;\\n\\n        {\\n            uint256 treasuryPercent = COMPTROLLER.treasuryPercent();\\n            uint256 redeemAmount = treasuryPercent > 0\\n                ? (collateralAmountToRedeem * MANTISSA_ONE + (MANTISSA_ONE - treasuryPercent) - 1) /\\n                    (MANTISSA_ONE - treasuryPercent)\\n                : collateralAmountToRedeem;\\n\\n            uint256 err = _collateralMarket.redeemUnderlyingBehalf(onBehalf, redeemAmount);\\n            if (err != SUCCESS) {\\n                revert RedeemBehalfFailed(err);\\n            }\\n        }\\n\\n        IERC20Upgradeable collateralAsset = IERC20Upgradeable(_collateralMarket.underlying());\\n\\n        _performSwap(\\n            collateralAsset,\\n            collateralAsset.balanceOf(address(this)),\\n            borrowedAsset,\\n            minAmountOutAfterSwap,\\n            swapCallData\\n        );\\n\\n        flashLoanRepayAmount = borrowedAssetAmountToRepayFromFlashLoan + borrowedAssetFees;\\n\\n        if (borrowedAsset.balanceOf(address(this)) < flashLoanRepayAmount) {\\n            revert InsufficientFundsToRepayFlashloan();\\n        }\\n\\n        borrowedAsset.forceApprove(address(borrowMarket), flashLoanRepayAmount);\\n    }\\n\\n    /**\\n     * @notice Executes the exit leveraged position with single collateral operation during flash loan callback\\n     * @dev This function performs the following steps:\\n     *      1. Queries actual debt and caps repayment to min(flashLoanAmount, actualDebt)\\n     *         to handle cases where UI flash loans slightly more than current debt\\n     *      2. Repays user's debt (up to actual debt amount) in the market\\n     *      3. Calculates redeem amount accounting for treasury fee (if any)\\n     *      4. Caps redeem amount to user's actual collateral balance to prevent revert\\n     *         when user entered with zero seed (collateral equals borrowed amount)\\n     *      5. Redeems collateral (up to user's balance) to repay flash loan\\n     *      6. Approves the collateral asset for repayment to the flash loan\\n     * @param onBehalf Address on whose behalf the operation is performed\\n     * @param market The vToken market for both collateral and borrowed assets\\n     * @param flashloanedCollateralAmount The amount borrowed via flash loan for debt repayment\\n     * @param collateralAmountFees The fees to be paid on the flash loaned collateral amount\\n     * @return flashLoanRepayAmount The total amount of collateral assets to repay\\n     * @custom:error RepayBehalfFailed if repayment of borrowed assets fails\\n     * @custom:error RedeemBehalfFailed if redeem operations fail\\n     * @custom:error InsufficientFundsToRepayFlashloan if insufficient funds are available to repay the flash loan\\n     */\\n    function _handleExitSingleAsset(\\n        address onBehalf,\\n        IVToken market,\\n        uint256 flashloanedCollateralAmount,\\n        uint256 collateralAmountFees\\n    ) internal returns (uint256 flashLoanRepayAmount) {\\n        IERC20Upgradeable collateralAsset = IERC20Upgradeable(market.underlying());\\n\\n        uint256 marketTotalDebtAmount = market.borrowBalanceCurrent(onBehalf);\\n        uint256 repayAmount = flashloanedCollateralAmount > marketTotalDebtAmount\\n            ? marketTotalDebtAmount\\n            : flashloanedCollateralAmount;\\n\\n        collateralAsset.forceApprove(address(market), repayAmount);\\n        uint256 err = market.repayBorrowBehalf(onBehalf, repayAmount);\\n\\n        if (err != SUCCESS) {\\n            revert RepayBehalfFailed(err);\\n        }\\n\\n        flashLoanRepayAmount = flashloanedCollateralAmount + collateralAmountFees;\\n\\n        uint256 treasuryPercent = COMPTROLLER.treasuryPercent();\\n        uint256 redeemAmount = treasuryPercent > 0\\n            ? (flashLoanRepayAmount * MANTISSA_ONE + (MANTISSA_ONE - treasuryPercent) - 1) /\\n                (MANTISSA_ONE - treasuryPercent)\\n            : flashLoanRepayAmount;\\n\\n        uint256 userCollateralBalance = market.balanceOfUnderlying(onBehalf);\\n        if (redeemAmount > userCollateralBalance) {\\n            redeemAmount = userCollateralBalance;\\n        }\\n\\n        err = market.redeemUnderlyingBehalf(onBehalf, redeemAmount);\\n        if (err != SUCCESS) {\\n            revert RedeemBehalfFailed(err);\\n        }\\n\\n        if (collateralAsset.balanceOf(address(this)) < flashLoanRepayAmount) {\\n            revert InsufficientFundsToRepayFlashloan();\\n        }\\n\\n        collateralAsset.forceApprove(address(market), flashLoanRepayAmount);\\n    }\\n\\n    /**\\n     * @notice Performs token swap via the SwapHelper contract\\n     * @dev Transfers tokens to SwapHelper and executes the swap operation.\\n     *      The swap operation is expected to return the output tokens to this contract.\\n     * @param tokenIn The input token to be swapped\\n     * @param amountIn The amount of input tokens to swap\\n     * @param tokenOut The output token to receive from the swap\\n     * @param minAmountOut The minimum acceptable amount of output tokens\\n     * @param param The encoded swap instructions/calldata for the SwapHelper\\n     * @return amountOut The actual amount of output tokens received from the swap\\n     * @custom:error TokenSwapCallFailed if the swap execution fails\\n     * @custom:error SlippageExceeded if the swap output is below the minimum required\\n     */\\n    function _performSwap(\\n        IERC20Upgradeable tokenIn,\\n        uint256 amountIn,\\n        IERC20Upgradeable tokenOut,\\n        uint256 minAmountOut,\\n        bytes calldata param\\n    ) internal returns (uint256 amountOut) {\\n        tokenIn.safeTransfer(address(swapHelper), amountIn);\\n\\n        uint256 tokenOutBalanceBefore = tokenOut.balanceOf(address(this));\\n\\n        (bool success, ) = address(swapHelper).call(param);\\n        if (!success) {\\n            revert TokenSwapCallFailed();\\n        }\\n\\n        uint256 tokenOutBalanceAfter = tokenOut.balanceOf(address(this));\\n\\n        amountOut = tokenOutBalanceAfter - tokenOutBalanceBefore;\\n        if (amountOut < minAmountOut) {\\n            revert SlippageExceeded();\\n        }\\n\\n        return amountOut;\\n    }\\n\\n    /**\\n     * @notice Transfers tokens from the user to this contract if amount > 0\\n     * @dev If the specified amount is greater than zero, transfers tokens from the user.\\n     *      Reverts if the actual transferred amount does not match the expected amount.\\n     * @param market The vToken market whose underlying asset is to be transferred\\n     * @param user The address of the user to transfer tokens from\\n     * @param amount The amount of tokens to transfer\\n     * @custom:error TransferFromUserFailed if the transferred amount does not match the expected amount\\n     */\\n    function _transferSeedAmountFromUser(IVToken market, address user, uint256 amount) internal {\\n        if (amount > 0) {\\n            IERC20Upgradeable token = IERC20Upgradeable(market.underlying());\\n            token.safeTransferFrom(user, address(this), amount);\\n        }\\n    }\\n\\n    /**\\n     * @notice Transfers any remaining dust amounts back to the operation initiator\\n     * @dev This function returns small remaining balances to the user who initiated the operation.\\n     *      Should be called after leverage operations to ensure no funds are left in the contract.\\n     * @param market The vToken market whose underlying asset dust should be transferred\\n     */\\n    function _transferDustToInitiator(IVToken market) internal {\\n        IERC20Upgradeable asset = IERC20Upgradeable(market.underlying());\\n\\n        uint256 dustAmount = asset.balanceOf(address(this));\\n        if (dustAmount > 0) {\\n            // Cache transient storage read to save gas\\n            address _operationInitiator = operationInitiator;\\n            asset.safeTransfer(_operationInitiator, dustAmount);\\n            emit DustTransferred(_operationInitiator, address(asset), dustAmount);\\n        }\\n    }\\n\\n    /**\\n     * @notice Borrows assets on behalf of the user to repay the flash loan fee\\n     * @dev Borrows the total amount needed to repay the flash loan fee\\n     *      and approves the borrowed asset for repayment to the flash loan.\\n     * @param onBehalf Address on whose behalf assets will be borrowed\\n     * @param borrowMarket The vToken market from which assets will be borrowed\\n     * @param borrowedAsset The underlying asset being borrowed\\n     * @param borrowedAssetFees The fees to be paid on the borrowed asset amount\\n     * @return flashLoanRepayAmount The total amount of borrowed assets to repay (only fees)\\n     * @custom:error BorrowBehalfFailed if borrow behalf operation fails\\n     * @custom:error InsufficientFundsToRepayFlashloan if insufficient funds are available to repay the flash loan\\n     */\\n    function _borrowAndRepayFlashLoanFee(\\n        address onBehalf,\\n        IVToken borrowMarket,\\n        IERC20Upgradeable borrowedAsset,\\n        uint256 borrowedAssetFees\\n    ) internal returns (uint256 flashLoanRepayAmount) {\\n        flashLoanRepayAmount = borrowedAssetFees;\\n\\n        uint256 marketBalanceBeforeBorrow = borrowedAsset.balanceOf(address(borrowMarket));\\n        uint256 err = borrowMarket.borrowBehalf(onBehalf, flashLoanRepayAmount);\\n        if (err != SUCCESS) {\\n            revert BorrowBehalfFailed(err);\\n        }\\n        uint256 marketBalanceAfterBorrow = borrowedAsset.balanceOf(address(borrowMarket));\\n\\n        if (marketBalanceBeforeBorrow - marketBalanceAfterBorrow < flashLoanRepayAmount) {\\n            revert InsufficientFundsToRepayFlashloan();\\n        }\\n\\n        borrowedAsset.forceApprove(address(borrowMarket), flashLoanRepayAmount);\\n    }\\n\\n    /**\\n     * @notice Accrues interest on a vToken market\\n     * @dev Must be called before safety checks to ensure borrow balances reflect accumulated interest\\n     * @param market The vToken market to accrue interest on\\n     * @custom:error AccrueInterestFailed if the accrueInterest call returns a non-zero error code\\n     */\\n    function _accrueInterest(IVToken market) internal {\\n        uint256 err = market.accrueInterest();\\n        if (err != SUCCESS) revert AccrueInterestFailed(err);\\n    }\\n\\n    /**\\n     * @notice Ensures the user has entered the market before operations\\n     * @dev If user is not a member of market the function calls Comptroller to enter market on behalf of user\\n     * @param user The account for which membership is validated/updated\\n     * @param market The vToken market the user must enter\\n     * @custom:error EnterMarketFailed when Comptroller.enterMarketBehalf returns a non-zero error code\\n     */\\n    function _validateAndEnterMarket(address user, IVToken market) internal {\\n        if (!COMPTROLLER.checkMembership(user, market)) {\\n            uint256 err = COMPTROLLER.enterMarketBehalf(user, address(market));\\n            if (err != SUCCESS) revert EnterMarketFailed(err);\\n        }\\n    }\\n\\n    /**\\n     * @notice Checks if the caller has delegated this contract in the Comptroller\\n     * @custom:error NotAnApprovedDelegate if caller has not approved this contract as delegate\\n     */\\n    function _checkUserDelegated() internal view {\\n        if (!COMPTROLLER.approvedDelegates(msg.sender, address(this))) {\\n            revert NotAnApprovedDelegate();\\n        }\\n    }\\n\\n    /**\\n     * @notice Checks if a `user` account is safe from liquidation\\n     * @dev Verifies that the user's account has no liquidity shortfall and the comptroller\\n     *      returned no errors when calculating account liquidity. This ensures the account\\n     *      won't be immediately liquidatable after the leverage operation.\\n     * @param user The address to check account safety for\\n     * @custom:error OperationCausesLiquidation if the account has a liquidity shortfall or comptroller error\\n     */\\n    function _checkAccountSafe(address user) internal view {\\n        (uint256 err, , uint256 shortfall) = COMPTROLLER.getBorrowingPower(user);\\n        if (err != SUCCESS || shortfall > 0) revert OperationCausesLiquidation(err);\\n    }\\n\\n    /**\\n     * @notice Ensures that the given market is supported for leverage operations\\n     * @dev A market must be listed in the Comptroller and must not be vBNB.\\n     *      vBNB is excluded because it uses native BNB which requires special handling\\n     *      that this contract does not support.\\n     * @param market The vToken address to validate\\n     * @custom:error MarketNotListed if the market is not listed in Comptroller\\n     * @custom:error VBNBNotSupported if the market is vBNB\\n     */\\n    function _checkMarketSupported(IVToken market) internal view {\\n        (bool isMarketListed, , ) = COMPTROLLER.markets(address(market));\\n        if (!isMarketListed) revert MarketNotListed(address(market));\\n        if (market == vBNB) revert VBNBNotSupported();\\n    }\\n}\\n\",\"keccak256\":\"0x2bf4ff1a3a2265f7e63431fc11766e3778051f5ebf11bccff39d8883e0347c9f\",\"license\":\"BSD-3-Clause\"},\"contracts/SwapHelper/SwapHelper.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { AddressUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport { EIP712 } from \\\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\\\";\\nimport { ECDSA } from \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport { Ownable2Step } from \\\"@openzeppelin/contracts/access/Ownable2Step.sol\\\";\\nimport { ReentrancyGuard } from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\n\\n/**\\n * @title SwapHelper\\n * @author Venus Protocol\\n * @notice Helper contract for executing multiple token operations atomically\\n * @dev This contract provides utilities for managing approvals,\\n *      and executing arbitrary calls in a single transaction. It supports\\n *      signature verification using EIP-712 for backend-authorized operations.\\n *      All functions except multicall are designed to be called internally via multicall.\\n * @custom:security-contact security@venus.io\\n */\\ncontract SwapHelper is EIP712, Ownable2Step, ReentrancyGuard {\\n    using SafeERC20Upgradeable for IERC20Upgradeable;\\n    using AddressUpgradeable for address;\\n\\n    /// @notice EIP-712 typehash for Multicall struct used in signature verification\\n    /// @dev keccak256(\\\"Multicall(address caller,bytes[] calls,uint256 deadline,bytes32 salt)\\\")\\n    bytes32 internal constant MULTICALL_TYPEHASH = keccak256(\\\"Multicall(address caller,bytes[] calls,uint256 deadline,bytes32 salt)\\\");\\n\\n    /// @notice Address authorized to sign multicall operations\\n    /// @dev Can be updated by contract owner via setBackendSigner\\n    address public backendSigner;\\n\\n    /// @notice Mapping to track used salts for replay protection\\n    /// @dev Maps salt => bool to prevent reuse of same salt\\n    mapping(bytes32 => bool) public usedSalts;\\n\\n    /// @notice Error thrown when transaction deadline has passed\\n    /// @dev Emitted when block.timestamp > deadline in multicall\\n    error DeadlineReached();\\n\\n    /// @notice Error thrown when signature verification fails\\n    /// @dev Emitted when recovered signer doesn't match backendSigner\\n    error Unauthorized();\\n\\n    /// @notice Error thrown when zero address is provided as parameter\\n    /// @dev Used in constructor and setBackendSigner validation\\n    error ZeroAddress();\\n\\n    /// @notice Error thrown when salt has already been used\\n    /// @dev Prevents replay attacks by ensuring each salt is used only once\\n    error SaltAlreadyUsed();\\n\\n    /// @notice Error thrown when caller is not authorized\\n    /// @dev Only owner or contract itself can call protected functions\\n    error CallerNotAuthorized();\\n\\n    /// @notice Error thrown when no calls are provided to multicall\\n    /// @dev Emitted when calls array is empty in multicall\\n    error NoCallsProvided();\\n\\n    /// @notice Error thrown when signature is missing but required\\n    /// @dev Emitted when signature length is zero but verification is expected\\n    error MissingSignature();\\n\\n    /// @notice Event emitted when backend signer is updated\\n    /// @param oldSigner Previous backend signer address\\n    /// @param newSigner New backend signer address\\n    event BackendSignerUpdated(address indexed oldSigner, address indexed newSigner);\\n\\n    /// @notice Event emitted when multicall is successfully executed\\n    /// @param caller Address that initiated the multicall\\n    /// @param callsCount Number of calls executed in the batch\\n    /// @param deadline Deadline timestamp used for the operation\\n    /// @param salt Salt used for replay protection\\n    event MulticallExecuted(address indexed caller, uint256 callsCount, uint256 deadline, bytes32 salt);\\n\\n    /// @notice Event emitted when tokens are swept from the contract\\n    /// @param token Address of the token swept\\n    /// @param to Recipient address\\n    /// @param amount Amount of tokens swept\\n    event Swept(address indexed token, address indexed to, uint256 amount);\\n\\n    /// @notice Event emitted when maximum approval is granted\\n    /// @param token Address of the token approved\\n    /// @param spender Address granted the approval\\n    event ApprovedMax(address indexed token, address indexed spender);\\n\\n    /// @notice Event emitted when generic call is executed\\n    /// @param target Address of the contract called\\n    /// @param data Encoded function call data\\n    event GenericCallExecuted(address indexed target, bytes data);\\n\\n    /// @notice Constructor\\n    /// @param backendSigner_ Address authorized to sign multicall operations\\n    /// @dev Initializes EIP-712 domain with name \\\"VenusSwap\\\" and version \\\"1\\\"\\n    /// @dev Transfers ownership to msg.sender\\n    /// @dev Reverts with ZeroAddress if parameter is address(0)\\n    /// @custom:error ZeroAddress if backendSigner_ is address(0)\\n    constructor(address backendSigner_) EIP712(\\\"VenusSwap\\\", \\\"1\\\") {\\n        if (backendSigner_ == address(0)) {\\n            revert ZeroAddress();\\n        }\\n\\n        backendSigner = backendSigner_;\\n    }\\n\\n    /// @notice Modifier to restrict access to owner or contract itself\\n    /// @dev Reverts with CallerNotAuthorized if caller is neither owner nor this contract\\n    modifier onlyOwnerOrSelf() {\\n        if (msg.sender != owner() && msg.sender != address(this)) {\\n            revert CallerNotAuthorized();\\n        }\\n        _;\\n    }\\n\\n    /// @notice Multicall function to execute multiple calls in a single transaction.\\n    /// @param calls Array of encoded function calls to execute on this contract\\n    /// @param deadline Unix timestamp after which the transaction will revert\\n    /// @param salt Unique value to ensure this exact multicall can only be executed once\\n    /// @param signature EIP-712 signature from backend signer\\n    /// @dev All calls are executed atomically - if any call fails, entire transaction reverts\\n    /// @dev Calls must be to functions on this contract (address(this))\\n    /// @dev Protected by nonReentrant modifier to prevent reentrancy attacks\\n    /// @dev This function should be called as a part of a transaction that sends tokens to this contract and verifies if they received desired tokens after execution.\\n    /// @dev EOA that calls this function should not send tokens directly nor approve this contract to spend tokens on their behalf.\\n    /// @custom:event MulticallExecuted emitted upon successful execution\\n    /// @custom:security Only the contract itself can call sweep, approveMax, and genericCall\\n    /// @custom:error NoCallsProvided if calls array is empty\\n    /// @custom:error DeadlineReached if block.timestamp > deadline\\n    /// @custom:error SaltAlreadyUsed if salt has been used before\\n    /// @custom:error Unauthorized if signature verification fails\\n    /// @custom:error MissingSignature if signature is empty\\n    function multicall(\\n        bytes[] calldata calls,\\n        uint256 deadline,\\n        bytes32 salt,\\n        bytes calldata signature\\n    ) external nonReentrant {\\n        if (calls.length == 0) {\\n            revert NoCallsProvided();\\n        }\\n\\n        if (block.timestamp > deadline) {\\n            revert DeadlineReached();\\n        }\\n\\n        if (signature.length == 0) {\\n            revert MissingSignature();\\n        }\\n        if (usedSalts[salt]) {\\n            revert SaltAlreadyUsed();\\n        }\\n        usedSalts[salt] = true;\\n\\n        bytes32 digest = _hashMulticall(msg.sender, calls, deadline, salt);\\n        address signer = ECDSA.recover(digest, signature);\\n        if (signer != backendSigner) {\\n            revert Unauthorized();\\n        }\\n\\n        for (uint256 i = 0; i < calls.length; i++) {\\n            (bool success, bytes memory returnData) = address(this).call(calls[i]);\\n            if (!success) {\\n                assembly {\\n                    revert(add(returnData, 0x20), mload(returnData))\\n                }\\n            }\\n        }\\n\\n        emit MulticallExecuted(msg.sender, calls.length, deadline, salt);\\n    }\\n\\n    /// @notice Generic call function to execute a call to an arbitrary address\\n    /// @param target Address of the contract to call\\n    /// @param data Encoded function call data\\n    /// @dev This function can interact with any external contract\\n    /// @dev Should only be called via multicall for safety, but can be called directly by owner\\n    /// @custom:security Use with extreme caution - can call any contract with any data\\n    /// @custom:security Ensure proper validation of target and data in off-chain systems\\n    /// @custom:error CallerNotAuthorized if caller is not owner or contract itself\\n    function genericCall(address target, bytes calldata data) external onlyOwnerOrSelf {\\n        target.functionCall(data);\\n        emit GenericCallExecuted(target, data);\\n    }\\n\\n    /// @notice Sweeps entire balance of an ERC-20 token to a specified address\\n    /// @param token ERC-20 token contract to sweep\\n    /// @param to Recipient address for the swept tokens\\n    /// @dev Transfers the entire balance of token held by this contract\\n    /// @dev Uses SafeERC20 for safe transfer operations\\n    /// @dev Should only be called via multicall for safety, but can be called directly by owner\\n    /// @custom:error CallerNotAuthorized if caller is not owner or contract itself\\n    /// @custom:error ZeroAddress if token is address(0) or to is address(0)\\n    function sweep(IERC20Upgradeable token, address to) external onlyOwnerOrSelf {\\n        if (address(token) == address(0) || to == address(0)) {\\n            revert ZeroAddress();\\n        }\\n        uint256 amount = token.balanceOf(address(this));\\n        if (amount > 0) {\\n            token.safeTransfer(to, amount);\\n        }\\n        emit Swept(address(token), to, amount);\\n    }\\n\\n    /// @notice Approves maximum amount of an ERC-20 token to a specified spender\\n    /// @param token ERC-20 token contract to approve\\n    /// @param spender Address to grant approval to\\n    /// @dev Sets approval to type(uint256).max for unlimited spending\\n    /// @dev Uses forceApprove to handle tokens that require 0 approval first\\n    /// @dev Should only be called via multicall for safety, but can be called directly by owner\\n    /// @custom:security Grants unlimited approval - ensure spender is trusted\\n    /// @custom:error CallerNotAuthorized if caller is not owner or contract itself\\n    function approveMax(IERC20Upgradeable token, address spender) external onlyOwnerOrSelf {\\n        token.forceApprove(spender, type(uint256).max);\\n        emit ApprovedMax(address(token), spender);\\n    }\\n\\n    /// @notice Updates the backend signer address\\n    /// @param newSigner New backend signer address\\n    /// @dev Only callable by contract owner\\n    /// @dev Reverts with ZeroAddress if newSigner is address(0)\\n    /// @dev Emits BackendSignerUpdated event\\n    /// @custom:error ZeroAddress if newSigner is address(0)\\n    /// @custom:error Ownable: caller is not the owner (from OpenZeppelin Ownable)\\n    function setBackendSigner(address newSigner) external onlyOwner {\\n        if (newSigner == address(0)) {\\n            revert ZeroAddress();\\n        }\\n\\n        emit BackendSignerUpdated(backendSigner, newSigner);\\n        backendSigner = newSigner;\\n    }\\n\\n    /// @notice Produces an EIP-712 digest of the multicall data\\n    /// @param caller Address of the authorized caller\\n    /// @param calls Array of encoded function calls\\n    /// @param deadline Unix timestamp deadline\\n    /// @param salt Unique value to ensure replay protection\\n    /// @return EIP-712 typed data hash for signature verification\\n    /// @dev Hashes each call individually, then encodes with MULTICALL_TYPEHASH, caller, deadline, and salt\\n    /// @dev Uses EIP-712 _hashTypedDataV4 for domain-separated hashing\\n    function _hashMulticall(address caller, bytes[] calldata calls, uint256 deadline, bytes32 salt) internal view returns (bytes32) {\\n        bytes32[] memory callHashes = new bytes32[](calls.length);\\n        for (uint256 i = 0; i < calls.length; i++) {\\n            callHashes[i] = keccak256(calls[i]);\\n        }\\n        return\\n            _hashTypedDataV4(\\n                keccak256(abi.encode(MULTICALL_TYPEHASH, caller, keccak256(abi.encodePacked(callHashes)), deadline, salt))\\n            );\\n    }\\n}\\n\",\"keccak256\":\"0x60ee52810d95b223a431307570eff0c2a7efd7ab7079c58b4e2ceedb313445e0\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
  "bytecode": "0x60e060405234801561000f575f5ffd5b5060405161387138038061387183398101604081905261002e91610177565b6001600160a01b038316158061004b57506001600160a01b038216155b8061005d57506001600160a01b038116155b1561007b5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0380841660805282811660a052811660c05261009c6100a4565b5050506101c1565b5f54610100900460ff161561010f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461015e575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610174575f5ffd5b50565b5f5f5f60608486031215610189575f5ffd5b835161019481610160565b60208501519093506101a581610160565b60408501519092506101b681610160565b809150509250925092565b60805160a05160c05161361761025a5f395f818161015201526113bf01525f818160f901528181612ac20152612b5401525f818161019f015281816103e5015281816106520152818161084e01528181610bd201528181610df201528181610f36015281816113250152818161142e01528181611569015281816115ff015281816116b701528181611fe1015261248301526136175ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c806379ba509711610093578063c78befbe11610063578063c78befbe146101fd578063e30c397814610210578063f2fde38b14610221578063fc08f9f614610234575f5ffd5b806379ba5097146101c95780638129fc1c146101d15780638da5cb5b146101d9578063c6cd25f6146101ea575f5ffd5b80633a8f8c43116100ce5780633a8f8c43146101745780633c3a2c21146101875780635f82c67e1461019a578063715018a6146101c1575f5ffd5b80630fc6a11c146100f4578063134248011461013857806333e1567f1461014d575b5f5ffd5b61011b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61014b610146366004612fe9565b610255565b005b61011b7f000000000000000000000000000000000000000000000000000000000000000081565b61014b610182366004613069565b6104c2565b61014b6101953660046130ca565b610725565b61011b7f000000000000000000000000000000000000000000000000000000000000000081565b61014b610915565b61014b610928565b61014b6109a7565b6033546001600160a01b031661011b565b61014b6101f83660046130fc565b610ab9565b61014b61020b366004613069565b610c92565b6065546001600160a01b031661011b565b61014b61022f366004613136565b610eaf565b610247610242366004613199565b610f20565b60405161012f9291906132c5565b835f03610275576040516362ec8de760e01b815260040160405180910390fd5b856001600160a01b0316876001600160a01b0316036102a757604051637239c0db60e11b815260040160405180910390fd5b6102b087611304565b6102b986611304565b6102c1611413565b6102ca876114bc565b6102d3866114bc565b6102dd3388611542565b6102e633611694565b6102f1863387611754565b335f805c610100600160a81b031916610100830217905d50866001805c6001600160a01b0319166001600160a01b03831617905d50848060035d50828060045d5060035f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905086815f81518110610374576103746132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905085815f815181106103c3576103c36132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c906104249033903090879087908b908b90600401613340565b5f604051808303815f87803b15801561043b575f5ffd5b505af115801561044d573d5f5f3e3d5ffd5b5050505061045a33611694565b60408051888152602081018890526001600160a01b03808b1692908c169133917f4bdf2f6f97b9e53fbb880300a2b1e8f12110f6cbcc3279602053bcf6f5e05103910160405180910390a46104ae896117d2565b6104b7886117d2565b505050505050505050565b835f036104e2576040516362ec8de760e01b815260040160405180910390fd5b846001600160a01b0316876001600160a01b03160361051457604051637239c0db60e11b815260040160405180910390fd5b61051d87611304565b61052685611304565b61052e611413565b610537876114bc565b610540856114bc565b61054a3388611542565b61055333611694565b61055e873388611754565b335f805c610100600160a81b031916610100830217905d50866001805c6001600160a01b0319166001600160a01b03831617905d50858060025d50828060045d5060025f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905085815f815181106105e1576105e16132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905085815f81518110610630576106306132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c906106919033903090879087908b908b90600401613340565b5f604051808303815f87803b1580156106a8575f5ffd5b505af11580156106ba573d5f5f3e3d5ffd5b505050506106c733611694565b60408051898152602081018890526001600160a01b03808a1692908c169133917f2535d675850d7c542dc54c7aa081f27a11d1b0df3f3db67275ce0a9d0562743491015b60405180910390a461071c896117d2565b6104b7876117d2565b805f03610745576040516362ec8de760e01b815260040160405180910390fd5b61074e83611304565b610756611413565b61075f836114bc565b6107693384611542565b61077233611694565b61077d833384611754565b335f805c610100600160a81b031916610100830217905d5060015f805c60ff19168217905d50818060025d506040805160018082528183019092525f916020808301908036833701905050905083815f815181106107dd576107dd6132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905082815f8151811061082c5761082c6132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c906108899033903090879087906004016133b4565b5f604051808303815f87803b1580156108a0575f5ffd5b505af11580156108b2573d5f5f3e3d5ffd5b505050506108bf33611694565b60408051858152602081018590526001600160a01b0387169133917f49cef9d2c3f3f5785b1ad7facb0837a43e60a785a0141101e658f5565664cd89910160405180910390a361090e856117d2565b5050505050565b61091d611917565b6109265f611971565b565b60655433906001600160a01b0316811461099b5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b6109a481611971565b50565b5f54610100900460ff16158080156109c557505f54600160ff909116105b806109de5750303b1580156109de57505f5460ff166001145b610a415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610992565b5f805460ff191660011790558015610a62575f805461ff0019166101001790555b610a6a61198a565b610a726119b8565b80156109a4575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b805f03610ad9576040516362ec8de760e01b815260040160405180910390fd5b610ae282611304565b610aea611413565b335f805c610100600160a81b031916610100830217905d50816001805c6001600160a01b0319166001600160a01b03831617905d5060055f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905082815f81518110610b6157610b616132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905082815f81518110610bb057610bb06132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c90610c0d9033903090879087906004016133b4565b5f604051808303815f87803b158015610c24575f5ffd5b505af1158015610c36573d5f5f3e3d5ffd5b50505050610c4333611694565b6040518381526001600160a01b0385169033907f9858e3a66fd738b1f0f73208c9090ca5a20ee504df594271e464d4bb4cda0e6f9060200160405180910390a3610c8c846117d2565b50505050565b835f03610cb2576040516362ec8de760e01b815260040160405180910390fd5b846001600160a01b0316876001600160a01b031603610ce457604051637239c0db60e11b815260040160405180910390fd5b610ced87611304565b610cf685611304565b610cfe611413565b335f805c610100600160a81b031916610100830217905d50866001805c6001600160a01b0319166001600160a01b03831617905d50858060025d50828060045d5060045f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905085815f81518110610d8157610d816132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905085815f81518110610dd057610dd06132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c90610e319033903090879087908b908b90600401613340565b5f604051808303815f87803b158015610e48575f5ffd5b505af1158015610e5a573d5f5f3e3d5ffd5b50505050610e6733611694565b60408051898152602081018890526001600160a01b03808a1692908c169133917fc40371cee960c145e7af5e62a37dfd2f97089c030c2427ad853ae214e815ebed910161070b565b610eb7611917565b606580546001600160a01b0383166001600160a01b03199091168117909155610ee86033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f6060610f2b6119e6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f74576040516341c8302160e11b815260040160405180910390fd5b6001600160a01b0386163014610f9d576040516304db910d60e01b815260040160405180910390fd5b6101005f5c046001600160a01b0390811690861614610fcf57604051632a057c4360e01b815260040160405180910390fd5b60018b141580610fe0575060018914155b80610fec575060018714155b1561100a57604051634f7d8fbd60e11b815260040160405180910390fd5b6040805160018082528183019092529060208083019080368337019050509050600160ff5f5c166005811115611042576110426132df565b036110cc576110a9858d8d5f81811061105d5761105d6132f3565b90506020020160208101906110729190613136565b8c8c5f818110611084576110846132f3565b905060200201358b8b5f81811061109d5761109d6132f3565b90506020020135611a3f565b815f815181106110bb576110bb6132f3565b6020026020010181815250506112e7565b600260ff5f5c1660058111156110e4576110e46132df565b0361114d576110a9858d8d5f8181106110ff576110ff6132f3565b90506020020160208101906111149190613136565b8c8c5f818110611126576111266132f3565b905060200201358b8b5f81811061113f5761113f6132f3565b905060200201358888611b75565b600360ff5f5c166005811115611165576111656132df565b036111ce576110a9858d8d5f818110611180576111806132f3565b90506020020160208101906111959190613136565b8c8c5f8181106111a7576111a76132f3565b905060200201358b8b5f8181106111c0576111c06132f3565b905060200201358888611d35565b600460ff5f5c1660058111156111e6576111e66132df565b0361124f576110a9858d8d5f818110611201576112016132f3565b90506020020160208101906112169190613136565b8c8c5f818110611228576112286132f3565b905060200201358b8b5f818110611241576112416132f3565b905060200201358888611e2a565b600560ff5f5c166005811115611267576112676132df565b036112ce576110a9858d8d5f818110611282576112826132f3565b90506020020160208101906112979190613136565b8c8c5f8181106112a9576112a96132f3565b905060200201358b8b5f8181106112c2576112c26132f3565b905060200201356122e5565b604051639c3c956760e01b815260040160405180910390fd5b600191506112f56001609755565b9a509a98505050505050505050565b604051638e8f294b60e01b81526001600160a01b0382811660048301525f917f000000000000000000000000000000000000000000000000000000000000000090911690638e8f294b90602401606060405180830381865afa15801561136c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611390919061341c565b50509050806113bd57604051635a9a1eb960e11b81526001600160a01b0383166004820152602401610992565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361140f5760405163baeccefd60e01b815260040160405180910390fd5b5050565b604051630217306760e31b81523360048201523060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310b9833890604401602060405180830381865afa15801561147b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061149f9190613456565b610926576040516337248ad960e01b815260040160405180910390fd5b5f816001600160a01b031663a6afed956040518163ffffffff1660e01b81526004016020604051808303815f875af11580156114fa573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061151e919061346f565b9050801561140f576040516315fc6cbf60e21b815260048101829052602401610992565b60405163929fe9a160e01b81526001600160a01b03838116600483015282811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063929fe9a190604401602060405180830381865afa1580156115ae573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115d29190613456565b61140f57604051636ac2e1e360e11b81526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063d585c3c6906044016020604051808303815f875af1158015611647573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061166b919061346f565b9050801561168f57604051631957d10560e31b815260048101829052602401610992565b505050565b6040516314a285d360e21b81526001600160a01b0382811660048301525f9182917f0000000000000000000000000000000000000000000000000000000000000000169063528a174c90602401606060405180830381865afa1580156116fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117209190613486565b92505091505f8214158061173357505f81115b1561168f576040516347749fcb60e01b815260048101839052602401610992565b801561168f575f836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611797573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117bb91906134b1565b9050610c8c6001600160a01b038216843085612728565b5f816001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061183391906134b1565b6040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa15801561187a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061189e919061346f565b9050801561168f576001600160a01b036101005f5c048116906118c49084168284612793565b826001600160a01b0316816001600160a01b03167fe8f38899ee6a4204a1a5ae0757b409b58be63978bc756134d464cfbaadc289318460405161190991815260200190565b60405180910390a350505050565b6033546001600160a01b031633146109265760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610992565b606580546001600160a01b03191690556109a4816127c3565b5f54610100900460ff166119b05760405162461bcd60e51b8152600401610992906134cc565b610926612814565b5f54610100900460ff166119de5760405162461bcd60e51b8152600401610992906134cc565b610926612843565b600260975403611a385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610992565b6002609755565b5f5f846001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa191906134b1565b90505f611ab060025c8661352b565b9050611ac66001600160a01b0383168783612869565b6040516323323e0360e01b81526001600160a01b038881166004830152602482018390525f91908816906323323e03906044016020604051808303815f875af1158015611b15573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b39919061346f565b90508015611b5d57604051631f32531d60e21b815260048101829052602401610992565b611b69888885886128f7565b98975050505050505050565b5f5f866001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bb3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bd791906134b1565b60408051636f307dc360e01b815290519192506001600160a01b0360015c16916004805c925f928592636f307dc3928082019260209290918290030181865afa158015611c26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c4a91906134b1565b90505f611c5b858b84868c8c612ab2565b90505f611c6a60025c8361352b565b9050611c806001600160a01b0384168683612869565b6040516323323e0360e01b81526001600160a01b038e81166004830152602482018390525f91908716906323323e03906044016020604051808303815f875af1158015611ccf573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611cf3919061346f565b90508015611d1757604051631f32531d60e21b815260048101829052602401610992565b611d238e8e898e6128f7565b9e9d5050505050505050505050505050565b5f5f866001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d73573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d9791906134b1565b60408051636f307dc360e01b815290519192506001600160a01b0360015c16916004805c925f928592636f307dc3928082019260209290918290030181865afa158015611de6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e0a91906134b1565b90505f611e198a60035c61352b565b90505f611c6a868385878d8d612ab2565b5f5f866001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e68573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e8c91906134b1565b6040516305eff7ef60e21b81526001600160a01b038a811660048301529192505f918916906317bfdfbc906024016020604051808303815f875af1158015611ed6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611efa919061346f565b90505f818811611f0a5787611f0c565b815b9050611f226001600160a01b0384168a83612869565b6040516304c11f0360e31b81526001600160a01b038b81166004830152602482018390525f91908b1690632608f818906044016020604051808303815f875af1158015611f71573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f95919061346f565b90508015611fb95760405163014e9bb360e01b815260048101829052602401610992565b505060408051629df3ab60e31b815290516001600160a01b0360015c8116935060025c925f927f0000000000000000000000000000000000000000000000000000000000000000909216916304ef9d58916004808201926020929091908290030181865afa15801561202d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612051919061346f565b90505f5f821161206157826120b7565b61207382670de0b6b3a764000061353e565b600161208784670de0b6b3a764000061353e565b612099670de0b6b3a764000087613551565b6120a3919061352b565b6120ad919061353e565b6120b79190613568565b604051636f9d28b760e11b81526001600160a01b038e81166004830152602482018390529192505f9186169063df3a516e906044016020604051808303815f875af1158015612108573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061212c919061346f565b9050801561215057604051636083d26960e01b815260048101829052602401610992565b5050505f826001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612190573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121b491906134b1565b6040516370a0823160e01b815230600482015290915061222e9082906001600160a01b038216906370a0823190602401602060405180830381865afa1580156121ff573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612223919061346f565b8660045c8b8b612ab2565b50612239888a61352b565b6040516370a0823160e01b815230600482015290955085906001600160a01b038616906370a0823190602401602060405180830381865afa158015612280573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a4919061346f565b10156122c357604051630f1b15df60e21b815260040160405180910390fd5b6122d76001600160a01b0385168b87612869565b505050509695505050505050565b5f5f846001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612323573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234791906134b1565b6040516305eff7ef60e21b81526001600160a01b0388811660048301529192505f918716906317bfdfbc906024016020604051808303815f875af1158015612391573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123b5919061346f565b90505f8186116123c557856123c7565b815b90506123dd6001600160a01b0384168883612869565b6040516304c11f0360e31b81526001600160a01b038981166004830152602482018390525f9190891690632608f818906044016020604051808303815f875af115801561242c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612450919061346f565b905080156124745760405163014e9bb360e01b815260048101829052602401610992565b61247e868861352b565b94505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166304ef9d586040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061346f565b90505f5f82116125115786612567565b61252382670de0b6b3a764000061353e565b600161253784670de0b6b3a764000061353e565b612549670de0b6b3a76400008b613551565b612553919061352b565b61255d919061353e565b6125679190613568565b604051633af9e66960e01b81526001600160a01b038d811660048301529192505f918c1690633af9e669906024016020604051808303815f875af11580156125b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125d5919061346f565b9050808211156125e3578091505b604051636f9d28b760e11b81526001600160a01b038d81166004830152602482018490528c169063df3a516e906044016020604051808303815f875af115801561262f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612653919061346f565b9350831561267757604051636083d26960e01b815260048101859052602401610992565b6040516370a0823160e01b815230600482015288906001600160a01b038916906370a0823190602401602060405180830381865afa1580156126bb573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126df919061346f565b10156126fe57604051630f1b15df60e21b815260040160405180910390fd5b6127126001600160a01b0388168c8a612869565b50505050505050949350505050565b6001609755565b6040516001600160a01b0380851660248301528316604482015260648101829052610c8c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c90565b6040516001600160a01b03831660248201526044810182905261168f90849063a9059cbb60e01b9060640161275c565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff1661283a5760405162461bcd60e51b8152600401610992906134cc565b61092633611971565b5f54610100900460ff166127215760405162461bcd60e51b8152600401610992906134cc565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526128ba8482612d63565b610c8c576040516001600160a01b03841660248201525f60448201526128ed90859063095ea7b360e01b9060640161275c565b610c8c8482612c90565b6040516370a0823160e01b81526001600160a01b03848116600483015282915f918516906370a0823190602401602060405180830381865afa15801561293f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612963919061346f565b60405163856e5bb360e01b81526001600160a01b038881166004830152602482018590529192505f9187169063856e5bb3906044016020604051808303815f875af11580156129b4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129d8919061346f565b905080156129fc576040516343f10e9d60e11b815260048101829052602401610992565b6040516370a0823160e01b81526001600160a01b0387811660048301525f91908716906370a0823190602401602060405180830381865afa158015612a43573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a67919061346f565b905083612a74828561353e565b1015612a9357604051630f1b15df60e21b815260040160405180910390fd5b612aa76001600160a01b0387168886612869565b505050949350505050565b5f612ae76001600160a01b0388167f000000000000000000000000000000000000000000000000000000000000000088612793565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612b2b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b4f919061346f565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168585604051612b8c929190613587565b5f604051808303815f865af19150503d805f8114612bc5576040519150601f19603f3d011682016040523d82523d5f602084013e612bca565b606091505b5050905080612bec5760405163428c0cc760e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f906001600160a01b038916906370a0823190602401602060405180830381865afa158015612c30573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c54919061346f565b9050612c60838261353e565b935086841015612c8357604051638199f5f360e01b815260040160405180910390fd5b5050509695505050505050565b5f612ce4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e069092919063ffffffff16565b905080515f1480612d04575080806020019051810190612d049190613456565b61168f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610992565b5f5f5f846001600160a01b031684604051612d7e9190613596565b5f604051808303815f865af19150503d805f8114612db7576040519150601f19603f3d011682016040523d82523d5f602084013e612dbc565b606091505b5091509150818015612de6575080511580612de6575080806020019051810190612de69190613456565b8015612dfb57506001600160a01b0385163b15155b925050505b92915050565b6060612e1484845f85612e1c565b949350505050565b606082471015612e7d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610992565b5f5f866001600160a01b03168587604051612e989190613596565b5f6040518083038185875af1925050503d805f8114612ed2576040519150601f19603f3d011682016040523d82523d5f602084013e612ed7565b606091505b5091509150612ee887838387612ef3565b979650505050505050565b60608315612f615782515f03612f5a576001600160a01b0385163b612f5a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610992565b5081612e14565b612e148383815115612f765781518083602001fd5b8060405162461bcd60e51b815260040161099291906135ac565b6001600160a01b03811681146109a4575f5ffd5b5f5f83601f840112612fb4575f5ffd5b50813567ffffffffffffffff811115612fcb575f5ffd5b602083019150836020828501011115612fe2575f5ffd5b9250929050565b5f5f5f5f5f5f5f60c0888a031215612fff575f5ffd5b873561300a81612f90565b9650602088013561301a81612f90565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff81111561304a575f5ffd5b6130568a828b01612fa4565b989b979a50959850939692959293505050565b5f5f5f5f5f5f5f60c0888a03121561307f575f5ffd5b873561308a81612f90565b96506020880135955060408801356130a181612f90565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561304a575f5ffd5b5f5f5f606084860312156130dc575f5ffd5b83356130e781612f90565b95602085013595506040909401359392505050565b5f5f6040838503121561310d575f5ffd5b823561311881612f90565b946020939093013593505050565b803561313181612f90565b919050565b5f60208284031215613146575f5ffd5b813561315181612f90565b9392505050565b5f5f83601f840112613168575f5ffd5b50813567ffffffffffffffff81111561317f575f5ffd5b6020830191508360208260051b8501011115612fe2575f5ffd5b5f5f5f5f5f5f5f5f5f5f60c08b8d0312156131b2575f5ffd5b8a3567ffffffffffffffff8111156131c8575f5ffd5b6131d48d828e01613158565b909b5099505060208b013567ffffffffffffffff8111156131f3575f5ffd5b6131ff8d828e01613158565b90995097505060408b013567ffffffffffffffff81111561321e575f5ffd5b61322a8d828e01613158565b909750955061323d905060608c01613126565b935061324b60808c01613126565b925060a08b013567ffffffffffffffff811115613266575f5ffd5b6132728d828e01612fa4565b915080935050809150509295989b9194979a5092959850565b5f8151808452602084019350602083015f5b828110156132bb57815186526020958601959091019060010161329d565b5093949350505050565b8215158152604060208201525f612e14604083018461328b565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f8151808452602084019350602083015f5b828110156132bb5781516001600160a01b0316865260209586019590910190600101613319565b6001600160a01b0387811682528616602082015260a0604082018190525f9061336b90830187613307565b828103606084015261337d818761328b565b90508281036080840152838152838560208301375f602085830101526020601f19601f860116820101915050979650505050505050565b6001600160a01b0385811682528416602082015260a0604082018190525f906133df90830185613307565b82810360608401526133f1818561328b565b83810360809094019390935250505f8152602001949350505050565b80518015158114613131575f5ffd5b5f5f5f6060848603121561342e575f5ffd5b6134378461340d565b6020850151909350915061344d6040850161340d565b90509250925092565b5f60208284031215613466575f5ffd5b6131518261340d565b5f6020828403121561347f575f5ffd5b5051919050565b5f5f5f60608486031215613498575f5ffd5b5050815160208301516040909301519094929350919050565b5f602082840312156134c1575f5ffd5b815161315181612f90565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b80820180821115612e0057612e00613517565b81810381811115612e0057612e00613517565b8082028115828204841417612e0057612e00613517565b5f8261358257634e487b7160e01b5f52601260045260245ffd5b500490565b818382375f9101908152919050565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fea26469706673582212205cd019e73645d0f05cf5bc1594393019d29edfd5427b993f215e9493975f529d64736f6c634300081c0033",
  "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c806379ba509711610093578063c78befbe11610063578063c78befbe146101fd578063e30c397814610210578063f2fde38b14610221578063fc08f9f614610234575f5ffd5b806379ba5097146101c95780638129fc1c146101d15780638da5cb5b146101d9578063c6cd25f6146101ea575f5ffd5b80633a8f8c43116100ce5780633a8f8c43146101745780633c3a2c21146101875780635f82c67e1461019a578063715018a6146101c1575f5ffd5b80630fc6a11c146100f4578063134248011461013857806333e1567f1461014d575b5f5ffd5b61011b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61014b610146366004612fe9565b610255565b005b61011b7f000000000000000000000000000000000000000000000000000000000000000081565b61014b610182366004613069565b6104c2565b61014b6101953660046130ca565b610725565b61011b7f000000000000000000000000000000000000000000000000000000000000000081565b61014b610915565b61014b610928565b61014b6109a7565b6033546001600160a01b031661011b565b61014b6101f83660046130fc565b610ab9565b61014b61020b366004613069565b610c92565b6065546001600160a01b031661011b565b61014b61022f366004613136565b610eaf565b610247610242366004613199565b610f20565b60405161012f9291906132c5565b835f03610275576040516362ec8de760e01b815260040160405180910390fd5b856001600160a01b0316876001600160a01b0316036102a757604051637239c0db60e11b815260040160405180910390fd5b6102b087611304565b6102b986611304565b6102c1611413565b6102ca876114bc565b6102d3866114bc565b6102dd3388611542565b6102e633611694565b6102f1863387611754565b335f805c610100600160a81b031916610100830217905d50866001805c6001600160a01b0319166001600160a01b03831617905d50848060035d50828060045d5060035f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905086815f81518110610374576103746132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905085815f815181106103c3576103c36132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c906104249033903090879087908b908b90600401613340565b5f604051808303815f87803b15801561043b575f5ffd5b505af115801561044d573d5f5f3e3d5ffd5b5050505061045a33611694565b60408051888152602081018890526001600160a01b03808b1692908c169133917f4bdf2f6f97b9e53fbb880300a2b1e8f12110f6cbcc3279602053bcf6f5e05103910160405180910390a46104ae896117d2565b6104b7886117d2565b505050505050505050565b835f036104e2576040516362ec8de760e01b815260040160405180910390fd5b846001600160a01b0316876001600160a01b03160361051457604051637239c0db60e11b815260040160405180910390fd5b61051d87611304565b61052685611304565b61052e611413565b610537876114bc565b610540856114bc565b61054a3388611542565b61055333611694565b61055e873388611754565b335f805c610100600160a81b031916610100830217905d50866001805c6001600160a01b0319166001600160a01b03831617905d50858060025d50828060045d5060025f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905085815f815181106105e1576105e16132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905085815f81518110610630576106306132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c906106919033903090879087908b908b90600401613340565b5f604051808303815f87803b1580156106a8575f5ffd5b505af11580156106ba573d5f5f3e3d5ffd5b505050506106c733611694565b60408051898152602081018890526001600160a01b03808a1692908c169133917f2535d675850d7c542dc54c7aa081f27a11d1b0df3f3db67275ce0a9d0562743491015b60405180910390a461071c896117d2565b6104b7876117d2565b805f03610745576040516362ec8de760e01b815260040160405180910390fd5b61074e83611304565b610756611413565b61075f836114bc565b6107693384611542565b61077233611694565b61077d833384611754565b335f805c610100600160a81b031916610100830217905d5060015f805c60ff19168217905d50818060025d506040805160018082528183019092525f916020808301908036833701905050905083815f815181106107dd576107dd6132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905082815f8151811061082c5761082c6132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c906108899033903090879087906004016133b4565b5f604051808303815f87803b1580156108a0575f5ffd5b505af11580156108b2573d5f5f3e3d5ffd5b505050506108bf33611694565b60408051858152602081018590526001600160a01b0387169133917f49cef9d2c3f3f5785b1ad7facb0837a43e60a785a0141101e658f5565664cd89910160405180910390a361090e856117d2565b5050505050565b61091d611917565b6109265f611971565b565b60655433906001600160a01b0316811461099b5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b6109a481611971565b50565b5f54610100900460ff16158080156109c557505f54600160ff909116105b806109de5750303b1580156109de57505f5460ff166001145b610a415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610992565b5f805460ff191660011790558015610a62575f805461ff0019166101001790555b610a6a61198a565b610a726119b8565b80156109a4575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b805f03610ad9576040516362ec8de760e01b815260040160405180910390fd5b610ae282611304565b610aea611413565b335f805c610100600160a81b031916610100830217905d50816001805c6001600160a01b0319166001600160a01b03831617905d5060055f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905082815f81518110610b6157610b616132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905082815f81518110610bb057610bb06132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c90610c0d9033903090879087906004016133b4565b5f604051808303815f87803b158015610c24575f5ffd5b505af1158015610c36573d5f5f3e3d5ffd5b50505050610c4333611694565b6040518381526001600160a01b0385169033907f9858e3a66fd738b1f0f73208c9090ca5a20ee504df594271e464d4bb4cda0e6f9060200160405180910390a3610c8c846117d2565b50505050565b835f03610cb2576040516362ec8de760e01b815260040160405180910390fd5b846001600160a01b0316876001600160a01b031603610ce457604051637239c0db60e11b815260040160405180910390fd5b610ced87611304565b610cf685611304565b610cfe611413565b335f805c610100600160a81b031916610100830217905d50866001805c6001600160a01b0319166001600160a01b03831617905d50858060025d50828060045d5060045f805c60ff19168217905d506040805160018082528183019092525f916020808301908036833701905050905085815f81518110610d8157610d816132f3565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f9181602001602082028036833701905050905085815f81518110610dd057610dd06132f3565b60209081029190910101526040516315513b6760e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635544ed9c90610e319033903090879087908b908b90600401613340565b5f604051808303815f87803b158015610e48575f5ffd5b505af1158015610e5a573d5f5f3e3d5ffd5b50505050610e6733611694565b60408051898152602081018890526001600160a01b03808a1692908c169133917fc40371cee960c145e7af5e62a37dfd2f97089c030c2427ad853ae214e815ebed910161070b565b610eb7611917565b606580546001600160a01b0383166001600160a01b03199091168117909155610ee86033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f6060610f2b6119e6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f74576040516341c8302160e11b815260040160405180910390fd5b6001600160a01b0386163014610f9d576040516304db910d60e01b815260040160405180910390fd5b6101005f5c046001600160a01b0390811690861614610fcf57604051632a057c4360e01b815260040160405180910390fd5b60018b141580610fe0575060018914155b80610fec575060018714155b1561100a57604051634f7d8fbd60e11b815260040160405180910390fd5b6040805160018082528183019092529060208083019080368337019050509050600160ff5f5c166005811115611042576110426132df565b036110cc576110a9858d8d5f81811061105d5761105d6132f3565b90506020020160208101906110729190613136565b8c8c5f818110611084576110846132f3565b905060200201358b8b5f81811061109d5761109d6132f3565b90506020020135611a3f565b815f815181106110bb576110bb6132f3565b6020026020010181815250506112e7565b600260ff5f5c1660058111156110e4576110e46132df565b0361114d576110a9858d8d5f8181106110ff576110ff6132f3565b90506020020160208101906111149190613136565b8c8c5f818110611126576111266132f3565b905060200201358b8b5f81811061113f5761113f6132f3565b905060200201358888611b75565b600360ff5f5c166005811115611165576111656132df565b036111ce576110a9858d8d5f818110611180576111806132f3565b90506020020160208101906111959190613136565b8c8c5f8181106111a7576111a76132f3565b905060200201358b8b5f8181106111c0576111c06132f3565b905060200201358888611d35565b600460ff5f5c1660058111156111e6576111e66132df565b0361124f576110a9858d8d5f818110611201576112016132f3565b90506020020160208101906112169190613136565b8c8c5f818110611228576112286132f3565b905060200201358b8b5f818110611241576112416132f3565b905060200201358888611e2a565b600560ff5f5c166005811115611267576112676132df565b036112ce576110a9858d8d5f818110611282576112826132f3565b90506020020160208101906112979190613136565b8c8c5f8181106112a9576112a96132f3565b905060200201358b8b5f8181106112c2576112c26132f3565b905060200201356122e5565b604051639c3c956760e01b815260040160405180910390fd5b600191506112f56001609755565b9a509a98505050505050505050565b604051638e8f294b60e01b81526001600160a01b0382811660048301525f917f000000000000000000000000000000000000000000000000000000000000000090911690638e8f294b90602401606060405180830381865afa15801561136c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611390919061341c565b50509050806113bd57604051635a9a1eb960e11b81526001600160a01b0383166004820152602401610992565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361140f5760405163baeccefd60e01b815260040160405180910390fd5b5050565b604051630217306760e31b81523360048201523060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310b9833890604401602060405180830381865afa15801561147b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061149f9190613456565b610926576040516337248ad960e01b815260040160405180910390fd5b5f816001600160a01b031663a6afed956040518163ffffffff1660e01b81526004016020604051808303815f875af11580156114fa573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061151e919061346f565b9050801561140f576040516315fc6cbf60e21b815260048101829052602401610992565b60405163929fe9a160e01b81526001600160a01b03838116600483015282811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063929fe9a190604401602060405180830381865afa1580156115ae573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115d29190613456565b61140f57604051636ac2e1e360e11b81526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063d585c3c6906044016020604051808303815f875af1158015611647573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061166b919061346f565b9050801561168f57604051631957d10560e31b815260048101829052602401610992565b505050565b6040516314a285d360e21b81526001600160a01b0382811660048301525f9182917f0000000000000000000000000000000000000000000000000000000000000000169063528a174c90602401606060405180830381865afa1580156116fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117209190613486565b92505091505f8214158061173357505f81115b1561168f576040516347749fcb60e01b815260048101839052602401610992565b801561168f575f836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611797573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117bb91906134b1565b9050610c8c6001600160a01b038216843085612728565b5f816001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180f573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061183391906134b1565b6040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa15801561187a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061189e919061346f565b9050801561168f576001600160a01b036101005f5c048116906118c49084168284612793565b826001600160a01b0316816001600160a01b03167fe8f38899ee6a4204a1a5ae0757b409b58be63978bc756134d464cfbaadc289318460405161190991815260200190565b60405180910390a350505050565b6033546001600160a01b031633146109265760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610992565b606580546001600160a01b03191690556109a4816127c3565b5f54610100900460ff166119b05760405162461bcd60e51b8152600401610992906134cc565b610926612814565b5f54610100900460ff166119de5760405162461bcd60e51b8152600401610992906134cc565b610926612843565b600260975403611a385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610992565b6002609755565b5f5f846001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa191906134b1565b90505f611ab060025c8661352b565b9050611ac66001600160a01b0383168783612869565b6040516323323e0360e01b81526001600160a01b038881166004830152602482018390525f91908816906323323e03906044016020604051808303815f875af1158015611b15573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b39919061346f565b90508015611b5d57604051631f32531d60e21b815260048101829052602401610992565b611b69888885886128f7565b98975050505050505050565b5f5f866001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bb3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bd791906134b1565b60408051636f307dc360e01b815290519192506001600160a01b0360015c16916004805c925f928592636f307dc3928082019260209290918290030181865afa158015611c26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c4a91906134b1565b90505f611c5b858b84868c8c612ab2565b90505f611c6a60025c8361352b565b9050611c806001600160a01b0384168683612869565b6040516323323e0360e01b81526001600160a01b038e81166004830152602482018390525f91908716906323323e03906044016020604051808303815f875af1158015611ccf573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611cf3919061346f565b90508015611d1757604051631f32531d60e21b815260048101829052602401610992565b611d238e8e898e6128f7565b9e9d5050505050505050505050505050565b5f5f866001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d73573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d9791906134b1565b60408051636f307dc360e01b815290519192506001600160a01b0360015c16916004805c925f928592636f307dc3928082019260209290918290030181865afa158015611de6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e0a91906134b1565b90505f611e198a60035c61352b565b90505f611c6a868385878d8d612ab2565b5f5f866001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e68573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e8c91906134b1565b6040516305eff7ef60e21b81526001600160a01b038a811660048301529192505f918916906317bfdfbc906024016020604051808303815f875af1158015611ed6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611efa919061346f565b90505f818811611f0a5787611f0c565b815b9050611f226001600160a01b0384168a83612869565b6040516304c11f0360e31b81526001600160a01b038b81166004830152602482018390525f91908b1690632608f818906044016020604051808303815f875af1158015611f71573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f95919061346f565b90508015611fb95760405163014e9bb360e01b815260048101829052602401610992565b505060408051629df3ab60e31b815290516001600160a01b0360015c8116935060025c925f927f0000000000000000000000000000000000000000000000000000000000000000909216916304ef9d58916004808201926020929091908290030181865afa15801561202d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612051919061346f565b90505f5f821161206157826120b7565b61207382670de0b6b3a764000061353e565b600161208784670de0b6b3a764000061353e565b612099670de0b6b3a764000087613551565b6120a3919061352b565b6120ad919061353e565b6120b79190613568565b604051636f9d28b760e11b81526001600160a01b038e81166004830152602482018390529192505f9186169063df3a516e906044016020604051808303815f875af1158015612108573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061212c919061346f565b9050801561215057604051636083d26960e01b815260048101829052602401610992565b5050505f826001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612190573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121b491906134b1565b6040516370a0823160e01b815230600482015290915061222e9082906001600160a01b038216906370a0823190602401602060405180830381865afa1580156121ff573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612223919061346f565b8660045c8b8b612ab2565b50612239888a61352b565b6040516370a0823160e01b815230600482015290955085906001600160a01b038616906370a0823190602401602060405180830381865afa158015612280573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a4919061346f565b10156122c357604051630f1b15df60e21b815260040160405180910390fd5b6122d76001600160a01b0385168b87612869565b505050509695505050505050565b5f5f846001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612323573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234791906134b1565b6040516305eff7ef60e21b81526001600160a01b0388811660048301529192505f918716906317bfdfbc906024016020604051808303815f875af1158015612391573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123b5919061346f565b90505f8186116123c557856123c7565b815b90506123dd6001600160a01b0384168883612869565b6040516304c11f0360e31b81526001600160a01b038981166004830152602482018390525f9190891690632608f818906044016020604051808303815f875af115801561242c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612450919061346f565b905080156124745760405163014e9bb360e01b815260048101829052602401610992565b61247e868861352b565b94505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166304ef9d586040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124dd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612501919061346f565b90505f5f82116125115786612567565b61252382670de0b6b3a764000061353e565b600161253784670de0b6b3a764000061353e565b612549670de0b6b3a76400008b613551565b612553919061352b565b61255d919061353e565b6125679190613568565b604051633af9e66960e01b81526001600160a01b038d811660048301529192505f918c1690633af9e669906024016020604051808303815f875af11580156125b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125d5919061346f565b9050808211156125e3578091505b604051636f9d28b760e11b81526001600160a01b038d81166004830152602482018490528c169063df3a516e906044016020604051808303815f875af115801561262f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612653919061346f565b9350831561267757604051636083d26960e01b815260048101859052602401610992565b6040516370a0823160e01b815230600482015288906001600160a01b038916906370a0823190602401602060405180830381865afa1580156126bb573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126df919061346f565b10156126fe57604051630f1b15df60e21b815260040160405180910390fd5b6127126001600160a01b0388168c8a612869565b50505050505050949350505050565b6001609755565b6040516001600160a01b0380851660248301528316604482015260648101829052610c8c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c90565b6040516001600160a01b03831660248201526044810182905261168f90849063a9059cbb60e01b9060640161275c565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff1661283a5760405162461bcd60e51b8152600401610992906134cc565b61092633611971565b5f54610100900460ff166127215760405162461bcd60e51b8152600401610992906134cc565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526128ba8482612d63565b610c8c576040516001600160a01b03841660248201525f60448201526128ed90859063095ea7b360e01b9060640161275c565b610c8c8482612c90565b6040516370a0823160e01b81526001600160a01b03848116600483015282915f918516906370a0823190602401602060405180830381865afa15801561293f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612963919061346f565b60405163856e5bb360e01b81526001600160a01b038881166004830152602482018590529192505f9187169063856e5bb3906044016020604051808303815f875af11580156129b4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129d8919061346f565b905080156129fc576040516343f10e9d60e11b815260048101829052602401610992565b6040516370a0823160e01b81526001600160a01b0387811660048301525f91908716906370a0823190602401602060405180830381865afa158015612a43573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a67919061346f565b905083612a74828561353e565b1015612a9357604051630f1b15df60e21b815260040160405180910390fd5b612aa76001600160a01b0387168886612869565b505050949350505050565b5f612ae76001600160a01b0388167f000000000000000000000000000000000000000000000000000000000000000088612793565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015612b2b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b4f919061346f565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168585604051612b8c929190613587565b5f604051808303815f865af19150503d805f8114612bc5576040519150601f19603f3d011682016040523d82523d5f602084013e612bca565b606091505b5050905080612bec5760405163428c0cc760e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f906001600160a01b038916906370a0823190602401602060405180830381865afa158015612c30573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c54919061346f565b9050612c60838261353e565b935086841015612c8357604051638199f5f360e01b815260040160405180910390fd5b5050509695505050505050565b5f612ce4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e069092919063ffffffff16565b905080515f1480612d04575080806020019051810190612d049190613456565b61168f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610992565b5f5f5f846001600160a01b031684604051612d7e9190613596565b5f604051808303815f865af19150503d805f8114612db7576040519150601f19603f3d011682016040523d82523d5f602084013e612dbc565b606091505b5091509150818015612de6575080511580612de6575080806020019051810190612de69190613456565b8015612dfb57506001600160a01b0385163b15155b925050505b92915050565b6060612e1484845f85612e1c565b949350505050565b606082471015612e7d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610992565b5f5f866001600160a01b03168587604051612e989190613596565b5f6040518083038185875af1925050503d805f8114612ed2576040519150601f19603f3d011682016040523d82523d5f602084013e612ed7565b606091505b5091509150612ee887838387612ef3565b979650505050505050565b60608315612f615782515f03612f5a576001600160a01b0385163b612f5a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610992565b5081612e14565b612e148383815115612f765781518083602001fd5b8060405162461bcd60e51b815260040161099291906135ac565b6001600160a01b03811681146109a4575f5ffd5b5f5f83601f840112612fb4575f5ffd5b50813567ffffffffffffffff811115612fcb575f5ffd5b602083019150836020828501011115612fe2575f5ffd5b9250929050565b5f5f5f5f5f5f5f60c0888a031215612fff575f5ffd5b873561300a81612f90565b9650602088013561301a81612f90565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff81111561304a575f5ffd5b6130568a828b01612fa4565b989b979a50959850939692959293505050565b5f5f5f5f5f5f5f60c0888a03121561307f575f5ffd5b873561308a81612f90565b96506020880135955060408801356130a181612f90565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561304a575f5ffd5b5f5f5f606084860312156130dc575f5ffd5b83356130e781612f90565b95602085013595506040909401359392505050565b5f5f6040838503121561310d575f5ffd5b823561311881612f90565b946020939093013593505050565b803561313181612f90565b919050565b5f60208284031215613146575f5ffd5b813561315181612f90565b9392505050565b5f5f83601f840112613168575f5ffd5b50813567ffffffffffffffff81111561317f575f5ffd5b6020830191508360208260051b8501011115612fe2575f5ffd5b5f5f5f5f5f5f5f5f5f5f60c08b8d0312156131b2575f5ffd5b8a3567ffffffffffffffff8111156131c8575f5ffd5b6131d48d828e01613158565b909b5099505060208b013567ffffffffffffffff8111156131f3575f5ffd5b6131ff8d828e01613158565b90995097505060408b013567ffffffffffffffff81111561321e575f5ffd5b61322a8d828e01613158565b909750955061323d905060608c01613126565b935061324b60808c01613126565b925060a08b013567ffffffffffffffff811115613266575f5ffd5b6132728d828e01612fa4565b915080935050809150509295989b9194979a5092959850565b5f8151808452602084019350602083015f5b828110156132bb57815186526020958601959091019060010161329d565b5093949350505050565b8215158152604060208201525f612e14604083018461328b565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f8151808452602084019350602083015f5b828110156132bb5781516001600160a01b0316865260209586019590910190600101613319565b6001600160a01b0387811682528616602082015260a0604082018190525f9061336b90830187613307565b828103606084015261337d818761328b565b90508281036080840152838152838560208301375f602085830101526020601f19601f860116820101915050979650505050505050565b6001600160a01b0385811682528416602082015260a0604082018190525f906133df90830185613307565b82810360608401526133f1818561328b565b83810360809094019390935250505f8152602001949350505050565b80518015158114613131575f5ffd5b5f5f5f6060848603121561342e575f5ffd5b6134378461340d565b6020850151909350915061344d6040850161340d565b90509250925092565b5f60208284031215613466575f5ffd5b6131518261340d565b5f6020828403121561347f575f5ffd5b5051919050565b5f5f5f60608486031215613498575f5ffd5b5050815160208301516040909301519094929350919050565b5f602082840312156134c1575f5ffd5b815161315181612f90565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b80820180821115612e0057612e00613517565b81810381811115612e0057612e00613517565b8082028115828204841417612e0057612e00613517565b5f8261358257634e487b7160e01b5f52601260045260245ffd5b500490565b818382375f9101908152919050565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fea26469706673582212205cd019e73645d0f05cf5bc1594393019d29edfd5427b993f215e9493975f529d64736f6c634300081c0033",
  "devdoc": {
    "author": "Venus Protocol",
    "errors": {
      "AccrueInterestFailed(uint256)": [
        {
          "custom:error": "AccrueInterestFailed accrueInterest on a vToken market returned a non-zero error code"
        }
      ],
      "BorrowBehalfFailed(uint256)": [
        {
          "custom:error": "BorrowBehalfFailed borrowBehalf on a vToken market returned a non-zero error code"
        }
      ],
      "EnterMarketFailed(uint256)": [
        {
          "custom:error": "EnterMarketFailed Comptroller.enterMarketBehalf returned a non-zero error code"
        }
      ],
      "FlashLoanAssetOrAmountMismatch()": [
        {
          "custom:error": "FlashLoanAssetOrAmountMismatch Invalid flash loan arrays length or >1 elements"
        }
      ],
      "IdenticalMarkets()": [
        {
          "custom:error": "IdenticalMarkets Collateral and borrow markets cannot be the same"
        }
      ],
      "InitiatorMismatch()": [
        {
          "custom:error": "InitiatorMismatch Invalid initiator address in flash loan callback"
        }
      ],
      "InsufficientFundsToRepayFlashloan()": [
        {
          "custom:error": "InsufficientFundsToRepayFlashloan Not enough proceeds to repay flash loan plus fees"
        }
      ],
      "InvalidExecuteOperation()": [
        {
          "custom:error": "InvalidExecuteOperation Unknown operation type in flash loan callback"
        }
      ],
      "MarketNotListed(address)": [
        {
          "custom:error": "MarketNotListed Provided vToken market is not listed in Comptroller"
        }
      ],
      "MintBehalfFailed(uint256)": [
        {
          "custom:error": "MintBehalfFailed mintBehalf on a vToken market returned a non-zero error code"
        }
      ],
      "NotAnApprovedDelegate()": [
        {
          "custom:error": "NotAnApprovedDelegate User has not approved this contract as a delegate"
        }
      ],
      "OnBehalfMismatch()": [
        {
          "custom:error": "OnBehalfMismatch Invalid onBehalf address in flash loan callback"
        }
      ],
      "OperationCausesLiquidation(uint256)": [
        {
          "custom:error": "OperationCausesLiquidation Operation would put the account at risk (undercollateralized) returns a non-zero error code from getBorrowingPower"
        }
      ],
      "RedeemBehalfFailed(uint256)": [
        {
          "custom:error": "RedeemBehalfFailed redeemBehalf on a vToken market returned a non-zero error code"
        }
      ],
      "RepayBehalfFailed(uint256)": [
        {
          "custom:error": "RepayBehalfFailed repayBehalf on a vToken market returned a non-zero error code"
        }
      ],
      "SlippageExceeded()": [
        {
          "custom:error": "SlippageExceeded Swap output lower than required minimum"
        }
      ],
      "TokenSwapCallFailed()": [
        {
          "custom:error": "TokenSwapCallFailed Swap helper call reverted or returned false"
        }
      ],
      "UnauthorizedExecutor()": [
        {
          "custom:error": "UnauthorizedExecutor Caller is not the expected Comptroller"
        }
      ],
      "VBNBNotSupported()": [
        {
          "custom:error": "VBNBNotSupported vBNB market is not supported for leverage operations"
        }
      ],
      "ZeroAddress()": [
        {
          "custom:error": "ZeroAddress One of the required addresses is zero"
        }
      ],
      "ZeroFlashLoanAmount()": [
        {
          "custom:error": "ZeroFlashLoanAmount Flash loan amount cannot be zero"
        }
      ]
    },
    "events": {
      "DustTransferred(address,address,uint256)": {
        "params": {
          "amount": "The amount of dust transferred",
          "recipient": "The address receiving the dust (user or protocol share reserve)",
          "token": "The underlying token address"
        }
      },
      "Initialized(uint8)": {
        "details": "Triggered when the contract has been initialized or reinitialized."
      },
      "LeverageEntered(address,address,uint256,address,uint256)": {
        "params": {
          "borrowedAmountToFlashLoan": "The amount being flash loaned",
          "borrowedMarket": "The vToken market being borrowed from",
          "collateralAmountSeed": "The initial collateral amount provided by the user",
          "collateralMarket": "The vToken market used as collateral",
          "user": "The address of the user entering the position"
        }
      },
      "LeverageEnteredFromBorrow(address,address,address,uint256,uint256)": {
        "params": {
          "borrowedAmountSeed": "The initial borrowed asset amount provided by the user",
          "borrowedAmountToFlashLoan": "The amount being flash loaned",
          "borrowedMarket": "The vToken market being borrowed from",
          "collateralMarket": "The vToken market used as collateral",
          "user": "The address of the user entering the position"
        }
      },
      "LeverageExited(address,address,uint256,address,uint256)": {
        "params": {
          "borrowedAmountToFlashLoan": "The amount being flash loaned",
          "borrowedMarket": "The vToken market being repaid",
          "collateralAmountToRedeemForSwap": "The amount of collateral being redeemed for swap",
          "collateralMarket": "The vToken market being redeemed",
          "user": "The address of the user exiting the position"
        }
      },
      "SingleAssetLeverageEntered(address,address,uint256,uint256)": {
        "params": {
          "collateralAmountSeed": "The initial collateral amount provided by the user",
          "collateralAmountToFlashLoan": "The amount being flash loaned",
          "collateralMarket": "The vToken market used as collateral",
          "user": "The address of the user entering the position"
        }
      },
      "SingleAssetLeverageExited(address,address,uint256)": {
        "params": {
          "collateralAmountToFlashLoan": "The amount being flash loaned",
          "collateralMarket": "The vToken market used for both collateral and borrowed asset",
          "user": "The address of the user exiting the position"
        }
      }
    },
    "kind": "dev",
    "methods": {
      "acceptOwnership()": {
        "details": "The new owner accepts the ownership transfer."
      },
      "constructor": {
        "custom:oz-upgrades-unsafe-allow": "constructor",
        "details": "Sets immutable variables and disables initializers for the implementation contract",
        "params": {
          "_comptroller": "The Venus comptroller contract address",
          "_swapHelper": "The swap helper contract address",
          "_vBNB": "The vBNB market address (not supported for leverage operations)"
        }
      },
      "enterLeverage(address,uint256,address,uint256,uint256,bytes)": {
        "details": "This function uses flash loans to borrow assets, swaps them for collateral tokens,      and supplies the collateral to the Venus protocol to amplify the user's position.      The user must have delegated permission to this contract via the comptroller.      Any remaining dust (both collateral and borrowed assets) after the operation is returned to the user.",
        "params": {
          "borrowedAmountToFlashLoan": "The amount to borrow via flash loan for leverage",
          "borrowedMarket": "The vToken market from which assets will be borrowed via flash loan (must not be vBNB)",
          "collateralAmountSeed": "The initial amount of collateral the user provides (can be 0)",
          "collateralMarket": "The vToken market where collateral will be supplied (must not be vBNB)",
          "minAmountOutAfterSwap": "The minimum amount of collateral expected after swap (for slippage protection)",
          "swapData": "Bytes containing swap instructions for converting borrowed assets to collateral"
        }
      },
      "enterLeverageFromBorrow(address,address,uint256,uint256,uint256,bytes)": {
        "details": "This function uses flash loans to borrow additional assets, swaps the total borrowed amount      for collateral tokens, and supplies the collateral to the Venus protocol to amplify the user's position.      The user must have delegated permission to this contract via the comptroller.      Any remaining dust (both collateral and borrowed assets) after the operation is returned to the user.",
        "params": {
          "borrowedAmountSeed": "The initial amount of borrowed assets the user provides (can be 0)",
          "borrowedAmountToFlashLoan": "The additional amount to borrow via flash loan for leverage",
          "borrowedMarket": "The vToken market from which assets will be borrowed via flash loan (must not be vBNB)",
          "collateralMarket": "The vToken market where collateral will be supplied (must not be vBNB)",
          "minAmountOutAfterSwap": "The minimum amount of collateral expected after swap (for slippage protection)",
          "swapData": "Bytes containing swap instructions for converting borrowed assets to collateral"
        }
      },
      "enterSingleAssetLeverage(address,uint256,uint256)": {
        "details": "This function flash loans additional collateral assets, amplifying the user's supplied collateral      in the Venus protocol. The user must have delegated permission to this contract via the comptroller.      Any remaining collateral dust after the operation is returned to the user.",
        "params": {
          "collateralAmountSeed": "The initial amount of collateral the user provides (can be 0)",
          "collateralAmountToFlashLoan": "The amount to borrow via flash loan for leverage",
          "collateralMarket": "The vToken market where collateral will be supplied (must not be vBNB)"
        }
      },
      "executeOperation(address[],uint256[],uint256[],address,address,bytes)": {
        "custom:error": "InitiatorMismatch When initiator is not this contractOnBehalfMismatch When onBehalf is not the operation initiatorUnauthorizedExecutor When caller is not the ComptrollerFlashLoanAssetOrAmountMismatch When array lengths mismatch or > 1 elementInvalidExecuteOperation When operation type is unknown",
        "details": "Protected by nonReentrant modifier to prevent reentrancy attacks during flash loan execution",
        "params": {
          "amounts": "Array with the borrowed underlying amount (single element)",
          "initiator": "The address that initiated the flash loan (must be this contract)",
          "onBehalf": "The user for whom debt will be opened",
          "param": "Encoded auxiliary data for the operation (e.g., swap multicall)",
          "premiums": "Array with the flash loan fee amount (single element)",
          "vTokens": "Array with the borrowed vToken market (single element)"
        },
        "returns": {
          "repayAmounts": "Amounts to approve for flash loan repayment",
          "success": "Whether the execution succeeded"
        }
      },
      "exitLeverage(address,uint256,address,uint256,uint256,bytes)": {
        "details": "This function uses flash loans to temporarily repay debt, redeems collateral,      swaps collateral for borrowed assets, and repays the flash loan. Any remaining      dust (both collateral and borrowed assets) is returned to the user. This ensures      users who swap more than required as protection against price volatility receive      their excess tokens back.      The flash loan amount can exceed actual debt to account for interest accrual      between transaction creation and mining. The contract caps repayment to actual      debt and uses leftover funds toward flash loan repayment.      NOTE: No pre-operation safety check is performed because exiting leverage reduces      debt exposure, which can only improve account health. Post-operation safety is      still validated to ensure the final position is healthy.      IMPORTANT: If treasuryPercent() is nonzero, the user must provide a      collateralAmountToRedeemForSwap that accounts for the treasury fee. Only      (1 - treasuryPercent/1e18) of the redeemed amount is transferred to this contract.      Required gross amount = netAmountNeeded * 1e18 / (1e18 - treasuryPercent)",
        "params": {
          "borrowedAmountToFlashLoan": "The amount to borrow via flash loan for debt repayment (can exceed actual debt)",
          "borrowedMarket": "The vToken market where debt will be repaid via flash loan (must not be vBNB)",
          "collateralAmountToRedeemForSwap": "The gross amount of collateral to redeem (must account for treasury fee if nonzero)",
          "collateralMarket": "The vToken market from which collateral will be redeemed (must not be vBNB)",
          "minAmountOutAfterSwap": "The minimum amount of borrowed asset expected after swap (for slippage protection)",
          "swapData": "Bytes containing swap instructions for converting collateral to borrowed assets"
        }
      },
      "exitSingleAssetLeverage(address,uint256)": {
        "details": "This function uses flash loans to temporarily repay debt, redeems collateral,      and repays the flash loan without requiring token swaps. This is more gas-efficient      than exitLeverage when dealing with single-asset positions. Any remaining collateral      dust after the operation is returned to the user.      The flash loan amount can exceed actual debt to account for interest accrual      between transaction creation and mining. The contract caps repayment to actual      debt and uses leftover funds toward flash loan repayment.      If treasuryPercent() is nonzero, the contract automatically adjusts the redeem      amount to ensure sufficient funds are received to repay the flash loan after the      treasury fee deduction.      NOTE: No pre-operation safety check is performed because exiting leverage reduces      debt exposure, which can only improve account health. Post-operation safety is      still validated to ensure the final position is healthy.",
        "params": {
          "collateralAmountToFlashLoan": "The amount to borrow via flash loan for debt repayment (can exceed actual debt)",
          "collateralMarket": "The vToken market for both collateral and borrowed asset (must not be vBNB)"
        }
      },
      "initialize()": {
        "details": "Sets up the Ownable2Step functionality. Can only be called once."
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "pendingOwner()": {
        "details": "Returns the address of the pending owner."
      },
      "renounceOwnership()": {
        "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
      },
      "transferOwnership(address)": {
        "details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner."
      }
    },
    "stateVariables": {
      "MANTISSA_ONE": {
        "details": "Mantissa for fixed-point arithmetic (1e18 = 100%)"
      },
      "SUCCESS": {
        "details": "Success return value for VToken operations (mint, borrow, repay, redeem)"
      },
      "borrowedAmountSeed": {
        "details": "Transient (EIP-1153): Cleared at transaction end. Stores borrowed amount seed for enterLeverageFromBorrow."
      },
      "collateralAmount": {
        "details": "Transient (EIP-1153): Cleared at transaction end. Stores collateral seed (enter) or redeem amount (exit)."
      },
      "collateralMarket": {
        "details": "Transient (EIP-1153): Cleared at transaction end. Stores collateral market for flash loan callback."
      },
      "minAmountOutAfterSwap": {
        "details": "Transient (EIP-1153): Cleared at transaction end. Stores minimum expected output after swap."
      },
      "operationInitiator": {
        "details": "Transient (EIP-1153): Cleared at transaction end. Stores msg.sender for flash loan callback context."
      },
      "operationType": {
        "details": "Transient (EIP-1153): Cleared at transaction end. Tracks operation type during flash loan callback."
      }
    },
    "title": "LeverageStrategiesManager",
    "version": 1
  },
  "userdoc": {
    "events": {
      "DustTransferred(address,address,uint256)": {
        "notice": "Emitted when dust amounts are transferred after a leverage operation"
      },
      "LeverageEntered(address,address,uint256,address,uint256)": {
        "notice": "Emitted when a user enters a leveraged position with collateral seed"
      },
      "LeverageEnteredFromBorrow(address,address,address,uint256,uint256)": {
        "notice": "Emitted when a user enters a leveraged position with borrowed asset seed"
      },
      "LeverageExited(address,address,uint256,address,uint256)": {
        "notice": "Emitted when a user exits a leveraged position"
      },
      "SingleAssetLeverageEntered(address,address,uint256,uint256)": {
        "notice": "Emitted when a user enters a leveraged position with single collateral asset"
      },
      "SingleAssetLeverageExited(address,address,uint256)": {
        "notice": "Emitted when a user exits a leveraged position with single collateral asset"
      }
    },
    "kind": "user",
    "methods": {
      "COMPTROLLER()": {
        "notice": "The Venus comptroller contract for market interactions and flash loans execution"
      },
      "constructor": {
        "notice": "Contract constructor"
      },
      "enterLeverage(address,uint256,address,uint256,uint256,bytes)": {
        "notice": "Enters a leveraged position by borrowing assets and converting them to collateral"
      },
      "enterLeverageFromBorrow(address,address,uint256,uint256,uint256,bytes)": {
        "notice": "Enters a leveraged position by using existing borrowed assets and converting them to collateral"
      },
      "enterSingleAssetLeverage(address,uint256,uint256)": {
        "notice": "Enters a leveraged position using only collateral provided by the user"
      },
      "executeOperation(address[],uint256[],uint256[],address,address,bytes)": {
        "notice": "Flash loan callback entrypoint called by Comptroller"
      },
      "exitLeverage(address,uint256,address,uint256,uint256,bytes)": {
        "notice": "Exits a leveraged position by redeeming collateral and repaying borrowed assets"
      },
      "exitSingleAssetLeverage(address,uint256)": {
        "notice": "Exits a leveraged position when collateral and borrowed assets are the same token"
      },
      "initialize()": {
        "notice": "Initializes the contract"
      },
      "swapHelper()": {
        "notice": "The swap helper contract for executing token swaps during leverage operations"
      },
      "vBNB()": {
        "notice": "The vBNB market address (not supported for leverage operations)"
      }
    },
    "notice": "Contract for managing leveraged positions using flash loans and token swaps",
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 246,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "_initialized",
        "offset": 0,
        "slot": "0",
        "type": "t_uint8"
      },
      {
        "astId": 249,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "_initializing",
        "offset": 1,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 1363,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "__gap",
        "offset": 0,
        "slot": "1",
        "type": "t_array(t_uint256)50_storage"
      },
      {
        "astId": 118,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "_owner",
        "offset": 0,
        "slot": "51",
        "type": "t_address"
      },
      {
        "astId": 238,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "__gap",
        "offset": 0,
        "slot": "52",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 11,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "_pendingOwner",
        "offset": 0,
        "slot": "101",
        "type": "t_address"
      },
      {
        "astId": 105,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "__gap",
        "offset": 0,
        "slot": "102",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 423,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "_status",
        "offset": 0,
        "slot": "151",
        "type": "t_uint256"
      },
      {
        "astId": 492,
        "contract": "contracts/LeverageManager/LeverageStrategiesManager.sol:LeverageStrategiesManager",
        "label": "__gap",
        "offset": 0,
        "slot": "152",
        "type": "t_array(t_uint256)49_storage"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_uint256)49_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[49]",
        "numberOfBytes": "1568"
      },
      "t_array(t_uint256)50_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[50]",
        "numberOfBytes": "1600"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      },
      "t_uint8": {
        "encoding": "inplace",
        "label": "uint8",
        "numberOfBytes": "1"
      }
    }
  }
}
