UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,506 lines 128 kB
{ "_format": "hh-sol-artifact-1", "contractName": "WitnetOracleTrustableDefault", "sourceName": "contracts/core/defaults/WitnetOracleTrustableDefault.sol", "abi": [ { "inputs": [ { "internalType": "contract WitnetRequestFactory", "name": "_factory", "type": "address" }, { "internalType": "contract WitnetRequestBytecodes", "name": "_registry", "type": "address" }, { "internalType": "bool", "name": "_upgradable", "type": "bool" }, { "internalType": "bytes32", "name": "_versionTag", "type": "bytes32" }, { "internalType": "uint256", "name": "_reportResultGasBase", "type": "uint256" }, { "internalType": "uint256", "name": "_reportResultWithCallbackGasBase", "type": "uint256" }, { "internalType": "uint256", "name": "_reportResultWithCallbackRevertGasBase", "type": "uint256" }, { "internalType": "uint256", "name": "_sstoreFromZeroGas", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "EmptyBuffer", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "index", "type": "uint256" }, { "internalType": "uint256", "name": "range", "type": "uint256" } ], "name": "IndexOutOfBounds", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "length", "type": "uint256" } ], "name": "InvalidLengthEncoding", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [], "name": "ReentrancyGuardReentrantCall", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "read", "type": "uint256" }, { "internalType": "uint256", "name": "expected", "type": "uint256" } ], "name": "UnexpectedMajorType", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "unexpected", "type": "uint256" } ], "name": "UnsupportedMajorType", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "queryId", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "reason", "type": "string" } ], "name": "BatchReportError", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferStarted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Received", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address[]", "name": "reporters", "type": "address[]" } ], "name": "ReportersSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address[]", "name": "reporters", "type": "address[]" } ], "name": "ReportersUnset", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "baseAddr", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "baseCodehash", "type": "bytes32" }, { "indexed": false, "internalType": "string", "name": "versionTag", "type": "string" } ], "name": "Upgraded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "evmReward", "type": "uint256" }, { "components": [ { "internalType": "uint8", "name": "committeeSize", "type": "uint8" }, { "internalType": "uint64", "name": "witnessingFeeNanoWit", "type": "uint64" } ], "indexed": false, "internalType": "struct WitnetV2.RadonSLA", "name": "witnetSLA", "type": "tuple" } ], "name": "WitnetQuery", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "evmGasPrice", "type": "uint256" } ], "name": "WitnetQueryResponse", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "evmGasPrice", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "evmCallbackGas", "type": "uint256" } ], "name": "WitnetQueryResponseDelivered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" }, { "indexed": false, "internalType": "uint256", "name": "evmGasPrice", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "evmCallbackActualGas", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "evmCallbackRevertReason", "type": "string" } ], "name": "WitnetQueryResponseDeliveryFailed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "evmReward", "type": "uint256" } ], "name": "WitnetQueryRewardUpgraded", "type": "event" }, { "stateMutability": "nonpayable", "type": "fallback" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "base", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "channel", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "class", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "codehash", "outputs": [ { "internalType": "bytes32", "name": "_codehash", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currency", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deployer", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_gasPrice", "type": "uint256" }, { "internalType": "uint16", "name": "_resultMaxSize", "type": "uint16" } ], "name": "estimateBaseFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "gasPrice", "type": "uint256" }, { "internalType": "bytes32", "name": "radHash", "type": "bytes32" } ], "name": "estimateBaseFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_gasPrice", "type": "uint256" }, { "internalType": "uint24", "name": "_callbackGasLimit", "type": "uint24" } ], "name": "estimateBaseFeeWithCallback", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_witnetQueryIds", "type": "uint256[]" }, { "internalType": "bytes", "name": "", "type": "bytes" }, { "internalType": "uint256", "name": "_txGasPrice", "type": "uint256" }, { "internalType": "uint256", "name": "_nanoWitPrice", "type": "uint256" } ], "name": "estimateReportEarnings", "outputs": [ { "internalType": "uint256", "name": "_revenues", "type": "uint256" }, { "internalType": "uint256", "name": "_expenses", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_queryIds", "type": "uint256[]" } ], "name": "extractWitnetDataRequests", "outputs": [ { "internalType": "bytes[]", "name": "_bytecodes", "type": "bytes[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "contract WitnetRequestFactory", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "fetchQueryResponse", "outputs": [ { "components": [ { "internalType": "address", "name": "reporter", "type": "address" }, { "internalType": "uint64", "name": "finality", "type": "uint64" }, { "internalType": "uint32", "name": "resultTimestamp", "type": "uint32" }, { "internalType": "bytes32", "name": "resultTallyHash", "type": "bytes32" }, { "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" } ], "internalType": "struct WitnetV2.Response", "name": "_response", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getNextQueryId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQuery", "outputs": [ { "components": [ { "components": [ { "internalType": "address", "name": "requester", "type": "address" }, { "internalType": "uint24", "name": "gasCallback", "type": "uint24" }, { "internalType": "uint72", "name": "evmReward", "type": "uint72" }, { "internalType": "bytes", "name": "witnetBytecode", "type": "bytes" }, { "internalType": "bytes32", "name": "witnetRAD", "type": "bytes32" }, { "components": [ { "internalType": "uint8", "name": "committeeSize", "type": "uint8" }, { "internalType": "uint64", "name": "witnessingFeeNanoWit", "type": "uint64" } ], "internalType": "struct WitnetV2.RadonSLA", "name": "witnetSLA", "type": "tuple" } ], "internalType": "struct WitnetV2.Request", "name": "request", "type": "tuple" }, { "components": [ { "internalType": "address", "name": "reporter", "type": "address" }, { "internalType": "uint64", "name": "finality", "type": "uint64" }, { "internalType": "uint32", "name": "resultTimestamp", "type": "uint32" }, { "internalType": "bytes32", "name": "resultTallyHash", "type": "bytes32" }, { "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" } ], "internalType": "struct WitnetV2.Response", "name": "response", "type": "tuple" } ], "internalType": "struct WitnetV2.Query", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryEvmReward", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryRequest", "outputs": [ { "components": [ { "internalType": "address", "name": "requester", "type": "address" }, { "internalType": "uint24", "name": "gasCallback", "type": "uint24" }, { "internalType": "uint72", "name": "evmReward", "type": "uint72" }, { "internalType": "bytes", "name": "witnetBytecode", "type": "bytes" }, { "internalType": "bytes32", "name": "witnetRAD", "type": "bytes32" }, { "components": [ { "internalType": "uint8", "name": "committeeSize", "type": "uint8" }, { "internalType": "uint64", "name": "witnessingFeeNanoWit", "type": "uint64" } ], "internalType": "struct WitnetV2.RadonSLA", "name": "witnetSLA", "type": "tuple" } ], "internalType": "struct WitnetV2.Request", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryResponse", "outputs": [ { "components": [ { "internalType": "address", "name": "reporter", "type": "address" }, { "internalType": "uint64", "name": "finality", "type": "uint64" }, { "internalType": "uint32", "name": "resultTimestamp", "type": "uint32" }, { "internalType": "bytes32", "name": "resultTallyHash", "type": "bytes32" }, { "internalType": "bytes", "name": "resultCborBytes", "type": "bytes" } ], "internalType": "struct WitnetV2.Response", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryResponseStatus", "outputs": [ { "internalType": "enum WitnetV2.ResponseStatus", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryResultCborBytes", "outputs": [ { "internalType": "bytes", "name": "", "type": "bytes" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryResultError", "outputs": [ { "components": [ { "internalType": "enum Witnet.ResultErrorCodes", "name": "code", "type": "uint8" }, { "internalType": "string", "name": "reason", "type": "string" } ], "internalType": "struct Witnet.ResultError", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "getQueryStatus", "outputs": [ { "internalType": "enum WitnetV2.QueryStatus", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_witnetQueryIds", "type": "uint256[]" } ], "name": "getQueryStatusBatch", "outputs": [ { "internalType": "enum WitnetV2.QueryStatus[]", "name": "_status", "type": "uint8[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "_initData", "type": "bytes" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_reporter", "type": "address" } ], "name": "isReporter", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isUpgradable", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_from", "type": "address" } ], "name": "isUpgradableFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_queryRAD", "type": "bytes32" }, { "components": [ { "internalType": "uint8", "name": "committeeSize", "type": "uint8" }, { "internalType": "uint64", "name": "witnessingFeeNanoWit", "type": "uint64" } ], "internalType": "struct WitnetV2.RadonSLA", "name": "_querySLA", "type": "tuple" } ], "name": "postRequest", "outputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "_queryUnverifiedBytecode", "type": "bytes" }, { "components": [ { "internalType": "uint8", "name": "committeeSize", "type": "uint8" }, { "internalType": "uint64", "name": "witnessingFeeNanoWit", "type": "uint64" } ], "internalType": "struct WitnetV2.RadonSLA", "name": "_querySLA", "type": "tuple" }, { "internalType": "uint24", "name": "_queryCallbackGasLimit", "type": "uint24" } ], "name": "postRequestWithCallback", "outputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_queryRAD", "type": "bytes32" }, { "components": [ { "internalType": "uint8", "name": "committeeSize", "type": "uint8" }, { "internalType": "uint64", "name": "witnessingFeeNanoWit", "type": "uint64" } ], "internalType": "struct WitnetV2.RadonSLA", "name": "_querySLA", "type": "tuple" }, { "internalType": "uint24", "name": "_queryCallbackGasLimit", "type": "uint24" } ], "name": "postRequestWithCallback", "outputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "registry", "outputs": [ { "internalType": "contract WitnetRequestBytecodes", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" }, { "internalType": "bytes32", "name": "_witnetQueryResultTallyHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_witnetQueryResultCborBytes", "type": "bytes" } ], "name": "reportResult", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" }, { "internalType": "uint32", "name": "_witnetQueryResultTimestamp", "type": "uint32" }, { "internalType": "bytes32", "name": "_witnetQueryResultTallyHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_witnetQueryResultCborBytes", "type": "bytes" } ], "name": "reportResult", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "queryId", "type": "uint256" }, { "internalType": "uint32", "name": "queryResultTimestamp", "type": "uint32" }, { "internalType": "bytes32", "name": "queryResultTallyHash", "type": "bytes32" }, { "internalType": "bytes", "name": "queryResultCborBytes", "type": "bytes" } ], "internalType": "struct IWitnetOracleReporter.BatchResult[]", "name": "_batchResults", "type": "tuple[]" } ], "name": "reportResultBatch", "outputs": [ { "internalType": "uint256", "name": "_batchReward", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_reporters", "type": "address[]" } ], "name": "setReporters", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "specs", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_exReporters", "type": "address[]" } ], "name": "unsetReporters", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_witnetQueryId", "type": "uint256" } ], "name": "upgradeQueryEvmReward", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "version", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ], "bytecode": "0x610240604052336101005263baeca88b60e01b6101605234801561002257600080fd5b50604051615c3d380380615c3d833981016040819052610041916101a6565b8787878760008083836040518060400160405280601981526020017f696f2e7769746e65742e70726f786961626c652e626f61726400000000000000815250823360006001600160a01b0316816001600160a01b0316036100bc57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100c581610125565b5030608052151560c052600160025560e091909152805160209091012061012052506001600160a01b03908116610140529485166101a05250505016610180526101c0939093526101e09190915261020052610220525061022892505050565b600180546001600160a01b031916905561013e81610141565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461013e57600080fd5b600080600080600080600080610100898b0312156101c357600080fd5b88516101ce81610191565b60208a01519098506101df81610191565b60408a015190975080151581146101f557600080fd5b60608a015160808b015160a08c015160c08d015160e0909d01519b9e9a9d50929b919a9099929850909650945092505050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051610200516102205161590861033560003960008181610bad0152611e6301526000610bd9015260008181610c190152610c6101526000611e8d01526000818161090301528181611792015281816117da015281816118a501526119620152600081816106c50152818161193801528181611af001526120ab01526000610870015260006109a00152600061052e0152600061094e01526000611b8301526000818161055f0152611d3b015260005050600081816104e401528181610839015281816116c70152818161172101528181611a280152611a4a01526159086000f3fe6080604052600436106102765760003560e01c80637b1039991161014f578063aeb2ffc1116100c1578063e30c39781161007a578063e30c397814610970578063e5a6b10f1461098e578063e900aa33146109c2578063ec5946db146109d5578063f2fde38b146109e8578063f61921b214610a08576102b3565b8063aeb2ffc114610892578063b207e730146108bf578063bff852fa146108df578063c45a0155146108f4578063c805dd0f14610927578063d5f394881461093c576102b3565b806393d5185c1161011357806393d5185c146107955780639cc56e67146107ca578063a3ff5b00146107ea578063a77fc1a4146107fd578063a9e954b91461082a578063adb7c3f71461085e576102b3565b80637b103999146106b35780637bbdb96e146106e75780637bd88218146107375780638d3d8b38146107575780638da5cb5b14610777576102b3565b80635001f3b5116101e85780636280bce8116101ac5780636280bce8146105d25780636b58960a146105f25780636f07abcc146106125780636fdaab7e1461063f578063715018a61461068957806379ba50971461069e576102b3565b80635001f3b5146104d557806352d1902d1461051c5780635479d9401461055057806354fd4d5014610583578063581f5094146105a5576102b3565b8063234fe6e31161023a578063234fe6e31461040857806328a78d9b146104355780633dc2b7a214610455578063439fab911461046857806345ea6c17146104885780634c9f72e3146104b5576102b3565b8063044ad7be1461032b57806305e742ef1461036057806306eb2c421461038e57806308b7e85e146103ae5780630aa4112a146103db576102b3565b366102b3576102b1604051806040016040528060158152602001741b9bc81d1c985b9cd9995c9cc81858d8d95c1d1959605a1b815250610a28565b005b3480156102bf57600080fd5b506102b16102d160003560f81c610a71565b6102e260ff60003560f01c16610a71565b6102f360ff60003560e81c16610a71565b61030460ff60003560e01c16610a71565b60405160200161031794939291906142eb565b604051602081830303815290604052610a28565b34801561033757600080fd5b5061034b61034636600461437f565b610b63565b60405190151581526020015b60405180910390f35b34801561036c57600080fd5b5061038061037b3660046143af565b610ba5565b604051908152602001610357565b34801561039a57600080fd5b506103806103a9366004614426565b610c96565b3480156103ba57600080fd5b506103ce6103c9366004614467565b611000565b6040516103579190614500565b3480156103e757600080fd5b506103fb6103f6366004614467565b611297565b6040516103579190614595565b34801561041457600080fd5b50610428610423366004614467565b6113fd565b60405161035791906145d2565b34801561044157600080fd5b506102b1610450366004614645565b611408565b6103806104633660046146fb565b6114c1565b34801561047457600080fd5b506102b1610483366004614746565b6115cb565b34801561049457600080fd5b506104a86104a3366004614426565b611abf565b60405161035791906147cb565b3480156104c157600080fd5b506102b16104d0366004614645565b611b68565b3480156104e157600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610357565b34801561052857600080fd5b506103807f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061034b565b34801561058f57600080fd5b50610598611b7c565b604051610357919061482f565b3480156105b157600080fd5b506105c56105c0366004614426565b611bac565b6040516103579190614852565b3480156105de57600080fd5b506103806105ed3660046148de565b611c67565b3480156105fe57600080fd5b5061034b61060d36600461437f565b611d37565b34801561061e57600080fd5b5061063261062d366004614467565b611d8d565b6040516103579190614930565b34801561064b57600080fd5b5061038061065a366004614467565b60009081526000805160206158b38339815191526020526040902054600160b81b90046001600160481b031690565b34801561069557600080fd5b506102b1611d98565b3480156106aa57600080fd5b506102b1611dac565b3480156106bf57600080fd5b506105047f000000000000000000000000000000000000000000000000000000000000000081565b3480156106f357600080fd5b5060408051306020808301919091524682840152825180830384018152606090920190925280519101205b6040516001600160e01b03199091168152602001610357565b34801561074357600080fd5b5061038061075236600461494e565b611e23565b34801561076357600080fd5b50610598610772366004614467565b611ebb565b34801561078357600080fd5b506000546001600160a01b0316610504565b3480156107a157600080fd5b506107b56107b036600461497e565b611f59565b60408051928352602083019190915201610357565b3480156107d657600080fd5b506103806107e53660046149fb565b612088565b6103806107f8366004614a1d565b61215e565b34801561080957600080fd5b5061081d610818366004614467565b6122b8565b6040516103579190614a92565b34801561083657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000003f610380565b34801561086a57600080fd5b5061071e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561089e57600080fd5b506108b26108ad366004614467565b612431565b6040516103579190614abe565b3480156108cb57600080fd5b506103806108da366004614b0b565b612667565b3480156108eb57600080fd5b50610598612782565b34801561090057600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610504565b34801561093357600080fd5b506103806127b9565b34801561094857600080fd5b506105047f000000000000000000000000000000000000000000000000000000000000000081565b34801561097c57600080fd5b506001546001600160a01b0316610504565b34801561099a57600080fd5b506105047f000000000000000000000000000000000000000000000000000000000000000081565b6103806109d0366004614b72565b6127d6565b6102b16109e3366004614467565b612895565b3480156109f457600080fd5b506102b1610a0336600461437f565b612993565b348015610a1457600080fd5b506103ce610a23366004614467565b612a04565b610a30612782565b81604051602001610a42929190614baf565b60408051601f198184030181529082905262461bcd60e51b8252610a689160040161482f565b60405180910390fd5b604080516002808252818301909252606091600091906020820181803683370190505090506000610aa3601085614c18565b610aae906030614c3a565b90506000610abd601086614c53565b610ac8906030614c3a565b905060398260ff161115610ae457610ae1600783614c3a565b91505b60398160ff161115610afe57610afb600782614c3a565b90505b8160f81b83600081518110610b1557610b15614c75565b60200101906001600160f81b031916908160001a9053508060f81b83600181518110610b4357610b43614c75565b60200101906001600160f81b031916908160001a90535091949350505050565b6001600160a01b03811660009081527ff595240b351bc8f951c2f53b26f4e78c32cb62122cf76c19b7fdda7d4968e185602052604081205460ff165b92915050565b600080610bd37f00000000000000000000000000000000000000000000000000000000000000006003614c8b565b610bfd907f0000000000000000000000000000000000000000000000000000000000000000614ca2565b9050808362ffffff161080610c3f575080610c3d62ffffff85167f0000000000000000000000000000000000000000000000000000000000000000614ca2565b105b15610c5657610c4e8185614c8b565b915050610b9f565b610c8562ffffff84167f0000000000000000000000000000000000000000000000000000000000000000614ca2565b610c4e9085614c8b565b5092915050565b6000610cf86000805160206158938339815191525b336000908152600291909101602090815260409182902054825180840190935260158352743ab730baba3437b934bd32b2103932b837b93a32b960591b9183019190915260ff1690612b26565b60005b82811015610fef576001610d32858584818110610d1a57610d1a614c75565b9050602002810190610d2c9190614cb5565b35612b38565b6003811115610d4357610d436145a8565b14610e28577f4df64445edc775fba59db44b8001852fb1b777eea88fd54f04572dd114e3ff7f848483818110610d7b57610d7b614c75565b9050602002810190610d8d9190614cb5565b6040516353e8875160e11b815290359073__$e6ff738751a05f257ae0de251e4d5c9673$__9063a7d10ea290610dc890600190600401614930565b600060405180830381865af4158015610de5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e0d9190810190614d24565b604051610e1b929190614d58565b60405180910390a1610fe7565b838382818110610e3a57610e3a614c75565b9050602002810190610e4c9190614cb5565b610e5d906040810190602001614d71565b63ffffffff161580610ea05750838382818110610e7c57610e7c614c75565b9050602002810190610e8e9190614cb5565b610e9c906060810190614d8c565b1590505b15610f1e577f4df64445edc775fba59db44b8001852fb1b777eea88fd54f04572dd114e3ff7f848483818110610ed857610ed8614c75565b9050602002810190610eea9190614cb5565b35610ef3612782565b604051602001610f039190614dd2565b60408051601f1981840301815290829052610e1b9291614d58565b610fda848483818110610f3357610f33614c75565b9050602002810190610f459190614cb5565b35858584818110610f5857610f58614c75565b9050602002810190610f6a9190614cb5565b610f7b906040810190602001614d71565b868685818110610f8d57610f8d614c75565b9050602002810190610f9f9190614cb5565b60400135878786818110610fb557610fb5614c75565b9050602002810190610fc79190614cb5565b610fd5906060810190614d8c565b612bb9565b610fe49083614ca2565b91505b600101610cfb565b508015610b9f57610b9f3382612d98565b6040805160a08101825260008082526020820181905291810182905260608082019290925260808101919091528160038061103a83612b38565b600381111561104b5761104b6145a8565b146110da576040516353e8875160e11b81526110d59073__$e6ff738751a05f257ae0de251e4d5c9673$__9063a7d10ea29061108b908590600401614930565b600060405180830381865af41580156110a8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110d09190810190614d24565b610a28565b611290565b836111236110e782612dce565b546040805180820190915260118152703737ba103a3432903932b8bab2b9ba32b960791b60208201526001600160a01b03909116331490612b26565b61112c85612dce565b6040805160a0810182526004830180546001600160a01b0381168352600160a01b81046001600160401b03166020840152600160e01b900463ffffffff1692820192909252600583015460608201526006909201805460808401919061119190614e0b565b80601f01602080910402602001604051908101604052809291908181526020018280546111bd90614e0b565b801561120a5780601f106111df5761010080835404028352916020019161120a565b820191906000526020600020905b8154815290600101906020018083116111ed57829003601f168201915b505050505081525050935061122a60008051602061589383398151915290565b6000868152600191820160205260408120818155918290829061124f908301826141af565b506000600282018190556003909101805468ffffffffffffffffff1916905560048301818155600584018290559061128a60068501826141af565b50505050505b5050919050565b6112db6040805160c081018252600080825260208083018290528284018290526060808401526080830182905283518085019094528184528301529060a082015290565b6112e482612dce565b6040805160c08101825282546001600160a01b0381168252600160a01b810462ffffff166020830152600160b81b90046001600160481b03169181019190915260018201805491929160608401919061133c90614e0b565b80601f016020809104026020016040519081016040528092919081815260200182805461136890614e0b565b80156113b55780601f1061138a576101008083540402835291602001916113b5565b820191906000526020600020905b81548152906001019060200180831161139857829003601f168201915b5050509183525050600282015460208083019190915260408051808201825260039094015460ff8116855261010090046001600160401b031691840191909152015292915050565b6000610b9f82612dec565b611410612f04565b60005b815181101561148657600082828151811061143057611430614c75565b60200260200101519050600061145160008051602061589383398151915290565b6001600160a01b0392909216600090815260029092016020526040909120805460ff1916911515919091179055600101611413565b507f646436560d9757cb3c0f01da0f62642c6040b00c9a80685f94ef1a7725cad5f1816040516114b69190614e3f565b60405180910390a150565b60006114cd3a84612088565b61150681345b1015604051806040016040528060138152602001721a5b9cdd59999a58da595b9d081c995dd85c99606a1b815250612b26565b61154461151482600a614c8b565b3411156040518060400160405280600f81526020016e1d1bdbc81b5d58da081c995dd85c99608a1b815250612b26565b8261157a61155182612f31565b6040518060400160405280600b81526020016a696e76616c696420534c4160a81b815250612b26565b61158685856000612f8a565b92507ffb94adf28ab7e538d2691d90927f622cbc1100eae6afec58052efdee6c98a6168334866040516115bb93929190614ea4565b60405180910390a1505092915050565b6000546001600160a01b031660608161161e576060838060200190518101906115f49190614eeb565b90935090506116028361305e565b808060200190518101906116169190614f3b565b915050611678565b611661826001600160a01b0316336001600160a01b0316146040518060400160405280600d81526020016c3737ba103a34329037bbb732b960991b815250612b26565b828060200190518101906116759190614f3b565b90505b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbe54158015906116e957507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbe547f00000000000000000000000000000000000000000000000000000000000000003f145b1561171f5761171f6040518060400160405280601081526020016f185b1c9958591e481d5c19dc9859195960821b815250610a28565b7f00000000000000000000000000000000000000000000000000000000000000003f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbe55604080518082019091526012815271696e6578697374656e7420666163746f727960701b60208201526117c3907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163b151590612b26565b611896630db7c58b60e41b6001600160e01b0319167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663adb7c3f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185a9190614fd4565b6001600160e01b0319161460405180604001604052806013815260200172756e636f6d706c69616e7420666163746f727960681b815250612b26565b611a1d306001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166346d1d21a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119259190614ffe565b6001600160a01b03161480156119ed57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637b1039996040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e29190614ffe565b6001600160a01b0316145b60405180604001604052806012815260200171646973636f7264616e7420666163746f727960701b815250612b26565b611a2681613077565b7f00000000000000000000000000000000000000000000000000000000000000003f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03167fe73e754121f0bad1327816970101955bfffdf53d270ac509d777c25be070d7f6611aa5611b7c565b604051611ab2919061482f565b60405180910390a4505050565b6040516251ca3160e21b815260609073__$e6ff738751a05f257ae0de251e4d5c9673$__9063014728c490611b1c907f0000000000000000000000000000000000000000000000000000000000000000908790879060040161501b565b600060405180830381865af4158015611b39573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b619190810190615065565b9392505050565b611b70612f04565b611b7981613077565b50565b6060611ba77f000000000000000000000000000000000000000000000000000000000000000061311d565b905090565b6060816001600160401b03811115611bc657611bc66145e0565b604051908082528060200260200182016040528015611bef578160200160