UNPKG

test-contracts-sovryn

Version:

Smart contracts for the Sovryn protocol and external integrations.

1,711 lines 83.6 kB
{ "_format": "hh-sol-artifact-1", "contractName": "MockAffiliates", "sourceName": "contracts/mockup/MockAffiliates.sol", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "referrer", "type": "address" }, { "indexed": false, "internalType": "address", "name": "trader", "type": "address" }, { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "bool", "name": "isHeld", "type": "bool" }, { "indexed": false, "internalType": "uint256", "name": "tradingFeeTokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "tokenBonusAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "sovBonusAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "sovBonusAmountPaid", "type": "uint256" } ], "name": "PayTradingFeeToAffiliate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "referrer", "type": "address" }, { "indexed": false, "internalType": "address", "name": "trader", "type": "address" }, { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tradingFeeTokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "tokenBonusAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "sovBonusAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "sovBonusAmountTryingToPaid", "type": "uint256" } ], "name": "PayTradingFeeToAffiliateFail", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "prevModuleContractAddress", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newModuleContractAddress", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "module", "type": "bytes32" } ], "name": "ProtocolModuleContractReplaced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", "name": "referrer", "type": "address" } ], "name": "SetAffiliatesReferrer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", "name": "referrer", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "alreadySet", "type": "bool" }, { "indexed": false, "internalType": "bool", "name": "userNotFirstTrade", "type": "bool" } ], "name": "SetAffiliatesReferrerFail", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" } ], "name": "SetUserNotFirstTradeFlag", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "referrer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": true, "internalType": "address", "name": "tokenAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "WithdrawAffiliatesReferrerTokenFees", "type": "event" }, { "payable": false, "stateMutability": "nonpayable", "type": "fallback" }, { "constant": true, "inputs": [], "name": "admin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "affiliateFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "affiliateRewardsHeld", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "affiliateTradingTokenFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "affiliatesReferrerBalances", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "affiliatesUserReferrer", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "borrowerNonce", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "borrowerOrders", "outputs": [ { "internalType": "uint256", "name": "lockedAmount", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "minLoanTerm", "type": "uint256" }, { "internalType": "uint256", "name": "maxLoanTerm", "type": "uint256" }, { "internalType": "uint256", "name": "createdTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "expirationTimestamp", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "borrowingFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "borrowingFeeTokensHeld", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "borrowingFeeTokensPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "delegatedManagers", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "feeRebatePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "feesController", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" } ], "name": "getAffiliateRewardsHeld", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getAffiliateTradingTokenFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" } ], "name": "getAffiliatesReferrerBalances", "outputs": [ { "internalType": "address[]", "name": "referrerTokensList", "type": "address[]" }, { "internalType": "uint256[]", "name": "referrerTokensBalances", "type": "uint256[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" } ], "name": "getAffiliatesReferrerTokenBalance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" } ], "name": "getAffiliatesReferrerTokensList", "outputs": [ { "internalType": "address[]", "name": "tokensList", "type": "address[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" } ], "name": "getAffiliatesTokenRewardsValueInRbtc", "outputs": [ { "internalType": "uint256", "name": "rbtcTotalAmount", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "getAffiliatesUserReferrer", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getMinReferralsToPayout", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" } ], "name": "getReferralsList", "outputs": [ { "internalType": "address[]", "name": "refList", "type": "address[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "getUserNotFirstTradeFlag", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "target", "type": "address" } ], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "lenderInterest", "outputs": [ { "internalType": "uint256", "name": "principalTotal", "type": "uint256" }, { "internalType": "uint256", "name": "owedPerDay", "type": "uint256" }, { "internalType": "uint256", "name": "owedTotal", "type": "uint256" }, { "internalType": "uint256", "name": "paidTotal", "type": "uint256" }, { "internalType": "uint256", "name": "updatedTimestamp", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "lenderOrders", "outputs": [ { "internalType": "uint256", "name": "lockedAmount", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "minLoanTerm", "type": "uint256" }, { "internalType": "uint256", "name": "maxLoanTerm", "type": "uint256" }, { "internalType": "uint256", "name": "createdTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "expirationTimestamp", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lendingFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "lendingFeeTokensHeld", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "lendingFeeTokensPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "liquidationIncentivePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "loanInterest", "outputs": [ { "internalType": "uint256", "name": "owedPerDay", "type": "uint256" }, { "internalType": "uint256", "name": "depositTotal", "type": "uint256" }, { "internalType": "uint256", "name": "updatedTimestamp", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "loanParams", "outputs": [ { "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "bool", "name": "active", "type": "bool" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "uint256", "name": "minInitialMargin", "type": "uint256" }, { "internalType": "uint256", "name": "maintenanceMargin", "type": "uint256" }, { "internalType": "uint256", "name": "maxLoanTerm", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "loanPoolToUnderlying", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "loans", "outputs": [ { "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "bytes32", "name": "loanParamsId", "type": "bytes32" }, { "internalType": "bytes32", "name": "pendingTradesId", "type": "bytes32" }, { "internalType": "bool", "name": "active", "type": "bool" }, { "internalType": "uint256", "name": "principal", "type": "uint256" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }, { "internalType": "uint256", "name": "startTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "endTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "startMargin", "type": "uint256" }, { "internalType": "uint256", "name": "startRate", "type": "uint256" }, { "internalType": "address", "name": "borrower", "type": "address" }, { "internalType": "address", "name": "lender", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lockedSOVAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "name": "logicTargets", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "maxDisagreement", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "maxSwapSize", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "minReferralsToPayout", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "pause", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "referrer", "type": "address" }, { "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "tradingFeeTokenBaseAmount", "type": "uint256" } ], "name": "payTradingFeeToAffiliatesReferrer", "outputs": [ { "internalType": "uint256", "name": "referrerBonusSovAmount", "type": "uint256" }, { "internalType": "uint256", "name": "referrerBonusTokenAmount", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "priceFeeds", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "protocolAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "protocolTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "protocolTokenHeld", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "protocolTokenPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rolloverBaseReward", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rolloverFlexFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "referrer", "type": "address" } ], "name": "setAffiliatesReferrer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "setUserNotFirstTradeFlag", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "sourceBuffer", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "sovTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "sovrynSwapContractRegistryAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "specialRebates", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "supportedTokens", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "swapsImpl", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "tradingFeePercent", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "tradingFeeTokensHeld", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "tradingFeeTokensPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "underlyingToLoanPool", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "userNotFirstTradeFlag", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdrawAffiliatesReferrerTokenFees", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "withdrawAllAffiliatesReferrerTokenFees", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "wrbtcToken", "outputs": [ { "internalType": "contract IWrbtcERC20", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x60806040526001600055678ac7230489e80000601555670214e8348c4f000060185567013fbe85edc90000601b55674563918244f40000602055674563918244f40000602155674563918244f400006027556127106028556802b5e3af16b1880000602955650f478e084000602b5567016345785d8a0000602c556802b5e3af16b1880000602f5560036035556801158e460913d0000060395560006100a96100fc60201b60201c565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610100565b3390565b612d368061010f6000396000f3fe608060405234801561001057600080fd5b50600436106103fc5760003560e01c806392d894f811610215578063c9ddf44811610125578063edab119f116100b8578063f2fde38b11610087578063f2fde38b14610d44578063f589a3e714610d6a578063f6ddc8b314610d72578063f706b1f214610d7a578063f851a44014610d82576103fc565b8063edab119f14610c4f578063f06a9c6b14610c57578063f0e085f514610c7d578063f19ece6f14610c85576103fc565b8063d473c2da116100f4578063d473c2da14610bf3578063d485045e14610bfb578063d80100ea14610c21578063e8f6276414610c47576103fc565b8063c9ddf44814610b22578063cb6eacd114610b50578063cd5d808d14610bbd578063d288208c14610beb576103fc565b8063b05f6570116101a8578063b9cffa3e11610177578063b9cffa3e14610a3e578063ba4861e914610a46578063bdee453c14610a4e578063c4a9081514610a74578063c4d66de814610afc576103fc565b8063b05f6570146109c4578063b30643d9146109ea578063b41263b614610a10578063b7e1524114610a18576103fc565b8063acc04348116101e4578063acc0434814610986578063adfcbc981461098e578063ae0a8530146109b4578063afe84009146109bc576103fc565b806392d894f8146108f2578063959083d314610918578063a22473a214610920578063ac92fd8e1461094e576103fc565b80634699f84611610310578063742e6798116102a35780638417a2ae116102725780638417a2ae1461088e5780638456cb59146108b45780638da5cb5b146108bc5780638dc48ba5146108c45780638f32d59b146108ea576103fc565b8063742e67981461086e57806378d849ed146108765780637a8faeb81461087e578063824fcdc914610886576103fc565b806362fff3f6116102df57806362fff3f6146107c157806368c4ac261461081a5780636e663730146108405780637420ca3e14610866576103fc565b80634699f8461461076e5780634f28cac214610776578063569fc1fb1461077e578063574442cc146107b9576103fc565b8063249556fb116103935780633432423c116103625780633432423c146106a45780633452d2d4146106d05780633fca506e146106f65780634115a2b61461071c5780634203e39514610748576103fc565b8063249556fb1461063457806324cc57491461065a5780632a324027146106945780632f4707641461069c576103fc565b806317548b79116103cf57806317548b79146105315780631b7bde74146105585780631c9f66c214610598578063218b39c61461060e576103fc565b8063065d810f146104335780630676c1b7146104925780630d4d11fe146104b6578063115cc0ce1461050b575b60405162461bcd60e51b8152600401808060200182810382526021815260200180612c6b6021913960400191505060405180910390fd5b61045f6004803603604081101561044957600080fd5b506001600160a01b038135169060200135610d8a565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b61049a610dca565b604080516001600160a01b039092168252519081900360200190f35b6104f2600480360360808110156104cc57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610dd9565b6040805192835260208301919091528051918290030190f35b61049a6004803603602081101561052157600080fd5b50356001600160a01b0316611266565b61049a6004803603602081101561054757600080fd5b50356001600160e01b031916611284565b6105866004803603604081101561056e57600080fd5b506001600160a01b038135811691602001351661129f565b60408051918252519081900360200190f35b6105be600480360360208110156105ae57600080fd5b50356001600160a01b03166112bc565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105fa5781810151838201526020016105e2565b505050509050019250505060405180910390f35b61049a6004803603602081101561062457600080fd5b50356001600160a01b03166112e6565b6105be6004803603602081101561064a57600080fd5b50356001600160a01b0316611301565b6106806004803603602081101561067057600080fd5b50356001600160a01b0316611325565b604080519115158252519081900360200190f35b61058661133a565b610586611340565b61045f600480360360408110156106ba57600080fd5b506001600160a01b038135169060200135611346565b610586600480360360208110156106e657600080fd5b50356001600160a01b0316611386565b6105866004803603602081101561070c57600080fd5b50356001600160a01b0316611398565b6106806004803603604081101561073257600080fd5b50803590602001356001600160a01b03166113aa565b6105866004803603602081101561075e57600080fd5b50356001600160a01b03166113ca565b6105866113dc565b6105866113e2565b61079b6004803603602081101561079457600080fd5b50356113e8565b60408051938452602084019290925282820152519081900360600190f35b610586611409565b6107ef600480360360408110156107d757600080fd5b506001600160a01b038135811691602001351661140f565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b6106806004803603602081101561083057600080fd5b50356001600160a01b0316611449565b61049a6004803603602081101561085657600080fd5b50356001600160a01b031661145e565b61049a611479565b610586611488565b61049a61148e565b61058661149d565b6105866114a3565b610586600480360360208110156108a457600080fd5b50356001600160a01b03166114a9565b6106806114c4565b61049a6114cd565b61049a600480360360208110156108da57600080fd5b50356001600160a01b03166114dc565b6106806114f7565b6105866004803603602081101561090857600080fd5b50356001600160a01b031661151d565b61058661152f565b6105866004803603604081101561093657600080fd5b506001600160a01b0381358116916020013516611535565b6109846004803603606081101561096457600080fd5b506001600160a01b03813581169160208101359091169060400135611560565b005b61058661178a565b610984600480360360208110156109a457600080fd5b50356001600160a01b0316611790565b6105866118d9565b61049a6118df565b610680600480360360208110156109da57600080fd5b50356001600160a01b03166118ee565b61058660048036036020811015610a0057600080fd5b50356001600160a01b031661190c565b61058661191e565b61058660048036036020811015610a2e57600080fd5b50356001600160a01b0316611924565b61049a611936565b61049a611945565b61058660048036036020811015610a6457600080fd5b50356001600160a01b0316611954565b610a9160048036036020811015610a8a57600080fd5b5035611966565b604080519c8d5260208d019b909b528b8b019990995296151560608b015260808a019590955260a089019390935260c088019190915260e08701526101008601526101208501526001600160a01b039081166101408501521661016083015251908190036101800190f35b61098460048036036020811015610b1257600080fd5b50356001600160a01b03166119d8565b61098460048036036040811015610b3857600080fd5b506001600160a01b0381358116916020013516611a34565b610b6d60048036036020811015610b6657600080fd5b5035611c3c565b6040805198895296151560208901526001600160a01b0395861688880152938516606088015291909316608086015260a085019290925260c084019190915260e083015251908190036101000190f35b61058660048036036040811015610bd357600080fd5b506001600160a01b0381358116916020013516611c8e565b61049a611cab565b610586611cba565b61058660048036036020811015610c1157600080fd5b50356001600160a01b0316611cc0565b61058660048036036020811015610c3757600080fd5b50356001600160a01b0316611cd2565b61049a611ecf565b610586611ede565b61098460048036036020811015610c6d57600080fd5b50356001600160a01b0316611ee4565b610586611ff8565b610cab60048036036020811015610c9b57600080fd5b50356001600160a01b0316611ffe565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610cef578181015183820152602001610cd7565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610d2e578181015183820152602001610d16565b5050505090500194505050505060405180910390f35b61098460048036036020811015610d5a57600080fd5b50356001600160a01b0316612088565b6105866120d9565b6105866120df565b61049a6120e5565b61049a6120f4565b6009602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b6031546001600160a01b031681565b60315460009081906001600160a01b03163314610e3a576040805162461bcd60e51b815260206004820152601a6024820152791059999a5b1a585d195cce881b9bdd08185d5d1a1bdc9a5e995960321b604482015290519081900360640190fd5b603d5460ff1615610e7b576040805162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b604482015290519081900360640190fd5b6000610e8561191e565b6001600160a01b0388166000908152603460205260409020610ea690612103565b10905060016000610eb68661210a565b6001600160a01b038a166000908152603a60205260409020909450610ee1908863ffffffff61213d16565b610f0f576001600160a01b0389166000908152603a60205260409020610f0d908863ffffffff61215b16565b505b6001600160a01b03808a166000908152603b60209081526040808320938b1683529290522054610f45908563ffffffff6121bb16565b6001600160a01b03808b166000908152603b60209081526040808320938c1683529290522055610f75878761221c565b6001600160a01b038a166000908152603660205260409020549095508315610fc557610fa7818763ffffffff6121bb16565b6001600160a01b038b16600090815260366020526040902055611189565b6001600160a01b038a1660009081526036602052604090205415610ffd576001600160a01b038a166000908152603660205260408120555b61100d868263ffffffff6121bb16565b6037546038546040805163095ea7b360e01b81526001600160a01b03928316600482015260248101859052905193955091169163095ea7b3916044808201926020929091908290030181600087803b15801561106857600080fd5b505af115801561107c573d6000803e3d6000fd5b505050506040513d602081101561109257600080fd5b5050603854604080516001600160a01b038d81166024830152604480830187905283518084039091018152606490920183526020820180516001600160e01b031663f33bf9a160e01b17815292518251600095929092169390918291908083835b602083106111125780518252601f1990920191602091820191016110f3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611174576040519150601f19603f3d011682016040523d82523d6000602084013e611179565b606091505b505090508061118757600093505b505b82156111f857604080516001600160a01b038b81168252602082018a90528183018890526060820189905260808201859052915186151592808c1692908e16917f956d8d442c76f1bedc4178cda59c4ad17c135bd6ec5a603a39fbfe5a320dbbc09181900360a00190a4611259565b604080516001600160a01b038b81168252602082018a905281830188905260608201899052608082018590529151828b16928d16917f0909aef8097f3ad1e03459f173d44656bde668485239e8d83d9dcbc8af63d140919081900360a00190a35b5050505094509492505050565b6001600160a01b039081166000908152603360205260409020541690565b6005602052600090815260409020546001600160a01b031681565b603b60209081526000928352604080842090915290825290205481565b6001600160a01b0381166000908152603a602052604090206060906112e090612377565b92915050565b6023602052600090815260409020546001600160a01b031681565b6001600160a01b03811660009081526034602052604090206060906112e090612377565b60326020526000908152604090205460ff1681565b60185481565b601f5481565b6008602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b601a6020526000908152604090205481565b602a6020526000908152604090205481565b600a60209081526000928352604080842090915290825290205460ff1681565b60166020526000908152604090205481565b60155481565b60295481565b600c6020526000908152604090208054600182015460029092015490919083565b602b5481565b600b602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b60266020526000908152604090205460ff1681565b6033602052600090815260409020546001600160a01b031681565b6003546001600160a01b031681565b60355481565b6002546001600160a01b031681565b601e5481565b60395490565b6001600160a01b031660009081526036602052604090205490565b603d5460ff1681565b6001546001600160a01b031690565b6022602052600090815260409020546001600160a01b031681565b6001546000906001600160a01b031661150e61241d565b6001600160a01b031614905090565b60176020526000908152604090205481565b602c5481565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b603d5460ff16156115a1576040805162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b604482015290519081900360640190fd5b6001600160a01b0382166115e65760405162461bcd60e51b815260040180806020018281038252602b815260200180612cad602b913960400191505060405180910390fd5b336000818152603b602090815260408083206001600160a01b038816845290915281205490838211611618578161161a565b835b90506000811161165b5760405162461bcd60e51b8152600401808060200182810382526027815260200180612c446027913960400191505060405180910390fd5b61166361191e565b6001600160a01b038416600090815260346020526040902061168490612103565b10156116c15760405162461bcd60e51b8152600401808060200182810382526032815260200180612bec6032913960400191505060405180910390fd5b60006116d3838363ffffffff61242116565b9050806116e9576116e48488612463565b611712565b6001600160a01b038085166000908152603b60209081526040808320938b168352929052208190555b61172c6001600160a01b038816878463ffffffff6124a616565b866001600160a01b0316866001600160a01b0316856001600160a01b03167f7e121a301046a79dbdc6bb475ff36f651f88a7cb91fefd7cb8aa4b9f4a33b20b856040518082815260200191505060405180910390a450505050505050565b602f5481565b603d5460ff16156117d1576040805162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b604482015290519081900360640190fd5b6001600160a01b0381166118165760405162461bcd60e51b815260040180806020018281038252602b815260200180612cad602b913960400191505060405180910390fd5b3361181f61191e565b6001600160a01b038216600090815260346020526040902061184090612103565b101561187d5760405162461bcd60e51b8152600401808060200182810382526032815260200180612bec6032913960400191505060405180910390fd5b60608061188983611ffe565b9150915060005b82518110156118d2576118ca8382815181106118a857fe5b6020026020010151868484815181106118bd57fe5b6020026020010151611560565b600101611890565b5050505050565b60205481565b602d546001600160a01b031681565b60016001