Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 181 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute Epoch | 20191036 | 27 days ago | IN | 0 ETH | 0.00298553 | ||||
Submit Solution | 20190866 | 27 days ago | IN | 0 ETH | 0.00123263 | ||||
Close Epoch | 20190862 | 27 days ago | IN | 0 ETH | 0.00302507 | ||||
Execute Epoch | 19597905 | 110 days ago | IN | 0 ETH | 0.00638517 | ||||
Submit Solution | 19597752 | 110 days ago | IN | 0 ETH | 0.00271237 | ||||
Close Epoch | 19597750 | 110 days ago | IN | 0 ETH | 0.00746064 | ||||
Close Epoch | 19128638 | 176 days ago | IN | 0 ETH | 0.02021405 | ||||
Execute Epoch | 18716699 | 234 days ago | IN | 0 ETH | 0.01374195 | ||||
Submit Solution | 18437434 | 273 days ago | IN | 0 ETH | 0.00274589 | ||||
Close Epoch | 18437427 | 273 days ago | IN | 0 ETH | 0.0142017 | ||||
Close Epoch | 17968228 | 339 days ago | IN | 0 ETH | 0.01306695 | ||||
Execute Epoch | 17493493 | 405 days ago | IN | 0 ETH | 0.01064955 | ||||
Submit Solution | 17478281 | 407 days ago | IN | 0 ETH | 0.00243437 | ||||
Close Epoch | 17478279 | 407 days ago | IN | 0 ETH | 0.01705675 | ||||
Close Epoch | 17386549 | 420 days ago | IN | 0 ETH | 0.0482327 | ||||
Execute Epoch | 17112322 | 459 days ago | IN | 0 ETH | 0.01511257 | ||||
Submit Solution | 17111872 | 459 days ago | IN | 0 ETH | 0.00624359 | ||||
Close Epoch | 17111870 | 459 days ago | IN | 0 ETH | 0.04438494 | ||||
Close Epoch | 17091723 | 462 days ago | IN | 0 ETH | 0.03264473 | ||||
Close Epoch | 17084682 | 463 days ago | IN | 0 ETH | 0.04454497 | ||||
Close Epoch | 17077503 | 464 days ago | IN | 0 ETH | 0.00112819 | ||||
Close Epoch | 17077493 | 464 days ago | IN | 0 ETH | 0.03621542 | ||||
Close Epoch | 17070410 | 465 days ago | IN | 0 ETH | 0.03709625 | ||||
Execute Epoch | 16491587 | 546 days ago | IN | 0 ETH | 0.00523176 | ||||
Submit Solution | 16488735 | 547 days ago | IN | 0 ETH | 0.0020761 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11639907 | 1290 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
EpochCoordinator
Compiler Version
v0.5.15+commit.6a57276f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-01-12 */ // Verified using https://dapp.tools // hevm: flattened sources of src/lender/coordinator.sol pragma solidity >=0.5.15 >=0.5.15 <0.6.0; pragma experimental ABIEncoderV2; ////// lib/tinlake-auth/lib/ds-note/src/note.sol /// note.sol -- the `note' modifier, for logging calls as events // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. /* pragma solidity >=0.5.15; */ contract DSNote { event LogNote( bytes4 indexed sig, address indexed guy, bytes32 indexed foo, bytes32 indexed bar, uint256 wad, bytes fax ) anonymous; modifier note { bytes32 foo; bytes32 bar; uint256 wad; assembly { foo := calldataload(4) bar := calldataload(36) wad := callvalue() } _; emit LogNote(msg.sig, msg.sender, foo, bar, wad, msg.data); } } ////// lib/tinlake-auth/src/auth.sol // Copyright (C) Centrifuge 2020, based on MakerDAO dss https://github.com/makerdao/dss // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. /* pragma solidity >=0.5.15 <0.6.0; */ /* import "ds-note/note.sol"; */ contract Auth is DSNote { mapping (address => uint) public wards; function rely(address usr) public auth note { wards[usr] = 1; } function deny(address usr) public auth note { wards[usr] = 0; } modifier auth { require(wards[msg.sender] == 1); _; } } ////// lib/tinlake-math/src/math.sol // Copyright (C) 2018 Rain <[email protected]> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. /* pragma solidity >=0.5.15 <0.6.0; */ contract Math { uint256 constant ONE = 10 ** 27; function safeAdd(uint x, uint y) public pure returns (uint z) { require((z = x + y) >= x, "safe-add-failed"); } function safeSub(uint x, uint y) public pure returns (uint z) { require((z = x - y) <= x, "safe-sub-failed"); } function safeMul(uint x, uint y) public pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, "safe-mul-failed"); } function safeDiv(uint x, uint y) public pure returns (uint z) { z = x / y; } function rmul(uint x, uint y) public pure returns (uint z) { z = safeMul(x, y) / ONE; } function rdiv(uint x, uint y) public pure returns (uint z) { require(y > 0, "division by zero"); z = safeAdd(safeMul(x, ONE), y / 2) / y; } function rdivup(uint x, uint y) internal pure returns (uint z) { require(y > 0, "division by zero"); // always rounds up z = safeAdd(safeMul(x, ONE), safeSub(y, 1)) / y; } } ////// src/fixed_point.sol // Copyright (C) 2020 Centrifuge // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. /* pragma solidity >=0.5.15 <0.6.0; */ contract FixedPoint { struct Fixed27 { uint value; } } ////// src/lender/coordinator.sol // Copyright (C) 2020 Centrifuge // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. /* pragma solidity >=0.5.15 <0.6.0; */ /* pragma experimental ABIEncoderV2; */ /* import "./../fixed_point.sol"; */ /* import "tinlake-auth/auth.sol"; */ /* import "tinlake-math/math.sol"; */ interface EpochTrancheLike { function epochUpdate(uint epochID, uint supplyFulfillment_, uint redeemFulfillment_, uint tokenPrice_, uint epochSupplyCurrency, uint epochRedeemCurrency) external; function closeEpoch() external returns(uint totalSupply, uint totalRedeem); } interface ReserveLike_3 { function balance() external; } contract AssessorLike_3 is FixedPoint { function calcSeniorTokenPrice(uint NAV, uint reserve) external returns(Fixed27 memory tokenPrice); function calcJuniorTokenPrice(uint NAV, uint reserve) external returns(Fixed27 memory tokenPrice); function maxReserve() external view returns(uint); function calcUpdateNAV() external returns (uint); function seniorDebt() external returns(uint); function seniorBalance() external returns(uint); function seniorRatioBounds() external view returns(Fixed27 memory minSeniorRatio, Fixed27 memory maxSeniorRatio); function changeSeniorAsset(uint seniorRatio, uint seniorSupply, uint seniorRedeem) external; function totalBalance() external returns(uint); function changeReserveAvailable(uint currencyAmount) public; } // The EpochCoordinator keeps track of the epochs and execute epochs them. // An epoch execution happens with the maximum amount of redeem and supply which still satisfies // all constraints or at least improve certain pool constraints. // In most cases all orders can be fulfilled with order maximum without violating any constraints. // If it is not possible to satisfy all orders at maximum the coordinators opens a submission period. // The problem of finding the maximum amount of supply and redeem orders which still satisfies all constraints // can be seen as a linear programming (linear optimization problem). // The optimal solution can be calculated off-chain contract EpochCoordinator is Auth, Math, FixedPoint { struct OrderSummary { // all variables are stored in currency uint seniorRedeem; uint juniorRedeem; uint juniorSupply; uint seniorSupply; } modifier minimumEpochTimePassed { require(safeSub(block.timestamp, lastEpochClosed) >= minimumEpochTime); _; } // timestamp last epoch closed uint public lastEpochClosed; // default minimum length of an epoch uint public minimumEpochTime = 1 days; EpochTrancheLike public juniorTranche; EpochTrancheLike public seniorTranche; ReserveLike_3 public reserve; AssessorLike_3 public assessor; uint public lastEpochExecuted; uint public currentEpoch; // current best solution submission for an epoch which satisfies all constraints OrderSummary public bestSubmission; // current best score of the best solution uint public bestSubScore; // flag which tracks if an submission period received a valid solution bool public gotFullValidSolution; // snapshot from the the orders in the tranches at epoch close OrderSummary public order; // snapshot from the senior token price at epoch close Fixed27 public epochSeniorTokenPrice; // snapshot from the junior token price at epoch close Fixed27 public epochJuniorTokenPrice; // snapshot from NAV (net asset value of the loans) at epoch close uint public epochNAV; // snapshot from the senior asset value at epoch close uint public epochSeniorAsset; // snapshot from reserve balance at epoch close uint public epochReserve; // flag which indicates if the coordinator is currently in a submission period bool public submissionPeriod; // weights of the scoring function // highest priority senior redeem and junior redeem before junior and senior supply uint public weightSeniorRedeem = 1000000; uint public weightJuniorRedeem = 100000; uint public weightJuniorSupply = 10000; uint public weightSeniorSupply = 1000; // challenge period end timestamp uint public minChallengePeriodEnd; // after a first valid solution is received others can submit better solutions // until challenge time is over uint public challengeTime; // if the current state is not healthy improvement submissions are allowed // ratio and reserve improvements receive score points // keeping track of the best improvements scores uint public bestRatioImprovement; uint public bestReserveImprovement; // flag for closing the pool (no new supplies allowed only redeem) bool public poolClosing = false; // constants int public constant SUCCESS = 0; int public constant NEW_BEST = 0; int public constant ERR_CURRENCY_AVAILABLE = -1; int public constant ERR_MAX_ORDER = -2; int public constant ERR_MAX_RESERVE = - 3; int public constant ERR_MIN_SENIOR_RATIO = -4; int public constant ERR_MAX_SENIOR_RATIO = -5; int public constant ERR_NOT_NEW_BEST = -6; int public constant ERR_POOL_CLOSING = -7; uint public constant BIG_NUMBER = ONE * ONE; uint public constant IMPROVEMENT_WEIGHT = 10000; constructor(uint challengeTime_) public { wards[msg.sender] = 1; challengeTime = challengeTime_; lastEpochClosed = block.timestamp; currentEpoch = 1; } function file(bytes32 name, uint value) public auth { if(name == "challengeTime") { challengeTime = value; } else if (name == "minimumEpochTime") { minimumEpochTime = value; } else if (name == "weightSeniorRedeem") { weightSeniorRedeem = value;} else if (name == "weightJuniorRedeem") { weightJuniorRedeem = value;} else if (name == "weightJuniorSupply") { weightJuniorSupply = value;} else if (name == "weightSeniorSupply") { weightSeniorSupply = value;} else { revert("unkown-name");} } /// sets the dependency to another contract function depend (bytes32 contractName, address addr) public auth { if (contractName == "juniorTranche") { juniorTranche = EpochTrancheLike(addr); } else if (contractName == "seniorTranche") { seniorTranche = EpochTrancheLike(addr); } else if (contractName == "reserve") { reserve = ReserveLike_3(addr); } else if (contractName == "assessor") { assessor = AssessorLike_3(addr); } else revert(); } /// an epoch can be closed after a minimum epoch time has passed /// closeEpoch creates a snapshot of the current lender state /// if all orders can be fulfilled epoch is executed otherwise /// submission period starts function closeEpoch() external minimumEpochTimePassed { require(submissionPeriod == false); lastEpochClosed = block.timestamp; currentEpoch = currentEpoch + 1; reserve.balance(); assessor.changeReserveAvailable(0); (uint orderJuniorSupply, uint orderJuniorRedeem) = juniorTranche.closeEpoch(); (uint orderSeniorSupply, uint orderSeniorRedeem) = seniorTranche.closeEpoch(); epochSeniorAsset = safeAdd(assessor.seniorDebt(), assessor.seniorBalance()); // create a snapshot of the current lender state epochNAV = assessor.calcUpdateNAV(); epochReserve = assessor.totalBalance(); // if no orders exist epoch can be executed without validation if (orderSeniorRedeem == 0 && orderJuniorRedeem == 0 && orderSeniorSupply == 0 && orderJuniorSupply == 0) { juniorTranche.epochUpdate(currentEpoch, 0, 0, 0, 0, 0); seniorTranche.epochUpdate(currentEpoch, 0, 0, 0, 0, 0); // assessor performs re-balancing assessor.changeSeniorAsset(calcSeniorRatio(epochSeniorAsset, epochNAV, epochReserve), 0, 0); lastEpochExecuted = safeAdd(lastEpochExecuted, 1); return; } // calculate current token prices which are used for the execute epochSeniorTokenPrice = assessor.calcSeniorTokenPrice(epochNAV, epochReserve); epochJuniorTokenPrice = assessor.calcJuniorTokenPrice(epochNAV, epochReserve); // start closing the pool if juniorTranche lost everything // the flag will change the behaviour of the validate function for not allowing new supplies if(epochJuniorTokenPrice.value == 0) { poolClosing = true; } // convert redeem orders in token into currency order.seniorRedeem = rmul(orderSeniorRedeem, epochSeniorTokenPrice.value); order.juniorRedeem = rmul(orderJuniorRedeem, epochJuniorTokenPrice.value); order.juniorSupply = orderJuniorSupply; order.seniorSupply = orderSeniorSupply; // epoch is executed if orders can be fulfilled to 100% without constraint violation if (validate(order.seniorRedeem , order.juniorRedeem, order.seniorSupply, order.juniorSupply) == SUCCESS) { _executeEpoch(order.seniorRedeem, order.juniorRedeem, orderSeniorSupply, orderJuniorSupply); return; } // if 100% order fulfillment is not possible submission period starts // challenge period time starts after first valid submission is received submissionPeriod = true; } //// internal method to save new optimum //// orders are expressed as currency //// all parameter are 10^18 function _saveNewOptimum(uint seniorRedeem, uint juniorRedeem, uint juniorSupply, uint seniorSupply, uint score) internal { bestSubmission.seniorRedeem = seniorRedeem; bestSubmission.juniorRedeem = juniorRedeem; bestSubmission.juniorSupply = juniorSupply; bestSubmission.seniorSupply = seniorSupply; bestSubScore = score; } /// method to submit a solution for submission period /// anybody can submit a solution for the current execution epoch /// if solution satisfies all constraints (or at least improves an unhealthy state) /// and has the highest score function submitSolution(uint seniorRedeem, uint juniorRedeem, uint juniorSupply, uint seniorSupply) public returns(int) { require(submissionPeriod == true, "submission-period-not-active"); int valid = _submitSolution(seniorRedeem, juniorRedeem, juniorSupply, seniorSupply); // if solution is the first valid for this epoch the challenge period starts if(valid == SUCCESS && minChallengePeriodEnd == 0) { minChallengePeriodEnd = safeAdd(block.timestamp, challengeTime); } return valid; } // internal method for submit solution function _submitSolution(uint seniorRedeem, uint juniorRedeem, uint juniorSupply, uint seniorSupply) internal returns(int) { int valid = validate(seniorRedeem, juniorRedeem, seniorSupply, juniorSupply); // every solution needs to satisfy all core constraints // there is no exception if(valid == ERR_CURRENCY_AVAILABLE || valid == ERR_MAX_ORDER) { // core constraint violated return valid; } // all core constraints and all pool constraints are satisfied if(valid == SUCCESS) { uint score = scoreSolution(seniorRedeem, juniorRedeem, seniorSupply, juniorSupply); if(gotFullValidSolution == false) { gotFullValidSolution = true; _saveNewOptimum(seniorRedeem, juniorRedeem, juniorSupply, seniorSupply, score); // solution is new best => 0 return SUCCESS; } if (score < bestSubScore) { // solution is not the best => -6 return ERR_NOT_NEW_BEST; } _saveNewOptimum(seniorRedeem, juniorRedeem, juniorSupply, seniorSupply, score); // solution is new best => 0 return SUCCESS; } // proposed solution does not satisfy all pool constraints // if we never received a solution which satisfies all constraints for this epoch // we might accept it as an improvement if (gotFullValidSolution == false) { return _improveScore(seniorRedeem, juniorRedeem, juniorSupply, seniorSupply); } // proposed solution doesn't satisfy the pool constraints but a previous submission did return ERR_NOT_NEW_BEST; } function absDistance(uint x, uint y) public pure returns(uint delta) { if (x == y) { // gas optimization: for avoiding an additional edge case of 0 distance // distance is set to the smallest value possible return 1; } if(x > y) { return safeSub(x, y); } return safeSub(y, x); } function checkRatioInRange(Fixed27 memory ratio, Fixed27 memory minRatio, Fixed27 memory maxRatio) public pure returns (bool) { if (ratio.value >= minRatio.value && ratio.value <= maxRatio.value ) { return true; } return false; } /// calculates the improvement score of a solution function _improveScore(uint seniorRedeem, uint juniorRedeem, uint juniorSupply, uint seniorSupply) internal returns(int) { Fixed27 memory currSeniorRatio = Fixed27(calcSeniorRatio(epochSeniorAsset, epochNAV, epochReserve)); int err = 0; uint impScoreRatio = 0; uint impScoreReserve = 0; if (bestRatioImprovement == 0) { // define no orders (current status) score as benchmark if no previous submission exists // if the current state satisfies all pool constraints it has the highest score (err, impScoreRatio, impScoreReserve) = scoreImprovement(currSeniorRatio, epochReserve); saveNewImprovement(impScoreRatio, impScoreReserve); } uint newReserve = calcNewReserve(seniorRedeem, juniorRedeem, seniorSupply, juniorSupply); Fixed27 memory newSeniorRatio = Fixed27(calcSeniorRatio(calcSeniorAssetValue(seniorRedeem, seniorSupply, epochSeniorAsset, newReserve, epochNAV), epochNAV, newReserve)); (err, impScoreRatio, impScoreReserve) = scoreImprovement(newSeniorRatio, newReserve); if (err == ERR_NOT_NEW_BEST) { // solution is not the best => -1 return err; } saveNewImprovement(impScoreRatio, impScoreReserve); // solution doesn't satisfy all pool constraints but improves the current violation // improvement only gets 0 points only solutions in the feasible region receive more _saveNewOptimum(seniorRedeem, juniorRedeem, juniorSupply, seniorSupply, 0); return NEW_BEST; } // the score improvement reserve uses the normalized distance to maxReserve/2 as score // as smaller the distance as higher is the score // highest possible score if solution is not violating the reserve function scoreReserveImprovement(uint newReserve_) public view returns (uint score) { if (newReserve_ <= assessor.maxReserve()) { // highest possible score return BIG_NUMBER; } // normalize reserve by defining maxReserve as ONE Fixed27 memory normalizedNewReserve = Fixed27(rdiv(newReserve_, assessor.maxReserve())); return rmul(IMPROVEMENT_WEIGHT, rdiv(ONE, absDistance(safeDiv(ONE, 2), normalizedNewReserve.value))); } // the score improvement ratio uses the normalized distance to (minRatio+maxRatio)/2 as score // as smaller the distance as higher is the score // highest possible score if solution is not violating the ratio function scoreRatioImprovement(Fixed27 memory newSeniorRatio) public view returns (uint) { (Fixed27 memory minSeniorRatio, Fixed27 memory maxSeniorRatio) = assessor.seniorRatioBounds(); if (checkRatioInRange(newSeniorRatio, minSeniorRatio, maxSeniorRatio) == true) { // highest possible score return BIG_NUMBER; } // absDistance of ratio can never be zero return rmul(IMPROVEMENT_WEIGHT, rdiv(ONE, absDistance(newSeniorRatio.value, safeDiv(safeAdd(minSeniorRatio.value, maxSeniorRatio.value), 2)))); } // internal method to save new improvement score function saveNewImprovement(uint impScoreRatio, uint impScoreReserve) internal { bestRatioImprovement = impScoreRatio; bestReserveImprovement = impScoreReserve; } /// calculates improvement score for reserve and ratio pool constraints function scoreImprovement(Fixed27 memory newSeniorRatio_, uint newReserve_) public view returns(int, uint, uint) { uint impScoreRatio = scoreRatioImprovement(newSeniorRatio_); uint impScoreReserve = scoreReserveImprovement(newReserve_); // the highest priority has fixing the currentSeniorRatio // if the ratio is improved, we can ignore reserve if (impScoreRatio > bestRatioImprovement) { // we found a new best return (NEW_BEST, impScoreRatio, impScoreReserve); } // only if the submitted solution ratio score equals the current best ratio // we determine if the submitted solution improves the reserve if (impScoreRatio == bestRatioImprovement) { if (impScoreReserve >= bestReserveImprovement) { return (NEW_BEST, impScoreRatio, impScoreReserve); } } return (ERR_NOT_NEW_BEST, impScoreRatio, impScoreReserve); } /// scores a solution in the submission period /// the scoring function is a linear function with high weights as coefficient to determine /// the priorities. (non-preemptive goal programming) function scoreSolution(uint seniorRedeem, uint juniorRedeem, uint juniorSupply, uint seniorSupply) public view returns(uint) { // the default priority order // 1. senior redeem // 2. junior redeem // 3. junior supply // 4. senior supply return safeAdd(safeAdd(safeMul(seniorRedeem, weightSeniorRedeem), safeMul(juniorRedeem, weightJuniorRedeem)), safeAdd(safeMul(juniorSupply, weightJuniorSupply), safeMul(seniorSupply, weightSeniorSupply))); } /// validates if a solution satisfy the core constraints /// returns: first constraint which is not satisfied or success function validateCoreConstraints(uint currencyAvailable, uint currencyOut, uint seniorRedeem, uint juniorRedeem, uint seniorSupply, uint juniorSupply) public view returns (int err) { // constraint 1: currency available if (currencyOut > currencyAvailable) { // currencyAvailableConstraint => -1 return ERR_CURRENCY_AVAILABLE; } // constraint 2: max order if (seniorSupply > order.seniorSupply || juniorSupply > order.juniorSupply || seniorRedeem > order.seniorRedeem || juniorRedeem > order.juniorRedeem) { // maxOrderConstraint => -2 return ERR_MAX_ORDER; } // successful => 0 return SUCCESS; } /// validates if a solution satisfies the pool constraints /// returns: first constraint which is not satisfied or success function validatePoolConstraints(uint reserve_, uint seniorAsset, uint nav_) public view returns (int err) { // constraint 3: max reserve if (reserve_ > assessor.maxReserve()) { // maxReserveConstraint => -3 return ERR_MAX_RESERVE; } uint assets = safeAdd(nav_, reserve_); (Fixed27 memory minSeniorRatio, Fixed27 memory maxSeniorRatio) = assessor.seniorRatioBounds(); // constraint 4: min senior ratio constraint if (seniorAsset < rmul(assets, minSeniorRatio.value)) { // minSeniorRatioConstraint => -4 return ERR_MIN_SENIOR_RATIO; } // constraint 5: max senior ratio constraint if (seniorAsset > rmul(assets, maxSeniorRatio.value)) { // maxSeniorRatioConstraint => -5 return ERR_MAX_SENIOR_RATIO; } // successful => 0 return SUCCESS; } /// validates if a solution satisfies core and pool constraints /// returns: first constraint which is not satisfied or success function validate(uint seniorRedeem, uint juniorRedeem, uint seniorSupply, uint juniorSupply) public view returns (int) { uint currencyAvailable = safeAdd(safeAdd(epochReserve, seniorSupply), juniorSupply); uint currencyOut = safeAdd(seniorRedeem, juniorRedeem); int err = validateCoreConstraints(currencyAvailable, currencyOut, seniorRedeem, juniorRedeem, seniorSupply, juniorSupply); if(err != SUCCESS) { return err; } uint newReserve = safeSub(currencyAvailable, currencyOut); if(poolClosing == true) { if(seniorSupply == 0 && juniorSupply == 0) { return SUCCESS; } return ERR_POOL_CLOSING; } return validatePoolConstraints(newReserve, calcSeniorAssetValue(seniorRedeem, seniorSupply, epochSeniorAsset, newReserve, epochNAV), epochNAV); } /// public method to execute an epoch which required a submission period and the challenge period is over function executeEpoch() public { require(block.timestamp >= minChallengePeriodEnd && minChallengePeriodEnd != 0); _executeEpoch(bestSubmission.seniorRedeem ,bestSubmission.juniorRedeem, bestSubmission.seniorSupply, bestSubmission.juniorSupply); } /// calculates a new senior asset value based on senior redeem and senior supply function calcSeniorAssetValue(uint seniorRedeem, uint seniorSupply, uint currSeniorAsset, uint reserve_, uint nav_) public pure returns (uint seniorAsset) { seniorAsset = safeSub(safeAdd(currSeniorAsset, seniorSupply), seniorRedeem); uint assets = calcAssets(nav_, reserve_); if(seniorAsset > assets) { seniorAsset = assets; } return seniorAsset; } /// calculates the net wealth in the system /// NAV for ongoing loans and currency in reserve function calcAssets(uint NAV, uint reserve_) public pure returns(uint) { return safeAdd(NAV, reserve_); } /// calculates the senior ratio function calcSeniorRatio(uint seniorAsset, uint NAV, uint reserve_) public pure returns(uint) { // note: NAV + reserve == seniorAsset + juniorAsset (loop invariant: always true) uint assets = calcAssets(NAV, reserve_); if(assets == 0) { return 0; } return rdiv(seniorAsset, assets); } /// calculates the percentage of an order type which can be fulfilled for an epoch function calcFulfillment(uint amount, uint totalOrder) public pure returns(Fixed27 memory percent) { if(amount == 0 || totalOrder == 0) { return Fixed27(0); } return Fixed27(rdiv(amount, totalOrder)); } /// calculates the new reserve after a solution would be executed function calcNewReserve(uint seniorRedeem, uint juniorRedeem, uint seniorSupply, uint juniorSupply) public view returns(uint) { return safeSub(safeAdd(safeAdd(epochReserve, seniorSupply), juniorSupply), safeAdd(seniorRedeem, juniorRedeem)); } /// internal execute epoch communicates the order fulfillment of the best solution to the tranches function _executeEpoch(uint seniorRedeem, uint juniorRedeem, uint seniorSupply, uint juniorSupply) internal { uint epochID = safeAdd(lastEpochExecuted, 1); seniorTranche.epochUpdate(epochID, calcFulfillment(seniorSupply, order.seniorSupply).value, calcFulfillment(seniorRedeem, order.seniorRedeem).value, epochSeniorTokenPrice.value,order.seniorSupply, order.seniorRedeem); juniorTranche.epochUpdate(epochID, calcFulfillment(juniorSupply, order.juniorSupply).value, calcFulfillment(juniorRedeem, order.juniorRedeem).value, epochJuniorTokenPrice.value, order.juniorSupply, order.juniorRedeem); uint newReserve = calcNewReserve(seniorRedeem, juniorRedeem , seniorSupply, juniorSupply); uint seniorAsset = calcSeniorAssetValue(seniorRedeem, seniorSupply, epochSeniorAsset, newReserve, epochNAV); uint newSeniorRatio = calcSeniorRatio(seniorAsset, epochNAV, newReserve); // assessor performs senior debt reBalancing according to new ratio assessor.changeSeniorAsset(newSeniorRatio, seniorSupply, seniorRedeem); // the new reserve after this epoch can be used for new loans assessor.changeReserveAvailable(newReserve); // reset state for next epochs lastEpochExecuted = epochID; submissionPeriod = false; minChallengePeriodEnd = 0; bestSubScore = 0; gotFullValidSolution = false; bestRatioImprovement = 0; bestReserveImprovement = 0; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"challengeTime_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"address","name":"guy","type":"address"},{"indexed":true,"internalType":"bytes32","name":"foo","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"bar","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"constant":true,"inputs":[],"name":"BIG_NUMBER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_CURRENCY_AVAILABLE","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_MAX_ORDER","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_MAX_RESERVE","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_MAX_SENIOR_RATIO","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_MIN_SENIOR_RATIO","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NOT_NEW_BEST","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_POOL_CLOSING","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"IMPROVEMENT_WEIGHT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NEW_BEST","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SUCCESS","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"absDistance","outputs":[{"internalType":"uint256","name":"delta","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"assessor","outputs":[{"internalType":"contract AssessorLike_3","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bestRatioImprovement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bestReserveImprovement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bestSubScore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bestSubmission","outputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"NAV","type":"uint256"},{"internalType":"uint256","name":"reserve_","type":"uint256"}],"name":"calcAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"totalOrder","type":"uint256"}],"name":"calcFulfillment","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct FixedPoint.Fixed27","name":"percent","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"}],"name":"calcNewReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"},{"internalType":"uint256","name":"currSeniorAsset","type":"uint256"},{"internalType":"uint256","name":"reserve_","type":"uint256"},{"internalType":"uint256","name":"nav_","type":"uint256"}],"name":"calcSeniorAssetValue","outputs":[{"internalType":"uint256","name":"seniorAsset","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"seniorAsset","type":"uint256"},{"internalType":"uint256","name":"NAV","type":"uint256"},{"internalType":"uint256","name":"reserve_","type":"uint256"}],"name":"calcSeniorRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"challengeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct FixedPoint.Fixed27","name":"ratio","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct FixedPoint.Fixed27","name":"minRatio","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct FixedPoint.Fixed27","name":"maxRatio","type":"tuple"}],"name":"checkRatioInRange","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"closeEpoch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"contractName","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"depend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"epochJuniorTokenPrice","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epochNAV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epochReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epochSeniorAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epochSeniorTokenPrice","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"executeEpoch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gotFullValidSolution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"juniorTranche","outputs":[{"internalType":"contract EpochTrancheLike","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastEpochClosed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastEpochExecuted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minChallengePeriodEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimumEpochTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"order","outputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"poolClosing","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"rdiv","outputs":[{"internalType":"uint256","name":"z","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reserve","outputs":[{"internalType":"contract ReserveLike_3","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"rmul","outputs":[{"internalType":"uint256","name":"z","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"safeAdd","outputs":[{"internalType":"uint256","name":"z","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"safeDiv","outputs":[{"internalType":"uint256","name":"z","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"safeMul","outputs":[{"internalType":"uint256","name":"z","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"safeSub","outputs":[{"internalType":"uint256","name":"z","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct FixedPoint.Fixed27","name":"newSeniorRatio_","type":"tuple"},{"internalType":"uint256","name":"newReserve_","type":"uint256"}],"name":"scoreImprovement","outputs":[{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct FixedPoint.Fixed27","name":"newSeniorRatio","type":"tuple"}],"name":"scoreRatioImprovement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"newReserve_","type":"uint256"}],"name":"scoreReserveImprovement","outputs":[{"internalType":"uint256","name":"score","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"}],"name":"scoreSolution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"seniorTranche","outputs":[{"internalType":"contract EpochTrancheLike","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"submissionPeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"}],"name":"submitSolution","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"}],"name":"validate","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"currencyAvailable","type":"uint256"},{"internalType":"uint256","name":"currencyOut","type":"uint256"},{"internalType":"uint256","name":"seniorRedeem","type":"uint256"},{"internalType":"uint256","name":"juniorRedeem","type":"uint256"},{"internalType":"uint256","name":"seniorSupply","type":"uint256"},{"internalType":"uint256","name":"juniorSupply","type":"uint256"}],"name":"validateCoreConstraints","outputs":[{"internalType":"int256","name":"err","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"reserve_","type":"uint256"},{"internalType":"uint256","name":"seniorAsset","type":"uint256"},{"internalType":"uint256","name":"nav_","type":"uint256"}],"name":"validatePoolConstraints","outputs":[{"internalType":"int256","name":"err","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weightJuniorRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weightJuniorSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weightSeniorRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weightSeniorSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405262015180600255620f4240601955620186a0601a55612710601b556103e8601c556000602160006101000a81548160ff0219169083151502179055503480156200004d57600080fd5b5060405162003fbc38038062003fbc8339818101604052620000739190810190620000eb565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080601e81905550426001819055506001600881905550506200013b565b600081519050620000e58162000121565b92915050565b600060208284031215620000fe57600080fd5b60006200010e84828501620000d4565b91505092915050565b6000819050919050565b6200012c8162000117565b81146200013857600080fd5b50565b613e71806200014b6000396000f3fe608060405234801561001057600080fd5b50600436106103e65760003560e01c8063965762d01161020a578063b5931f7c11610125578063cea3e113116100b8578063d73f696811610087578063d73f696814610c51578063dfaba3d714610c6f578063e6cb901314610ca1578063e8e88f0014610cd1578063fefe740e14610cdb576103e6565b8063cea3e11314610bc7578063d05c78da14610be5578063d0a6d1a614610c15578063d2a27df914610c33576103e6565b8063bf353dbb116100f4578063bf353dbb14610b3f578063c91145cc14610b6f578063cd3293de14610b9f578063cdd5f2c814610bbd576103e6565b8063b5931f7c14610ab2578063b981bab914610ae2578063bc83428914610b00578063bf15071d14610b1e576103e6565b80639f8c924c1161019d578063a80f42311161016c578063a80f423114610a28578063a8781af414610a46578063acda8a9914610a76578063b2c5fb1e14610a94576103e6565b80639f8c924c1461098c578063a293d1e8146109bc578063a4727272146109ec578063a639d0dc14610a0a576103e6565b80639c314c0b116101d95780639c314c0b146108f25780639c52a7f1146109225780639dedbdf51461093e5780639ed197f61461096e576103e6565b8063965762d01461086a57806398558d391461089a5780639a5fde37146108b85780639adc339d146108d6576103e6565b806351cace0511610305578063645efa4011610298578063675e8ad911610267578063675e8ad9146107c257806374935b30146107f257806376671808146108105780637973aa561461082e57806386d4779e1461084c576103e6565b8063645efa401461073a57806364c1cf331461075857806365fae35e146107765780636745702214610792576103e6565b80635720d0db116102d45780635720d0db1461069e57806359d24eca146106bc5780635af8dcf3146106ec57806361d7f3811461071c576103e6565b806351cace051461061157806352a12f5914610632578063537dc21a1461066257806355dd18fc14610680576103e6565b80632339e6341161037d5780633e39cbb21161034c5780633e39cbb21461058757806341fcd35d146105b7578063455a2b77146105d557806349579a86146105f3576103e6565b80632339e6341461051157806329ae81141461052f5780632f4fda301461054b57806334bd140e14610569576103e6565b80630f477425116103b95780630f477425146104995780631821d696146104b7578063185fde7e146104d557806319a369c9146104f3576103e6565b8063043fa2fd146103eb5780630d0bbddb1461041b5780630d2305f41461044b5780630e2286d314610469575b600080fd5b61040560048036036104009190810190613496565b610d0b565b6040516104129190613ab5565b60405180910390f35b610435600480360361043091908101906133b9565b610d1f565b6040516104429190613901565b60405180910390f35b610453610d5b565b6040516104609190613ab5565b60405180910390f35b610483600480360361047e9190810190613496565b610d67565b6040516104909190613ab5565b60405180910390f35b6104a1610de5565b6040516104ae919061396d565b60405180910390f35b6104bf610e09565b6040516104cc919061391c565b60405180910390f35b6104dd610e2f565b6040516104ea9190613901565b60405180910390f35b6104fb610e42565b6040516105089190613ab5565b60405180910390f35b610519610e48565b6040516105269190613ab5565b60405180910390f35b610549600480360361054491908101906132ef565b610e4e565b005b610553611015565b6040516105609190613ab5565b60405180910390f35b610571611027565b60405161057e919061396d565b60405180910390f35b6105a1600480360361059c919081019061350e565b61104b565b6040516105ae9190613ab5565b60405180910390f35b6105bf611082565b6040516105cc9190613901565b60405180910390f35b6105dd611095565b6040516105ea9190613ab5565b60405180910390f35b6105fb61109b565b6040516106089190613ab5565b60405180910390f35b6106196110a1565b6040516106299493929190613bfa565b60405180910390f35b61064c60048036036106479190810190613637565b6110bf565b604051610659919061396d565b60405180910390f35b61066a611162565b6040516106779190613ab5565b60405180910390f35b610688611168565b6040516106959190613ab5565b60405180910390f35b6106a661116e565b6040516106b39190613ab5565b60405180910390f35b6106d660048036036106d1919081019061332b565b611174565b6040516106e39190613ab5565b60405180910390f35b6107066004803603610701919081019061355d565b6112ab565b6040516107139190613ab5565b60405180910390f35b6107246112ff565b6040516107319190613ab5565b60405180910390f35b61074261130b565b60405161074f919061396d565b60405180910390f35b61076061132f565b60405161076d9190613ab5565b60405180910390f35b610790600480360361078b919081019061328a565b611335565b005b6107ac60048036036107a79190810190613496565b611454565b6040516107b99190613ab5565b60405180910390f35b6107dc60048036036107d7919081019061350e565b61147d565b6040516107e9919061396d565b60405180910390f35b6107fa61169e565b6040516108079190613ab5565b60405180910390f35b6108186116a4565b6040516108259190613ab5565b60405180910390f35b6108366116aa565b604051610843919061396d565b60405180910390f35b6108546116ce565b6040516108619190613937565b60405180910390f35b610884600480360361087f9190810190613496565b6116f4565b6040516108919190613a9a565b60405180910390f35b6108a2611748565b6040516108af9190613ab5565b60405180910390f35b6108c061174e565b6040516108cd9190613ab5565b60405180910390f35b6108f060048036036108eb91908101906132b3565b611754565b005b61090c6004803603610907919081019061355d565b611963565b6040516109199190613ab5565b60405180910390f35b61093c6004803603610937919081019061328a565b611996565b005b61095860048036036109539190810190613496565b611ab5565b6040516109659190613ab5565b60405180910390f35b610976611af4565b6040516109839190613ab5565b60405180910390f35b6109a660048036036109a191908101906135c0565b611afa565b6040516109b39190613ab5565b60405180910390f35b6109d660048036036109d19190810190613496565b611b38565b6040516109e39190613ab5565b60405180910390f35b6109f4611b88565b604051610a019190613ab5565b60405180910390f35b610a12611b8e565b604051610a1f9190613937565b60405180910390f35b610a30611bb4565b604051610a3d919061396d565b60405180910390f35b610a606004803603610a5b9190810190613444565b611bb9565b604051610a6d9190613ab5565b60405180910390f35b610a7e611d85565b604051610a8b9190613ab5565b60405180910390f35b610a9c611d8b565b604051610aa99190613901565b60405180910390f35b610acc6004803603610ac79190810190613496565b611d9e565b604051610ad99190613ab5565b60405180910390f35b610aea611db2565b604051610af7919061396d565b60405180910390f35b610b08611dd6565b604051610b15919061396d565b60405180910390f35b610b26611dfa565b604051610b369493929190613bfa565b60405180910390f35b610b596004803603610b54919081019061328a565b611e18565b604051610b669190613ab5565b60405180910390f35b610b896004803603610b84919081019061355d565b611e30565b604051610b96919061396d565b60405180910390f35b610ba7611ece565b604051610bb49190613952565b60405180910390f35b610bc5611ef4565b005b610bcf6128c1565b604051610bdc919061396d565b60405180910390f35b610bff6004803603610bfa9190810190613496565b6128e5565b604051610c0c9190613ab5565b60405180910390f35b610c1d612947565b604051610c2a919061396d565b60405180910390f35b610c3b61294c565b604051610c489190613ab5565b60405180910390f35b610c59612952565b604051610c669190613ab5565b60405180910390f35b610c896004803603610c849190810190613408565b612958565b604051610c9893929190613988565b60405180910390f35b610cbb6004803603610cb69190810190613496565b6129e9565b604051610cc89190613ab5565b60405180910390f35b610cd9612a39565b005b610cf56004803603610cf0919081019061355d565b612a79565b604051610d02919061396d565b60405180910390f35b6000610d1783836129e9565b905092915050565b60008260000151846000015110158015610d4157508160000151846000015111155b15610d4f5760019050610d54565b600090505b9392505050565b60138060000154905081565b6000808211610dab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da290613a5a565b60405180910390fd5b81610dd5610dc5856b033b2e3c9fd0803ce80000006128e5565b60028581610dcf57fe5b046129e9565b81610ddc57fe5b04905092915050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd81565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601860009054906101000a900460ff1681565b60195481565b60175481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610e9957600080fd5b7f6368616c6c656e676554696d6500000000000000000000000000000000000000821415610ecd5780601e81905550611011565b7f6d696e696d756d45706f636854696d6500000000000000000000000000000000821415610f015780600281905550611010565b7f77656967687453656e696f7252656465656d0000000000000000000000000000821415610f35578060198190555061100f565b7f7765696768744a756e696f7252656465656d0000000000000000000000000000821415610f695780601a8190555061100e565b7f7765696768744a756e696f72537570706c790000000000000000000000000000821415610f9d5780601b8190555061100d565b7f77656967687453656e696f72537570706c790000000000000000000000000000821415610fd15780601c8190555061100c565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611003906139da565b60405180910390fd5b5b5b5b5b5b5050565b6b033b2e3c9fd0803ce8000000800281565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb81565b6000806110588484610d0b565b9050600081141561106d57600091505061107b565b6110778582610d67565b9150505b9392505050565b602160009054906101000a900460ff1681565b60155481565b601c5481565b60098060000154908060010154908060020154908060030154905084565b6000868611156110f1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9050611158565b600f600301548311806111085750600f6002015482115b806111175750600f6000015485115b806111265750600f6001015484115b15611153577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9050611158565b600090505b9695505050505050565b60165481565b60025481565b601b5481565b600061117e6131b3565b6111866131b3565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bae994936040518163ffffffff1660e01b8152600401604080518083038186803b1580156111ed57600080fd5b505afa158015611201573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611225919081019061337d565b9150915060011515611238858484610d1f565b15151415611258576b033b2e3c9fd0803ce80000008002925050506112a6565b6112a161271061129c6b033b2e3c9fd0803ce8000000611297886000015161129261128b896000015189600001516129e9565b6002611d9e565b611ab5565b610d67565b611454565b925050505b919050565b60006112f56112d06112bf876019546128e5565b6112cb87601a546128e5565b6129e9565b6112f06112df86601b546128e5565b6112eb86601c546128e5565b6129e9565b6129e9565b9050949350505050565b60148060000154905081565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc81565b60075481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461138057600080fd5b60008060006004359250602435915034905060016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081833373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168460003660405161144693929190613ad0565b60405180910390a450505050565b60006b033b2e3c9fd0803ce800000061146d84846128e5565b8161147457fe5b04905092915050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3b3a9fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114e757600080fd5b505afa1580156114fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061151f919081019061346d565b84111561154e577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9050611697565b600061155a83866129e9565b90506115646131b3565b61156c6131b3565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bae994936040518163ffffffff1660e01b8152600401604080518083038186803b1580156115d357600080fd5b505afa1580156115e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061160b919081019061337d565b9150915061161d838360000151611454565b86101561164f577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9350505050611697565b61165d838260000151611454565b86111561168f577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb9350505050611697565b600093505050505b9392505050565b601a5481565b60085481565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116fc6131b3565b600083148061170b5750600082145b1561172757604051806020016040528060008152509050611742565b604051806020016040528061173c8585610d67565b81525090505b92915050565b60015481565b601d5481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461179f57600080fd5b7f6a756e696f725472616e6368650000000000000000000000000000000000000082141561180d5780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195f565b7f73656e696f725472616e6368650000000000000000000000000000000000000082141561187b5780600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195e565b7f72657365727665000000000000000000000000000000000000000000000000008214156118e95780600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195d565b7f6173736573736f720000000000000000000000000000000000000000000000008214156119575780600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195c565b600080fd5b5b5b5b5050565b600061198c61197d611977601754866129e9565b846129e9565b61198787876129e9565b611b38565b9050949350505050565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146119e157600080fd5b60008060006004359250602435915034905060008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081833373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684600036604051611aa793929190613ad0565b60405180910390a450505050565b600081831415611ac85760019050611aee565b81831115611ae157611ada8383611b38565b9050611aee565b611aeb8284611b38565b90505b92915050565b60205481565b6000611b0f611b0985876129e9565b87611b38565b90506000611b1d8385610d0b565b905080821115611b2b578091505b8191505095945050505050565b6000828284039150811115611b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7990613a7a565b60405180910390fd5b92915050565b601e5481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3b3a9fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2357600080fd5b505afa158015611c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c5b919081019061346d565b8211611c77576b033b2e3c9fd0803ce800000080029050611d80565b611c7f6131b3565b6040518060200160405280611d3385600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3b3a9fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cf657600080fd5b505afa158015611d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d2e919081019061346d565b610d67565b8152509050611d7c612710611d776b033b2e3c9fd0803ce8000000611d72611d686b033b2e3c9fd0803ce80000006002611d9e565b8660000151611ab5565b610d67565b611454565b9150505b919050565b601f5481565b600e60009054906101000a900460ff1681565b6000818381611da957fe5b04905092915050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa81565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b600f8060000154908060010154908060020154908060030154905084565b60006020528060005260406000206000915090505481565b600060011515601860009054906101000a900460ff16151514611e88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7f90613a3a565b60405180910390fd5b6000611e9686868686612b6a565b9050600081148015611eaa57506000601d54145b15611ec257611ebb42601e546129e9565b601d819055505b80915050949350505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600254611f0342600154611b38565b1015611f0e57600080fd5b60001515601860009054906101000a900460ff16151514611f2e57600080fd5b42600181905550600160085401600881905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b69ef8a86040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611fab57600080fd5b505af1158015611fbf573d6000803e3d6000fd5b50505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f825d66860006040518263ffffffff1660e01b815260040161201f91906139bf565b600060405180830381600087803b15801561203957600080fd5b505af115801561204d573d6000803e3d6000fd5b50505050600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd5f2c86040518163ffffffff1660e01b81526004016040805180830381600087803b1580156120bd57600080fd5b505af11580156120d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506120f591908101906134d2565b91509150600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd5f2c86040518163ffffffff1660e01b81526004016040805180830381600087803b15801561216557600080fd5b505af1158015612179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061219d91908101906134d2565b915091506122ed600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c308d746040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561220e57600080fd5b505af1158015612222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612246919081019061346d565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ac62d3856040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156122b057600080fd5b505af11580156122c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506122e8919081019061346d565b6129e9565b601681905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1739bea6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561235d57600080fd5b505af1158015612371573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612395919081019061346d565b601581905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad7a672f6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561240557600080fd5b505af1158015612419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061243d919081019061346d565b6017819055506000811480156124535750600083145b801561245f5750600082145b801561246b5750600084145b1561266657600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca160085460008060008060006040518763ffffffff1660e01b81526004016124da96959493929190613b39565b600060405180830381600087803b1580156124f457600080fd5b505af1158015612508573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca160085460008060008060006040518763ffffffff1660e01b815260040161257696959493929190613b39565b600060405180830381600087803b15801561259057600080fd5b505af11580156125a4573d6000803e3d6000fd5b50505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663493046656125f760165460155460175461104b565b6000806040518463ffffffff1660e01b815260040161261893929190613b02565b600060405180830381600087803b15801561263257600080fd5b505af1158015612646573d6000803e3d6000fd5b5050505061265760075460016129e9565b600781905550505050506128bf565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e59990f96015546017546040518363ffffffff1660e01b81526004016126c7929190613b9a565b602060405180830381600087803b1580156126e157600080fd5b505af11580156126f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127199190810190613354565b601360008201518160000155905050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633cc893bb6015546017546040518363ffffffff1660e01b8152600401612789929190613b9a565b602060405180830381600087803b1580156127a357600080fd5b505af11580156127b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127db9190810190613354565b60146000820151816000015590505060006014600001541415612814576001602160006101000a81548160ff0219169083151502179055505b61282381601360000154611454565b600f6000018190555061283b83601460000154611454565b600f6001018190555083600f6002018190555081600f60030181905550600061287a600f60000154600f60010154600f60030154600f60020154612a79565b141561289f57612896600f60000154600f600101548487612ce7565b505050506128bf565b6001601860006101000a81548160ff021916908315150217905550505050505b565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff981565b60008082148061290257508282838502925082816128ff57fe5b04145b612941576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612938906139fa565b60405180910390fd5b92915050565b600081565b600d5481565b61271081565b60008060008061296786611174565b9050600061297486611bb9565b9050601f54821115612991576000828294509450945050506129e2565b601f548214156129b65760205481106129b5576000828294509450945050506129e2565b5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa828294509450945050505b9250925092565b6000828284019150811015612a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2a90613a1a565b60405180910390fd5b92915050565b601d544210158015612a4e57506000601d5414155b612a5757600080fd5b612a77600960000154600960010154600960030154600960020154612ce7565b565b600080612a91612a8b601754866129e9565b846129e9565b90506000612a9f87876129e9565b90506000612ab183838a8a8a8a6110bf565b905060008114612ac657809350505050612b62565b6000612ad28484611b38565b905060011515602160009054906101000a900460ff1615151415612b3e57600087148015612b005750600086145b15612b12576000945050505050612b62565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9945050505050612b62565b612b5b81612b538b8a60165486601554611afa565b60155461147d565b9450505050505b949350505050565b600080612b7986868587612a79565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811480612bc857507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81145b15612bd65780915050612cdf565b6000811415612c8a576000612bed878786886112ab565b905060001515600e60009054906101000a900460ff1615151415612c3e576001600e60006101000a81548160ff021916908315150217905550612c338787878785613047565b600092505050612cdf565b600d54811015612c72577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa92505050612cdf565b612c7f8787878785613047565b600092505050612cdf565b60001515600e60009054906101000a900460ff1615151415612cba57612cb28686868661307d565b915050612cdf565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9150505b949350505050565b6000612cf660075460016129e9565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca182612d4686600f600301546116f4565b60000151612d5989600f600001546116f4565b60000151601360000154600f60030154600f600001546040518763ffffffff1660e01b8152600401612d9096959493929190613c3f565b600060405180830381600087803b158015612daa57600080fd5b505af1158015612dbe573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca182612e1085600f600201546116f4565b60000151612e2388600f600101546116f4565b60000151601460000154600f60020154600f600101546040518763ffffffff1660e01b8152600401612e5a96959493929190613c3f565b600060405180830381600087803b158015612e7457600080fd5b505af1158015612e88573d6000803e3d6000fd5b505050506000612e9a86868686611963565b90506000612eaf878660165485601554611afa565b90506000612ec0826015548561104b565b9050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634930466582888b6040518463ffffffff1660e01b8152600401612f2193929190613bc3565b600060405180830381600087803b158015612f3b57600080fd5b505af1158015612f4f573d6000803e3d6000fd5b50505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f825d668846040518263ffffffff1660e01b8152600401612fae9190613ab5565b600060405180830381600087803b158015612fc857600080fd5b505af1158015612fdc573d6000803e3d6000fd5b50505050836007819055506000601860006101000a81548160ff0219169083151502179055506000601d819055506000600d819055506000600e60006101000a81548160ff0219169083151502179055506000601f8190555060006020819055505050505050505050565b8460096000018190555083600960010181905550826009600201819055508160096003018190555080600d819055505050505050565b60006130876131b3565b60405180602001604052806130a360165460155460175461104b565b81525090506000809050600080905060008090506000601f5414156130e5576130ce84601754612958565b8093508194508295505050506130e482826131a1565b5b60006130f38a8a898b611963565b90506130fd6131b3565b604051806020016040528061312561311c8e8c60165488601554611afa565b6015548661104b565b81525090506131348183612958565b8095508196508297505050507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa85141561317657849650505050505050613199565b61318084846131a1565b61318e8b8b8b8b6000613047565b600096505050505050505b949350505050565b81601f81905550806020819055505050565b6040518060200160405280600081525090565b6000813590506131d581613de9565b92915050565b6000813590506131ea81613e00565b92915050565b60006020828403121561320257600080fd5b61320c6020613ca0565b9050600061321c84828501613260565b60008301525092915050565b60006020828403121561323a57600080fd5b6132446020613ca0565b9050600061325484828501613275565b60008301525092915050565b60008135905061326f81613e17565b92915050565b60008151905061328481613e17565b92915050565b60006020828403121561329c57600080fd5b60006132aa848285016131c6565b91505092915050565b600080604083850312156132c657600080fd5b60006132d4858286016131db565b92505060206132e5858286016131c6565b9150509250929050565b6000806040838503121561330257600080fd5b6000613310858286016131db565b925050602061332185828601613260565b9150509250929050565b60006020828403121561333d57600080fd5b600061334b848285016131f0565b91505092915050565b60006020828403121561336657600080fd5b600061337484828501613228565b91505092915050565b6000806040838503121561339057600080fd5b600061339e85828601613228565b92505060206133af85828601613228565b9150509250929050565b6000806000606084860312156133ce57600080fd5b60006133dc868287016131f0565b93505060206133ed868287016131f0565b92505060406133fe868287016131f0565b9150509250925092565b6000806040838503121561341b57600080fd5b6000613429858286016131f0565b925050602061343a85828601613260565b9150509250929050565b60006020828403121561345657600080fd5b600061346484828501613260565b91505092915050565b60006020828403121561347f57600080fd5b600061348d84828501613275565b91505092915050565b600080604083850312156134a957600080fd5b60006134b785828601613260565b92505060206134c885828601613260565b9150509250929050565b600080604083850312156134e557600080fd5b60006134f385828601613275565b925050602061350485828601613275565b9150509250929050565b60008060006060848603121561352357600080fd5b600061353186828701613260565b935050602061354286828701613260565b925050604061355386828701613260565b9150509250925092565b6000806000806080858703121561357357600080fd5b600061358187828801613260565b945050602061359287828801613260565b93505060406135a387828801613260565b92505060606135b487828801613260565b91505092959194509250565b600080600080600060a086880312156135d857600080fd5b60006135e688828901613260565b95505060206135f788828901613260565b945050604061360888828901613260565b935050606061361988828901613260565b925050608061362a88828901613260565b9150509295509295909350565b60008060008060008060c0878903121561365057600080fd5b600061365e89828a01613260565b965050602061366f89828a01613260565b955050604061368089828a01613260565b945050606061369189828a01613260565b93505060806136a289828a01613260565b92505060a06136b389828a01613260565b9150509295509295509295565b6136c981613d01565b82525050565b60006136db8385613ccd565b93506136e8838584613dc9565b6136f183613dd8565b840190509392505050565b61370581613d4b565b82525050565b61371481613d6f565b82525050565b61372381613d93565b82525050565b61373281613d17565b82525050565b61374181613db7565b82525050565b6000613754600b83613cde565b91507f756e6b6f776e2d6e616d650000000000000000000000000000000000000000006000830152602082019050919050565b6000613794600f83613cde565b91507f736166652d6d756c2d6661696c656400000000000000000000000000000000006000830152602082019050919050565b60006137d4600f83613cde565b91507f736166652d6164642d6661696c656400000000000000000000000000000000006000830152602082019050919050565b6000613814601c83613cde565b91507f7375626d697373696f6e2d706572696f642d6e6f742d616374697665000000006000830152602082019050919050565b6000613854601083613cde565b91507f6469766973696f6e206279207a65726f000000000000000000000000000000006000830152602082019050919050565b6000613894600f83613cde565b91507f736166652d7375622d6661696c656400000000000000000000000000000000006000830152602082019050919050565b6020820160008201516138dd60008501826138e3565b50505050565b6138ec81613d41565b82525050565b6138fb81613d41565b82525050565b600060208201905061391660008301846136c0565b92915050565b600060208201905061393160008301846136fc565b92915050565b600060208201905061394c600083018461370b565b92915050565b6000602082019050613967600083018461371a565b92915050565b60006020820190506139826000830184613729565b92915050565b600060608201905061399d6000830186613729565b6139aa60208301856138f2565b6139b760408301846138f2565b949350505050565b60006020820190506139d46000830184613738565b92915050565b600060208201905081810360008301526139f381613747565b9050919050565b60006020820190508181036000830152613a1381613787565b9050919050565b60006020820190508181036000830152613a33816137c7565b9050919050565b60006020820190508181036000830152613a5381613807565b9050919050565b60006020820190508181036000830152613a7381613847565b9050919050565b60006020820190508181036000830152613a9381613887565b9050919050565b6000602082019050613aaf60008301846138c7565b92915050565b6000602082019050613aca60008301846138f2565b92915050565b6000604082019050613ae560008301866138f2565b8181036020830152613af88184866136cf565b9050949350505050565b6000606082019050613b1760008301866138f2565b613b246020830185613738565b613b316040830184613738565b949350505050565b600060c082019050613b4e60008301896138f2565b613b5b6020830188613738565b613b686040830187613738565b613b756060830186613738565b613b826080830185613738565b613b8f60a0830184613738565b979650505050505050565b6000604082019050613baf60008301856138f2565b613bbc60208301846138f2565b9392505050565b6000606082019050613bd860008301866138f2565b613be560208301856138f2565b613bf260408301846138f2565b949350505050565b6000608082019050613c0f60008301876138f2565b613c1c60208301866138f2565b613c2960408301856138f2565b613c3660608301846138f2565b95945050505050565b600060c082019050613c5460008301896138f2565b613c6160208301886138f2565b613c6e60408301876138f2565b613c7b60608301866138f2565b613c8860808301856138f2565b613c9560a08301846138f2565b979650505050505050565b6000604051905081810181811067ffffffffffffffff82111715613cc357600080fd5b8060405250919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613cfa82613d21565b9050919050565b60008115159050919050565b6000819050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613d5682613d5d565b9050919050565b6000613d6882613d21565b9050919050565b6000613d7a82613d81565b9050919050565b6000613d8c82613d21565b9050919050565b6000613d9e82613da5565b9050919050565b6000613db082613d21565b9050919050565b6000613dc282613d41565b9050919050565b82818337600083830152505050565b6000601f19601f8301169050919050565b613df281613cef565b8114613dfd57600080fd5b50565b613e0981613d0d565b8114613e1457600080fd5b50565b613e2081613d41565b8114613e2b57600080fd5b5056fea365627a7a723158202761a35bf5ba40d36a4408ee85844e7627553c6f0c8e7c42702ba603804da73a6c6578706572696d656e74616cf564736f6c634300050f00400000000000000000000000000000000000000000000000000000000000000708
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103e65760003560e01c8063965762d01161020a578063b5931f7c11610125578063cea3e113116100b8578063d73f696811610087578063d73f696814610c51578063dfaba3d714610c6f578063e6cb901314610ca1578063e8e88f0014610cd1578063fefe740e14610cdb576103e6565b8063cea3e11314610bc7578063d05c78da14610be5578063d0a6d1a614610c15578063d2a27df914610c33576103e6565b8063bf353dbb116100f4578063bf353dbb14610b3f578063c91145cc14610b6f578063cd3293de14610b9f578063cdd5f2c814610bbd576103e6565b8063b5931f7c14610ab2578063b981bab914610ae2578063bc83428914610b00578063bf15071d14610b1e576103e6565b80639f8c924c1161019d578063a80f42311161016c578063a80f423114610a28578063a8781af414610a46578063acda8a9914610a76578063b2c5fb1e14610a94576103e6565b80639f8c924c1461098c578063a293d1e8146109bc578063a4727272146109ec578063a639d0dc14610a0a576103e6565b80639c314c0b116101d95780639c314c0b146108f25780639c52a7f1146109225780639dedbdf51461093e5780639ed197f61461096e576103e6565b8063965762d01461086a57806398558d391461089a5780639a5fde37146108b85780639adc339d146108d6576103e6565b806351cace0511610305578063645efa4011610298578063675e8ad911610267578063675e8ad9146107c257806374935b30146107f257806376671808146108105780637973aa561461082e57806386d4779e1461084c576103e6565b8063645efa401461073a57806364c1cf331461075857806365fae35e146107765780636745702214610792576103e6565b80635720d0db116102d45780635720d0db1461069e57806359d24eca146106bc5780635af8dcf3146106ec57806361d7f3811461071c576103e6565b806351cace051461061157806352a12f5914610632578063537dc21a1461066257806355dd18fc14610680576103e6565b80632339e6341161037d5780633e39cbb21161034c5780633e39cbb21461058757806341fcd35d146105b7578063455a2b77146105d557806349579a86146105f3576103e6565b80632339e6341461051157806329ae81141461052f5780632f4fda301461054b57806334bd140e14610569576103e6565b80630f477425116103b95780630f477425146104995780631821d696146104b7578063185fde7e146104d557806319a369c9146104f3576103e6565b8063043fa2fd146103eb5780630d0bbddb1461041b5780630d2305f41461044b5780630e2286d314610469575b600080fd5b61040560048036036104009190810190613496565b610d0b565b6040516104129190613ab5565b60405180910390f35b610435600480360361043091908101906133b9565b610d1f565b6040516104429190613901565b60405180910390f35b610453610d5b565b6040516104609190613ab5565b60405180910390f35b610483600480360361047e9190810190613496565b610d67565b6040516104909190613ab5565b60405180910390f35b6104a1610de5565b6040516104ae919061396d565b60405180910390f35b6104bf610e09565b6040516104cc919061391c565b60405180910390f35b6104dd610e2f565b6040516104ea9190613901565b60405180910390f35b6104fb610e42565b6040516105089190613ab5565b60405180910390f35b610519610e48565b6040516105269190613ab5565b60405180910390f35b610549600480360361054491908101906132ef565b610e4e565b005b610553611015565b6040516105609190613ab5565b60405180910390f35b610571611027565b60405161057e919061396d565b60405180910390f35b6105a1600480360361059c919081019061350e565b61104b565b6040516105ae9190613ab5565b60405180910390f35b6105bf611082565b6040516105cc9190613901565b60405180910390f35b6105dd611095565b6040516105ea9190613ab5565b60405180910390f35b6105fb61109b565b6040516106089190613ab5565b60405180910390f35b6106196110a1565b6040516106299493929190613bfa565b60405180910390f35b61064c60048036036106479190810190613637565b6110bf565b604051610659919061396d565b60405180910390f35b61066a611162565b6040516106779190613ab5565b60405180910390f35b610688611168565b6040516106959190613ab5565b60405180910390f35b6106a661116e565b6040516106b39190613ab5565b60405180910390f35b6106d660048036036106d1919081019061332b565b611174565b6040516106e39190613ab5565b60405180910390f35b6107066004803603610701919081019061355d565b6112ab565b6040516107139190613ab5565b60405180910390f35b6107246112ff565b6040516107319190613ab5565b60405180910390f35b61074261130b565b60405161074f919061396d565b60405180910390f35b61076061132f565b60405161076d9190613ab5565b60405180910390f35b610790600480360361078b919081019061328a565b611335565b005b6107ac60048036036107a79190810190613496565b611454565b6040516107b99190613ab5565b60405180910390f35b6107dc60048036036107d7919081019061350e565b61147d565b6040516107e9919061396d565b60405180910390f35b6107fa61169e565b6040516108079190613ab5565b60405180910390f35b6108186116a4565b6040516108259190613ab5565b60405180910390f35b6108366116aa565b604051610843919061396d565b60405180910390f35b6108546116ce565b6040516108619190613937565b60405180910390f35b610884600480360361087f9190810190613496565b6116f4565b6040516108919190613a9a565b60405180910390f35b6108a2611748565b6040516108af9190613ab5565b60405180910390f35b6108c061174e565b6040516108cd9190613ab5565b60405180910390f35b6108f060048036036108eb91908101906132b3565b611754565b005b61090c6004803603610907919081019061355d565b611963565b6040516109199190613ab5565b60405180910390f35b61093c6004803603610937919081019061328a565b611996565b005b61095860048036036109539190810190613496565b611ab5565b6040516109659190613ab5565b60405180910390f35b610976611af4565b6040516109839190613ab5565b60405180910390f35b6109a660048036036109a191908101906135c0565b611afa565b6040516109b39190613ab5565b60405180910390f35b6109d660048036036109d19190810190613496565b611b38565b6040516109e39190613ab5565b60405180910390f35b6109f4611b88565b604051610a019190613ab5565b60405180910390f35b610a12611b8e565b604051610a1f9190613937565b60405180910390f35b610a30611bb4565b604051610a3d919061396d565b60405180910390f35b610a606004803603610a5b9190810190613444565b611bb9565b604051610a6d9190613ab5565b60405180910390f35b610a7e611d85565b604051610a8b9190613ab5565b60405180910390f35b610a9c611d8b565b604051610aa99190613901565b60405180910390f35b610acc6004803603610ac79190810190613496565b611d9e565b604051610ad99190613ab5565b60405180910390f35b610aea611db2565b604051610af7919061396d565b60405180910390f35b610b08611dd6565b604051610b15919061396d565b60405180910390f35b610b26611dfa565b604051610b369493929190613bfa565b60405180910390f35b610b596004803603610b54919081019061328a565b611e18565b604051610b669190613ab5565b60405180910390f35b610b896004803603610b84919081019061355d565b611e30565b604051610b96919061396d565b60405180910390f35b610ba7611ece565b604051610bb49190613952565b60405180910390f35b610bc5611ef4565b005b610bcf6128c1565b604051610bdc919061396d565b60405180910390f35b610bff6004803603610bfa9190810190613496565b6128e5565b604051610c0c9190613ab5565b60405180910390f35b610c1d612947565b604051610c2a919061396d565b60405180910390f35b610c3b61294c565b604051610c489190613ab5565b60405180910390f35b610c59612952565b604051610c669190613ab5565b60405180910390f35b610c896004803603610c849190810190613408565b612958565b604051610c9893929190613988565b60405180910390f35b610cbb6004803603610cb69190810190613496565b6129e9565b604051610cc89190613ab5565b60405180910390f35b610cd9612a39565b005b610cf56004803603610cf0919081019061355d565b612a79565b604051610d02919061396d565b60405180910390f35b6000610d1783836129e9565b905092915050565b60008260000151846000015110158015610d4157508160000151846000015111155b15610d4f5760019050610d54565b600090505b9392505050565b60138060000154905081565b6000808211610dab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da290613a5a565b60405180910390fd5b81610dd5610dc5856b033b2e3c9fd0803ce80000006128e5565b60028581610dcf57fe5b046129e9565b81610ddc57fe5b04905092915050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd81565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601860009054906101000a900460ff1681565b60195481565b60175481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610e9957600080fd5b7f6368616c6c656e676554696d6500000000000000000000000000000000000000821415610ecd5780601e81905550611011565b7f6d696e696d756d45706f636854696d6500000000000000000000000000000000821415610f015780600281905550611010565b7f77656967687453656e696f7252656465656d0000000000000000000000000000821415610f35578060198190555061100f565b7f7765696768744a756e696f7252656465656d0000000000000000000000000000821415610f695780601a8190555061100e565b7f7765696768744a756e696f72537570706c790000000000000000000000000000821415610f9d5780601b8190555061100d565b7f77656967687453656e696f72537570706c790000000000000000000000000000821415610fd15780601c8190555061100c565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611003906139da565b60405180910390fd5b5b5b5b5b5b5050565b6b033b2e3c9fd0803ce8000000800281565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb81565b6000806110588484610d0b565b9050600081141561106d57600091505061107b565b6110778582610d67565b9150505b9392505050565b602160009054906101000a900460ff1681565b60155481565b601c5481565b60098060000154908060010154908060020154908060030154905084565b6000868611156110f1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9050611158565b600f600301548311806111085750600f6002015482115b806111175750600f6000015485115b806111265750600f6001015484115b15611153577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9050611158565b600090505b9695505050505050565b60165481565b60025481565b601b5481565b600061117e6131b3565b6111866131b3565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bae994936040518163ffffffff1660e01b8152600401604080518083038186803b1580156111ed57600080fd5b505afa158015611201573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611225919081019061337d565b9150915060011515611238858484610d1f565b15151415611258576b033b2e3c9fd0803ce80000008002925050506112a6565b6112a161271061129c6b033b2e3c9fd0803ce8000000611297886000015161129261128b896000015189600001516129e9565b6002611d9e565b611ab5565b610d67565b611454565b925050505b919050565b60006112f56112d06112bf876019546128e5565b6112cb87601a546128e5565b6129e9565b6112f06112df86601b546128e5565b6112eb86601c546128e5565b6129e9565b6129e9565b9050949350505050565b60148060000154905081565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc81565b60075481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461138057600080fd5b60008060006004359250602435915034905060016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081833373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168460003660405161144693929190613ad0565b60405180910390a450505050565b60006b033b2e3c9fd0803ce800000061146d84846128e5565b8161147457fe5b04905092915050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3b3a9fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114e757600080fd5b505afa1580156114fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061151f919081019061346d565b84111561154e577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9050611697565b600061155a83866129e9565b90506115646131b3565b61156c6131b3565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bae994936040518163ffffffff1660e01b8152600401604080518083038186803b1580156115d357600080fd5b505afa1580156115e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061160b919081019061337d565b9150915061161d838360000151611454565b86101561164f577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9350505050611697565b61165d838260000151611454565b86111561168f577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb9350505050611697565b600093505050505b9392505050565b601a5481565b60085481565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116fc6131b3565b600083148061170b5750600082145b1561172757604051806020016040528060008152509050611742565b604051806020016040528061173c8585610d67565b81525090505b92915050565b60015481565b601d5481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461179f57600080fd5b7f6a756e696f725472616e6368650000000000000000000000000000000000000082141561180d5780600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195f565b7f73656e696f725472616e6368650000000000000000000000000000000000000082141561187b5780600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195e565b7f72657365727665000000000000000000000000000000000000000000000000008214156118e95780600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195d565b7f6173736573736f720000000000000000000000000000000000000000000000008214156119575780600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061195c565b600080fd5b5b5b5b5050565b600061198c61197d611977601754866129e9565b846129e9565b61198787876129e9565b611b38565b9050949350505050565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146119e157600080fd5b60008060006004359250602435915034905060008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081833373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684600036604051611aa793929190613ad0565b60405180910390a450505050565b600081831415611ac85760019050611aee565b81831115611ae157611ada8383611b38565b9050611aee565b611aeb8284611b38565b90505b92915050565b60205481565b6000611b0f611b0985876129e9565b87611b38565b90506000611b1d8385610d0b565b905080821115611b2b578091505b8191505095945050505050565b6000828284039150811115611b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7990613a7a565b60405180910390fd5b92915050565b601e5481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3b3a9fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2357600080fd5b505afa158015611c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c5b919081019061346d565b8211611c77576b033b2e3c9fd0803ce800000080029050611d80565b611c7f6131b3565b6040518060200160405280611d3385600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3b3a9fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cf657600080fd5b505afa158015611d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d2e919081019061346d565b610d67565b8152509050611d7c612710611d776b033b2e3c9fd0803ce8000000611d72611d686b033b2e3c9fd0803ce80000006002611d9e565b8660000151611ab5565b610d67565b611454565b9150505b919050565b601f5481565b600e60009054906101000a900460ff1681565b6000818381611da957fe5b04905092915050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa81565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b600f8060000154908060010154908060020154908060030154905084565b60006020528060005260406000206000915090505481565b600060011515601860009054906101000a900460ff16151514611e88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7f90613a3a565b60405180910390fd5b6000611e9686868686612b6a565b9050600081148015611eaa57506000601d54145b15611ec257611ebb42601e546129e9565b601d819055505b80915050949350505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600254611f0342600154611b38565b1015611f0e57600080fd5b60001515601860009054906101000a900460ff16151514611f2e57600080fd5b42600181905550600160085401600881905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b69ef8a86040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611fab57600080fd5b505af1158015611fbf573d6000803e3d6000fd5b50505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f825d66860006040518263ffffffff1660e01b815260040161201f91906139bf565b600060405180830381600087803b15801561203957600080fd5b505af115801561204d573d6000803e3d6000fd5b50505050600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd5f2c86040518163ffffffff1660e01b81526004016040805180830381600087803b1580156120bd57600080fd5b505af11580156120d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506120f591908101906134d2565b91509150600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd5f2c86040518163ffffffff1660e01b81526004016040805180830381600087803b15801561216557600080fd5b505af1158015612179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061219d91908101906134d2565b915091506122ed600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c308d746040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561220e57600080fd5b505af1158015612222573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612246919081019061346d565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ac62d3856040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156122b057600080fd5b505af11580156122c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506122e8919081019061346d565b6129e9565b601681905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1739bea6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561235d57600080fd5b505af1158015612371573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612395919081019061346d565b601581905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad7a672f6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561240557600080fd5b505af1158015612419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061243d919081019061346d565b6017819055506000811480156124535750600083145b801561245f5750600082145b801561246b5750600084145b1561266657600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca160085460008060008060006040518763ffffffff1660e01b81526004016124da96959493929190613b39565b600060405180830381600087803b1580156124f457600080fd5b505af1158015612508573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca160085460008060008060006040518763ffffffff1660e01b815260040161257696959493929190613b39565b600060405180830381600087803b15801561259057600080fd5b505af11580156125a4573d6000803e3d6000fd5b50505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663493046656125f760165460155460175461104b565b6000806040518463ffffffff1660e01b815260040161261893929190613b02565b600060405180830381600087803b15801561263257600080fd5b505af1158015612646573d6000803e3d6000fd5b5050505061265760075460016129e9565b600781905550505050506128bf565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e59990f96015546017546040518363ffffffff1660e01b81526004016126c7929190613b9a565b602060405180830381600087803b1580156126e157600080fd5b505af11580156126f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127199190810190613354565b601360008201518160000155905050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633cc893bb6015546017546040518363ffffffff1660e01b8152600401612789929190613b9a565b602060405180830381600087803b1580156127a357600080fd5b505af11580156127b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127db9190810190613354565b60146000820151816000015590505060006014600001541415612814576001602160006101000a81548160ff0219169083151502179055505b61282381601360000154611454565b600f6000018190555061283b83601460000154611454565b600f6001018190555083600f6002018190555081600f60030181905550600061287a600f60000154600f60010154600f60030154600f60020154612a79565b141561289f57612896600f60000154600f600101548487612ce7565b505050506128bf565b6001601860006101000a81548160ff021916908315150217905550505050505b565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff981565b60008082148061290257508282838502925082816128ff57fe5b04145b612941576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612938906139fa565b60405180910390fd5b92915050565b600081565b600d5481565b61271081565b60008060008061296786611174565b9050600061297486611bb9565b9050601f54821115612991576000828294509450945050506129e2565b601f548214156129b65760205481106129b5576000828294509450945050506129e2565b5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa828294509450945050505b9250925092565b6000828284019150811015612a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2a90613a1a565b60405180910390fd5b92915050565b601d544210158015612a4e57506000601d5414155b612a5757600080fd5b612a77600960000154600960010154600960030154600960020154612ce7565b565b600080612a91612a8b601754866129e9565b846129e9565b90506000612a9f87876129e9565b90506000612ab183838a8a8a8a6110bf565b905060008114612ac657809350505050612b62565b6000612ad28484611b38565b905060011515602160009054906101000a900460ff1615151415612b3e57600087148015612b005750600086145b15612b12576000945050505050612b62565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9945050505050612b62565b612b5b81612b538b8a60165486601554611afa565b60155461147d565b9450505050505b949350505050565b600080612b7986868587612a79565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811480612bc857507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81145b15612bd65780915050612cdf565b6000811415612c8a576000612bed878786886112ab565b905060001515600e60009054906101000a900460ff1615151415612c3e576001600e60006101000a81548160ff021916908315150217905550612c338787878785613047565b600092505050612cdf565b600d54811015612c72577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa92505050612cdf565b612c7f8787878785613047565b600092505050612cdf565b60001515600e60009054906101000a900460ff1615151415612cba57612cb28686868661307d565b915050612cdf565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9150505b949350505050565b6000612cf660075460016129e9565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca182612d4686600f600301546116f4565b60000151612d5989600f600001546116f4565b60000151601360000154600f60030154600f600001546040518763ffffffff1660e01b8152600401612d9096959493929190613c3f565b600060405180830381600087803b158015612daa57600080fd5b505af1158015612dbe573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638be03ca182612e1085600f600201546116f4565b60000151612e2388600f600101546116f4565b60000151601460000154600f60020154600f600101546040518763ffffffff1660e01b8152600401612e5a96959493929190613c3f565b600060405180830381600087803b158015612e7457600080fd5b505af1158015612e88573d6000803e3d6000fd5b505050506000612e9a86868686611963565b90506000612eaf878660165485601554611afa565b90506000612ec0826015548561104b565b9050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634930466582888b6040518463ffffffff1660e01b8152600401612f2193929190613bc3565b600060405180830381600087803b158015612f3b57600080fd5b505af1158015612f4f573d6000803e3d6000fd5b50505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f825d668846040518263ffffffff1660e01b8152600401612fae9190613ab5565b600060405180830381600087803b158015612fc857600080fd5b505af1158015612fdc573d6000803e3d6000fd5b50505050836007819055506000601860006101000a81548160ff0219169083151502179055506000601d819055506000600d819055506000600e60006101000a81548160ff0219169083151502179055506000601f8190555060006020819055505050505050505050565b8460096000018190555083600960010181905550826009600201819055508160096003018190555080600d819055505050505050565b60006130876131b3565b60405180602001604052806130a360165460155460175461104b565b81525090506000809050600080905060008090506000601f5414156130e5576130ce84601754612958565b8093508194508295505050506130e482826131a1565b5b60006130f38a8a898b611963565b90506130fd6131b3565b604051806020016040528061312561311c8e8c60165488601554611afa565b6015548661104b565b81525090506131348183612958565b8095508196508297505050507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa85141561317657849650505050505050613199565b61318084846131a1565b61318e8b8b8b8b6000613047565b600096505050505050505b949350505050565b81601f81905550806020819055505050565b6040518060200160405280600081525090565b6000813590506131d581613de9565b92915050565b6000813590506131ea81613e00565b92915050565b60006020828403121561320257600080fd5b61320c6020613ca0565b9050600061321c84828501613260565b60008301525092915050565b60006020828403121561323a57600080fd5b6132446020613ca0565b9050600061325484828501613275565b60008301525092915050565b60008135905061326f81613e17565b92915050565b60008151905061328481613e17565b92915050565b60006020828403121561329c57600080fd5b60006132aa848285016131c6565b91505092915050565b600080604083850312156132c657600080fd5b60006132d4858286016131db565b92505060206132e5858286016131c6565b9150509250929050565b6000806040838503121561330257600080fd5b6000613310858286016131db565b925050602061332185828601613260565b9150509250929050565b60006020828403121561333d57600080fd5b600061334b848285016131f0565b91505092915050565b60006020828403121561336657600080fd5b600061337484828501613228565b91505092915050565b6000806040838503121561339057600080fd5b600061339e85828601613228565b92505060206133af85828601613228565b9150509250929050565b6000806000606084860312156133ce57600080fd5b60006133dc868287016131f0565b93505060206133ed868287016131f0565b92505060406133fe868287016131f0565b9150509250925092565b6000806040838503121561341b57600080fd5b6000613429858286016131f0565b925050602061343a85828601613260565b9150509250929050565b60006020828403121561345657600080fd5b600061346484828501613260565b91505092915050565b60006020828403121561347f57600080fd5b600061348d84828501613275565b91505092915050565b600080604083850312156134a957600080fd5b60006134b785828601613260565b92505060206134c885828601613260565b9150509250929050565b600080604083850312156134e557600080fd5b60006134f385828601613275565b925050602061350485828601613275565b9150509250929050565b60008060006060848603121561352357600080fd5b600061353186828701613260565b935050602061354286828701613260565b925050604061355386828701613260565b9150509250925092565b6000806000806080858703121561357357600080fd5b600061358187828801613260565b945050602061359287828801613260565b93505060406135a387828801613260565b92505060606135b487828801613260565b91505092959194509250565b600080600080600060a086880312156135d857600080fd5b60006135e688828901613260565b95505060206135f788828901613260565b945050604061360888828901613260565b935050606061361988828901613260565b925050608061362a88828901613260565b9150509295509295909350565b60008060008060008060c0878903121561365057600080fd5b600061365e89828a01613260565b965050602061366f89828a01613260565b955050604061368089828a01613260565b945050606061369189828a01613260565b93505060806136a289828a01613260565b92505060a06136b389828a01613260565b9150509295509295509295565b6136c981613d01565b82525050565b60006136db8385613ccd565b93506136e8838584613dc9565b6136f183613dd8565b840190509392505050565b61370581613d4b565b82525050565b61371481613d6f565b82525050565b61372381613d93565b82525050565b61373281613d17565b82525050565b61374181613db7565b82525050565b6000613754600b83613cde565b91507f756e6b6f776e2d6e616d650000000000000000000000000000000000000000006000830152602082019050919050565b6000613794600f83613cde565b91507f736166652d6d756c2d6661696c656400000000000000000000000000000000006000830152602082019050919050565b60006137d4600f83613cde565b91507f736166652d6164642d6661696c656400000000000000000000000000000000006000830152602082019050919050565b6000613814601c83613cde565b91507f7375626d697373696f6e2d706572696f642d6e6f742d616374697665000000006000830152602082019050919050565b6000613854601083613cde565b91507f6469766973696f6e206279207a65726f000000000000000000000000000000006000830152602082019050919050565b6000613894600f83613cde565b91507f736166652d7375622d6661696c656400000000000000000000000000000000006000830152602082019050919050565b6020820160008201516138dd60008501826138e3565b50505050565b6138ec81613d41565b82525050565b6138fb81613d41565b82525050565b600060208201905061391660008301846136c0565b92915050565b600060208201905061393160008301846136fc565b92915050565b600060208201905061394c600083018461370b565b92915050565b6000602082019050613967600083018461371a565b92915050565b60006020820190506139826000830184613729565b92915050565b600060608201905061399d6000830186613729565b6139aa60208301856138f2565b6139b760408301846138f2565b949350505050565b60006020820190506139d46000830184613738565b92915050565b600060208201905081810360008301526139f381613747565b9050919050565b60006020820190508181036000830152613a1381613787565b9050919050565b60006020820190508181036000830152613a33816137c7565b9050919050565b60006020820190508181036000830152613a5381613807565b9050919050565b60006020820190508181036000830152613a7381613847565b9050919050565b60006020820190508181036000830152613a9381613887565b9050919050565b6000602082019050613aaf60008301846138c7565b92915050565b6000602082019050613aca60008301846138f2565b92915050565b6000604082019050613ae560008301866138f2565b8181036020830152613af88184866136cf565b9050949350505050565b6000606082019050613b1760008301866138f2565b613b246020830185613738565b613b316040830184613738565b949350505050565b600060c082019050613b4e60008301896138f2565b613b5b6020830188613738565b613b686040830187613738565b613b756060830186613738565b613b826080830185613738565b613b8f60a0830184613738565b979650505050505050565b6000604082019050613baf60008301856138f2565b613bbc60208301846138f2565b9392505050565b6000606082019050613bd860008301866138f2565b613be560208301856138f2565b613bf260408301846138f2565b949350505050565b6000608082019050613c0f60008301876138f2565b613c1c60208301866138f2565b613c2960408301856138f2565b613c3660608301846138f2565b95945050505050565b600060c082019050613c5460008301896138f2565b613c6160208301886138f2565b613c6e60408301876138f2565b613c7b60608301866138f2565b613c8860808301856138f2565b613c9560a08301846138f2565b979650505050505050565b6000604051905081810181811067ffffffffffffffff82111715613cc357600080fd5b8060405250919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613cfa82613d21565b9050919050565b60008115159050919050565b6000819050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000613d5682613d5d565b9050919050565b6000613d6882613d21565b9050919050565b6000613d7a82613d81565b9050919050565b6000613d8c82613d21565b9050919050565b6000613d9e82613da5565b9050919050565b6000613db082613d21565b9050919050565b6000613dc282613d41565b9050919050565b82818337600083830152505050565b6000601f19601f8301169050919050565b613df281613cef565b8114613dfd57600080fd5b50565b613e0981613d0d565b8114613e1457600080fd5b50565b613e2081613d41565b8114613e2b57600080fd5b5056fea365627a7a723158202761a35bf5ba40d36a4408ee85844e7627553c6f0c8e7c42702ba603804da73a6c6578706572696d656e74616cf564736f6c634300050f0040
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000708
-----Decoded View---------------
Arg [0] : challengeTime_ (uint256): 1800
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000708
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.