608060405234801561001057600080fd5b50611ab6806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063a9059cbb11610066578063a9059cbb1461020f578063dd62ed3e14610222578063e51d93b81461025b578063f2fde38b1461026e57600080fd5b80638da5cb5b146101c657806395d89b41146101e157806396278417146101e9578063a571fdd7146101fc57600080fd5b8063313ce567116100d3578063313ce5671461016b578063422c5f131461018057806370a0823114610195578063715018a6146101be57600080fd5b806306fdde0314610105578063095ea7b31461012357806318160ddd1461014657806323b872dd14610158575b600080fd5b61010d610281565b60405161011a91906111c3565b60405180910390f35b610136610131366004611236565b610313565b604051901515815260200161011a565b6003545b60405190815260200161011a565b610136610166366004611262565b61032d565b60065460405160ff909116815260200161011a565b61019361018e366004611382565b610351565b005b61014a6101a33660046113f6565b6001600160a01b031660009081526001602052604090205490565b61019361050c565b6000546040516001600160a01b03909116815260200161011a565b61010d610520565b6101936101f7366004611413565b61052f565b61019361020a36600461146a565b6105c9565b61013661021d366004611236565b6105fc565b61014a610230366004611483565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610193610269366004611532565b61060a565b61019361027c3660046113f6565b610912565b60606004805461029090611637565b80601f01602080910402602001604051908101604052809291908181526020018280546102bc90611637565b80156103095780601f106102de57610100808354040283529160200191610309565b820191906000526020600020905b8154815290600101906020018083116102ec57829003601f168201915b5050505050905090565b600033610321818585610990565b60019150505b92915050565b60003361033b858285610a2f565b610346858585610a92565b506001949350505050565b600e5433906001600160a01b0316811461037e5760405163779def6f60e11b815260040160405180910390fd5b60005b855181101561047c576008546001600160a01b0316600090815260026020526040812087518692908990859081106103bb576103bb611671565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550610420600860009054906101000a90046001600160a01b031687838151811061041257610412611671565b602002602001015186610a92565b6001600f600088848151811061043857610438611671565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806104748161169d565b915050610381565b5060005b84518110156105045784818151811061049b5761049b611671565b60200260200101516001600160a01b0316600a60009054906101000a90046001600160a01b03166001600160a01b0316600080516020611a61833981519152856040516104ea91815260200190565b60405180910390a3806104fc8161169d565b915050610480565b505050505050565b61051461101c565b61051e6000611076565b565b60606005805461029090611637565b600e5433906001600160a01b0316811461055c5760405163779def6f60e11b815260040160405180910390fd5b60005b83518110156105c357826012600086848151811061057f5761057f611671565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105bb8161169d565b91505061055f565b50505050565b600e5433906001600160a01b031681146105f65760405163779def6f60e11b815260040160405180910390fd5b50600755565b600033610321818585610a92565b60065462010000900460ff161561063457604051634fa777dd60e11b815260040160405180910390fd5b6006805462ff000019166201000017905561064e8a611076565b600461065a8d82611701565b5060056106678c82611701565b5088600660006101000a81548160ff021916908360ff16021790555087600660016101000a81548160ff021916908360ff1602179055508660078190555081600a60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600960006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089600860006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610769600860009054906101000a90046001600160a01b0316600660009054906101000a900460ff16600a61074f91906118a5565b61075a9060016118b4565b61076490896118b4565b6110c6565b600b80546001600160a01b0319166001600160a01b0387811691909117909155600a54610798918691166118cb565b600d80546001600160a01b0319166001600160a01b039283161790556009546107c3918591166118cb565b600e80546001600160a01b0319166001600160a01b039283169081179091556000908152600f6020526040808220805460ff199081166001908117909255600d54851684528284208054821683179055600a548516845292829020805490931617909155600954600b5491516364e329cb60e11b815291831660048301523060248301529091169063c9c65396906044016020604051808303816000875af1158015610873573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089791906118f2565b600c80546001600160a01b0319166001600160a01b039283169081179091556000908152600f60205260409020805460ff19166001179055600d546003546108fa928d921690600a906108eb9060076118b4565b6108f5919061190f565b610a92565b6109046000611076565b505050505050505050505050565b61091a61101c565b6001600160a01b0381166109845760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61098d81611076565b50565b6001600160a01b03831615806109ad57506001600160a01b038216155b156109ce57604051630a8b9dbb60e31b81526000600482015260240161097b565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526002602090815260408083209386168352929052205460001981146105c35781811015610a8557828183604051637dc7a0d960e11b815260040161097b93929190611931565b6105c38484848403610990565b6001600160a01b03831660009081526012602052604090205460ff1615610acc5760405163010896e960e01b815260040160405180910390fd5b604080516002808252606082018352600092602083019080368337019050509050610af561116b565b6001600160a01b03841660009081526001602052604090205482811015610b355784818460405163391434e360e21b815260040161097b93929190611931565b600c546001600160a01b038681169116148015610b6b57506001600160a01b0384166000908152600f602052604090205460ff16155b15610d1357600b5482516001600160a01b03909116908390600090610b9257610b92611671565b60200260200101906001600160a01b031690816001600160a01b0316815250503082600181518110610bc657610bc6611671565b6001600160a01b039283166020918202929092010152600a546040516307c0329d60e21b81526000929190911690631f00ca7490610c0a9087908790600401611952565b600060405180830381865afa158015610c27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c4f91908101906119a9565b600081518110610c6157610c61611671565b6020908102919091018101516001600160a01b0387166000908152601090925260409091208190559050610c958483611a3a565b6001600160a01b038088166000908152600160205260408082209390935590871681529081208054869290610ccb908490611a4d565b92505081905550846001600160a01b0316866001600160a01b0316600080516020611a6183398151915286604051610d0591815260200190565b60405180910390a350611003565b600c546001600160a01b038581169116148015610d4957506001600160a01b0385166000908152600f602052604090205460ff16155b15610f21576001600160a01b03851660009081526011602052604090205460ff1615610d8e5784818460405163391434e360e21b815260040161097b93929190611931565b3082600081518110610da257610da2611671565b6001600160a01b039283166020918202929092010152600b54835191169083906001908110610dd357610dd3611671565b6001600160a01b039283166020918202929092010152600a5460405163d06ca61f60e01b8152600092919091169063d06ca61f90610e179087908790600401611952565b600060405180830381865afa158015610e34573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e5c91908101906119a9565b600181518110610e6e57610e6e611671565b60200260200101519050610ea960075460106000896001600160a01b03166001600160a01b03168152602001908152602001600020546111ab565b811115610ef4576007546001600160a01b0387166000908152601060205260409020548691610ed7916111ab565b82604051637dc7a0d960e11b815260040161097b93929190611931565b6001600160a01b0386166000908152601160205260409020805460ff19166001179055610c958483611a3a565b600c546001600160a01b038681169116148015610f4b5750600a546001600160a01b038581169116145b8015610f625750600d546001600160a01b03163214155b15610f8057604051632e049df160e01b815260040160405180910390fd5b610f8a8382611a3a565b6001600160a01b038087166000908152600160205260408082209390935590861681529081208054859290610fc0908490611a4d565b92505081905550836001600160a01b0316856001600160a01b0316600080516020611a6183398151915285604051610ffa91815260200190565b60405180910390a35b6110156006805463ff00000019169055565b5050505050565b6000546001600160a01b0316331461051e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161097b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166110f857604051630a8b9dbb60e31b81526001600160a01b038316600482015260240161097b565b61110061116b565b80600360008282546111129190611a4d565b90915550506001600160a01b038216600081815260016020908152604080832080548601905551848152600080516020611a61833981519152910160405180910390a36111676006805463ff00000019169055565b5050565b6006546301000000900460ff1615611196576040516329f745a760e01b815260040160405180910390fd5b6006805463ff00000019166301000000179055565b60008183106111ba57816111bc565b825b9392505050565b600060208083528351808285015260005b818110156111f0578581018301518582016040015282016111d4565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461098d57600080fd5b803561123181611211565b919050565b6000806040838503121561124957600080fd5b823561125481611211565b946020939093013593505050565b60008060006060848603121561127757600080fd5b833561128281611211565b9250602084013561129281611211565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156112e2576112e26112a3565b604052919050565b600067ffffffffffffffff821115611304576113046112a3565b5060051b60200190565b600082601f83011261131f57600080fd5b8135602061133461132f836112ea565b6112b9565b82815260059290921b8401810191818101908684111561135357600080fd5b8286015b8481101561137757803561136a81611211565b8352918301918301611357565b509695505050505050565b6000806000806080858703121561139857600080fd5b843567ffffffffffffffff808211156113b057600080fd5b6113bc8883890161130e565b955060208701359150808211156113d257600080fd5b506113df8782880161130e565b949794965050505060408301359260600135919050565b60006020828403121561140857600080fd5b81356111bc81611211565b6000806040838503121561142657600080fd5b823567ffffffffffffffff81111561143d57600080fd5b6114498582860161130e565b9250506020830135801515811461145f57600080fd5b809150509250929050565b60006020828403121561147c57600080fd5b5035919050565b6000806040838503121561149657600080fd5b82356114a181611211565b9150602083013561145f81611211565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc6112a3565b6114ef601f8201601f19166020016112b9565b81815284602083860101111561150457600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff8116811461123157600080fd5b6000806000806000806000806000806000806101808d8f03121561155557600080fd5b67ffffffffffffffff8d35111561156b57600080fd5b6115788e8e358f016114b1565b9b5067ffffffffffffffff60208e0135111561159357600080fd5b6115a38e60208f01358f016114b1565b9a506115b160408e01611226565b99506115bf60608e01611521565b98506115cd60808e01611521565b975060a08d0135965060c08d013595506115e960e08e01611226565b94506115f86101008e01611226565b93506116076101208e01611226565b92506116166101408e01611226565b91506116256101608e01611226565b90509295989b509295989b509295989b565b600181811c9082168061164b57607f821691505b60208210810361166b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016116af576116af611687565b5060010190565b601f8211156116fc57600081815260208120601f850160051c810160208610156116dd5750805b601f850160051c820191505b81811015610504578281556001016116e9565b505050565b815167ffffffffffffffff81111561171b5761171b6112a3565b61172f816117298454611637565b846116b6565b602080601f831160018114611764576000841561174c5750858301515b600019600386901b1c1916600185901b178555610504565b600085815260208120601f198616915b8281101561179357888601518255948401946001909101908401611774565b50858210156117b15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600181815b808511156117fc5781600019048211156117e2576117e2611687565b808516156117ef57918102915b93841c93908002906117c6565b509250929050565b60008261181357506001610327565b8161182057506000610327565b816001811461183657600281146118405761185c565b6001915050610327565b60ff84111561185157611851611687565b50506001821b610327565b5060208310610133831016604e8410600b841016171561187f575081810a610327565b61188983836117c1565b806000190482111561189d5761189d611687565b029392505050565b60006111bc60ff841683611804565b808202811582820484141761032757610327611687565b6001600160a01b038181168382160190808211156118eb576118eb611687565b5092915050565b60006020828403121561190457600080fd5b81516111bc81611211565b60008261192c57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b039390931683526020830191909152604082015260600190565b6000604082018483526020604081850152818551808452606086019150828701935060005b8181101561199c5784516001600160a01b031683529383019391830191600101611977565b5090979650505050505050565b600060208083850312156119bc57600080fd5b825167ffffffffffffffff8111156119d357600080fd5b8301601f810185136119e457600080fd5b80516119f261132f826112ea565b81815260059190911b82018301908381019087831115611a1157600080fd5b928401925b82841015611a2f57835182529284019290840190611a16565b979650505050505050565b8181038181111561032757610327611687565b808201808211156103275761032761168756feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a3b4f95123c834a147b33ef78a992eb7288f35ce2ee77abe1f9f20cd188ebe2a64736f6c63430008150033