UNPKG

@vporton/future-contracts

Version:

Ethereum accounts bid on future financing (essentially, transfer money from the future) - smart contracts

990 lines 1.41 MB
{ "contractName": "BaseLock", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "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": "contract IERC1155", "name": "contractAddress", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "collateralTokenId", "type": "uint256" }, { "indexed": true, "internalType": "uint64", "name": "oracleId", "type": "uint64" }, { "indexed": false, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "CollateralWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", "name": "customer", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "condition", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "ConditionCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "contract IERC1155", "name": "collateralContractAddress", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "collateralTokenId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "DonateCollateral", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "uint64", "name": "oracleId", "type": "uint64" } ], "name": "OracleCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "oracleId", "type": "uint64" } ], "name": "OracleFinished", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "oracleOwner", "type": "address" }, { "indexed": true, "internalType": "uint64", "name": "oracleId", "type": "uint64" } ], "name": "OracleOwnerChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "values", "type": "uint256[]" } ], "name": "TransferBatch", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "TransferSingle", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "value", "type": "string" }, { "indexed": true, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "URI", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "accounts", "type": "address[]" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" } ], "name": "balanceOfBatch", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "conditionOwners", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "lastCollateralBalanceFirstRoundMap", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "lastCollateralBalanceSecondRoundMap", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxConditionId", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxOracleId", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "onERC1155BatchReceived", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "onERC1155Received", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "onERC721Received", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "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": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "uri", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "name": "usersWithdrewInFirstRound", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_newOracleOwner", "type": "address" }, { "internalType": "uint64", "name": "_oracleId", "type": "uint64" } ], "name": "changeOracleOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint256", "name": "_time", "type": "uint256" } ], "name": "updateGracePeriodEnds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IERC1155", "name": "_collateralContractAddress", "type": "address" }, { "internalType": "uint256", "name": "_collateralTokenId", "type": "uint256" }, { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "donate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IERC1155", "name": "_collateralContractAddress", "type": "address" }, { "internalType": "uint256", "name": "_collateralTokenId", "type": "uint256" }, { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "gatherDeFiProfit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IERC1155", "name": "_collateralContractAddress", "type": "address" }, { "internalType": "uint256", "name": "_collateralTokenId", "type": "uint256" }, { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint256", "name": "_condition", "type": "uint256" }, { "internalType": "address", "name": "_user", "type": "address" } ], "name": "collateralOwing", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IERC1155", "name": "_collateralContractAddress", "type": "address" }, { "internalType": "uint256", "name": "_collateralTokenId", "type": "uint256" }, { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint256", "name": "_condition", "type": "uint256" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "withdrawCollateral", "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": "uint256", "name": "_value", "type": "uint256" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_values", "type": "uint256[]" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "safeBatchTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_oracleId", "type": "uint64" } ], "name": "oracleOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "name": "isOracleFinished", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "uint256", "name": "_condition", "type": "uint256" } ], "name": "isConditionalLocked", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_oracleId", "type": "uint64" } ], "name": "gracePeriodEnd", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"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\":\"contract IERC1155\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"collateralTokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"oracleId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CollateralWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"customer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"condition\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConditionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC1155\",\"name\":\"collateralContractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"collateralTokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DonateCollateral\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"oracleId\",\"type\":\"uint64\"}],\"name\":\"OracleCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"oracleId\",\"type\":\"uint64\"}],\"name\":\"OracleFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracleOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"oracleId\",\"type\":\"uint64\"}],\"name\":\"OracleOwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOracleOwner\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"}],\"name\":\"changeOracleOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"_collateralContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"_condition\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"collateralOwing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"conditionOwners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"_collateralContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"donate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"_collateralContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"gatherDeFiProfit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"}],\"name\":\"gracePeriodEnd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_condition\",\"type\":\"uint256\"}],\"name\":\"isConditionalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"isOracleFinished\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastCollateralBalanceFirstRoundMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastCollateralBalanceSecondRoundMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConditionId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxOracleId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"}],\"name\":\"oracleOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"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\":\"uint256\",\"name\":\"_value\",\"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\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"_time\",\"type\":\"uint256\"}],\"name\":\"updateGracePeriodEnds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"usersWithdrewInFirstRound\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"_collateralContractAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_collateralTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"_condition\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"withdrawCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Victor Porton One can also donate/bequest a smart wallet (explain how). We have two kinds of ERC-1155 token IDs: - conditional tokens: numbers < 2**64 - a combination of a collateral contract address and collateral token ID (a counter of donated amount of collateral tokens, don't confuse with collateral tokens themselves) Inheriting from here don't forget to create `createOracle()` external method.\",\"events\":{\"CollateralWithdrawn(address,uint256,uint64,address,uint256)\":{\"params\":{\"amount\":\"The amount withdrawn.\",\"collateralTokenId\":\"The ERC-1155 token ID of the collateral.\",\"contractAddress\":\"The ERC-1155 contract of the collateral token.\",\"oracleId\":\"The oracle ID for which withdrawal is done.\",\"user\":\"Who has withdrawn.\"}},\"ConditionCreated(address,address,uint256,bytes)\":{\"params\":{\"condition\":\"The created condition ID.\",\"customer\":\"The owner of the condition.\",\"sender\":\"Who created the condition\"}},\"DonateCollateral(address,uint256,address,uint256,address,bytes)\":{\"params\":{\"amount\":\"The amount donated.\",\"collateralContractAddress\":\"The ERC-1155 contract of the donated token.\",\"collateralTokenId\":\"The ERC-1155 ID of the donated token.\",\"data\":\"Additional transaction data.\",\"sender\":\"Who donated.\",\"to\":\"Whose account the donation is assigned to.\"}},\"OracleCreated(address,uint64)\":{\"params\":{\"oracleId\":\"The ID of the created oracle.\"}},\"OracleFinished(uint64)\":{\"params\":{\"oracleId\":\"The oracle ID.\"}},\"OracleOwnerChanged(address,uint64)\":{\"params\":{\"oracleId\":\"The ID of the oracle.\",\"oracleOwner\":\"Who created an oracle\"}}},\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address.\"},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"changeOracleOwner(address,uint64)\":{\"params\":{\"_newOracleOwner\":\"New owner.\",\"_oracleId\":\"The oracle whose owner to change.\"}},\"collateralOwing(address,uint256,uint64,uint256,address)\":{\"params\":{\"_collateralContractAddress\":\"The ERC-1155 collateral token contract.\",\"_collateralTokenId\":\"The ERC-1155 collateral token ID.\",\"_condition\":\"The condition (the original receiver of a conditional token).\",\"_oracleId\":\"From which oracle's \\\"account\\\" to withdraw.\",\"_user\":\"The user to which we may owe.\"}},\"constructor\":{\"params\":{\"_uri\":\"Our ERC-1155 tokens description URI.\"}},\"donate(address,uint256,uint64,uint256,address,address,bytes)\":{\"params\":{\"_amount\":\"The amount to donate.\",\"_collateralContractAddress\":\"The collateral ERC-1155 contract address.\",\"_collateralTokenId\":\"The collateral ERC-1155 token ID.\",\"_data\":\"Additional transaction data.\",\"_from\":\"From whom to take the donation.\",\"_oracleId\":\"The oracle ID to whose ecosystem to donate to.\",\"_to\":\"On whose account the donation amount is assigned.\"}},\"gatherDeFiProfit(address,uint256,uint64,bytes)\":{\"params\":{\"_collateralContractAddress\":\"The collateral ERC-1155 contract address.\",\"_collateralTokenId\":\"The collateral ERC-1155 token ID.\",\"_data\":\"Additional transaction data.\",\"_oracleId\":\"The oracle ID to whose ecosystem to donate to.\"}},\"gracePeriodEnd(uint64)\":{\"params\":{\"_oracleId\":\"For which oracle.\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"isConditionalLocked(address,uint256)\":{\"params\":{\"_condition\":\"The condition (the original receiver of a conditional token).\",\"_user\":\"Querying if locked for this user.\"}},\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`.\"},\"oracleOwner(uint64)\":{\"params\":{\"_oracleId\":\"The oracle ID.\"}},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"totalSupply(uint256)\":{\"params\":{\"id\":\"Token ID.\"},\"returns\":{\"_0\":\"Total supply.\"}},\"uri(uint256)\":{\"details\":\"See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\\\{id\\\\}` substring with the actual token type ID.\"},\"withdrawCollateral(address,uint256,uint64,uint256,bytes)\":{\"params\":{\"_collateralContractAddress\":\"The ERC-1155 collateral token contract.\",\"_collateralTokenId\":\"The ERC-1155 collateral token ID.\",\"_condition\":\"The condition.\",\"_data\":\"Additional data. Notes: - It is made impossible to withdraw somebody's other collateral, as otherwise we can't mark non-active accounts in grace period. - We can't transfer to somebody other than `msg.sender` because anybody can transfer (needed for multi-level transfers). - After this function is called, it becomes impossible to transfer the corresponding conditional token of `msg.sender` (to prevent its repeated withdrawal).\",\"_oracleId\":\"From which oracle's \\\"account\\\" to withdraw.\"}}},\"title\":\"A base class to lock collaterals and distribute them proportional to an oracle result.\",\"version\":1},\"userdoc\":{\"events\":{\"CollateralWithdrawn(address,uint256,uint64,address,uint256)\":{\"notice\":\"Emitted when collateral is withdrawn.\"},\"ConditionCreated(address,address,uint256,bytes)\":{\"notice\":\"Emitted when an oracle owner is set.\"},\"DonateCollateral(address,uint256,address,uint256,address,bytes)\":{\"notice\":\"Emitted when a collateral is donated.\"},\"OracleCreated(address,uint64)\":{\"notice\":\"Emitted when an oracle is created.\"},\"OracleFinished(uint64)\":{\"notice\":\"Emitted when an oracle is marked as having finished its work.\"},\"OracleOwnerChanged(address,uint64)\":{\"notice\":\"Emitted when an oracle owner is set.\"}},\"kind\":\"user\",\"methods\":{\"changeOracleOwner(address,uint64)\":{\"notice\":\"Modify the owner of an oracle.\"},\"collateralOwing(address,uint256,uint64,uint256,address)\":{\"notice\":\"Calculate how much collateral is owed to a user.\"},\"constructor\":{\"notice\":\"Constructor.\"},\"donate(address,uint256,uint64,uint256,address,address,bytes)\":{\"notice\":\"Donate funds in an ERC-1155 token. First, the collateral token need to be approved to be spent by this contract from the address `_from`. It also mints a token (with a different ID), that counts donations in that token.\"},\"gatherDeFiProfit(address,uint256,uint64,bytes)\":{\"notice\":\"Gather a DeFi profit of a token previous donated to this contact.\"},\"gracePeriodEnd(uint64)\":{\"notice\":\"Retrieve the end of the grace period.\"},\"isConditionalLocked(address,uint256)\":{\"notice\":\"Are transfers of a conditinal token locked? This is used to prevent its repeated withdrawal.\"},\"isOracleFinished(uint64)\":{\"notice\":\"Is the oracle marked as having finished its work? `oracleId` is the oracle ID.\"},\"oracleOwner(uint64)\":{\"notice\":\"Get the oracle owner.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"notice\":\"An ERC-1155 function. We disallow transfers of conditional tokens after redeem `_to` prevent \\\"gathering\\\" them before redeeming each oracle.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"notice\":\"An ERC-1155 function. We disallow transfers of conditional tokens after redeem `_to` prevent \\\"gathering\\\" them before redeeming each oracle.\"},\"totalSupply(uint256)\":{\"notice\":\"Total supply of a token (conforms to `IERC1155Views`).\"},\"updateGracePeriodEnds(uint64,uint256)\":{\"notice\":\"Set the end time of the grace period. The first withdrawal can be done *only* during the grace period. The second withdrawal can be done after the end of the grace period and only if the first withdrawal was done. The intention of the grace period is to check which of users are active (\\\"alive\\\").\"},\"usersWithdrewInFirstRound(uint64)\":{\"notice\":\"Mapping (oracleId => amount user withdrew in first round) (see `docs/Calculations.md`).\"},\"withdrawCollateral(address,uint256,uint64,uint256,bytes)\":{\"notice\":\"Transfer to `msg.sender` the collateral ERC-1155 token. The amount transferred is proportional to the score of `_condition` by the oracle.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/user/Projects/future-contracts/contracts/BaseLock.sol\":\"BaseLock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/user/Projects/future-contracts/contracts/BaseLock.sol\":{\"keccak256\":\"0x477edfd8178110507dd44a101ec4d45bd82e073a8441c30062a9ca3cc3742184\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://0188608bd813e9e1de9472d2c71264fa24655ec646cc59be93d56a648fab1c6c\",\"dweb:/ipfs/QmdERM9oNEvHgmes3AWG8zAyx4ueAFKtXGsegAfXUKryDW\"]},\"/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155.sol\":{\"keccak256\":\"0x7dcdf324fd4d2dec68846958865ae833956cb4ad80cd83cf6f107e7c33500bf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5cddf52afd931cbf983100a0415f04e6646aa90d100fd91437d2a75e3b241206\",\"dweb:/ipfs/QmXXJ2qoC1rSsKdg5s87m3BPQ3RFGw2rNrNv7KygzGJ9zQ\"]},\"/home/user/Projects/future-contracts/contracts/ERC1155/ERC1155WithTotals.sol\":{\"keccak256\":\"0x1d5fcf7a70d6f5dcd4ddf25caece633a9b4d17154fb98b5fc9a5ae4600b2db15\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://9638d138ecec5f7f6651cf690295fdaaa99023d58555360fa801ace5cac88a9d\",\"dweb:/ipfs/QmUWf56QEe5uSfpHB7inMUGzufNZSxyu8aszLzoYMZHMYf\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xd6b90e604fb2eb2d641c7110c72440bf2dc999ec6ab8ff60f200e71ca75d1d90\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7b92d8ab83b21ff984b1f0d6d66897d5afb1f2052004cbcb133cea023e0ae468\",\"dweb:/ipfs/QmTarypkQrFp4UMjTh7Zzhz2nZLz5uPS4nJQtHDEuwBVe6\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x3b21f2c8d626de3b9925ae33e972d8bf5c8b1bffb3f4ee94daeed7d0679036e6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f8d45329fecbf0836ad7543330c3ecd0f8d0ffa42d4016278c3eb2215fdcdfe\",\"dweb:/ipfs/QmXWLT7GcnHtA5NiD6MFi2CV3EWJY4wv5mLNnypqYDrxL3\"]},\"@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol\":{\"keccak256\":\"0x21428ca879b2437107322dfc1e214d25ecd6b966344961025ee412c3acfd5fc0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9747c875899d05823aede28b60ca8d3719b8c28018f397521c4ffb05041e1ac5\",\"dweb:/ipfs/QmQEQ4jJYEGFNfcngfZ3gPkcrcWYWKbo1Bq2F57scJxbmE\"]},\"@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol\":{\"keccak256\":\"0xfce008c2ddf19a62e29e056fdddfa10204b19417ae0f711913703e4ee9dec92c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://37a7bb9249c0e8aaecd0c6f33fae7f03d15aebb015f5f7f1face393cfd58d75b\",\"dweb:/ipfs/QmevqbHb43sTLnpWzrGW9WvWvktMzuP5EzYHhqZox2A5v3\"]},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x61321d2c86346045bf394885ee3afeecc65f9daad2694bc19110967588fd7b5d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1703b877203e0447ede72dcf73f1c4f2089b415bd1c44877904128a64fafed5b\",\"dweb:/ipfs/QmaZoYDo2FWtKcwCc9zuabU6zri8KV9xJrhU614d93sLid\"]},\"@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol\":{\"keccak256\":\"0xd918cca1b659f588a6d12d05fd7196179a8b1eac9133d7f77da7ef3133e13256\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c75d578f42e2e2e427b934e6c41cc759be2d0a52155868308e915328c8feb2b\",\"dweb:/ipfs/QmbFNHtWAoNhe82Hy6yKTePWJRczqzp1APSBfLS9XfAN6e\"]},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"keccak256\":\"0x2690a9b7f4f7489b8d25a4fc6bffc02ec3971fb41ed6c8b59adef2833bdab07c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8148c99452b6793ac9599abdc8bdaf4eeb47f34590beea8aa01089be14e2990c\",\"dweb:/ipfs/QmNdenmZ4EDfH9TuBas3pHeGuZvDNo2rsfgUj6ka8vuH37\"]},\"@openzeppelin/contracts/token/ERC721/ERC721Holder.sol\":{\"keccak256\":\"0xdb2133d55b8f3a94313af8f4371ae0501a58e412d471b03d8581214c5ea2ce33\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cea1e4bf769f27c8c9c1442f1518b49ef6c8b71a4bd4ce88353da9e9a8ba1704\",\"dweb:/ipfs/QmR1b8sj7fxgeHqDksV4GYTjZS1qajWC3yg9VCMUJus2bF\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada84513617b7c1b2f890b44503735abaec73a1acd030112a17aac7e6c66a4a1\",\"dweb:/ipfs/QmaiFwdio67iJrfjAdkMac24eJ5sS1qD7CZW6PhUU6KjiK\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xa6a15ddddcbf29d2922a1e0d4151b5d2d33da24b93cc9ebc12390e0d855532f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c119bcaecfa853d564ac88d312777f75fa1126a3bca88a3371adb0ad9f35cb0\",\"dweb:/ipfs/QmY9UPuXeSKq86Zh38fE43VGQPhKMN34mkuFSFqPcr6nvZ\"]},\"abdk-libraries-solidity/ABDKMath64x64.sol\":{\"keccak256\":\"0x67609bc0923563d05d3a8a7c681056f9702a92120777cb0bcbb40d0afbb4a015\",\"license\":\"BSD-4-Clause\",\"urls\":[\"bzz-raw://55e817969394d4e0201a8cd3763ad6776bc9fddc986febe9b4acf120e8b7ad0d\",\"dweb:/ipfs/QmNMve5ZjUfA8DJYic4sYTrDEAN6VyxcC7jWUTX25Wmnnp\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\npragma solidity ^0.7.1;\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport { ABDKMath64x64 } from \"abdk-libraries-solidity/ABDKMath64x64.sol\";\nimport { ERC1155WithTotals } from \"./ERC1155/ERC1155WithTotals.sol\";\nimport { ERC1155Holder } from \"@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol\";\nimport { IERC1155 } from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport { ERC721Holder } from \"@openzeppelin/contracts/token/ERC721/ERC721Holder.sol\";\n\n/// @title A base class to lock collaterals and distribute them proportional to an oracle result.\n/// @author Victor Porton\n///\n/// One can also donate/bequest a smart wallet (explain how).\n///\n/// We have two kinds of ERC-1155 token IDs:\n/// - conditional tokens: numbers < 2**64\n/// - a combination of a collateral contract address and collateral token ID\n/// (a counter of donated amount of collateral tokens, don't confuse with collateral tokens themselves)\n///\n/// Inheriting from here don't forget to create `cr