fluid-contracts-public/deployments/mainnet/dump/0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d.json
2024-07-11 13:05:09 +00:00

1364 lines
148 KiB
JSON

{
"address": "0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "owner_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "colLiquidated",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "debtLiquidated",
"type": "uint256"
}
],
"name": "FluidLiquidateResult",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId_",
"type": "uint256"
}
],
"name": "FluidVaultError",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "deployer",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "LogSetDeployer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "globalAuth",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "LogSetGlobalAuth",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vaultAuth",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
},
{
"indexed": true,
"internalType": "address",
"name": "vault",
"type": "address"
}
],
"name": "LogSetVaultAuth",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vaultDeploymentLogic",
"type": "address"
},
{
"indexed": true,
"internalType": "bool",
"name": "allowed",
"type": "bool"
}
],
"name": "LogSetVaultDeploymentLogic",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vault",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "NewPositionMinted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "vault",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "vaultId",
"type": "uint256"
}
],
"name": "VaultDeployed",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender_",
"type": "address"
},
{
"internalType": "uint256",
"name": "id_",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner_",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "vaultDeploymentLogic_",
"type": "address"
},
{
"internalType": "bytes",
"name": "vaultDeploymentData_",
"type": "bytes"
}
],
"name": "deployVault",
"outputs": [
{
"internalType": "address",
"name": "vault_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "vaultId_",
"type": "uint256"
}
],
"name": "getVaultAddress",
"outputs": [
{
"internalType": "address",
"name": "vault_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "deployer_",
"type": "address"
}
],
"name": "isDeployer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "globalAuth_",
"type": "address"
}
],
"name": "isGlobalAuth",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "vault_",
"type": "address"
}
],
"name": "isVault",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "vault_",
"type": "address"
},
{
"internalType": "address",
"name": "vaultAuth_",
"type": "address"
}
],
"name": "isVaultAuth",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "vaultDeploymentLogic_",
"type": "address"
}
],
"name": "isVaultDeploymentLogic",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "vaultId_",
"type": "uint256"
},
{
"internalType": "address",
"name": "user_",
"type": "address"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "tokenId_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id_",
"type": "uint256"
}
],
"name": "ownerOf",
"outputs": [
{
"internalType": "address",
"name": "owner_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "slot_",
"type": "bytes32"
}
],
"name": "readFromStorage",
"outputs": [
{
"internalType": "uint256",
"name": "result_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from_",
"type": "address"
},
{
"internalType": "address",
"name": "to_",
"type": "address"
},
{
"internalType": "uint256",
"name": "id_",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from_",
"type": "address"
},
{
"internalType": "address",
"name": "to_",
"type": "address"
},
{
"internalType": "uint256",
"name": "id_",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data_",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator_",
"type": "address"
},
{
"internalType": "bool",
"name": "approved_",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "deployer_",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed_",
"type": "bool"
}
],
"name": "setDeployer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "globalAuth_",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed_",
"type": "bool"
}
],
"name": "setGlobalAuth",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "vault_",
"type": "address"
},
{
"internalType": "address",
"name": "vaultAuth_",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed_",
"type": "bool"
}
],
"name": "setVaultAuth",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "deploymentLogic_",
"type": "address"
},
{
"internalType": "bool",
"name": "allowed_",
"type": "bool"
}
],
"name": "setVaultDeploymentLogic",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target_",
"type": "address"
},
{
"internalType": "bytes",
"name": "data_",
"type": "bytes"
}
],
"name": "spell",
"outputs": [
{
"internalType": "bytes",
"name": "response_",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId_",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index_",
"type": "uint256"
}
],
"name": "tokenByIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner_",
"type": "address"
},
{
"internalType": "uint256",
"name": "index_",
"type": "uint256"
}
],
"name": "tokenOfOwnerByIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "id_",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalVaults",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from_",
"type": "address"
},
{
"internalType": "address",
"name": "to_",
"type": "address"
},
{
"internalType": "uint256",
"name": "id_",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x4b47e70dd0dd266135bb7954811b272bf3260bc24aa6125ead41341dc1b1091a",
"receipt": {
"to": "0x4e59b44847b379578588920cA78FbF26c0B4956C",
"from": "0x0Ed35B1609Ec45c7079E80d11149a52717e4859A",
"contractAddress": null,
"transactionIndex": 71,
"gasUsed": "2538490",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000001000000000000200000000000000000000002020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000020000000000000000000100000000000000000000000000000000000000000000200",
"blockHash": "0x84bb2270fe28d14a7168a87b50fcee6de6acf5f17e8ab9f11b24b526e0717737",
"transactionHash": "0x4b47e70dd0dd266135bb7954811b272bf3260bc24aa6125ead41341dc1b1091a",
"logs": [
{
"transactionIndex": 71,
"blockNumber": 19310014,
"transactionHash": "0x4b47e70dd0dd266135bb7954811b272bf3260bc24aa6125ead41341dc1b1091a",
"address": "0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e"
],
"data": "0x",
"logIndex": 117,
"blockHash": "0x84bb2270fe28d14a7168a87b50fcee6de6acf5f17e8ab9f11b24b526e0717737"
}
],
"blockNumber": 19310014,
"cumulativeGasUsed": "7192560",
"status": 1,
"byzantium": true
},
"args": [
"0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e"
],
"numDeployments": 2,
"solcInputHash": "0d3d9b6fb2c5a83ef78cb6d542656b82",
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"colLiquidated\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"debtLiquidated\",\"type\":\"uint256\"}],\"name\":\"FluidLiquidateResult\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorId_\",\"type\":\"uint256\"}],\"name\":\"FluidVaultError\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"LogSetDeployer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"globalAuth\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"LogSetGlobalAuth\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vaultAuth\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"name\":\"LogSetVaultAuth\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vaultDeploymentLogic\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"LogSetVaultDeploymentLogic\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"NewPositionMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vaultId\",\"type\":\"uint256\"}],\"name\":\"VaultDeployed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vaultDeploymentLogic_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"vaultDeploymentData_\",\"type\":\"bytes\"}],\"name\":\"deployVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"vault_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vaultId_\",\"type\":\"uint256\"}],\"name\":\"getVaultAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"vault_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer_\",\"type\":\"address\"}],\"name\":\"isDeployer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"globalAuth_\",\"type\":\"address\"}],\"name\":\"isGlobalAuth\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault_\",\"type\":\"address\"}],\"name\":\"isVault\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAuth_\",\"type\":\"address\"}],\"name\":\"isVaultAuth\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vaultDeploymentLogic_\",\"type\":\"address\"}],\"name\":\"isVaultDeploymentLogic\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vaultId_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot_\",\"type\":\"bytes32\"}],\"name\":\"readFromStorage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data_\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved_\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed_\",\"type\":\"bool\"}],\"name\":\"setDeployer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"globalAuth_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed_\",\"type\":\"bool\"}],\"name\":\"setGlobalAuth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vault_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAuth_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed_\",\"type\":\"bool\"}],\"name\":\"setVaultAuth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deploymentLogic_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed_\",\"type\":\"bool\"}],\"name\":\"setVaultDeploymentLogic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data_\",\"type\":\"bytes\"}],\"name\":\"spell\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"response_\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId_\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index_\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index_\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalVaults\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Note the deployed vaults start out with no config at Liquidity contract. This must be done by Liquidity auths in a separate step, otherwise no deposits will be possible. This contract is not upgradeable. It supports adding new vault deployment logic contracts for new, future vaults.\",\"events\":{\"LogSetDeployer(address,bool)\":{\"details\":\"Emitted when the deployer is modified by owner.\",\"params\":{\"allowed\":\"Indicates whether the address is authorized as a deployer or not.\",\"deployer\":\"Address whose deployer status is updated.\"}},\"LogSetGlobalAuth(address,bool)\":{\"details\":\"Emitted when the globalAuth is modified by owner.\",\"params\":{\"allowed\":\"Indicates whether the address is authorized as a deployer or not.\",\"globalAuth\":\"Address whose globalAuth status is updated.\"}},\"LogSetVaultAuth(address,bool,address)\":{\"details\":\"Emitted when the vaultAuth is modified by owner.\",\"params\":{\"allowed\":\"Indicates whether the address is authorized as a deployer or not.\",\"vault\":\"Address of the specific vault related to the authorization change.\",\"vaultAuth\":\"Address whose vaultAuth status is updated.\"}},\"LogSetVaultDeploymentLogic(address,bool)\":{\"details\":\"Emitted when the vault deployment logic is modified by owner.\",\"params\":{\"allowed\":\"Indicates whether the address is authorized as a deployer or not.\",\"vaultDeploymentLogic\":\"The address of the vault deployment logic contract.\"}},\"NewPositionMinted(address,address,uint256)\":{\"details\":\"Emitted when a new token/position is minted by a vault.\",\"params\":{\"tokenId\":\"The ID of the newly minted token.\",\"user\":\"The address of the user who received the minted token.\",\"vault\":\"The address of the vault that minted the token.\"}},\"VaultDeployed(address,uint256)\":{\"details\":\"Emitted when a new vault is deployed.\",\"params\":{\"vault\":\"The address of the newly deployed vault.\",\"vaultId\":\"The id of the newly deployed vault.\"}}},\"kind\":\"dev\",\"methods\":{\"deployVault(address,bytes)\":{\"params\":{\"vaultDeploymentData_\":\"The data to be used for vault deployment.\",\"vaultDeploymentLogic_\":\"The address of the vault deployment logic contract.\"},\"returns\":{\"vault_\":\" Returns the address of the newly deployed vault.\"}},\"getVaultAddress(uint256)\":{\"params\":{\"vaultId_\":\"The ID of the vault.\"},\"returns\":{\"vault_\":\" Returns the computed address of the vault.\"}},\"isDeployer(address)\":{\"params\":{\"deployer_\":\"The address to be checked for deployer authorization.\"},\"returns\":{\"_0\":\"Returns `true` if the address is a deployer, otherwise `false`.\"}},\"isGlobalAuth(address)\":{\"params\":{\"globalAuth_\":\"The address to be checked for global authorization privileges.\"},\"returns\":{\"_0\":\"Returns `true` if the given address has global authorization privileges, otherwise `false`.\"}},\"isVault(address)\":{\"params\":{\"vault_\":\"The vault address to check.\"},\"returns\":{\"_0\":\"Returns `true` if the given address corresponds to a valid vault, otherwise `false`.\"}},\"isVaultAuth(address,address)\":{\"params\":{\"vaultAuth_\":\"The address to be checked for vault authorization privileges.\",\"vault_\":\"The address of the vault to check.\"},\"returns\":{\"_0\":\"Returns `true` if the given address has vault authorization privileges for the specified vault, otherwise `false`.\"}},\"isVaultDeploymentLogic(address)\":{\"params\":{\"vaultDeploymentLogic_\":\"The address of the vault deploy logic to check for authorization privileges.\"},\"returns\":{\"_0\":\"Returns `true` if the given address has authorization privileges for vault deployment, otherwise `false`.\"}},\"mint(uint256,address)\":{\"params\":{\"user_\":\"The address receiving the minted token.\",\"vaultId_\":\"The ID of the vault that's minting the token.\"},\"returns\":{\"tokenId_\":\" The ID of the newly minted token.\"}},\"setDeployer(address,bool)\":{\"params\":{\"allowed_\":\"A boolean indicating whether the specified address is allowed to deploy vaults.\",\"deployer_\":\"The address to be set as deployer.\"}},\"setGlobalAuth(address,bool)\":{\"params\":{\"allowed_\":\"A boolean indicating whether the specified address is allowed to update any vault config.\",\"globalAuth_\":\"The address to be set as global authorization.\"}},\"setVaultAuth(address,address,bool)\":{\"params\":{\"allowed_\":\"A boolean indicating whether the specified address is allowed to update the specific vault config.\",\"vaultAuth_\":\"The address to be set as vault authorization.\",\"vault_\":\"The address of the vault for which the authorization is being set.\"}},\"setVaultDeploymentLogic(address,bool)\":{\"params\":{\"allowed_\":\"A boolean indicating whether the specified address is allowed to deploy new type of vault.\",\"deploymentLogic_\":\"The address of the vault deployment logic contract to be set.\"}},\"spell(address,bytes)\":{\"params\":{\"data_\":\"Data to execute at the delegated address\",\"target_\":\"Address to which the call needs to be delegated\"}},\"tokenURI(uint256)\":{\"params\":{\"id_\":\"The ID of the token to query.\"},\"returns\":{\"_0\":\"An empty string since no specific URI is defined in this implementation.\"}},\"totalVaults()\":{\"returns\":{\"_0\":\"Returns the total number of vaults.\"}}},\"title\":\"Fluid VaultFactory\",\"version\":1},\"userdoc\":{\"errors\":{\"FluidLiquidateResult(uint256,uint256)\":[{\"notice\":\"used to simulate liquidation to find the maximum liquidatable amounts\"}]},\"kind\":\"user\",\"methods\":{\"approve(address,uint256)\":{\"notice\":\"approves an NFT with `id_` to be spent (transferred) by `spender_`\"},\"balanceOf(address)\":{\"notice\":\"returns total count of NFTs owned by `owner_`\"},\"deployVault(address,bytes)\":{\"notice\":\"Deploys a new vault using the specified deployment logic `vaultDeploymentLogic_` and data `vaultDeploymentData_`. Only accounts with deployer access or the owner can deploy a new vault.\"},\"getApproved(uint256)\":{\"notice\":\"trackes if a NFT id is approved for a certain address.\"},\"getVaultAddress(uint256)\":{\"notice\":\"Computes the address of a vault based on its given ID (`vaultId_`).\"},\"isApprovedForAll(address,address)\":{\"notice\":\"trackes if all the NFTs of an owner are approved for a certain other address.\"},\"isDeployer(address)\":{\"notice\":\"Checks if the provided address (`deployer_`) is authorized as a deployer.\"},\"isGlobalAuth(address)\":{\"notice\":\"Checks if the provided address (`globalAuth_`) has global vault authorization privileges.\"},\"isVault(address)\":{\"notice\":\"Checks if a given address (`vault_`) corresponds to a valid vault.\"},\"isVaultAuth(address,address)\":{\"notice\":\"Checks if the provided address (`vaultAuth_`) has vault authorization privileges for the specified vault (`vault_`).\"},\"isVaultDeploymentLogic(address)\":{\"notice\":\"Checks if the provided (`vaultDeploymentLogic_`) address has authorization for vault deployment.\"},\"mint(uint256,address)\":{\"notice\":\"Mints a new ERC721 token for a specific vault (`vaultId_`) to a specified user (`user_`). Only the corresponding vault is authorized to mint a token.\"},\"ownerOf(uint256)\":{\"notice\":\"returns `owner_` of NFT with `id_`\"},\"safeTransferFrom(address,address,uint256)\":{\"notice\":\"transfers an NFT with `id_` `from_` address `to_` address\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"notice\":\"transfers an NFT with `id_` `from_` address `to_` address, passing `data_` to `onERC721Received` callback\"},\"setApprovalForAll(address,bool)\":{\"notice\":\"approves all NFTs owned by msg.sender to be spent (transferred) by `operator_`\"},\"setDeployer(address,bool)\":{\"notice\":\"Sets an address (`deployer_`) as allowed deployer or not. This function can only be called by the owner.\"},\"setGlobalAuth(address,bool)\":{\"notice\":\"Sets an address (`globalAuth_`) as a global authorization or not. This function can only be called by the owner.\"},\"setVaultAuth(address,address,bool)\":{\"notice\":\"Sets an address (`vaultAuth_`) as allowed vault authorization or not for a specific vault (`vault_`). This function can only be called by the owner.\"},\"setVaultDeploymentLogic(address,bool)\":{\"notice\":\"Sets an address as allowed vault deployment logic (`deploymentLogic_`) contract or not. This function can only be called by the owner.\"},\"spell(address,bytes)\":{\"notice\":\"Spell allows owner aka governance to do any arbitrary call on factory\"},\"tokenByIndex(uint256)\":{\"notice\":\"Returns a token ID at a given `index_` of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"notice\":\"Returns a token ID owned by `owner_` at a given `index_` of its token list. Use along with {balanceOf} to enumerate all of `owner_`'s tokens.\"},\"tokenURI(uint256)\":{\"notice\":\"Returns the URI of the specified token ID (`id_`). In this implementation, an empty string is returned as no specific URI is defined.\"},\"totalSupply()\":{\"notice\":\"total amount of tokens stored by the contract.\"},\"totalVaults()\":{\"notice\":\"Returns the total number of vaults deployed by the factory.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"transfers an NFT with `id_` `from_` address `to_` address without safe check\"}},\"notice\":\"creates Fluid vault protocol vaults, which are interacting with Fluid Liquidity to deposit / borrow funds. Vaults are created at a deterministic address, given an incrementing `vaultId` (see `getVaultAddress()`). Vaults can only be deployed by allow-listed deployer addresses. This factory also implements ERC721-Enumerable, the NFTs are used to represent created user positions. Only vaults can mint new NFTs.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/protocols/vault/factory/main.sol\":\"FluidVaultFactory\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000000},\"remappings\":[]},\"sources\":{\"contracts/libraries/storageRead.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\n/// @notice implements a method to read uint256 data from storage at a bytes32 storage slot key.\\ncontract StorageRead {\\n function readFromStorage(bytes32 slot_) public view returns (uint256 result_) {\\n assembly {\\n result_ := sload(slot_) // read value from the storage slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1b03dfe294c2f0376f7e34c3960fe7088d7ff44bb2ffd9cb2ac940486bfba8c9\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/vault/error.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\ncontract Error {\\n error FluidVaultError(uint256 errorId_);\\n\\n /// @notice used to simulate liquidation to find the maximum liquidatable amounts\\n error FluidLiquidateResult(uint256 colLiquidated, uint256 debtLiquidated);\\n}\\n\",\"keccak256\":\"0x84d885c40fdca6828cb4cdc206c852fc4ad7e52f7621e2a63b151742123196f5\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/vault/errorTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nlibrary ErrorTypes {\\n /***********************************|\\n | Vault Factory | \\n |__________________________________*/\\n\\n uint256 internal constant VaultFactory__InvalidOperation = 30001;\\n uint256 internal constant VaultFactory__Unauthorized = 30002;\\n uint256 internal constant VaultFactory__SameTokenNotAllowed = 30003;\\n uint256 internal constant VaultFactory__InvalidParams = 30004;\\n uint256 internal constant VaultFactory__InvalidVault = 30005;\\n uint256 internal constant VaultFactory__InvalidVaultAddress = 30006;\\n uint256 internal constant VaultFactory__OnlyDelegateCallAllowed = 30007;\\n\\n /***********************************|\\n | VaultT1 | \\n |__________________________________*/\\n\\n /// @notice thrown at reentrancy\\n uint256 internal constant VaultT1__AlreadyEntered = 31001;\\n\\n /// @notice thrown when user sends deposit & borrow amount as 0\\n uint256 internal constant VaultT1__InvalidOperateAmount = 31002;\\n\\n /// @notice thrown when msg.value is not in sync with native token deposit or payback\\n uint256 internal constant VaultT1__InvalidMsgValueOperate = 31003;\\n\\n /// @notice thrown when msg.sender is not the owner of the vault\\n uint256 internal constant VaultT1__NotAnOwner = 31004;\\n\\n /// @notice thrown when user's position does not exist. Sending the wrong index from the frontend\\n uint256 internal constant VaultT1__TickIsEmpty = 31005;\\n\\n /// @notice thrown when the user's position is above CF and the user tries to make it more risky by trying to withdraw or borrow\\n uint256 internal constant VaultT1__PositionAboveCF = 31006;\\n\\n /// @notice thrown when the top tick is not initialized. Happens if the vault is totally new or all the user's left\\n uint256 internal constant VaultT1__TopTickDoesNotExist = 31007;\\n\\n /// @notice thrown when msg.value in liquidate is not in sync payback\\n uint256 internal constant VaultT1__InvalidMsgValueLiquidate = 31008;\\n\\n /// @notice thrown when slippage is more on liquidation than what the liquidator sent\\n uint256 internal constant VaultT1__ExcessSlippageLiquidation = 31009;\\n\\n /// @notice thrown when msg.sender is not the rebalancer/reserve contract\\n uint256 internal constant VaultT1__NotRebalancer = 31010;\\n\\n /// @notice thrown when NFT of one vault interacts with the NFT of other vault\\n uint256 internal constant VaultT1__NftNotOfThisVault = 31011;\\n\\n /// @notice thrown when the token is not initialized on the liquidity contract\\n uint256 internal constant VaultT1__TokenNotInitialized = 31012;\\n\\n /// @notice thrown when admin updates fallback if a non-auth calls vault\\n uint256 internal constant VaultT1__NotAnAuth = 31013;\\n\\n /// @notice thrown in operate when user tries to witdhraw more collateral than deposited\\n uint256 internal constant VaultT1__ExcessCollateralWithdrawal = 31014;\\n\\n /// @notice thrown in operate when user tries to payback more debt than borrowed\\n uint256 internal constant VaultT1__ExcessDebtPayback = 31015;\\n\\n /// @notice thrown when user try to withdrawal more than operate's withdrawal limit\\n uint256 internal constant VaultT1__WithdrawMoreThanOperateLimit = 31016;\\n\\n /// @notice thrown when caller of liquidityCallback is not Liquidity\\n uint256 internal constant VaultT1__InvalidLiquidityCallbackAddress = 31017;\\n\\n /// @notice thrown when reentrancy is not already on\\n uint256 internal constant VaultT1__NotEntered = 31018;\\n\\n /// @notice thrown when someone directly calls secondary implementation contract\\n uint256 internal constant VaultT1__OnlyDelegateCallAllowed = 31019;\\n\\n /// @notice thrown when the safeTransferFrom for a token amount failed\\n uint256 internal constant VaultT1__TransferFromFailed = 31020;\\n\\n /// @notice thrown when exchange price overflows while updating on storage\\n uint256 internal constant VaultT1__ExchangePriceOverFlow = 31021;\\n\\n /// @notice thrown when debt to liquidate amt is sent wrong\\n uint256 internal constant VaultT1__InvalidLiquidationAmt = 31022;\\n\\n /// @notice thrown when user debt or collateral goes above 2**128 or below -2**128\\n uint256 internal constant VaultT1__UserCollateralDebtExceed = 31023;\\n\\n /// @notice thrown if on liquidation branch debt becomes lower than 100\\n uint256 internal constant VaultT1__BranchDebtTooLow = 31024;\\n\\n /// @notice thrown when tick's debt is less than 10000\\n uint256 internal constant VaultT1__TickDebtTooLow = 31025;\\n\\n /// @notice thrown when the received new liquidity exchange price is of unexpected value (< than the old one)\\n uint256 internal constant VaultT1__LiquidityExchangePriceUnexpected = 31026;\\n\\n /// @notice thrown when user's debt is less than 10000\\n uint256 internal constant VaultT1__UserDebtTooLow = 31027;\\n\\n /// @notice thrown when on only payback and only deposit the ratio of position increases\\n uint256 internal constant VaultT1__InvalidPaybackOrDeposit = 31028;\\n\\n /// @notice thrown when liquidation just happens of a single partial\\n uint256 internal constant VaultT1__InvalidLiquidation = 31029;\\n\\n /// @notice thrown when msg.value is sent wrong in rebalance\\n uint256 internal constant VaultT1__InvalidMsgValueInRebalance = 31030;\\n\\n /// @notice thrown when nothing rebalanced\\n uint256 internal constant VaultT1__NothingToRebalance = 31031;\\n\\n /***********************************|\\n | ERC721 | \\n |__________________________________*/\\n\\n uint256 internal constant ERC721__InvalidParams = 32001;\\n uint256 internal constant ERC721__Unauthorized = 32002;\\n uint256 internal constant ERC721__InvalidOperation = 32003;\\n uint256 internal constant ERC721__UnsafeRecipient = 32004;\\n uint256 internal constant ERC721__OutOfBoundsIndex = 32005;\\n\\n /***********************************|\\n | Vault Admin | \\n |__________________________________*/\\n\\n /// @notice thrown when admin tries to setup invalid value which are crossing limits\\n uint256 internal constant VaultT1Admin__ValueAboveLimit = 33001;\\n\\n /// @notice when someone directly calls admin implementation contract\\n uint256 internal constant VaultT1Admin__OnlyDelegateCallAllowed = 33002;\\n\\n /// @notice thrown when auth sends NFT ID as 0 while collecting dust debt\\n uint256 internal constant VaultT1Admin__NftIdShouldBeNonZero = 33003;\\n\\n /// @notice thrown when trying to collect dust debt of NFT which is not of this vault\\n uint256 internal constant VaultT1Admin__NftNotOfThisVault = 33004;\\n\\n /// @notice thrown when dust debt of NFT is 0, meaning nothing to collect\\n uint256 internal constant VaultT1Admin__DustDebtIsZero = 33005;\\n\\n /// @notice thrown when final debt after liquidation is not 0, meaning position 100% liquidated\\n uint256 internal constant VaultT1Admin__FinalDebtShouldBeZero = 33006;\\n\\n /// @notice thrown when NFT is not liquidated state\\n uint256 internal constant VaultT1Admin__NftNotLiquidated = 33007;\\n\\n /// @notice thrown when total absorbed dust debt is 0\\n uint256 internal constant VaultT1Admin__AbsorbedDustDebtIsZero = 33008;\\n\\n /// @notice thrown when address is set as 0\\n uint256 internal constant VaultT1Admin__AddressZeroNotAllowed = 33009;\\n\\n /***********************************|\\n | Vault Rewards | \\n |__________________________________*/\\n\\n uint256 internal constant VaultRewards__Unauthorized = 34001;\\n uint256 internal constant VaultRewards__AddressZero = 34002;\\n uint256 internal constant VaultRewards__InvalidParams = 34003;\\n uint256 internal constant VaultRewards__NewMagnifierSameAsOldMagnifier = 34004;\\n uint256 internal constant VaultRewards__NotTheInitiator = 34005;\\n uint256 internal constant VaultRewards__AlreadyStarted = 34006;\\n uint256 internal constant VaultRewards__RewardsNotStartedOrEnded = 34007;\\n}\\n\",\"keccak256\":\"0xcc883dc6d2b7b941f6dfaa484f2ecfe803ee4b238af240240013651f08237c90\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/vault/factory/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { ErrorTypes } from \\\"../../errorTypes.sol\\\";\\nimport { Error } from \\\"../../error.sol\\\";\\n\\n/// @notice Fluid Vault Factory ERC721 base contract. Implements the ERC721 standard, based on Solmate.\\n/// In addition, implements ERC721 Enumerable.\\n/// Modern, minimalist, and gas efficient ERC-721 with Enumerable implementation.\\n///\\n/// @author Instadapp\\n/// @author Modified Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)\\nabstract contract ERC721 is Error {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 indexed id);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 indexed id);\\n\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE/LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n function tokenURI(uint256 id) public view virtual returns (string memory);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 BALANCE/OWNER STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n // token id => token config\\n // uint160 0 - 159: address:: owner\\n // uint32 160 - 191: uint32:: index\\n // uint32 192 - 223: uint32:: vaultId\\n // uint32 224 - 255: uint32:: null\\n mapping(uint256 => uint256) internal _tokenConfig;\\n\\n // owner => slot => index\\n /*\\n // slot 0: \\n // uint32 0 - 31: uint32:: balanceOf\\n // uint224 32 - 255: 7 tokenIds each of uint32 packed\\n // slot N (N >= 1)\\n // uint32 * 8 each tokenId\\n */\\n mapping(address => mapping(uint256 => uint256)) internal _ownerConfig;\\n\\n /// @notice returns `owner_` of NFT with `id_`\\n function ownerOf(uint256 id_) public view virtual returns (address owner_) {\\n if ((owner_ = address(uint160(_tokenConfig[id_]))) == address(0))\\n revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);\\n }\\n\\n /// @notice returns total count of NFTs owned by `owner_`\\n function balanceOf(address owner_) public view virtual returns (uint256) {\\n if (owner_ == address(0)) revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);\\n\\n return _ownerConfig[owner_][0] & type(uint32).max;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721Enumerable STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n /// @notice total amount of tokens stored by the contract.\\n uint256 public totalSupply;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 APPROVAL STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n /// @notice trackes if a NFT id is approved for a certain address.\\n mapping(uint256 => address) public getApproved;\\n\\n /// @notice trackes if all the NFTs of an owner are approved for a certain other address.\\n mapping(address => mapping(address => bool)) public isApprovedForAll;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(string memory _name, string memory _symbol) {\\n name = _name;\\n symbol = _symbol;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n /// @notice approves an NFT with `id_` to be spent (transferred) by `spender_`\\n function approve(address spender_, uint256 id_) public virtual {\\n address owner_ = address(uint160(_tokenConfig[id_]));\\n if (!(msg.sender == owner_ || isApprovedForAll[owner_][msg.sender]))\\n revert FluidVaultError(ErrorTypes.ERC721__Unauthorized);\\n\\n getApproved[id_] = spender_;\\n\\n emit Approval(owner_, spender_, id_);\\n }\\n\\n /// @notice approves all NFTs owned by msg.sender to be spent (transferred) by `operator_`\\n function setApprovalForAll(address operator_, bool approved_) public virtual {\\n isApprovedForAll[msg.sender][operator_] = approved_;\\n\\n emit ApprovalForAll(msg.sender, operator_, approved_);\\n }\\n\\n /// @notice transfers an NFT with `id_` `from_` address `to_` address without safe check\\n function transferFrom(address from_, address to_, uint256 id_) public virtual {\\n uint256 tokenConfig_ = _tokenConfig[id_];\\n if (from_ != address(uint160(tokenConfig_))) revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);\\n\\n if (!(msg.sender == from_ || isApprovedForAll[from_][msg.sender] || msg.sender == getApproved[id_]))\\n revert FluidVaultError(ErrorTypes.ERC721__Unauthorized);\\n\\n // call _transfer with vaultId extracted from tokenConfig_\\n _transfer(from_, to_, id_, (tokenConfig_ >> 192) & type(uint32).max);\\n\\n delete getApproved[id_];\\n\\n emit Transfer(from_, to_, id_);\\n }\\n\\n /// @notice transfers an NFT with `id_` `from_` address `to_` address\\n function safeTransferFrom(address from_, address to_, uint256 id_) public virtual {\\n transferFrom(from_, to_, id_);\\n\\n if (\\n !(to_.code.length == 0 ||\\n ERC721TokenReceiver(to_).onERC721Received(msg.sender, from_, id_, \\\"\\\") ==\\n ERC721TokenReceiver.onERC721Received.selector)\\n ) revert FluidVaultError(ErrorTypes.ERC721__UnsafeRecipient);\\n }\\n\\n /// @notice transfers an NFT with `id_` `from_` address `to_` address, passing `data_` to `onERC721Received` callback\\n function safeTransferFrom(address from_, address to_, uint256 id_, bytes calldata data_) public virtual {\\n transferFrom(from_, to_, id_);\\n\\n if (\\n !((to_.code.length == 0) ||\\n ERC721TokenReceiver(to_).onERC721Received(msg.sender, from_, id_, data_) ==\\n ERC721TokenReceiver.onERC721Received.selector)\\n ) revert FluidVaultError(ErrorTypes.ERC721__UnsafeRecipient);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721Enumerable LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n /// @notice Returns a token ID at a given `index_` of all the tokens stored by the contract.\\n /// Use along with {totalSupply} to enumerate all tokens.\\n function tokenByIndex(uint256 index_) external view returns (uint256) {\\n if (index_ >= totalSupply) {\\n revert FluidVaultError(ErrorTypes.ERC721__OutOfBoundsIndex);\\n }\\n return index_ + 1;\\n }\\n\\n /// @notice Returns a token ID owned by `owner_` at a given `index_` of its token list.\\n /// Use along with {balanceOf} to enumerate all of `owner_`'s tokens.\\n function tokenOfOwnerByIndex(address owner_, uint256 index_) external view returns (uint256) {\\n if (index_ >= balanceOf(owner_)) {\\n revert FluidVaultError(ErrorTypes.ERC721__OutOfBoundsIndex);\\n }\\n\\n index_ = index_ + 1;\\n return (_ownerConfig[owner_][index_ / 8] >> ((index_ % 8) * 32)) & type(uint32).max;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC165 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function supportsInterface(bytes4 interfaceId_) public view virtual returns (bool) {\\n return\\n interfaceId_ == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\\n interfaceId_ == 0x80ac58cd || // ERC165 Interface ID for ERC721\\n interfaceId_ == 0x5b5e139f || // ERC165 Interface ID for ERC721Metadata\\n interfaceId_ == 0x780e9d63; // ERC165 Interface ID for ERC721Enumberable\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL TRANSFER LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _transfer(address from_, address to_, uint256 id_, uint256 vaultId_) internal {\\n if (to_ == address(0)) {\\n revert FluidVaultError(ErrorTypes.ERC721__InvalidOperation);\\n } else if (from_ == address(0)) {\\n _add(to_, id_, vaultId_);\\n } else if (to_ != from_) {\\n _remove(from_, id_);\\n _add(to_, id_, vaultId_);\\n }\\n }\\n\\n function _add(address user_, uint256 id_, uint256 vaultId_) private {\\n uint256 ownerConfig_ = _ownerConfig[user_][0];\\n unchecked {\\n // index starts from `1`\\n uint256 balanceOf_ = (ownerConfig_ & type(uint32).max) + 1;\\n\\n _tokenConfig[id_] = (uint160(user_) | (balanceOf_ << 160) | (vaultId_ << 192));\\n\\n _ownerConfig[user_][0] = (ownerConfig_ & ~uint256(type(uint32).max)) | (balanceOf_);\\n\\n uint256 wordIndex_ = (balanceOf_ / 8);\\n _ownerConfig[user_][wordIndex_] = _ownerConfig[user_][wordIndex_] | (id_ << ((balanceOf_ % 8) * 32));\\n }\\n }\\n\\n function _remove(address user_, uint256 id_) private {\\n uint256 temp_ = _tokenConfig[id_];\\n\\n // fetching `id_` details and deleting it.\\n uint256 tokenIndex_ = (temp_ >> 160) & type(uint32).max;\\n _tokenConfig[id_] = 0;\\n\\n // fetching & updating balance\\n temp_ = _ownerConfig[user_][0];\\n uint256 lastTokenIndex_ = (temp_ & type(uint32).max); // (lastTokenIndex_ = balanceOf)\\n _ownerConfig[user_][0] = (temp_ & ~uint256(type(uint32).max)) | (lastTokenIndex_ - 1);\\n\\n {\\n unchecked {\\n uint256 lastTokenWordIndex_ = (lastTokenIndex_ / 8);\\n uint256 lastTokenBitShift_ = (lastTokenIndex_ % 8) * 32;\\n temp_ = _ownerConfig[user_][lastTokenWordIndex_];\\n\\n // replace `id_` tokenId with `last` tokenId.\\n if (lastTokenIndex_ != tokenIndex_) {\\n uint256 wordIndex_ = (tokenIndex_ / 8);\\n uint256 bitShift_ = (tokenIndex_ % 8) * 32;\\n\\n // temp_ here is _ownerConfig[user_][lastTokenWordIndex_];\\n uint256 lastTokenId_ = uint256((temp_ >> lastTokenBitShift_) & type(uint32).max);\\n if (wordIndex_ == lastTokenWordIndex_) {\\n // this case, when lastToken and currentToken are in same slot.\\n // updating temp_ as we will remove the lastToken from this slot itself\\n temp_ = (temp_ & ~(uint256(type(uint32).max) << bitShift_)) | (lastTokenId_ << bitShift_);\\n } else {\\n _ownerConfig[user_][wordIndex_] =\\n (_ownerConfig[user_][wordIndex_] & ~(uint256(type(uint32).max) << bitShift_)) |\\n (lastTokenId_ << bitShift_);\\n }\\n _tokenConfig[lastTokenId_] =\\n (_tokenConfig[lastTokenId_] & ~(uint256(type(uint32).max) << 160)) |\\n (tokenIndex_ << 160);\\n }\\n\\n // temp_ here is _ownerConfig[user_][lastTokenWordIndex_];\\n _ownerConfig[user_][lastTokenWordIndex_] = temp_ & ~(uint256(type(uint32).max) << lastTokenBitShift_);\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to_, uint256 vaultId_) internal virtual returns (uint256 id_) {\\n\\n unchecked {\\n ++totalSupply;\\n }\\n\\n id_ = totalSupply;\\n if (id_ >= type(uint32).max || _tokenConfig[id_] != 0) revert FluidVaultError(ErrorTypes.ERC721__InvalidParams);\\n\\n _transfer(address(0), to_, id_, vaultId_);\\n\\n emit Transfer(address(0), to_, id_);\\n }\\n}\\n\\nabstract contract ERC721TokenReceiver {\\n function onERC721Received(address, address, uint256, bytes calldata) external virtual returns (bytes4) {\\n return ERC721TokenReceiver.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0xa85a97d1b058cc53712831b2a25cb200bbc1b0707fc9c9c2c27f5c5cce3b7ddf\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/vault/factory/main.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { Owned } from \\\"solmate/src/auth/Owned.sol\\\";\\nimport { ERC721 } from \\\"./ERC721/ERC721.sol\\\";\\nimport { ErrorTypes } from \\\"../errorTypes.sol\\\";\\n\\nimport { StorageRead } from \\\"../../../libraries/storageRead.sol\\\";\\n\\nabstract contract VaultFactoryVariables is Owned, ERC721, StorageRead {\\n /// @dev ERC721 tokens name\\n string internal constant ERC721_NAME = \\\"Fluid Vault\\\";\\n /// @dev ERC721 tokens symbol\\n string internal constant ERC721_SYMBOL = \\\"fVLT\\\";\\n\\n /*//////////////////////////////////////////////////////////////\\n STORAGE VARIABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n // ------------ storage variables from inherited contracts (Owned and ERC721) come before vars here --------\\n\\n // ----------------------- slot 0 ---------------------------\\n // address public owner; // from Owned\\n\\n // 12 bytes empty\\n\\n // ----------------------- slot 1 ---------------------------\\n // string public name;\\n\\n // ----------------------- slot 2 ---------------------------\\n // string public symbol;\\n\\n // ----------------------- slot 3 ---------------------------\\n // mapping(uint256 => uint256) internal _tokenConfig;\\n\\n // ----------------------- slot 4 ---------------------------\\n // mapping(address => mapping(uint256 => uint256)) internal _ownerConfig;\\n\\n // ----------------------- slot 5 ---------------------------\\n // uint256 public totalSupply;\\n\\n // ----------------------- slot 6 ---------------------------\\n // mapping(uint256 => address) public getApproved;\\n\\n // ----------------------- slot 7 ---------------------------\\n // mapping(address => mapping(address => bool)) public isApprovedForAll;\\n\\n // ----------------------- slot 8 ---------------------------\\n /// @dev deployer can deploy new Vault contract\\n /// owner can add/remove deployer.\\n /// Owner is deployer by default.\\n mapping(address => bool) internal _deployers;\\n\\n // ----------------------- slot 9 ---------------------------\\n /// @dev global auths can update any vault config.\\n /// owner can add/remove global auths.\\n /// Owner is global auth by default.\\n mapping(address => bool) internal _globalAuths;\\n\\n // ----------------------- slot 10 ---------------------------\\n /// @dev vault auths can update specific vault config.\\n /// owner can add/remove vault auths.\\n /// Owner is vault auth by default.\\n /// vault => auth => add/remove\\n mapping(address => mapping(address => bool)) internal _vaultAuths;\\n\\n // ----------------------- slot 11 ---------------------------\\n /// @dev total no of vaults deployed by the factory\\n /// only addresses that have deployer role or owner can deploy new vault.\\n uint256 internal _totalVaults;\\n\\n // ----------------------- slot 12 ---------------------------\\n /// @dev vault deployment logics for deploying vault\\n /// These logic contracts hold the deployment logics of specific vaults and are called via .delegatecall inside deployVault().\\n /// only addresses that have owner can add/remove new vault deployment logic.\\n mapping(address => bool) internal _vaultDeploymentLogics;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n constructor(address owner_) Owned(owner_) ERC721(ERC721_NAME, ERC721_SYMBOL) {}\\n}\\n\\nabstract contract VaultFactoryEvents {\\n /// @dev Emitted when a new vault is deployed.\\n /// @param vault The address of the newly deployed vault.\\n /// @param vaultId The id of the newly deployed vault.\\n event VaultDeployed(address indexed vault, uint256 indexed vaultId);\\n\\n /// @dev Emitted when a new token/position is minted by a vault.\\n /// @param vault The address of the vault that minted the token.\\n /// @param user The address of the user who received the minted token.\\n /// @param tokenId The ID of the newly minted token.\\n event NewPositionMinted(address indexed vault, address indexed user, uint256 indexed tokenId);\\n\\n /// @dev Emitted when the deployer is modified by owner.\\n /// @param deployer Address whose deployer status is updated.\\n /// @param allowed Indicates whether the address is authorized as a deployer or not.\\n event LogSetDeployer(address indexed deployer, bool indexed allowed);\\n\\n /// @dev Emitted when the globalAuth is modified by owner.\\n /// @param globalAuth Address whose globalAuth status is updated.\\n /// @param allowed Indicates whether the address is authorized as a deployer or not.\\n event LogSetGlobalAuth(address indexed globalAuth, bool indexed allowed);\\n\\n /// @dev Emitted when the vaultAuth is modified by owner.\\n /// @param vaultAuth Address whose vaultAuth status is updated.\\n /// @param allowed Indicates whether the address is authorized as a deployer or not.\\n /// @param vault Address of the specific vault related to the authorization change.\\n event LogSetVaultAuth(address indexed vaultAuth, bool indexed allowed, address indexed vault);\\n\\n /// @dev Emitted when the vault deployment logic is modified by owner.\\n /// @param vaultDeploymentLogic The address of the vault deployment logic contract.\\n /// @param allowed Indicates whether the address is authorized as a deployer or not.\\n event LogSetVaultDeploymentLogic(address indexed vaultDeploymentLogic, bool indexed allowed);\\n}\\n\\nabstract contract VaultFactoryCore is VaultFactoryVariables, VaultFactoryEvents {\\n constructor(address owner_) validAddress(owner_) VaultFactoryVariables(owner_) {}\\n\\n /// @dev validates that an address is not the zero address\\n modifier validAddress(address value_) {\\n if (value_ == address(0)) {\\n revert FluidVaultError(ErrorTypes.VaultFactory__InvalidParams);\\n }\\n _;\\n }\\n}\\n\\n/// @dev Implements Vault Factory auth-only callable methods. Owner / auths can set various config values and\\n/// can define the allow-listed deployers.\\nabstract contract VaultFactoryAuth is VaultFactoryCore {\\n /// @notice Sets an address (`deployer_`) as allowed deployer or not.\\n /// This function can only be called by the owner.\\n /// @param deployer_ The address to be set as deployer.\\n /// @param allowed_ A boolean indicating whether the specified address is allowed to deploy vaults.\\n function setDeployer(address deployer_, bool allowed_) external onlyOwner validAddress(deployer_) {\\n _deployers[deployer_] = allowed_;\\n\\n emit LogSetDeployer(deployer_, allowed_);\\n }\\n\\n /// @notice Sets an address (`globalAuth_`) as a global authorization or not.\\n /// This function can only be called by the owner.\\n /// @param globalAuth_ The address to be set as global authorization.\\n /// @param allowed_ A boolean indicating whether the specified address is allowed to update any vault config.\\n function setGlobalAuth(address globalAuth_, bool allowed_) external onlyOwner validAddress(globalAuth_) {\\n _globalAuths[globalAuth_] = allowed_;\\n\\n emit LogSetGlobalAuth(globalAuth_, allowed_);\\n }\\n\\n /// @notice Sets an address (`vaultAuth_`) as allowed vault authorization or not for a specific vault (`vault_`).\\n /// This function can only be called by the owner.\\n /// @param vault_ The address of the vault for which the authorization is being set.\\n /// @param vaultAuth_ The address to be set as vault authorization.\\n /// @param allowed_ A boolean indicating whether the specified address is allowed to update the specific vault config.\\n function setVaultAuth(\\n address vault_,\\n address vaultAuth_,\\n bool allowed_\\n ) external onlyOwner validAddress(vaultAuth_) {\\n _vaultAuths[vault_][vaultAuth_] = allowed_;\\n\\n emit LogSetVaultAuth(vaultAuth_, allowed_, vault_);\\n }\\n\\n /// @notice Sets an address as allowed vault deployment logic (`deploymentLogic_`) contract or not.\\n /// This function can only be called by the owner.\\n /// @param deploymentLogic_ The address of the vault deployment logic contract to be set.\\n /// @param allowed_ A boolean indicating whether the specified address is allowed to deploy new type of vault.\\n function setVaultDeploymentLogic(\\n address deploymentLogic_,\\n bool allowed_\\n ) public onlyOwner validAddress(deploymentLogic_) {\\n _vaultDeploymentLogics[deploymentLogic_] = allowed_;\\n\\n emit LogSetVaultDeploymentLogic(deploymentLogic_, allowed_);\\n }\\n\\n /// @notice Spell allows owner aka governance to do any arbitrary call on factory\\n /// @param target_ Address to which the call needs to be delegated\\n /// @param data_ Data to execute at the delegated address\\n function spell(address target_, bytes memory data_) external onlyOwner returns (bytes memory response_) {\\n assembly {\\n let succeeded := delegatecall(gas(), target_, add(data_, 0x20), mload(data_), 0, 0)\\n let size := returndatasize()\\n\\n response_ := mload(0x40)\\n mstore(0x40, add(response_, and(add(add(size, 0x20), 0x1f), not(0x1f))))\\n mstore(response_, size)\\n returndatacopy(add(response_, 0x20), 0, size)\\n\\n switch iszero(succeeded)\\n case 1 {\\n // throw if delegatecall failed\\n returndatacopy(0x00, 0x00, size)\\n revert(0x00, size)\\n }\\n }\\n }\\n\\n /// @notice Checks if the provided address (`deployer_`) is authorized as a deployer.\\n /// @param deployer_ The address to be checked for deployer authorization.\\n /// @return Returns `true` if the address is a deployer, otherwise `false`.\\n function isDeployer(address deployer_) public view returns (bool) {\\n return _deployers[deployer_] || owner == deployer_;\\n }\\n\\n /// @notice Checks if the provided address (`globalAuth_`) has global vault authorization privileges.\\n /// @param globalAuth_ The address to be checked for global authorization privileges.\\n /// @return Returns `true` if the given address has global authorization privileges, otherwise `false`.\\n function isGlobalAuth(address globalAuth_) public view returns (bool) {\\n return _globalAuths[globalAuth_] || owner == globalAuth_;\\n }\\n\\n /// @notice Checks if the provided address (`vaultAuth_`) has vault authorization privileges for the specified vault (`vault_`).\\n /// @param vault_ The address of the vault to check.\\n /// @param vaultAuth_ The address to be checked for vault authorization privileges.\\n /// @return Returns `true` if the given address has vault authorization privileges for the specified vault, otherwise `false`.\\n function isVaultAuth(address vault_, address vaultAuth_) public view returns (bool) {\\n return _vaultAuths[vault_][vaultAuth_] || owner == vaultAuth_;\\n }\\n\\n /// @notice Checks if the provided (`vaultDeploymentLogic_`) address has authorization for vault deployment.\\n /// @param vaultDeploymentLogic_ The address of the vault deploy logic to check for authorization privileges.\\n /// @return Returns `true` if the given address has authorization privileges for vault deployment, otherwise `false`.\\n function isVaultDeploymentLogic(address vaultDeploymentLogic_) public view returns (bool) {\\n return _vaultDeploymentLogics[vaultDeploymentLogic_];\\n }\\n}\\n\\n/// @dev implements VaultFactory deploy vault related methods.\\nabstract contract VaultFactoryDeployment is VaultFactoryCore, VaultFactoryAuth {\\n /// @dev Deploys a contract using the CREATE opcode with the provided bytecode (`bytecode_`).\\n /// This is an internal function, meant to be used within the contract to facilitate the deployment of other contracts.\\n /// @param bytecode_ The bytecode of the contract to be deployed.\\n /// @return address_ Returns the address of the deployed contract.\\n function _deploy(bytes memory bytecode_) internal returns (address address_) {\\n if (bytecode_.length == 0) {\\n revert FluidVaultError(ErrorTypes.VaultFactory__InvalidOperation);\\n }\\n /// @solidity memory-safe-assembly\\n assembly {\\n address_ := create(0, add(bytecode_, 0x20), mload(bytecode_))\\n }\\n if (address_ == address(0)) {\\n revert FluidVaultError(ErrorTypes.VaultFactory__InvalidOperation);\\n }\\n }\\n\\n /// @notice Deploys a new vault using the specified deployment logic `vaultDeploymentLogic_` and data `vaultDeploymentData_`.\\n /// Only accounts with deployer access or the owner can deploy a new vault.\\n /// @param vaultDeploymentLogic_ The address of the vault deployment logic contract.\\n /// @param vaultDeploymentData_ The data to be used for vault deployment.\\n /// @return vault_ Returns the address of the newly deployed vault.\\n function deployVault(\\n address vaultDeploymentLogic_,\\n bytes calldata vaultDeploymentData_\\n ) external returns (address vault_) {\\n // Revert if msg.sender doesn't have deployer access or is an owner.\\n if (!isDeployer(msg.sender)) revert FluidVaultError(ErrorTypes.VaultFactory__Unauthorized);\\n // Revert if vaultDeploymentLogic_ is not whitelisted.\\n if (!isVaultDeploymentLogic(vaultDeploymentLogic_))\\n revert FluidVaultError(ErrorTypes.VaultFactory__Unauthorized);\\n\\n // Vault ID for the new vault and also acts as `nonce` for CREATE\\n uint256 vaultId_ = ++_totalVaults;\\n\\n // compute vault address for vault id.\\n vault_ = getVaultAddress(vaultId_);\\n\\n // deploy the vault using vault deployment logic by making .delegatecall\\n (bool success_, bytes memory data_) = vaultDeploymentLogic_.delegatecall(vaultDeploymentData_);\\n\\n if (!(success_ && vault_ == _deploy(abi.decode(data_, (bytes))) && isVault(vault_))) {\\n revert FluidVaultError(ErrorTypes.VaultFactory__InvalidVaultAddress);\\n }\\n\\n emit VaultDeployed(vault_, vaultId_);\\n }\\n\\n /// @notice Computes the address of a vault based on its given ID (`vaultId_`).\\n /// @param vaultId_ The ID of the vault.\\n /// @return vault_ Returns the computed address of the vault.\\n function getVaultAddress(uint256 vaultId_) public view returns (address vault_) {\\n // @dev based on https://ethereum.stackexchange.com/a/61413\\n\\n // nonce of smart contract always starts with 1. so, with nonce 0 there won't be any deployment\\n // hence, nonce of vault deployment starts with 1.\\n bytes memory data;\\n if (vaultId_ == 0x00) {\\n return address(0);\\n } else if (vaultId_ <= 0x7f) {\\n data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), address(this), uint8(vaultId_));\\n } else if (vaultId_ <= 0xff) {\\n data = abi.encodePacked(bytes1(0xd7), bytes1(0x94), address(this), bytes1(0x81), uint8(vaultId_));\\n } else if (vaultId_ <= 0xffff) {\\n data = abi.encodePacked(bytes1(0xd8), bytes1(0x94), address(this), bytes1(0x82), uint16(vaultId_));\\n } else if (vaultId_ <= 0xffffff) {\\n data = abi.encodePacked(bytes1(0xd9), bytes1(0x94), address(this), bytes1(0x83), uint24(vaultId_));\\n } else {\\n data = abi.encodePacked(bytes1(0xda), bytes1(0x94), address(this), bytes1(0x84), uint32(vaultId_));\\n }\\n\\n return address(uint160(uint256(keccak256(data))));\\n }\\n\\n /// @notice Checks if a given address (`vault_`) corresponds to a valid vault.\\n /// @param vault_ The vault address to check.\\n /// @return Returns `true` if the given address corresponds to a valid vault, otherwise `false`.\\n function isVault(address vault_) public view returns (bool) {\\n if (vault_.code.length == 0) {\\n return false;\\n } else {\\n // VAULT_ID() function signature is 0x540acabc\\n (bool success_, bytes memory data_) = vault_.staticcall(hex\\\"540acabc\\\");\\n return success_ && vault_ == getVaultAddress(abi.decode(data_, (uint256)));\\n }\\n }\\n\\n /// @notice Returns the total number of vaults deployed by the factory.\\n /// @return Returns the total number of vaults.\\n function totalVaults() external view returns (uint256) {\\n return _totalVaults;\\n }\\n}\\n\\nabstract contract VaultFactoryERC721 is VaultFactoryCore, VaultFactoryDeployment {\\n /// @notice Mints a new ERC721 token for a specific vault (`vaultId_`) to a specified user (`user_`).\\n /// Only the corresponding vault is authorized to mint a token.\\n /// @param vaultId_ The ID of the vault that's minting the token.\\n /// @param user_ The address receiving the minted token.\\n /// @return tokenId_ The ID of the newly minted token.\\n function mint(uint256 vaultId_, address user_) external returns (uint256 tokenId_) {\\n if (msg.sender != getVaultAddress(vaultId_)) revert FluidVaultError(ErrorTypes.VaultFactory__InvalidVault);\\n\\n // Using _mint() instead of _safeMint() to allow any msg.sender to receive ERC721 without onERC721Received holder.\\n tokenId_ = _mint(user_, vaultId_);\\n\\n emit NewPositionMinted(msg.sender, user_, tokenId_);\\n }\\n\\n /// @notice Returns the URI of the specified token ID (`id_`).\\n /// In this implementation, an empty string is returned as no specific URI is defined.\\n /// @param id_ The ID of the token to query.\\n /// @return An empty string since no specific URI is defined in this implementation.\\n function tokenURI(uint256 id_) public view virtual override returns (string memory) {\\n return \\\"\\\";\\n }\\n}\\n\\n/// @title Fluid VaultFactory\\n/// @notice creates Fluid vault protocol vaults, which are interacting with Fluid Liquidity to deposit / borrow funds.\\n/// Vaults are created at a deterministic address, given an incrementing `vaultId` (see `getVaultAddress()`).\\n/// Vaults can only be deployed by allow-listed deployer addresses.\\n/// This factory also implements ERC721-Enumerable, the NFTs are used to represent created user positions. Only vaults\\n/// can mint new NFTs.\\n/// @dev Note the deployed vaults start out with no config at Liquidity contract.\\n/// This must be done by Liquidity auths in a separate step, otherwise no deposits will be possible.\\n/// This contract is not upgradeable. It supports adding new vault deployment logic contracts for new, future vaults.\\ncontract FluidVaultFactory is VaultFactoryCore, VaultFactoryAuth, VaultFactoryDeployment, VaultFactoryERC721 {\\n constructor(address owner_) VaultFactoryCore(owner_) {}\\n}\\n\",\"keccak256\":\"0xb2bec95656d24d5c88cc63ce1463b65c66fdba11814f5cbe3fd177eaedb1ee78\",\"license\":\"BUSL-1.1\"},\"solmate/src/auth/Owned.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Simple single owner authorization mixin.\\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)\\nabstract contract Owned {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event OwnershipTransferred(address indexed user, address indexed newOwner);\\n\\n /*//////////////////////////////////////////////////////////////\\n OWNERSHIP STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n address public owner;\\n\\n modifier onlyOwner() virtual {\\n require(msg.sender == owner, \\\"UNAUTHORIZED\\\");\\n\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(address _owner) {\\n owner = _owner;\\n\\n emit OwnershipTransferred(address(0), _owner);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n OWNERSHIP LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n owner = newOwner;\\n\\n emit OwnershipTransferred(msg.sender, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xfedb27d14c508342c33eb067c9a02eabcdb0f9dcf93b04ded1001f580d12d0ea\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b5060405162002ea838038062002ea883398101604081905262000034916200011d565b604080518082018252600b81526a119b1d5a590815985d5b1d60aa1b6020808301919091528251808401845260048152631995931560e21b91810191909152600080546001600160a01b0319166001600160a01b0386169081178255935185948594939285927f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001620000ce8382620001f4565b506002620000dd8282620001f4565b50839250506001600160a01b038216905062000114576040516330090e6560e11b8152617534600482015260240160405180910390fd5b505050620002c0565b6000602082840312156200013057600080fd5b81516001600160a01b03811681146200014857600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200017a57607f821691505b6020821081036200019b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001ef57600081815260208120601f850160051c81016020861015620001ca5750805b601f850160051c820191505b81811015620001eb57828155600101620001d6565b5050505b505050565b81516001600160401b038111156200021057620002106200014f565b620002288162000221845462000165565b84620001a1565b602080601f831160018114620002605760008415620002475750858301515b600019600386901b1c1916600185901b178555620001eb565b600085815260208120601f198616915b82811015620002915788860151825594840194600190910190840162000270565b5085821015620002b05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612bd880620002d06000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80637faa1d211161012a578063a34b5ee8116100bd578063c87b56dd1161008c578063e6bd26a211610071578063e6bd26a2146104d9578063e985e9c5146104ec578063f2fde38b1461051a57600080fd5b8063c87b56dd146104a5578063e04c8e5d146104c657600080fd5b8063a34b5ee81461045a578063b5c736e41461046d578063b88d4fde1461047f578063c7acb01f1461049257600080fd5b806394bf804d116100f957806394bf804d1461041957806395d89b411461042c578063968cbade14610434578063a22cb4651461044757600080fd5b80637faa1d21146103cb5780638d654023146103de5780638da5cb5b146103e65780638f2db95d1461040657600080fd5b80632f745c59116101a257806350c358a41161017157806350c358a41461037f5780636352211e14610392578063652b9b41146103a557806370a08231146103b857600080fd5b80632f745c591461033357806342842e0e146103465780634502d063146103595780634f6ccce71461036c57600080fd5b8063095ea7b3116101de578063095ea7b3146102bd57806317e7681c146102d057806318160ddd1461030957806323b872dd1461032057600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d57806308a892d9146102a8575b600080fd5b61022361021e366004612489565b61052d565b60405190151581526020015b60405180910390f35b61024061065e565b60405161022f9190612514565b61028361025b366004612527565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161022f565b6102bb6102b6366004612574565b6106ec565b005b6102bb6102cb3660046125a7565b610844565b6102236102de3660046125d1565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205460ff1690565b61031260055481565b60405190815260200161022f565b6102bb61032e3660046125ec565b610962565b6103126103413660046125a7565b610b17565b6102bb6103543660046125ec565b610bd1565b6102236103673660046125d1565b610d0f565b61031261037a366004612527565b610d60565b61022361038d3660046125d1565b610dac565b6102836103a0366004612527565b610dfd565b6102236103b33660046125d1565b610e62565b6103126103c63660046125d1565b610f70565b6102bb6103d9366004612628565b610ffd565b600b54610312565b6000546102839073ffffffffffffffffffffffffffffffffffffffff1681565b6102bb610414366004612574565b611164565b61031261042736600461266b565b6112b7565b610240611382565b6102836104423660046126d7565b61138f565b6102bb610455366004612574565b6115b2565b6102bb610468366004612574565b611649565b61031261047b366004612527565b5490565b6102bb61048d36600461272a565b61179c565b6102406104a036600461285d565b6118ca565b6102406104b3366004612527565b5060408051602081019091526000815290565b6102236104d43660046128ee565b611998565b6102836104e7366004612527565b6119fc565b6102236104fa3660046128ee565b600760209081526000928352604080842090915290825290205460ff1681565b6102bb6105283660046125d1565b611e5f565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806105c057507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061060c57507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061065857507f780e9d63000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6001805461066b90612918565b80601f016020809104026020016040519081016040528092919081815260200182805461069790612918565b80156106e45780601f106106b9576101008083540402835291602001916106e4565b820191906000526020600020905b8154815290600101906020018083116106c757829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610772576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff81166107c4576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600c602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f6e71f281df08e5962589123c1ca39a8c9df25c6c9cfa7b6d1525effed3dafd2191a3505050565b6000818152600360205260409020543373ffffffffffffffffffffffffffffffffffffffff821614806108a7575073ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832033845290915290205460ff165b6108e1576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d026004820152602401610769565b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff848116908216146109c7576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b3373ffffffffffffffffffffffffffffffffffffffff85161480610a1b575073ffffffffffffffffffffffffffffffffffffffff8416600090815260076020908152604080832033845290915290205460ff165b80610a49575060008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b610a83576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d026004820152602401610769565b610a9984848460c085901c63ffffffff16611f50565b60008281526006602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905551839173ffffffffffffffffffffffffffffffffffffffff86811692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a450505050565b6000610b2283610f70565b8210610b5e576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d056004820152602401610769565b610b6982600161299a565b915063ffffffff610b7b6008846129dc565b610b869060206129f0565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260046020526040812090610bb7600887612a07565b815260200190815260200160002054901c16905092915050565b610bdc838383610962565b73ffffffffffffffffffffffffffffffffffffffff82163b1580610cd057506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac9190612a1b565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610d0a576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d046004820152602401610769565b505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205460ff168061065857505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b60006005548210610da1576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d056004820152602401610769565b61065882600161299a565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602052604081205460ff168061065857505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff8116610e5d576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b919050565b60008173ffffffffffffffffffffffffffffffffffffffff163b600003610e8b57506000919050565b6000808373ffffffffffffffffffffffffffffffffffffffff16604051610ed5907f540acabc00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610f10576040519150601f19603f3d011682016040523d82523d6000602084013e610f15565b606091505b5091509150818015610f685750610f39818060200190518101906104e79190612a38565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216610fc3576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b5073ffffffffffffffffffffffffffffffffffffffff16600090815260046020908152604080832083805290915290205463ffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b8173ffffffffffffffffffffffffffffffffffffffff81166110d0576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff8481166000818152600a602090815260408083209488168084529490915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001687151590811790915590519293909290917f7aee16d2c366535c2577e873699b458af55a0b0bd4c4fab5e930a780f05669d791a450505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b8173ffffffffffffffffffffffffffffffffffffffff8116611237576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff831660008181526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f0a1c6cd77aa2e405e482adf6ee6cf190a27682b6dd1234403f7602e5203c83bb91a3505050565b60006112c2836119fc565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461132a576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175356004820152602401610769565b6113348284612139565b604051909150819073ffffffffffffffffffffffffffffffffffffffff84169033907ffcc2278353c4cc5d54b742d7eee2d4a7abc22e4dc6213340088293860d502b5190600090a492915050565b6002805461066b90612918565b600061139a33610dac565b6113d4576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175326004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600c602052604090205460ff16611437576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175326004820152602401610769565b6000600b6000815461144890612a51565b91829055509050611458816119fc565b91506000808673ffffffffffffffffffffffffffffffffffffffff168686604051611484929190612a89565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b509150915081801561151c57506114ed818060200190518101906114e89190612a99565b6121f7565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b801561152c575061152c84610e62565b611566576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175366004820152602401610769565b604051839073ffffffffffffffffffffffffffffffffffffffff8616907efa89a51ae01c150bfde909191818194382d30b43b645428ed6a71f1955107390600090a35050509392505050565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b8173ffffffffffffffffffffffffffffffffffffffff811661171c576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff831660008181526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f48cc5b4660fae22eabe5e803ee595e63572773d114bcd54ecc118c1efa8d75af91a3505050565b6117a7858585610962565b73ffffffffffffffffffffffffffffffffffffffff84163b158061188957506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff86169063150b7a02906118229033908a90899089908990600401612b10565b6020604051808303816000875af1158015611841573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118659190612a1b565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b6118c3576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d046004820152602401610769565b5050505050565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461194e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b600080835160208501865af43d6040519250601f19601f6020830101168301604052808352806000602085013e81156001810361198f57816000803e816000fd5b50505092915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600a6020908152604080832093851683529290529081205460ff16806119f5575060005473ffffffffffffffffffffffffffffffffffffffff8381169116145b9392505050565b6000606082600003611a115750600092915050565b607f8311611ad9576040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b16602282015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660368201526037015b6040516020818303038152906040529050611e51565b60ff8311611bb5576040517fd70000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f8100000000000000000000000000000000000000000000000000000000000000603682015260f884901b7fff00000000000000000000000000000000000000000000000000000000000000166037820152603801611ac3565b61ffff8311611c92576040517fd80000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f820000000000000000000000000000000000000000000000000000000000000060368201527fffff00000000000000000000000000000000000000000000000000000000000060f085901b166037820152603901611ac3565b62ffffff8311611d70576040517fd90000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f830000000000000000000000000000000000000000000000000000000000000060368201527fffffff000000000000000000000000000000000000000000000000000000000060e885901b166037820152603a01611ac3565b6040517fda0000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f840000000000000000000000000000000000000000000000000000000000000060368201527fffffffff0000000000000000000000000000000000000000000000000000000060e085901b166037820152603b0160405160208183030381529060405290505b805160209091012092915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ee0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b73ffffffffffffffffffffffffffffffffffffffff8316611fa1576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d036004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff841661205b5773ffffffffffffffffffffffffffffffffffffffff83166000818152600460209081526040808320838052808352818420805488865260038552838620600163ffffffff83160160a081901b90981760c08a901b1790557fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000168617905560088504845282529091208054600790931690910284901b9091179055612133565b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612133576120988483612294565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600460209081526040808320838052808352818420805488865260038552838620600163ffffffff83160160a081901b90981760c08a901b1790557fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000168617905560088504845282529091208054600790931690910284901b90911790555b50505050565b600580546001019081905563ffffffff81101580612164575060008181526003602052604090205415155b1561219f576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b6121ac6000848385611f50565b604051819073ffffffffffffffffffffffffffffffffffffffff8516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a492915050565b60008151600003612238576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175316004820152602401610769565b8151602083016000f0905073ffffffffffffffffffffffffffffffffffffffff8116610e5d576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175316004820152602401610769565b600081815260036020908152604080832080549084905573ffffffffffffffffffffffffffffffffffffffff8616845260048352818420848052909252909120549060a01c63ffffffff9081169082166122ef600182612b8f565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260046020908152604080832083805282528083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009790971693909317909555600883048082529190205493600783160283831461241357600884046020600786160286831c63ffffffff168483036123945763ffffffff821b199790971687821b17966123d6565b73ffffffffffffffffffffffffffffffffffffffff8a1660009081526004602090815260408083208684529091529020805463ffffffff841b191682841b1790555b600090815260036020526040902080547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff1660a088901b17905550505b73ffffffffffffffffffffffffffffffffffffffff90961660009081526004602090815260408083209383529290522063ffffffff90951b1992909216909355505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461248657600080fd5b50565b60006020828403121561249b57600080fd5b81356119f581612458565b60005b838110156124c15781810151838201526020016124a9565b50506000910152565b600081518084526124e28160208601602086016124a6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006119f560208301846124ca565b60006020828403121561253957600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e5d57600080fd5b80358015158114610e5d57600080fd5b6000806040838503121561258757600080fd5b61259083612540565b915061259e60208401612564565b90509250929050565b600080604083850312156125ba57600080fd5b6125c383612540565b946020939093013593505050565b6000602082840312156125e357600080fd5b6119f582612540565b60008060006060848603121561260157600080fd5b61260a84612540565b925061261860208501612540565b9150604084013590509250925092565b60008060006060848603121561263d57600080fd5b61264684612540565b925061265460208501612540565b915061266260408501612564565b90509250925092565b6000806040838503121561267e57600080fd5b8235915061259e60208401612540565b60008083601f8401126126a057600080fd5b50813567ffffffffffffffff8111156126b857600080fd5b6020830191508360208285010111156126d057600080fd5b9250929050565b6000806000604084860312156126ec57600080fd5b6126f584612540565b9250602084013567ffffffffffffffff81111561271157600080fd5b61271d8682870161268e565b9497909650939450505050565b60008060008060006080868803121561274257600080fd5b61274b86612540565b945061275960208701612540565b935060408601359250606086013567ffffffffffffffff81111561277c57600080fd5b6127888882890161268e565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561280f5761280f612799565b604052919050565b600067ffffffffffffffff82111561283157612831612799565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000806040838503121561287057600080fd5b61287983612540565b9150602083013567ffffffffffffffff81111561289557600080fd5b8301601f810185136128a657600080fd5b80356128b96128b482612817565b6127c8565b8181528660208385010111156128ce57600080fd5b816020840160208301376000602083830101528093505050509250929050565b6000806040838503121561290157600080fd5b61290a83612540565b915061259e60208401612540565b600181811c9082168061292c57607f821691505b602082108103612965577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156106585761065861296b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826129eb576129eb6129ad565b500690565b80820281158282048414176106585761065861296b565b600082612a1657612a166129ad565b500490565b600060208284031215612a2d57600080fd5b81516119f581612458565b600060208284031215612a4a57600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8257612a8261296b565b5060010190565b8183823760009101908152919050565b600060208284031215612aab57600080fd5b815167ffffffffffffffff811115612ac257600080fd5b8201601f81018413612ad357600080fd5b8051612ae16128b482612817565b818152856020838501011115612af657600080fd5b612b078260208301602086016124a6565b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011683010190509695505050505050565b818103818111156106585761065861296b56fea2646970667358221220e8bb1399bdae8c2e8b5a12c38f6d4d678260ca807614968cd3519512187a96a064736f6c63430008150033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061020b5760003560e01c80637faa1d211161012a578063a34b5ee8116100bd578063c87b56dd1161008c578063e6bd26a211610071578063e6bd26a2146104d9578063e985e9c5146104ec578063f2fde38b1461051a57600080fd5b8063c87b56dd146104a5578063e04c8e5d146104c657600080fd5b8063a34b5ee81461045a578063b5c736e41461046d578063b88d4fde1461047f578063c7acb01f1461049257600080fd5b806394bf804d116100f957806394bf804d1461041957806395d89b411461042c578063968cbade14610434578063a22cb4651461044757600080fd5b80637faa1d21146103cb5780638d654023146103de5780638da5cb5b146103e65780638f2db95d1461040657600080fd5b80632f745c59116101a257806350c358a41161017157806350c358a41461037f5780636352211e14610392578063652b9b41146103a557806370a08231146103b857600080fd5b80632f745c591461033357806342842e0e146103465780634502d063146103595780634f6ccce71461036c57600080fd5b8063095ea7b3116101de578063095ea7b3146102bd57806317e7681c146102d057806318160ddd1461030957806323b872dd1461032057600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d57806308a892d9146102a8575b600080fd5b61022361021e366004612489565b61052d565b60405190151581526020015b60405180910390f35b61024061065e565b60405161022f9190612514565b61028361025b366004612527565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161022f565b6102bb6102b6366004612574565b6106ec565b005b6102bb6102cb3660046125a7565b610844565b6102236102de3660046125d1565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205460ff1690565b61031260055481565b60405190815260200161022f565b6102bb61032e3660046125ec565b610962565b6103126103413660046125a7565b610b17565b6102bb6103543660046125ec565b610bd1565b6102236103673660046125d1565b610d0f565b61031261037a366004612527565b610d60565b61022361038d3660046125d1565b610dac565b6102836103a0366004612527565b610dfd565b6102236103b33660046125d1565b610e62565b6103126103c63660046125d1565b610f70565b6102bb6103d9366004612628565b610ffd565b600b54610312565b6000546102839073ffffffffffffffffffffffffffffffffffffffff1681565b6102bb610414366004612574565b611164565b61031261042736600461266b565b6112b7565b610240611382565b6102836104423660046126d7565b61138f565b6102bb610455366004612574565b6115b2565b6102bb610468366004612574565b611649565b61031261047b366004612527565b5490565b6102bb61048d36600461272a565b61179c565b6102406104a036600461285d565b6118ca565b6102406104b3366004612527565b5060408051602081019091526000815290565b6102236104d43660046128ee565b611998565b6102836104e7366004612527565b6119fc565b6102236104fa3660046128ee565b600760209081526000928352604080842090915290825290205460ff1681565b6102bb6105283660046125d1565b611e5f565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806105c057507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061060c57507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061065857507f780e9d63000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6001805461066b90612918565b80601f016020809104026020016040519081016040528092919081815260200182805461069790612918565b80156106e45780601f106106b9576101008083540402835291602001916106e4565b820191906000526020600020905b8154815290600101906020018083116106c757829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610772576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff81166107c4576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600c602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f6e71f281df08e5962589123c1ca39a8c9df25c6c9cfa7b6d1525effed3dafd2191a3505050565b6000818152600360205260409020543373ffffffffffffffffffffffffffffffffffffffff821614806108a7575073ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832033845290915290205460ff165b6108e1576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d026004820152602401610769565b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff848116908216146109c7576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b3373ffffffffffffffffffffffffffffffffffffffff85161480610a1b575073ffffffffffffffffffffffffffffffffffffffff8416600090815260076020908152604080832033845290915290205460ff165b80610a49575060008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b610a83576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d026004820152602401610769565b610a9984848460c085901c63ffffffff16611f50565b60008281526006602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905551839173ffffffffffffffffffffffffffffffffffffffff86811692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a450505050565b6000610b2283610f70565b8210610b5e576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d056004820152602401610769565b610b6982600161299a565b915063ffffffff610b7b6008846129dc565b610b869060206129f0565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260046020526040812090610bb7600887612a07565b815260200190815260200160002054901c16905092915050565b610bdc838383610962565b73ffffffffffffffffffffffffffffffffffffffff82163b1580610cd057506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac9190612a1b565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610d0a576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d046004820152602401610769565b505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205460ff168061065857505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b60006005548210610da1576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d056004820152602401610769565b61065882600161299a565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602052604081205460ff168061065857505060005473ffffffffffffffffffffffffffffffffffffffff91821691161490565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff8116610e5d576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b919050565b60008173ffffffffffffffffffffffffffffffffffffffff163b600003610e8b57506000919050565b6000808373ffffffffffffffffffffffffffffffffffffffff16604051610ed5907f540acabc00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610f10576040519150601f19603f3d011682016040523d82523d6000602084013e610f15565b606091505b5091509150818015610f685750610f39818060200190518101906104e79190612a38565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216610fc3576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b5073ffffffffffffffffffffffffffffffffffffffff16600090815260046020908152604080832083805290915290205463ffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b8173ffffffffffffffffffffffffffffffffffffffff81166110d0576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff8481166000818152600a602090815260408083209488168084529490915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001687151590811790915590519293909290917f7aee16d2c366535c2577e873699b458af55a0b0bd4c4fab5e930a780f05669d791a450505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b8173ffffffffffffffffffffffffffffffffffffffff8116611237576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff831660008181526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f0a1c6cd77aa2e405e482adf6ee6cf190a27682b6dd1234403f7602e5203c83bb91a3505050565b60006112c2836119fc565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461132a576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175356004820152602401610769565b6113348284612139565b604051909150819073ffffffffffffffffffffffffffffffffffffffff84169033907ffcc2278353c4cc5d54b742d7eee2d4a7abc22e4dc6213340088293860d502b5190600090a492915050565b6002805461066b90612918565b600061139a33610dac565b6113d4576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175326004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600c602052604090205460ff16611437576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175326004820152602401610769565b6000600b6000815461144890612a51565b91829055509050611458816119fc565b91506000808673ffffffffffffffffffffffffffffffffffffffff168686604051611484929190612a89565b600060405180830381855af49150503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b509150915081801561151c57506114ed818060200190518101906114e89190612a99565b6121f7565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b801561152c575061152c84610e62565b611566576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175366004820152602401610769565b604051839073ffffffffffffffffffffffffffffffffffffffff8616907efa89a51ae01c150bfde909191818194382d30b43b645428ed6a71f1955107390600090a35050509392505050565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b8173ffffffffffffffffffffffffffffffffffffffff811661171c576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175346004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff831660008181526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519092917f48cc5b4660fae22eabe5e803ee595e63572773d114bcd54ecc118c1efa8d75af91a3505050565b6117a7858585610962565b73ffffffffffffffffffffffffffffffffffffffff84163b158061188957506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff86169063150b7a02906118229033908a90899089908990600401612b10565b6020604051808303816000875af1158015611841573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118659190612a1b565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b6118c3576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d046004820152602401610769565b5050505050565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461194e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b600080835160208501865af43d6040519250601f19601f6020830101168301604052808352806000602085013e81156001810361198f57816000803e816000fd5b50505092915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600a6020908152604080832093851683529290529081205460ff16806119f5575060005473ffffffffffffffffffffffffffffffffffffffff8381169116145b9392505050565b6000606082600003611a115750600092915050565b607f8311611ad9576040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b16602282015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660368201526037015b6040516020818303038152906040529050611e51565b60ff8311611bb5576040517fd70000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f8100000000000000000000000000000000000000000000000000000000000000603682015260f884901b7fff00000000000000000000000000000000000000000000000000000000000000166037820152603801611ac3565b61ffff8311611c92576040517fd80000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f820000000000000000000000000000000000000000000000000000000000000060368201527fffff00000000000000000000000000000000000000000000000000000000000060f085901b166037820152603901611ac3565b62ffffff8311611d70576040517fd90000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f830000000000000000000000000000000000000000000000000000000000000060368201527fffffff000000000000000000000000000000000000000000000000000000000060e885901b166037820152603a01611ac3565b6040517fda0000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f840000000000000000000000000000000000000000000000000000000000000060368201527fffffffff0000000000000000000000000000000000000000000000000000000060e085901b166037820152603b0160405160208183030381529060405290505b805160209091012092915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ee0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610769565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b73ffffffffffffffffffffffffffffffffffffffff8316611fa1576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d036004820152602401610769565b73ffffffffffffffffffffffffffffffffffffffff841661205b5773ffffffffffffffffffffffffffffffffffffffff83166000818152600460209081526040808320838052808352818420805488865260038552838620600163ffffffff83160160a081901b90981760c08a901b1790557fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000168617905560088504845282529091208054600790931690910284901b9091179055612133565b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612133576120988483612294565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600460209081526040808320838052808352818420805488865260038552838620600163ffffffff83160160a081901b90981760c08a901b1790557fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000168617905560088504845282529091208054600790931690910284901b90911790555b50505050565b600580546001019081905563ffffffff81101580612164575060008181526003602052604090205415155b1561219f576040517f60121cca000000000000000000000000000000000000000000000000000000008152617d016004820152602401610769565b6121ac6000848385611f50565b604051819073ffffffffffffffffffffffffffffffffffffffff8516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a492915050565b60008151600003612238576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175316004820152602401610769565b8151602083016000f0905073ffffffffffffffffffffffffffffffffffffffff8116610e5d576040517f60121cca0000000000000000000000000000000000000000000000000000000081526175316004820152602401610769565b600081815260036020908152604080832080549084905573ffffffffffffffffffffffffffffffffffffffff8616845260048352818420848052909252909120549060a01c63ffffffff9081169082166122ef600182612b8f565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260046020908152604080832083805282528083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009790971693909317909555600883048082529190205493600783160283831461241357600884046020600786160286831c63ffffffff168483036123945763ffffffff821b199790971687821b17966123d6565b73ffffffffffffffffffffffffffffffffffffffff8a1660009081526004602090815260408083208684529091529020805463ffffffff841b191682841b1790555b600090815260036020526040902080547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff1660a088901b17905550505b73ffffffffffffffffffffffffffffffffffffffff90961660009081526004602090815260408083209383529290522063ffffffff90951b1992909216909355505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461248657600080fd5b50565b60006020828403121561249b57600080fd5b81356119f581612458565b60005b838110156124c15781810151838201526020016124a9565b50506000910152565b600081518084526124e28160208601602086016124a6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006119f560208301846124ca565b60006020828403121561253957600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e5d57600080fd5b80358015158114610e5d57600080fd5b6000806040838503121561258757600080fd5b61259083612540565b915061259e60208401612564565b90509250929050565b600080604083850312156125ba57600080fd5b6125c383612540565b946020939093013593505050565b6000602082840312156125e357600080fd5b6119f582612540565b60008060006060848603121561260157600080fd5b61260a84612540565b925061261860208501612540565b9150604084013590509250925092565b60008060006060848603121561263d57600080fd5b61264684612540565b925061265460208501612540565b915061266260408501612564565b90509250925092565b6000806040838503121561267e57600080fd5b8235915061259e60208401612540565b60008083601f8401126126a057600080fd5b50813567ffffffffffffffff8111156126b857600080fd5b6020830191508360208285010111156126d057600080fd5b9250929050565b6000806000604084860312156126ec57600080fd5b6126f584612540565b9250602084013567ffffffffffffffff81111561271157600080fd5b61271d8682870161268e565b9497909650939450505050565b60008060008060006080868803121561274257600080fd5b61274b86612540565b945061275960208701612540565b935060408601359250606086013567ffffffffffffffff81111561277c57600080fd5b6127888882890161268e565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561280f5761280f612799565b604052919050565b600067ffffffffffffffff82111561283157612831612799565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000806040838503121561287057600080fd5b61287983612540565b9150602083013567ffffffffffffffff81111561289557600080fd5b8301601f810185136128a657600080fd5b80356128b96128b482612817565b6127c8565b8181528660208385010111156128ce57600080fd5b816020840160208301376000602083830101528093505050509250929050565b6000806040838503121561290157600080fd5b61290a83612540565b915061259e60208401612540565b600181811c9082168061292c57607f821691505b602082108103612965577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156106585761065861296b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826129eb576129eb6129ad565b500690565b80820281158282048414176106585761065861296b565b600082612a1657612a166129ad565b500490565b600060208284031215612a2d57600080fd5b81516119f581612458565b600060208284031215612a4a57600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8257612a8261296b565b5060010190565b8183823760009101908152919050565b600060208284031215612aab57600080fd5b815167ffffffffffffffff811115612ac257600080fd5b8201601f81018413612ad357600080fd5b8051612ae16128b482612817565b818152856020838501011115612af657600080fd5b612b078260208301602086016124a6565b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011683010190509695505050505050565b818103818111156106585761065861296b56fea2646970667358221220e8bb1399bdae8c2e8b5a12c38f6d4d678260ca807614968cd3519512187a96a064736f6c63430008150033",
"devdoc": {
"details": "Note the deployed vaults start out with no config at Liquidity contract. This must be done by Liquidity auths in a separate step, otherwise no deposits will be possible. This contract is not upgradeable. It supports adding new vault deployment logic contracts for new, future vaults.",
"events": {
"LogSetDeployer(address,bool)": {
"details": "Emitted when the deployer is modified by owner.",
"params": {
"allowed": "Indicates whether the address is authorized as a deployer or not.",
"deployer": "Address whose deployer status is updated."
}
},
"LogSetGlobalAuth(address,bool)": {
"details": "Emitted when the globalAuth is modified by owner.",
"params": {
"allowed": "Indicates whether the address is authorized as a deployer or not.",
"globalAuth": "Address whose globalAuth status is updated."
}
},
"LogSetVaultAuth(address,bool,address)": {
"details": "Emitted when the vaultAuth is modified by owner.",
"params": {
"allowed": "Indicates whether the address is authorized as a deployer or not.",
"vault": "Address of the specific vault related to the authorization change.",
"vaultAuth": "Address whose vaultAuth status is updated."
}
},
"LogSetVaultDeploymentLogic(address,bool)": {
"details": "Emitted when the vault deployment logic is modified by owner.",
"params": {
"allowed": "Indicates whether the address is authorized as a deployer or not.",
"vaultDeploymentLogic": "The address of the vault deployment logic contract."
}
},
"NewPositionMinted(address,address,uint256)": {
"details": "Emitted when a new token/position is minted by a vault.",
"params": {
"tokenId": "The ID of the newly minted token.",
"user": "The address of the user who received the minted token.",
"vault": "The address of the vault that minted the token."
}
},
"VaultDeployed(address,uint256)": {
"details": "Emitted when a new vault is deployed.",
"params": {
"vault": "The address of the newly deployed vault.",
"vaultId": "The id of the newly deployed vault."
}
}
},
"kind": "dev",
"methods": {
"deployVault(address,bytes)": {
"params": {
"vaultDeploymentData_": "The data to be used for vault deployment.",
"vaultDeploymentLogic_": "The address of the vault deployment logic contract."
},
"returns": {
"vault_": " Returns the address of the newly deployed vault."
}
},
"getVaultAddress(uint256)": {
"params": {
"vaultId_": "The ID of the vault."
},
"returns": {
"vault_": " Returns the computed address of the vault."
}
},
"isDeployer(address)": {
"params": {
"deployer_": "The address to be checked for deployer authorization."
},
"returns": {
"_0": "Returns `true` if the address is a deployer, otherwise `false`."
}
},
"isGlobalAuth(address)": {
"params": {
"globalAuth_": "The address to be checked for global authorization privileges."
},
"returns": {
"_0": "Returns `true` if the given address has global authorization privileges, otherwise `false`."
}
},
"isVault(address)": {
"params": {
"vault_": "The vault address to check."
},
"returns": {
"_0": "Returns `true` if the given address corresponds to a valid vault, otherwise `false`."
}
},
"isVaultAuth(address,address)": {
"params": {
"vaultAuth_": "The address to be checked for vault authorization privileges.",
"vault_": "The address of the vault to check."
},
"returns": {
"_0": "Returns `true` if the given address has vault authorization privileges for the specified vault, otherwise `false`."
}
},
"isVaultDeploymentLogic(address)": {
"params": {
"vaultDeploymentLogic_": "The address of the vault deploy logic to check for authorization privileges."
},
"returns": {
"_0": "Returns `true` if the given address has authorization privileges for vault deployment, otherwise `false`."
}
},
"mint(uint256,address)": {
"params": {
"user_": "The address receiving the minted token.",
"vaultId_": "The ID of the vault that's minting the token."
},
"returns": {
"tokenId_": " The ID of the newly minted token."
}
},
"setDeployer(address,bool)": {
"params": {
"allowed_": "A boolean indicating whether the specified address is allowed to deploy vaults.",
"deployer_": "The address to be set as deployer."
}
},
"setGlobalAuth(address,bool)": {
"params": {
"allowed_": "A boolean indicating whether the specified address is allowed to update any vault config.",
"globalAuth_": "The address to be set as global authorization."
}
},
"setVaultAuth(address,address,bool)": {
"params": {
"allowed_": "A boolean indicating whether the specified address is allowed to update the specific vault config.",
"vaultAuth_": "The address to be set as vault authorization.",
"vault_": "The address of the vault for which the authorization is being set."
}
},
"setVaultDeploymentLogic(address,bool)": {
"params": {
"allowed_": "A boolean indicating whether the specified address is allowed to deploy new type of vault.",
"deploymentLogic_": "The address of the vault deployment logic contract to be set."
}
},
"spell(address,bytes)": {
"params": {
"data_": "Data to execute at the delegated address",
"target_": "Address to which the call needs to be delegated"
}
},
"tokenURI(uint256)": {
"params": {
"id_": "The ID of the token to query."
},
"returns": {
"_0": "An empty string since no specific URI is defined in this implementation."
}
},
"totalVaults()": {
"returns": {
"_0": "Returns the total number of vaults."
}
}
},
"title": "Fluid VaultFactory",
"version": 1
},
"userdoc": {
"errors": {
"FluidLiquidateResult(uint256,uint256)": [
{
"notice": "used to simulate liquidation to find the maximum liquidatable amounts"
}
]
},
"kind": "user",
"methods": {
"approve(address,uint256)": {
"notice": "approves an NFT with `id_` to be spent (transferred) by `spender_`"
},
"balanceOf(address)": {
"notice": "returns total count of NFTs owned by `owner_`"
},
"deployVault(address,bytes)": {
"notice": "Deploys a new vault using the specified deployment logic `vaultDeploymentLogic_` and data `vaultDeploymentData_`. Only accounts with deployer access or the owner can deploy a new vault."
},
"getApproved(uint256)": {
"notice": "trackes if a NFT id is approved for a certain address."
},
"getVaultAddress(uint256)": {
"notice": "Computes the address of a vault based on its given ID (`vaultId_`)."
},
"isApprovedForAll(address,address)": {
"notice": "trackes if all the NFTs of an owner are approved for a certain other address."
},
"isDeployer(address)": {
"notice": "Checks if the provided address (`deployer_`) is authorized as a deployer."
},
"isGlobalAuth(address)": {
"notice": "Checks if the provided address (`globalAuth_`) has global vault authorization privileges."
},
"isVault(address)": {
"notice": "Checks if a given address (`vault_`) corresponds to a valid vault."
},
"isVaultAuth(address,address)": {
"notice": "Checks if the provided address (`vaultAuth_`) has vault authorization privileges for the specified vault (`vault_`)."
},
"isVaultDeploymentLogic(address)": {
"notice": "Checks if the provided (`vaultDeploymentLogic_`) address has authorization for vault deployment."
},
"mint(uint256,address)": {
"notice": "Mints a new ERC721 token for a specific vault (`vaultId_`) to a specified user (`user_`). Only the corresponding vault is authorized to mint a token."
},
"ownerOf(uint256)": {
"notice": "returns `owner_` of NFT with `id_`"
},
"safeTransferFrom(address,address,uint256)": {
"notice": "transfers an NFT with `id_` `from_` address `to_` address"
},
"safeTransferFrom(address,address,uint256,bytes)": {
"notice": "transfers an NFT with `id_` `from_` address `to_` address, passing `data_` to `onERC721Received` callback"
},
"setApprovalForAll(address,bool)": {
"notice": "approves all NFTs owned by msg.sender to be spent (transferred) by `operator_`"
},
"setDeployer(address,bool)": {
"notice": "Sets an address (`deployer_`) as allowed deployer or not. This function can only be called by the owner."
},
"setGlobalAuth(address,bool)": {
"notice": "Sets an address (`globalAuth_`) as a global authorization or not. This function can only be called by the owner."
},
"setVaultAuth(address,address,bool)": {
"notice": "Sets an address (`vaultAuth_`) as allowed vault authorization or not for a specific vault (`vault_`). This function can only be called by the owner."
},
"setVaultDeploymentLogic(address,bool)": {
"notice": "Sets an address as allowed vault deployment logic (`deploymentLogic_`) contract or not. This function can only be called by the owner."
},
"spell(address,bytes)": {
"notice": "Spell allows owner aka governance to do any arbitrary call on factory"
},
"tokenByIndex(uint256)": {
"notice": "Returns a token ID at a given `index_` of all the tokens stored by the contract. Use along with {totalSupply} to enumerate all tokens."
},
"tokenOfOwnerByIndex(address,uint256)": {
"notice": "Returns a token ID owned by `owner_` at a given `index_` of its token list. Use along with {balanceOf} to enumerate all of `owner_`'s tokens."
},
"tokenURI(uint256)": {
"notice": "Returns the URI of the specified token ID (`id_`). In this implementation, an empty string is returned as no specific URI is defined."
},
"totalSupply()": {
"notice": "total amount of tokens stored by the contract."
},
"totalVaults()": {
"notice": "Returns the total number of vaults deployed by the factory."
},
"transferFrom(address,address,uint256)": {
"notice": "transfers an NFT with `id_` `from_` address `to_` address without safe check"
}
},
"notice": "creates Fluid vault protocol vaults, which are interacting with Fluid Liquidity to deposit / borrow funds. Vaults are created at a deterministic address, given an incrementing `vaultId` (see `getVaultAddress()`). Vaults can only be deployed by allow-listed deployer addresses. This factory also implements ERC721-Enumerable, the NFTs are used to represent created user positions. Only vaults can mint new NFTs.",
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 35941,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 23133,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "name",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 23135,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "symbol",
"offset": 0,
"slot": "2",
"type": "t_string_storage"
},
{
"astId": 23146,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_tokenConfig",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_uint256,t_uint256)"
},
{
"astId": 23152,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_ownerConfig",
"offset": 0,
"slot": "4",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 23220,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "totalSupply",
"offset": 0,
"slot": "5",
"type": "t_uint256"
},
{
"astId": 23225,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "getApproved",
"offset": 0,
"slot": "6",
"type": "t_mapping(t_uint256,t_address)"
},
{
"astId": 23232,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "isApprovedForAll",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
},
{
"astId": 24435,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_deployers",
"offset": 0,
"slot": "8",
"type": "t_mapping(t_address,t_bool)"
},
{
"astId": 24440,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_globalAuths",
"offset": 0,
"slot": "9",
"type": "t_mapping(t_address,t_bool)"
},
{
"astId": 24447,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_vaultAuths",
"offset": 0,
"slot": "10",
"type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
},
{
"astId": 24450,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_totalVaults",
"offset": 0,
"slot": "11",
"type": "t_uint256"
},
{
"astId": 24455,
"contract": "contracts/protocols/vault/factory/main.sol:FluidVaultFactory",
"label": "_vaultDeploymentLogics",
"offset": 0,
"slot": "12",
"type": "t_mapping(t_address,t_bool)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_mapping(t_address,t_bool)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_address,t_mapping(t_address,t_bool))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(address => bool))",
"numberOfBytes": "32",
"value": "t_mapping(t_address,t_bool)"
},
"t_mapping(t_address,t_mapping(t_uint256,t_uint256))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(uint256 => uint256))",
"numberOfBytes": "32",
"value": "t_mapping(t_uint256,t_uint256)"
},
"t_mapping(t_uint256,t_address)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => address)",
"numberOfBytes": "32",
"value": "t_address"
},
"t_mapping(t_uint256,t_uint256)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}