UNPKG

@vporton/future-contracts

Version:

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

1,194 lines 291 kB
{ "contractName": "BidOnAddresses", "abi": [ { "inputs": [ { "internalType": "string", "name": "_uri", "type": "string" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "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": "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": "CustomerRegistered", "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": "uint64", "name": "oracleId", "type": "uint64" }, { "indexed": true, "internalType": "uint256", "name": "condition", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "numerator", "type": "uint256" } ], "name": "ReportedNumerator", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "oracleId", "type": "uint64" }, { "indexed": true, "internalType": "uint64[]", "name": "conditions", "type": "uint64[]" }, { "indexed": false, "internalType": "uint256[]", "name": "numerators", "type": "uint256[]" } ], "name": "ReportedNumeratorsBatch", "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": "uint64", "name": "_oracleId", "type": "uint64" } ], "name": "finishOracle", "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": "_oracleId", "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": "uint64", "name": "_oracleId", "type": "uint64" } ], "name": "payoutDenominator", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint256", "name": "_condition", "type": "uint256" } ], "name": "payoutNumerator", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint256", "name": "_condition", "type": "uint256" }, { "internalType": "uint256", "name": "_numerator", "type": "uint256" } ], "name": "reportNumerator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_oracleId", "type": "uint64" }, { "internalType": "uint64[]", "name": "_conditions", "type": "uint64[]" }, { "internalType": "uint256[]", "name": "_numerators", "type": "uint256[]" } ], "name": "reportNumeratorsBatch", "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": "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" }, { "inputs": [ { "internalType": "address", "name": "_customer", "type": "address" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "registerCustomer", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_uri\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"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\":\"CustomerRegistered\",\"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\":\"uint64\",\"name\":\"oracleId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"condition\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"}],\"name\":\"ReportedNumerator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"oracleId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64[]\",\"name\":\"conditions\",\"type\":\"uint64[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"numerators\",\"type\":\"uint256[]\"}],\"name\":\"ReportedNumeratorsBatch\",\"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\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"}],\"name\":\"finishOracle\",\"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\":\"_oracleId\",\"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\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"}],\"name\":\"payoutDenominator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"_condition\",\"type\":\"uint256\"}],\"name\":\"payoutNumerator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_customer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"registerCustomer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"_condition\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"}],\"name\":\"reportNumerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_oracleId\",\"type\":\"uint64\"},{\"internalType\":\"uint64[]\",\"name\":\"_conditions\",\"type\":\"uint64[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_numerators\",\"type\":\"uint256[]\"}],\"name\":\"reportNumeratorsBatch\",\"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\":\"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\",\"events\":{\"CustomerRegistered(address,address,uint256,bytes)\":{\"params\":{\"customer\":\"The customer address.\",\"data\":\"Additional data.\",\"sender\":\"`msg.sender`.\"}}},\"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\":\"The ERC-1155 token 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.\"}},\"finishOracle(uint64)\":{\"params\":{\"_oracleId\":\"The oracle ID. You should set grace period end time before calling this method.\"}},\"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.\"}},\"isOracleFinished(uint64)\":{\"params\":{\"_oracleId\":\"The oracle ID.\"},\"returns\":{\"_0\":\"`true` if it has finished.\"}},\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`.\"},\"oracleOwner(uint64)\":{\"params\":{\"_oracleId\":\"The oracle ID.\"}},\"payoutDenominator(uint64)\":{\"params\":{\"_oracleId\":\"The oracle ID. The result can't change if the oracle has finished.\"}},\"payoutNumerator(uint64,uint256)\":{\"params\":{\"_condition\":\"The condition (the original receiver of a conditional token). The result can't change if the oracle has finished.\",\"_oracleId\":\"The oracle ID.\"}},\"registerCustomer(address,bytes)\":{\"params\":{\"_customer\":\"The address of the customer.\",\"_data\":\"Additional data.\"}},\"reportNumerator(uint64,uint256,uint256)\":{\"params\":{\"_condition\":\"The condition.\",\"_numerator\":\"The relative score of the condition. Note: We could make oracles easily verificable by a hash of all the data, but - It may need allowing to set a numerator only once. - It may be not necessary because future technology will allow to aggregate blockchains.\",\"_oracleId\":\"The oracle ID.\"}},\"reportNumeratorsBatch(uint64,uint64[],uint256[])\":{\"params\":{\"_conditions\":\"The conditions.\",\"_numerators\":\"The relative scores of the condition.\",\"_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\":\"Bidding on Ethereum addresses\",\"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.\"},\"CustomerRegistered(address,address,uint256,bytes)\":{\"notice\":\"Customer registered.\"},\"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.\"},\"ReportedNumerator(uint64,uint256,uint256)\":{\"notice\":\"A condition score was stored in the chain by an oracle.\"},\"ReportedNumeratorsBatch(uint64,uint64[],uint256[])\":{\"notice\":\"Some condition scores were stored in the chain by an oracle.\"}},\"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.\"},\"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.\"},\"finishOracle(uint64)\":{\"notice\":\"Need to be called after all numerators were reported.\"},\"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\":\"Check if an oracle has finished.\"},\"oracleOwner(uint64)\":{\"notice\":\"Get the oracle owner.\"},\"payoutDenominator(uint64)\":{\"notice\":\"Retrieve the last stored payout denominator (the sum of all numerators of the oracle).\"},\"payoutNumerator(uint64,uint256)\":{\"n