Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- Realitio_v2_1
- Optimization enabled
- true
- Compiler version
- v0.4.25+commit.59dbf8f1
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2021-01-13T06:49:48.919266Z
Contract source code
pragma solidity ^0.4.25;
/**
* @title ReailtioSafeMath256
* @dev Math operations with safety checks that throw on error
*/
library RealitioSafeMath256 {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
/**
* @title RealitioSafeMath32
* @dev Math operations with safety checks that throw on error
* @dev Copy of SafeMath but for uint32 instead of uint256
* @dev Deleted functions we don't use
*/
library RealitioSafeMath32 {
function add(uint32 a, uint32 b) internal pure returns (uint32) {
uint32 c = a + b;
assert(c >= a);
return c;
}
}
contract BalanceHolder {
mapping(address => uint256) public balanceOf;
event LogWithdraw(
address indexed user,
uint256 amount
);
function withdraw()
public {
uint256 bal = balanceOf[msg.sender];
balanceOf[msg.sender] = 0;
msg.sender.transfer(bal);
emit LogWithdraw(msg.sender, bal);
}
}
// Next version of Realitio v2, will be deployed on xdai, may be deployed to other networks in future
// API-compatible with Realitio v2, address will be stored in Realitio.json
contract Realitio_v2_1 is BalanceHolder {
using RealitioSafeMath256 for uint256;
using RealitioSafeMath32 for uint32;
address constant NULL_ADDRESS = address(0);
// History hash when no history is created, or history has been cleared
bytes32 constant NULL_HASH = bytes32(0);
// An unitinalized finalize_ts for a question will indicate an unanswered question.
uint32 constant UNANSWERED = 0;
// An unanswered reveal_ts for a commitment will indicate that it does not exist.
uint256 constant COMMITMENT_NON_EXISTENT = 0;
// Commit->reveal timeout is 1/8 of the question timeout (rounded down).
uint32 constant COMMITMENT_TIMEOUT_RATIO = 8;
// Proportion withheld when you claim an earlier bond.
uint256 constant BOND_CLAIM_FEE_PROPORTION = 40; // One 40th ie 2.5%
event LogSetQuestionFee(
address arbitrator,
uint256 amount
);
event LogNewTemplate(
uint256 indexed template_id,
address indexed user,
string question_text
);
event LogNewQuestion(
bytes32 indexed question_id,
address indexed user,
uint256 template_id,
string question,
bytes32 indexed content_hash,
address arbitrator,
uint32 timeout,
uint32 opening_ts,
uint256 nonce,
uint256 created
);
event LogFundAnswerBounty(
bytes32 indexed question_id,
uint256 bounty_added,
uint256 bounty,
address indexed user
);
event LogNewAnswer(
bytes32 answer,
bytes32 indexed question_id,
bytes32 history_hash,
address indexed user,
uint256 bond,
uint256 ts,
bool is_commitment
);
event LogAnswerReveal(
bytes32 indexed question_id,
address indexed user,
bytes32 indexed answer_hash,
bytes32 answer,
uint256 nonce,
uint256 bond
);
event LogNotifyOfArbitrationRequest(
bytes32 indexed question_id,
address indexed user
);
event LogCancelArbitration(
bytes32 indexed question_id
);
event LogFinalize(
bytes32 indexed question_id,
bytes32 indexed answer
);
event LogClaim(
bytes32 indexed question_id,
address indexed user,
uint256 amount
);
struct Question {
bytes32 content_hash;
address arbitrator;
uint32 opening_ts;
uint32 timeout;
uint32 finalize_ts;
bool is_pending_arbitration;
uint256 bounty;
bytes32 best_answer;
bytes32 history_hash;
uint256 bond;
}
// Stored in a mapping indexed by commitment_id, a hash of commitment hash, question, bond.
struct Commitment {
uint32 reveal_ts;
bool is_revealed;
bytes32 revealed_answer;
}
// Only used when claiming more bonds than fits into a transaction
// Stored in a mapping indexed by question_id.
struct Claim {
address payee;
uint256 last_bond;
uint256 queued_funds;
}
uint256 nextTemplateID = 0;
mapping(uint256 => uint256) public templates;
mapping(uint256 => bytes32) public template_hashes;
mapping(bytes32 => Question) public questions;
mapping(bytes32 => Claim) public question_claims;
mapping(bytes32 => Commitment) public commitments;
mapping(address => uint256) public arbitrator_question_fees;
modifier onlyArbitrator(bytes32 question_id) {
require(msg.sender == questions[question_id].arbitrator, "msg.sender must be arbitrator");
_;
}
modifier stateAny() {
_;
}
modifier stateNotCreated(bytes32 question_id) {
require(questions[question_id].timeout == 0, "question must not exist");
_;
}
modifier stateOpen(bytes32 question_id) {
require(questions[question_id].timeout > 0, "question must exist");
require(!questions[question_id].is_pending_arbitration, "question must not be pending arbitration");
uint32 finalize_ts = questions[question_id].finalize_ts;
require(finalize_ts == UNANSWERED || finalize_ts > uint32(now), "finalization deadline must not have passed");
uint32 opening_ts = questions[question_id].opening_ts;
require(opening_ts == 0 || opening_ts <= uint32(now), "opening date must have passed");
_;
}
modifier statePendingArbitration(bytes32 question_id) {
require(questions[question_id].is_pending_arbitration, "question must be pending arbitration");
_;
}
modifier stateOpenOrPendingArbitration(bytes32 question_id) {
require(questions[question_id].timeout > 0, "question must exist");
uint32 finalize_ts = questions[question_id].finalize_ts;
require(finalize_ts == UNANSWERED || finalize_ts > uint32(now), "finalization dealine must not have passed");
uint32 opening_ts = questions[question_id].opening_ts;
require(opening_ts == 0 || opening_ts <= uint32(now), "opening date must have passed");
_;
}
modifier stateFinalized(bytes32 question_id) {
require(isFinalized(question_id), "question must be finalized");
_;
}
modifier bondMustDouble(bytes32 question_id) {
require(msg.value > 0, "bond must be positive");
require(msg.value >= (questions[question_id].bond.mul(2)), "bond must be double at least previous bond");
_;
}
modifier previousBondMustNotBeatMaxPrevious(bytes32 question_id, uint256 max_previous) {
if (max_previous > 0) {
require(questions[question_id].bond <= max_previous, "bond must exceed max_previous");
}
_;
}
/// @notice Constructor, sets up some initial templates
/// @dev Creates some generalized templates for different question types used in the DApp.
constructor()
public {
createTemplate('{"title": "%s", "type": "bool", "category": "%s", "lang": "%s"}');
createTemplate('{"title": "%s", "type": "uint", "decimals": 18, "category": "%s", "lang": "%s"}');
createTemplate('{"title": "%s", "type": "single-select", "outcomes": [%s], "category": "%s", "lang": "%s"}');
createTemplate('{"title": "%s", "type": "multiple-select", "outcomes": [%s], "category": "%s", "lang": "%s"}');
createTemplate('{"title": "%s", "type": "datetime", "category": "%s", "lang": "%s"}');
}
/// @notice Function for arbitrator to set an optional per-question fee.
/// @dev The per-question fee, charged when a question is asked, is intended as an anti-spam measure.
/// @param fee The fee to be charged by the arbitrator when a question is asked
function setQuestionFee(uint256 fee)
stateAny()
external {
arbitrator_question_fees[msg.sender] = fee;
emit LogSetQuestionFee(msg.sender, fee);
}
/// @notice Create a reusable template, which should be a JSON document.
/// Placeholders should use gettext() syntax, eg %s.
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @param content The template content
/// @return The ID of the newly-created template, which is created sequentially.
function createTemplate(string content)
stateAny()
public returns (uint256) {
uint256 id = nextTemplateID;
templates[id] = block.number;
template_hashes[id] = keccak256(abi.encodePacked(content));
emit LogNewTemplate(id, msg.sender, content);
nextTemplateID = id.add(1);
return id;
}
/// @notice Create a new reusable template and use it to ask a question
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @param content The template content
/// @param question A string containing the parameters that will be passed into the template to make the question
/// @param arbitrator The arbitration contract that will have the final word on the answer if there is a dispute
/// @param timeout How long the contract should wait after the answer is changed before finalizing on that answer
/// @param opening_ts If set, the earliest time it should be possible to answer the question.
/// @param nonce A user-specified nonce used in the question ID. Change it to repeat a question.
/// @return The ID of the newly-created template, which is created sequentially.
function createTemplateAndAskQuestion(
string content,
string question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce
)
// stateNotCreated is enforced by the internal _askQuestion
public payable returns (bytes32) {
uint256 template_id = createTemplate(content);
return askQuestion(template_id, question, arbitrator, timeout, opening_ts, nonce);
}
/// @notice Ask a new question and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @param template_id The ID number of the template the question will use
/// @param question A string containing the parameters that will be passed into the template to make the question
/// @param arbitrator The arbitration contract that will have the final word on the answer if there is a dispute
/// @param timeout How long the contract should wait after the answer is changed before finalizing on that answer
/// @param opening_ts If set, the earliest time it should be possible to answer the question.
/// @param nonce A user-specified nonce used in the question ID. Change it to repeat a question.
/// @return The ID of the newly-created question, created deterministically.
function askQuestion(uint256 template_id, string question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce)
// stateNotCreated is enforced by the internal _askQuestion
public payable returns (bytes32) {
require(templates[template_id] > 0, "template must exist");
bytes32 content_hash = keccak256(abi.encodePacked(template_id, opening_ts, question));
bytes32 question_id = keccak256(abi.encodePacked(content_hash, arbitrator, timeout, msg.sender, nonce));
_askQuestion(question_id, content_hash, arbitrator, timeout, opening_ts);
emit LogNewQuestion(question_id, msg.sender, template_id, question, content_hash, arbitrator, timeout, opening_ts, nonce, now);
return question_id;
}
function _askQuestion(bytes32 question_id, bytes32 content_hash, address arbitrator, uint32 timeout, uint32 opening_ts)
stateNotCreated(question_id)
internal {
// A timeout of 0 makes no sense, and we will use this to check existence
require(timeout > 0, "timeout must be positive");
require(timeout < 365 days, "timeout must be less than 365 days");
require(arbitrator != NULL_ADDRESS, "arbitrator must be set");
uint256 bounty = msg.value;
// The arbitrator can set a fee for asking a question.
// This is intended as an anti-spam defence.
// The fee is waived if the arbitrator is asking the question.
// This allows them to set an impossibly high fee and make users proxy the question through them.
// This would allow more sophisticated pricing, question whitelisting etc.
if (msg.sender != arbitrator) {
uint256 question_fee = arbitrator_question_fees[arbitrator];
require(bounty >= question_fee, "ETH provided must cover question fee");
bounty = bounty.sub(question_fee);
balanceOf[arbitrator] = balanceOf[arbitrator].add(question_fee);
}
questions[question_id].content_hash = content_hash;
questions[question_id].arbitrator = arbitrator;
questions[question_id].opening_ts = opening_ts;
questions[question_id].timeout = timeout;
questions[question_id].bounty = bounty;
}
/// @notice Add funds to the bounty for a question
/// @dev Add bounty funds after the initial question creation. Can be done any time until the question is finalized.
/// @param question_id The ID of the question you wish to fund
function fundAnswerBounty(bytes32 question_id)
stateOpen(question_id)
external payable {
questions[question_id].bounty = questions[question_id].bounty.add(msg.value);
emit LogFundAnswerBounty(question_id, msg.value, questions[question_id].bounty, msg.sender);
}
/// @notice Submit an answer for a question.
/// @dev Adds the answer to the history and updates the current "best" answer.
/// May be subject to front-running attacks; Substitute submitAnswerCommitment()->submitAnswerReveal() to prevent them.
/// @param question_id The ID of the question
/// @param answer The answer, encoded into bytes32
/// @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.
function submitAnswer(bytes32 question_id, bytes32 answer, uint256 max_previous)
stateOpen(question_id)
bondMustDouble(question_id)
previousBondMustNotBeatMaxPrevious(question_id, max_previous)
external payable {
_addAnswerToHistory(question_id, answer, msg.sender, msg.value, false);
_updateCurrentAnswer(question_id, answer, questions[question_id].timeout);
}
/// @notice Submit an answer for a question, crediting it to the specified account.
/// @dev Adds the answer to the history and updates the current "best" answer.
/// May be subject to front-running attacks; Substitute submitAnswerCommitment()->submitAnswerReveal() to prevent them.
/// @param question_id The ID of the question
/// @param answer The answer, encoded into bytes32
/// @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.
/// @param answerer The account to which the answer should be credited
function submitAnswerFor(bytes32 question_id, bytes32 answer, uint256 max_previous, address answerer)
stateOpen(question_id)
bondMustDouble(question_id)
previousBondMustNotBeatMaxPrevious(question_id, max_previous)
external payable {
require(answerer != NULL_ADDRESS, "answerer must be non-zero");
_addAnswerToHistory(question_id, answer, answerer, msg.value, false);
_updateCurrentAnswer(question_id, answer, questions[question_id].timeout);
}
// @notice Verify and store a commitment, including an appropriate timeout
// @param question_id The ID of the question to store
// @param commitment The ID of the commitment
function _storeCommitment(bytes32 question_id, bytes32 commitment_id)
internal
{
require(commitments[commitment_id].reveal_ts == COMMITMENT_NON_EXISTENT, "commitment must not already exist");
uint32 commitment_timeout = questions[question_id].timeout / COMMITMENT_TIMEOUT_RATIO;
commitments[commitment_id].reveal_ts = uint32(now).add(commitment_timeout);
}
/// @notice Submit the hash of an answer, laying your claim to that answer if you reveal it in a subsequent transaction.
/// @dev Creates a hash, commitment_id, uniquely identifying this answer, to this question, with this bond.
/// The commitment_id is stored in the answer history where the answer would normally go.
/// Does not update the current best answer - this is left to the later submitAnswerReveal() transaction.
/// @param question_id The ID of the question
/// @param answer_hash The hash of your answer, plus a nonce that you will later reveal
/// @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.
/// @param _answerer If specified, the address to be given as the question answerer. Defaults to the sender.
/// @dev Specifying the answerer is useful if you want to delegate the commit-and-reveal to a third-party.
function submitAnswerCommitment(bytes32 question_id, bytes32 answer_hash, uint256 max_previous, address _answerer)
stateOpen(question_id)
bondMustDouble(question_id)
previousBondMustNotBeatMaxPrevious(question_id, max_previous)
external payable {
bytes32 commitment_id = keccak256(abi.encodePacked(question_id, answer_hash, msg.value));
address answerer = (_answerer == NULL_ADDRESS) ? msg.sender : _answerer;
_storeCommitment(question_id, commitment_id);
_addAnswerToHistory(question_id, commitment_id, answerer, msg.value, true);
}
/// @notice Submit the answer whose hash you sent in a previous submitAnswerCommitment() transaction
/// @dev Checks the parameters supplied recreate an existing commitment, and stores the revealed answer
/// Updates the current answer unless someone has since supplied a new answer with a higher bond
/// msg.sender is intentionally not restricted to the user who originally sent the commitment;
/// For example, the user may want to provide the answer+nonce to a third-party service and let them send the tx
/// NB If we are pending arbitration, it will be up to the arbitrator to wait and see any outstanding reveal is sent
/// @param question_id The ID of the question
/// @param answer The answer, encoded as bytes32
/// @param nonce The nonce that, combined with the answer, recreates the answer_hash you gave in submitAnswerCommitment()
/// @param bond The bond that you paid in your submitAnswerCommitment() transaction
function submitAnswerReveal(bytes32 question_id, bytes32 answer, uint256 nonce, uint256 bond)
stateOpenOrPendingArbitration(question_id)
external {
bytes32 answer_hash = keccak256(abi.encodePacked(answer, nonce));
bytes32 commitment_id = keccak256(abi.encodePacked(question_id, answer_hash, bond));
require(!commitments[commitment_id].is_revealed, "commitment must not have been revealed yet");
require(commitments[commitment_id].reveal_ts > uint32(now), "reveal deadline must not have passed");
commitments[commitment_id].revealed_answer = answer;
commitments[commitment_id].is_revealed = true;
if (bond == questions[question_id].bond) {
_updateCurrentAnswer(question_id, answer, questions[question_id].timeout);
}
emit LogAnswerReveal(question_id, msg.sender, answer_hash, answer, nonce, bond);
}
function _addAnswerToHistory(bytes32 question_id, bytes32 answer_or_commitment_id, address answerer, uint256 bond, bool is_commitment)
internal
{
bytes32 new_history_hash = keccak256(abi.encodePacked(questions[question_id].history_hash, answer_or_commitment_id, bond, answerer, is_commitment));
// Update the current bond level, if there's a bond (ie anything except arbitration)
if (bond > 0) {
questions[question_id].bond = bond;
}
questions[question_id].history_hash = new_history_hash;
emit LogNewAnswer(answer_or_commitment_id, question_id, new_history_hash, answerer, bond, now, is_commitment);
}
function _updateCurrentAnswer(bytes32 question_id, bytes32 answer, uint32 timeout_secs)
internal {
questions[question_id].best_answer = answer;
questions[question_id].finalize_ts = uint32(now).add(timeout_secs);
}
/// @notice Notify the contract that the arbitrator has been paid for a question, freezing it pending their decision.
/// @dev The arbitrator contract is trusted to only call this if they've been paid, and tell us who paid them.
/// @param question_id The ID of the question
/// @param requester The account that requested arbitration
/// @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.
function notifyOfArbitrationRequest(bytes32 question_id, address requester, uint256 max_previous)
onlyArbitrator(question_id)
stateOpen(question_id)
previousBondMustNotBeatMaxPrevious(question_id, max_previous)
external {
require(questions[question_id].bond > 0, "Question must already have an answer when arbitration is requested");
questions[question_id].is_pending_arbitration = true;
emit LogNotifyOfArbitrationRequest(question_id, requester);
}
/// @notice Cancel a previously-requested arbitration and extend the timeout
/// @dev Useful when doing arbitration across chains that can't be requested atomically
/// @param question_id The ID of the question
function cancelArbitration(bytes32 question_id)
onlyArbitrator(question_id)
statePendingArbitration(question_id)
external {
questions[question_id].is_pending_arbitration = false;
questions[question_id].finalize_ts = uint32(now).add(questions[question_id].timeout);
emit LogCancelArbitration(question_id);
}
/// @notice Submit the answer for a question, for use by the arbitrator.
/// @dev Doesn't require (or allow) a bond.
/// If the current final answer is correct, the account should be whoever submitted it.
/// If the current final answer is wrong, the account should be whoever paid for arbitration.
/// However, the answerer stipulations are not enforced by the contract.
/// @param question_id The ID of the question
/// @param answer The answer, encoded into bytes32
/// @param answerer The account credited with this answer for the purpose of bond claims
function submitAnswerByArbitrator(bytes32 question_id, bytes32 answer, address answerer)
onlyArbitrator(question_id)
statePendingArbitration(question_id)
public {
require(answerer != NULL_ADDRESS, "answerer must be provided");
emit LogFinalize(question_id, answer);
questions[question_id].is_pending_arbitration = false;
_addAnswerToHistory(question_id, answer, answerer, 0, false);
_updateCurrentAnswer(question_id, answer, 0);
}
/// @notice Submit the answer for a question, for use by the arbitrator, working out the appropriate winner based on the last answer details.
/// @dev Doesn't require (or allow) a bond.
/// @param question_id The ID of the question
/// @param answer The answer, encoded into bytes32
/// @param payee_if_wrong The account to by credited as winner if the last answer given is wrong, usually the account that paid the arbitrator
/// @param last_history_hash The history hash before the final one
/// @param last_answer_or_commitment_id The last answer given, or the commitment ID if it was a commitment.
/// @param last_answerer The address that supplied the last answer
function assignWinnerAndSubmitAnswerByArbitrator(bytes32 question_id, bytes32 answer, address payee_if_wrong, bytes32 last_history_hash, bytes32 last_answer_or_commitment_id, address last_answerer)
external {
bool is_commitment = _verifyHistoryInputOrRevert(questions[question_id].history_hash, last_history_hash, last_answer_or_commitment_id, questions[question_id].bond, last_answerer);
address payee;
// If the last answer is an unrevealed commit, it's always wrong.
// For anything else, the last answer was set as the "best answer" in submitAnswer or submitAnswerReveal.
if (is_commitment && !commitments[last_answer_or_commitment_id].is_revealed) {
require(commitments[last_answer_or_commitment_id].reveal_ts < uint32(now), "You must wait for the reveal deadline before finalizing");
payee = payee_if_wrong;
} else {
payee = (questions[question_id].best_answer == answer) ? last_answerer : payee_if_wrong;
}
submitAnswerByArbitrator(question_id, answer, payee);
}
/// @notice Report whether the answer to the specified question is finalized
/// @param question_id The ID of the question
/// @return Return true if finalized
function isFinalized(bytes32 question_id)
view public returns (bool) {
uint32 finalize_ts = questions[question_id].finalize_ts;
return ( !questions[question_id].is_pending_arbitration && (finalize_ts > UNANSWERED) && (finalize_ts <= uint32(now)) );
}
/// @notice (Deprecated) Return the final answer to the specified question, or revert if there isn't one
/// @param question_id The ID of the question
/// @return The answer formatted as a bytes32
function getFinalAnswer(bytes32 question_id)
stateFinalized(question_id)
external view returns (bytes32) {
return questions[question_id].best_answer;
}
/// @notice Return the final answer to the specified question, or revert if there isn't one
/// @param question_id The ID of the question
/// @return The answer formatted as a bytes32
function resultFor(bytes32 question_id)
stateFinalized(question_id)
external view returns (bytes32) {
return questions[question_id].best_answer;
}
/// @notice Return the final answer to the specified question, provided it matches the specified criteria.
/// @dev Reverts if the question is not finalized, or if it does not match the specified criteria.
/// @param question_id The ID of the question
/// @param content_hash The hash of the question content (template ID + opening time + question parameter string)
/// @param arbitrator The arbitrator chosen for the question (regardless of whether they are asked to arbitrate)
/// @param min_timeout The timeout set in the initial question settings must be this high or higher
/// @param min_bond The bond sent with the final answer must be this high or higher
/// @return The answer formatted as a bytes32
function getFinalAnswerIfMatches(
bytes32 question_id,
bytes32 content_hash, address arbitrator, uint32 min_timeout, uint256 min_bond
)
stateFinalized(question_id)
external view returns (bytes32) {
require(content_hash == questions[question_id].content_hash, "content hash must match");
require(arbitrator == questions[question_id].arbitrator, "arbitrator must match");
require(min_timeout <= questions[question_id].timeout, "timeout must be long enough");
require(min_bond <= questions[question_id].bond, "bond must be high enough");
return questions[question_id].best_answer;
}
/// @notice Assigns the winnings (bounty and bonds) to everyone who gave the accepted answer
/// Caller must provide the answer history, in reverse order
/// @dev Works up the chain and assign bonds to the person who gave the right answer
/// If someone gave the winning answer earlier, they must get paid from the higher bond
/// That means we can't pay out the bond added at n until we have looked at n-1
/// The first answer is authenticated by checking against the stored history_hash.
/// One of the inputs to history_hash is the history_hash before it, so we use that to authenticate the next entry, etc
/// Once we get to a null hash we'll know we're done and there are no more answers.
/// Usually you would call the whole thing in a single transaction, but if not then the data is persisted to pick up later.
/// @param question_id The ID of the question
/// @param history_hashes Second-last-to-first, the hash of each history entry. (Final one should be empty).
/// @param addrs Last-to-first, the address of each answerer or commitment sender
/// @param bonds Last-to-first, the bond supplied with each answer or commitment
/// @param answers Last-to-first, each answer supplied, or commitment ID if the answer was supplied with commit->reveal
function claimWinnings(
bytes32 question_id,
bytes32[] history_hashes, address[] addrs, uint256[] bonds, bytes32[] answers
)
stateFinalized(question_id)
public {
require(history_hashes.length > 0, "at least one history hash entry must be provided");
// These are only set if we split our claim over multiple transactions.
address payee = question_claims[question_id].payee;
uint256 last_bond = question_claims[question_id].last_bond;
uint256 queued_funds = question_claims[question_id].queued_funds;
// Starts as the hash of the final answer submitted. It'll be cleared when we're done.
// If we're splitting the claim over multiple transactions, it'll be the hash where we left off last time
bytes32 last_history_hash = questions[question_id].history_hash;
bytes32 best_answer = questions[question_id].best_answer;
uint256 i;
for (i = 0; i < history_hashes.length; i++) {
// Check input against the history hash, and see which of 2 possible values of is_commitment fits.
bool is_commitment = _verifyHistoryInputOrRevert(last_history_hash, history_hashes[i], answers[i], bonds[i], addrs[i]);
queued_funds = queued_funds.add(last_bond);
(queued_funds, payee) = _processHistoryItem(
question_id, best_answer, queued_funds, payee,
addrs[i], bonds[i], answers[i], is_commitment);
// Line the bond up for next time, when it will be added to somebody's queued_funds
last_bond = bonds[i];
// Burn (just leave in contract balance) a fraction of all bonds except the final one.
// This creates a cost to increasing your own bond, which could be used to delay resolution maliciously
if (last_bond != questions[question_id].bond) {
last_bond = last_bond.sub(last_bond / BOND_CLAIM_FEE_PROPORTION);
}
last_history_hash = history_hashes[i];
}
if (last_history_hash != NULL_HASH) {
// We haven't yet got to the null hash (1st answer), ie the caller didn't supply the full answer chain.
// Persist the details so we can pick up later where we left off later.
// If we know who to pay we can go ahead and pay them out, only keeping back last_bond
// (We always know who to pay unless all we saw were unrevealed commits)
if (payee != NULL_ADDRESS) {
_payPayee(question_id, payee, queued_funds);
queued_funds = 0;
}
question_claims[question_id].payee = payee;
question_claims[question_id].last_bond = last_bond;
question_claims[question_id].queued_funds = queued_funds;
} else {
// There is nothing left below us so the payee can keep what remains
_payPayee(question_id, payee, queued_funds.add(last_bond));
delete question_claims[question_id];
}
questions[question_id].history_hash = last_history_hash;
}
function _payPayee(bytes32 question_id, address payee, uint256 value)
internal {
balanceOf[payee] = balanceOf[payee].add(value);
emit LogClaim(question_id, payee, value);
}
function _verifyHistoryInputOrRevert(
bytes32 last_history_hash,
bytes32 history_hash, bytes32 answer, uint256 bond, address addr
)
internal pure returns (bool) {
if (last_history_hash == keccak256(abi.encodePacked(history_hash, answer, bond, addr, true)) ) {
return true;
}
if (last_history_hash == keccak256(abi.encodePacked(history_hash, answer, bond, addr, false)) ) {
return false;
}
revert("History input provided did not match the expected hash");
}
function _processHistoryItem(
bytes32 question_id, bytes32 best_answer,
uint256 queued_funds, address payee,
address addr, uint256 bond, bytes32 answer, bool is_commitment
)
internal returns (uint256, address) {
// For commit-and-reveal, the answer history holds the commitment ID instead of the answer.
// We look at the referenced commitment ID and switch in the actual answer.
if (is_commitment) {
bytes32 commitment_id = answer;
// If it's a commit but it hasn't been revealed, it will always be considered wrong.
if (!commitments[commitment_id].is_revealed) {
delete commitments[commitment_id];
return (queued_funds, payee);
} else {
answer = commitments[commitment_id].revealed_answer;
delete commitments[commitment_id];
}
}
if (answer == best_answer) {
if (payee == NULL_ADDRESS) {
// The entry is for the first payee we come to, ie the winner.
// They get the question bounty.
payee = addr;
queued_funds = queued_funds.add(questions[question_id].bounty);
questions[question_id].bounty = 0;
} else if (addr != payee) {
// Answerer has changed, ie we found someone lower down who needs to be paid
// The lower answerer will take over receiving bonds from higher answerer.
// They should also be paid the takeover fee, which is set at a rate equivalent to their bond.
// (This is our arbitrary rule, to give consistent right-answerers a defence against high-rollers.)
// There should be enough for the fee, but if not, take what we have.
// There's an edge case involving weird arbitrator behaviour where we may be short.
uint256 answer_takeover_fee = (queued_funds >= bond) ? bond : queued_funds;
// Settle up with the old (higher-bonded) payee
_payPayee(question_id, payee, queued_funds.sub(answer_takeover_fee));
// Now start queued_funds again for the new (lower-bonded) payee
payee = addr;
queued_funds = answer_takeover_fee;
}
}
return (queued_funds, payee);
}
/// @notice Convenience function to assign bounties/bonds for multiple questions in one go, then withdraw all your funds.
/// Caller must provide the answer history for each question, in reverse order
/// @dev Can be called by anyone to assign bonds/bounties, but funds are only withdrawn for the user making the call.
/// @param question_ids The IDs of the questions you want to claim for
/// @param lengths The number of history entries you will supply for each question ID
/// @param hist_hashes In a single list for all supplied questions, the hash of each history entry.
/// @param addrs In a single list for all supplied questions, the address of each answerer or commitment sender
/// @param bonds In a single list for all supplied questions, the bond supplied with each answer or commitment
/// @param answers In a single list for all supplied questions, each answer supplied, or commitment ID
function claimMultipleAndWithdrawBalance(
bytes32[] question_ids, uint256[] lengths,
bytes32[] hist_hashes, address[] addrs, uint256[] bonds, bytes32[] answers
)
stateAny() // The finalization checks are done in the claimWinnings function
public {
uint256 qi;
uint256 i;
for (qi = 0; qi < question_ids.length; qi++) {
bytes32 qid = question_ids[qi];
uint256 ln = lengths[qi];
bytes32[] memory hh = new bytes32[](ln);
address[] memory ad = new address[](ln);
uint256[] memory bo = new uint256[](ln);
bytes32[] memory an = new bytes32[](ln);
uint256 j;
for (j = 0; j < ln; j++) {
hh[j] = hist_hashes[i];
ad[j] = addrs[i];
bo[j] = bonds[i];
an[j] = answers[i];
i++;
}
claimWinnings(qid, hh, ad, bo, an);
}
withdraw();
}
/// @notice Returns the questions's content hash, identifying the question content
/// @param question_id The ID of the question
function getContentHash(bytes32 question_id)
public view returns(bytes32) {
return questions[question_id].content_hash;
}
/// @notice Returns the arbitrator address for the question
/// @param question_id The ID of the question
function getArbitrator(bytes32 question_id)
public view returns(address) {
return questions[question_id].arbitrator;
}
/// @notice Returns the timestamp when the question can first be answered
/// @param question_id The ID of the question
function getOpeningTS(bytes32 question_id)
public view returns(uint32) {
return questions[question_id].opening_ts;
}
/// @notice Returns the timeout in seconds used after each answer
/// @param question_id The ID of the question
function getTimeout(bytes32 question_id)
public view returns(uint32) {
return questions[question_id].timeout;
}
/// @notice Returns the timestamp at which the question will be/was finalized
/// @param question_id The ID of the question
function getFinalizeTS(bytes32 question_id)
public view returns(uint32) {
return questions[question_id].finalize_ts;
}
/// @notice Returns whether the question is pending arbitration
/// @param question_id The ID of the question
function isPendingArbitration(bytes32 question_id)
public view returns(bool) {
return questions[question_id].is_pending_arbitration;
}
/// @notice Returns the current total unclaimed bounty
/// @dev Set back to zero once the bounty has been claimed
/// @param question_id The ID of the question
function getBounty(bytes32 question_id)
public view returns(uint256) {
return questions[question_id].bounty;
}
/// @notice Returns the current best answer
/// @param question_id The ID of the question
function getBestAnswer(bytes32 question_id)
public view returns(bytes32) {
return questions[question_id].best_answer;
}
/// @notice Returns the history hash of the question
/// @param question_id The ID of the question
/// @dev Updated on each answer, then rewound as each is claimed
function getHistoryHash(bytes32 question_id)
public view returns(bytes32) {
return questions[question_id].history_hash;
}
/// @notice Returns the highest bond posted so far for a question
/// @param question_id The ID of the question
function getBond(bytes32 question_id)
public view returns(uint256) {
return questions[question_id].bond;
}
}
Contract ABI
[{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"claimWinnings","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32[]","name":"history_hashes"},{"type":"address[]","name":"addrs"},{"type":"uint256[]","name":"bonds"},{"type":"bytes32[]","name":"answers"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"submitAnswerFor","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"answer"},{"type":"uint256","name":"max_previous"},{"type":"address","name":"answerer"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"getFinalAnswerIfMatches","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"content_hash"},{"type":"address","name":"arbitrator"},{"type":"uint32","name":"min_timeout"},{"type":"uint256","name":"min_bond"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getBounty","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"getArbitrator","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getBond","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"claimMultipleAndWithdrawBalance","inputs":[{"type":"bytes32[]","name":"question_ids"},{"type":"uint256[]","name":"lengths"},{"type":"bytes32[]","name":"hist_hashes"},{"type":"address[]","name":"addrs"},{"type":"uint256[]","name":"bonds"},{"type":"bytes32[]","name":"answers"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"withdraw","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"submitAnswerReveal","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"answer"},{"type":"uint256","name":"nonce"},{"type":"uint256","name":"bond"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setQuestionFee","inputs":[{"type":"uint256","name":"fee"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"template_hashes","inputs":[{"type":"uint256","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"getContentHash","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"payee"},{"type":"uint256","name":"last_bond"},{"type":"uint256","name":"queued_funds"}],"name":"question_claims","inputs":[{"type":"bytes32","name":""}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"fundAnswerBounty","inputs":[{"type":"bytes32","name":"question_id"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"arbitrator_question_fees","inputs":[{"type":"address","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"balanceOf","inputs":[{"type":"address","name":""}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[{"type":"bytes32","name":""}],"name":"askQuestion","inputs":[{"type":"uint256","name":"template_id"},{"type":"string","name":"question"},{"type":"address","name":"arbitrator"},{"type":"uint32","name":"timeout"},{"type":"uint32","name":"opening_ts"},{"type":"uint256","name":"nonce"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"submitAnswer","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"answer"},{"type":"uint256","name":"max_previous"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isFinalized","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"getHistoryHash","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32","name":"reveal_ts"},{"type":"bool","name":"is_revealed"},{"type":"bytes32","name":"revealed_answer"}],"name":"commitments","inputs":[{"type":"bytes32","name":""}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"createTemplate","inputs":[{"type":"string","name":"content"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"getBestAnswer","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isPendingArbitration","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"content_hash"},{"type":"address","name":"arbitrator"},{"type":"uint32","name":"opening_ts"},{"type":"uint32","name":"timeout"},{"type":"uint32","name":"finalize_ts"},{"type":"bool","name":"is_pending_arbitration"},{"type":"uint256","name":"bounty"},{"type":"bytes32","name":"best_answer"},{"type":"bytes32","name":"history_hash"},{"type":"uint256","name":"bond"}],"name":"questions","inputs":[{"type":"bytes32","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32","name":""}],"name":"getOpeningTS","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32","name":""}],"name":"getTimeout","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[{"type":"bytes32","name":""}],"name":"createTemplateAndAskQuestion","inputs":[{"type":"string","name":"content"},{"type":"string","name":"question"},{"type":"address","name":"arbitrator"},{"type":"uint32","name":"timeout"},{"type":"uint32","name":"opening_ts"},{"type":"uint256","name":"nonce"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"getFinalAnswer","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint32","name":""}],"name":"getFinalizeTS","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"templates","inputs":[{"type":"uint256","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"resultFor","inputs":[{"type":"bytes32","name":"question_id"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"assignWinnerAndSubmitAnswerByArbitrator","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"answer"},{"type":"address","name":"payee_if_wrong"},{"type":"bytes32","name":"last_history_hash"},{"type":"bytes32","name":"last_answer_or_commitment_id"},{"type":"address","name":"last_answerer"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"submitAnswerCommitment","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"answer_hash"},{"type":"uint256","name":"max_previous"},{"type":"address","name":"_answerer"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"cancelArbitration","inputs":[{"type":"bytes32","name":"question_id"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"notifyOfArbitrationRequest","inputs":[{"type":"bytes32","name":"question_id"},{"type":"address","name":"requester"},{"type":"uint256","name":"max_previous"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"submitAnswerByArbitrator","inputs":[{"type":"bytes32","name":"question_id"},{"type":"bytes32","name":"answer"},{"type":"address","name":"answerer"}],"constant":false},{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[]},{"type":"event","name":"LogSetQuestionFee","inputs":[{"type":"address","name":"arbitrator","indexed":false},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"LogNewTemplate","inputs":[{"type":"uint256","name":"template_id","indexed":true},{"type":"address","name":"user","indexed":true},{"type":"string","name":"question_text","indexed":false}],"anonymous":false},{"type":"event","name":"LogNewQuestion","inputs":[{"type":"bytes32","name":"question_id","indexed":true},{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"template_id","indexed":false},{"type":"string","name":"question","indexed":false},{"type":"bytes32","name":"content_hash","indexed":true},{"type":"address","name":"arbitrator","indexed":false},{"type":"uint32","name":"timeout","indexed":false},{"type":"uint32","name":"opening_ts","indexed":false},{"type":"uint256","name":"nonce","indexed":false},{"type":"uint256","name":"created","indexed":false}],"anonymous":false},{"type":"event","name":"LogFundAnswerBounty","inputs":[{"type":"bytes32","name":"question_id","indexed":true},{"type":"uint256","name":"bounty_added","indexed":false},{"type":"uint256","name":"bounty","indexed":false},{"type":"address","name":"user","indexed":true}],"anonymous":false},{"type":"event","name":"LogNewAnswer","inputs":[{"type":"bytes32","name":"answer","indexed":false},{"type":"bytes32","name":"question_id","indexed":true},{"type":"bytes32","name":"history_hash","indexed":false},{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"bond","indexed":false},{"type":"uint256","name":"ts","indexed":false},{"type":"bool","name":"is_commitment","indexed":false}],"anonymous":false},{"type":"event","name":"LogAnswerReveal","inputs":[{"type":"bytes32","name":"question_id","indexed":true},{"type":"address","name":"user","indexed":true},{"type":"bytes32","name":"answer_hash","indexed":true},{"type":"bytes32","name":"answer","indexed":false},{"type":"uint256","name":"nonce","indexed":false},{"type":"uint256","name":"bond","indexed":false}],"anonymous":false},{"type":"event","name":"LogNotifyOfArbitrationRequest","inputs":[{"type":"bytes32","name":"question_id","indexed":true},{"type":"address","name":"user","indexed":true}],"anonymous":false},{"type":"event","name":"LogCancelArbitration","inputs":[{"type":"bytes32","name":"question_id","indexed":true}],"anonymous":false},{"type":"event","name":"LogFinalize","inputs":[{"type":"bytes32","name":"question_id","indexed":true},{"type":"bytes32","name":"answer","indexed":true}],"anonymous":false},{"type":"event","name":"LogClaim","inputs":[{"type":"bytes32","name":"question_id","indexed":true},{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false},{"type":"event","name":"LogWithdraw","inputs":[{"type":"address","name":"user","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false}]
Contract Creation Code
0x608060405260006001553480156200001657600080fd5b506200008d606060405190810160405280603f81526020017f7b227469746c65223a20222573222c202274797065223a2022626f6f6c222c2081526020017f2263617465676f7279223a20222573222c20226c616e67223a20222573227d0081525062000308640100000000026401000000009004565b506200012a608060405190810160405280604f81526020017f7b227469746c65223a20222573222c202274797065223a202275696e74222c2081526020017f22646563696d616c73223a2031382c202263617465676f7279223a202225732281526020017f2c20226c616e67223a20222573227d000000000000000000000000000000000081525062000308640100000000026401000000009004565b50620001c7608060405190810160405280605a81526020017f7b227469746c65223a20222573222c202274797065223a202273696e676c652d81526020017f73656c656374222c20226f7574636f6d6573223a205b25735d2c20226361746581526020017f676f7279223a20222573222c20226c616e67223a20222573227d00000000000081525062000308640100000000026401000000009004565b5062000264608060405190810160405280605c81526020017f7b227469746c65223a20222573222c202274797065223a20226d756c7469706c81526020017f652d73656c656374222c20226f7574636f6d6573223a205b25735d2c2022636181526020017f7465676f7279223a20222573222c20226c616e67223a20222573227d0000000081525062000308640100000000026401000000009004565b5062000301608060405190810160405280604381526020017f7b227469746c65223a20222573222c202274797065223a20226461746574696d81526020017f65222c202263617465676f7279223a20222573222c20226c616e67223a20222581526020017f73227d000000000000000000000000000000000000000000000000000000000081525062000308640100000000026401000000009004565b50620004ca565b60015460008181526002602090815260408083204390555184519293928592918201918291908401908083835b60208310620003565780518252601f19909201916020918201910162000335565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310620003bb5780518252601f1990920191602091820191016200039a565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000888152600383528581209190915581835289518383015289513397508896507fb87fb721c0a557bb8dff89a86796466931d82ba530a66a239263eb8735ade2e4958b955084939084019290860191908190849084905b83811015620004545781810151838201526020016200043a565b50505050905090810190601f168015620004825780820380516001836020036101000a031916815260200191505b509250505060405180910390a3620004aa81600164010000000062003739620004b382021704565b60015592915050565b600082820183811015620004c357fe5b9392505050565b6140a980620004da6000396000f3006080604052600436106101b35763ffffffff60e060020a6000350416631101a0fd81146101b8578063111ec138146102bf57806312a203c3146102dc5780632417395c146103215780632518904c1461033957806326d6c97b1461036d57806328828b1e146103855780633ccfd60b146104f75780634dc266b41461050c5780634df6ca2a1461052d5780634e60f8831461054557806351577ea91461055d578063590158a71461057557806359245ff3146105b55780636fa42742146105c057806370a08231146105e1578063762c38fd1461060257806377f325df146106785780637f8d429e1461068957806382ffa9f7146106b5578063839df945146106cd57806383bf46091461070a5780638d552d4614610763578063924532fb1461077b57806395addb90146107935780639e63fa6a1461080f5780639f1025c614610840578063a1130d0414610858578063a462fb7b14610907578063acae8f4e1461091f578063bc52565214610937578063d09cc57e14610907578063d44e293c1461094f578063d7cff98614610984578063ebbdd2b0146109a1578063f6a94ecb146109b9578063fe92049d146109e0575b600080fd5b3480156101c457600080fd5b506040805160206004602480358281013584810280870186019097528086526102bd96843596369660449591949091019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610a079650505050505050565b005b6102bd600435602435604435600160a060020a0360643516610d62565b3480156102e857600080fd5b5061030f600435602435600160a060020a036044351663ffffffff60643516608435611145565b60408051918252519081900360200190f35b34801561032d57600080fd5b5061030f600435611382565b34801561034557600080fd5b50610351600435611397565b60408051600160a060020a039092168252519081900360200190f35b34801561037957600080fd5b5061030f6004356113b5565b34801561039157600080fd5b50604080516020600480358082013583810280860185019096528085526102bd95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506113ca9650505050505050565b34801561050357600080fd5b506102bd6115de565b34801561051857600080fd5b506102bd600435602435604435606435611659565b34801561053957600080fd5b506102bd600435611af9565b34801561055157600080fd5b5061030f600435611b48565b34801561056957600080fd5b5061030f600435611b5a565b34801561058157600080fd5b5061058d600435611b6c565b60408051600160a060020a039094168452602084019290925282820152519081900360600190f35b6102bd600435611b97565b3480156105cc57600080fd5b5061030f600160a060020a0360043516611df4565b3480156105ed57600080fd5b5061030f600160a060020a0360043516611e06565b60408051602060046024803582810135601f810185900485028601850190965285855261030f95833595369560449491939091019190819084018382808284375094975050508335600160a060020a03169450505050602081013563ffffffff9081169160408101359091169060600135611e18565b6102bd60043560243560443561213c565b34801561069557600080fd5b506106a16004356124be565b604080519115158252519081900360200190f35b3480156106c157600080fd5b5061030f60043561251b565b3480156106d957600080fd5b506106e5600435612530565b6040805163ffffffff9094168452911515602084015282820152519081900360600190f35b34801561071657600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261030f94369492936024939284019190819084018382808284375094975061255d9650505050505050565b34801561076f57600080fd5b5061030f6004356126f7565b34801561078757600080fd5b506106a160043561270d565b34801561079f57600080fd5b506107ab600435612725565b604080519a8b52600160a060020a0390991660208b015263ffffffff9788168a8a015295871660608a015293909516608088015290151560a087015260c086015260e085019290925261010084019190915261012083015251908190036101400190f35b34801561081b57600080fd5b50610827600435612790565b6040805163ffffffff9092168252519081900360200190f35b34801561084c57600080fd5b506108276004356127b2565b6040805160206004803580820135601f810184900484028501840190955284845261030f94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050508335600160a060020a03169450505050602081013563ffffffff90811691604081013590911690606001356127d4565b34801561091357600080fd5b5061030f6004356127fc565b34801561092b57600080fd5b50610827600435612876565b34801561094357600080fd5b5061030f600435612898565b34801561095b57600080fd5b506102bd600435602435600160a060020a03604435811690606435906084359060a435166128aa565b6102bd600435602435604435600160a060020a03606435166129d2565b3480156109ad57600080fd5b506102bd600435612ddb565b3480156109c557600080fd5b506102bd600435600160a060020a0360243516604435612f91565b3480156109ec57600080fd5b506102bd600435602435600160a060020a0360443516613355565b60008060008060008060008b610a1c816124be565b1515610a72576040805160e560020a62461bcd02815260206004820152601a60248201527f7175657374696f6e206d7573742062652066696e616c697a6564000000000000604482015290519081900360640190fd5b8b51600010610af1576040805160e560020a62461bcd02815260206004820152603060248201527f6174206c65617374206f6e6520686973746f7279206861736820656e7472792060448201527f6d7573742062652070726f766964656400000000000000000000000000000000606482015290519081900360840190fd5b60008d815260056020818152604080842080546001820154600290920154600494859052928620948501549490930154600160a060020a039093169c509a509850909650945092505b8b51831015610c8557610bac858d85815181101515610b5557fe5b906020019060200201518b86815181101515610b6d57fe5b906020019060200201518d87815181101515610b8557fe5b906020019060200201518f88815181101515610b9d57fe5b90602001906020020151613523565b9150610bbe868863ffffffff61373916565b9550610c158d85888b8f88815181101515610bd557fe5b906020019060200201518f89815181101515610bed57fe5b906020019060200201518f8a815181101515610c0557fe5b9060200190602002015189613753565b8b519099509096508a9084908110610c2957fe5b602090810290910181015160008f815260049092526040909120600601549097508714610c6057610c5d8760288104613883565b96505b8b83815181101515610c6e57fe5b602090810290910101519450600190920191610b3a565b8415610cf057600160a060020a03881615610caa57610ca58d8988613895565b600095505b60008d8152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038a1617815560018101889055600201869055610d3f565b610d0a8d89610d05898b63ffffffff61373916565b613895565b60008d8152600560205260408120805473ffffffffffffffffffffffffffffffffffffffff1916815560018101829055600201555b5050506000998a5250600460205260409098206005019790975550505050505050565b600084815260046020526040812060010154859190819060c060020a900463ffffffff168110610dca576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615610e36576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff169150811580610e6f57504263ffffffff168263ffffffff16115b1515610ec7576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff16801580610f0057504263ffffffff168163ffffffff1611155b1515610f44576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8660003411610f9d576040805160e560020a62461bcd02815260206004820152601560248201527f626f6e64206d75737420626520706f7369746976650000000000000000000000604482015290519081900360640190fd5b600081815260046020526040902060060154610fc090600263ffffffff61391616565b34101561103d576040805160e560020a62461bcd02815260206004820152602a60248201527f626f6e64206d75737420626520646f75626c65206174206c656173742070726560448201527f76696f757320626f6e6400000000000000000000000000000000000000000000606482015290519081900360840190fd5b8786600081111561109f5760008281526004602052604090206006015481101561109f576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b600160a060020a03871615156110ff576040805160e560020a62461bcd02815260206004820152601960248201527f616e737765726572206d757374206265206e6f6e2d7a65726f00000000000000604482015290519081900360640190fd5b61110d8a8a89346000613941565b60008a815260046020526040902060010154611139908b908b9060c060020a900463ffffffff16613ab9565b50505050505050505050565b600085611151816124be565b15156111a7576040805160e560020a62461bcd02815260206004820152601a60248201527f7175657374696f6e206d7573742062652066696e616c697a6564000000000000604482015290519081900360640190fd5b600087815260046020526040902054861461120c576040805160e560020a62461bcd02815260206004820152601760248201527f636f6e74656e742068617368206d757374206d61746368000000000000000000604482015290519081900360640190fd5b600087815260046020526040902060010154600160a060020a03868116911614611280576040805160e560020a62461bcd02815260206004820152601560248201527f61726269747261746f72206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b60008781526004602052604090206001015463ffffffff60c060020a909104811690851611156112fa576040805160e560020a62461bcd02815260206004820152601b60248201527f74696d656f7574206d757374206265206c6f6e6720656e6f7567680000000000604482015290519081900360640190fd5b600087815260046020526040902060060154831115611363576040805160e560020a62461bcd02815260206004820152601860248201527f626f6e64206d757374206265206869676820656e6f7567680000000000000000604482015290519081900360640190fd5b6000878152600460208190526040909120015491505095945050505050565b60009081526004602052604090206003015490565b600090815260046020526040902060010154600160a060020a031690565b60009081526004602052604090206006015490565b60008080806060808080845b8e518910156115c5578e898151811015156113ed57fe5b9060200190602002015196508d8981518110151561140757fe5b9060200190602002015195508560405190808252806020026020018201604052801561143d578160200160208202803883390190505b5094508560405190808252806020026020018201604052801561146a578160200160208202803883390190505b50935085604051908082528060200260200182016040528015611497578160200160208202803883390190505b509250856040519080825280602002602001820160405280156114c4578160200160208202803883390190505b509150600090505b858110156115ad578c888151811015156114e257fe5b9060200190602002015185828151811015156114fa57fe5b602090810290910101528b518c908990811061151257fe5b90602001906020020151848281518110151561152a57fe5b600160a060020a039092166020928302909101909101528a518b908990811061154f57fe5b90602001906020020151838281518110151561156757fe5b6020908102909101015289518a908990811061157f57fe5b90602001906020020151828281518110151561159757fe5b60209081029091010152600197880197016114cc565b6115ba8786868686610a07565b6001909801976113d6565b6115cd6115de565b505050505050505050505050505050565b33600081815260208190526040808220805490839055905190929183156108fc02918491818181858888f1935050505015801561161f573d6000803e3d6000fd5b5060408051828152905133917f4ce7033d118120e254016dccf195288400b28fc8936425acd5f17ce2df3ab708919081900360200190a250565b600084815260046020526040812060010154819086908290819060c060020a900463ffffffff1681106116c4576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206001015460e060020a900463ffffffff1691508115806116fd57504263ffffffff168263ffffffff16115b1515611779576040805160e560020a62461bcd02815260206004820152602960248201527f66696e616c697a6174696f6e206465616c696e65206d757374206e6f7420686160448201527f7665207061737365640000000000000000000000000000000000000000000000606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff168015806117b257504263ffffffff168163ffffffff1611155b15156117f6576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b6040805160208082018b90528183018a9052825180830384018152606090920192839052815191929182918401908083835b602083106118475780518252601f199092019160209182019101611828565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209450888587604051602001808460001916600019168152602001836000191660001916815260200182815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106118e55780518252601f1990920191602091820191016118c6565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260069092529290205491975050640100000000900460ff161591506119a99050576040805160e560020a62461bcd02815260206004820152602a60248201527f636f6d6d69746d656e74206d757374206e6f742068617665206265656e20726560448201527f7665616c65642079657400000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526006602052604090205463ffffffff428116911611611a3c576040805160e560020a62461bcd028152602060048201526024808201527f72657665616c20646561646c696e65206d757374206e6f74206861766520706160448201527f7373656400000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152600660208181526040808420600181018d9055805464ff0000000019166401000000001790558c845260049091529091200154861415611aa757600089815260046020526040902060010154611aa7908a908a9060c060020a900463ffffffff16613ab9565b60408051898152602081018990528082018890529051869133918c917fa7b2d313bc7a062e30b2c3b811aa4c9faf09755a6b4ea3bf42deff920944332f919081900360600190a4505050505050505050565b336000818152600760209081526040918290208490558151928352820183905280517fdca703d022171824d3d639b33c1525fd2338120b4cfb89507c0b59596893acda9281900390910190a150565b60036020526000908152604090205481565b60009081526004602052604090205490565b600560205260009081526040902080546001820154600290920154600160a060020a03909116919083565b600081815260046020526040812060010154829190819060c060020a900463ffffffff168110611bff576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615611c6b576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff169150811580611ca457504263ffffffff168263ffffffff16115b1515611cfc576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff16801580611d3557504263ffffffff168163ffffffff1611155b1515611d79576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b600084815260046020526040902060030154611d9b903463ffffffff61373916565b6000858152600460209081526040918290206003018390558151348152908101929092528051339287927f54d68405b79f2aa4fd4e8db7b67844ad254cf8f208aac476c2894134a9deab6692918290030190a350505050565b60076020526000908152604090205481565b60006020819052908152604090205481565b600086815260026020526040812054819081908110611e81576040805160e560020a62461bcd02815260206004820152601360248201527f74656d706c617465206d75737420657869737400000000000000000000000000604482015290519081900360640190fd5b888589604051602001808481526020018363ffffffff1663ffffffff1660e060020a02815260040182805190602001908083835b60208310611ed45780518252601f199092019160209182019101611eb5565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b60208310611f395780518252601f199092019160209182019101611f1a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828201819052600160a060020a038e166c010000000000000000000000009081028487015263ffffffff8e1660e060020a02605485015233026058840152606c8084018c905285518085039091018152608c9093019485905282519098509195509293508392850191508083835b60208310611fed5780518252601f199092019160209182019101611fce565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506120298183898989613b30565b816000191633600160a060020a031682600019167ffe2dac156a3890636ce13f65f4fdf41dcaee11526e4a5374531572d92194796c8c8c8c8c8c8c42604051808881526020018060200187600160a060020a0316600160a060020a031681526020018663ffffffff1663ffffffff1681526020018563ffffffff1663ffffffff168152602001848152602001838152602001828103825288818151815260200191508051906020019080838360005b838110156120f05781810151838201526020016120d8565b50505050905090810190601f16801561211d5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a498975050505050505050565b600083815260046020526040812060010154849190819060c060020a900463ffffffff1681106121a4576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615612210576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff16915081158061224957504263ffffffff168263ffffffff16115b15156122a1576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff168015806122da57504263ffffffff168163ffffffff1611155b151561231e576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8560003411612377576040805160e560020a62461bcd02815260206004820152601560248201527f626f6e64206d75737420626520706f7369746976650000000000000000000000604482015290519081900360640190fd5b60008181526004602052604090206006015461239a90600263ffffffff61391616565b341015612417576040805160e560020a62461bcd02815260206004820152602a60248201527f626f6e64206d75737420626520646f75626c65206174206c656173742070726560448201527f76696f757320626f6e6400000000000000000000000000000000000000000000606482015290519081900360840190fd5b8685600081111561247957600082815260046020526040902060060154811015612479576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b612487898933346000613941565b6000898152600460205260409020600101546124b3908a908a9060c060020a900463ffffffff16613ab9565b505050505050505050565b6000818152600460205260408120600181015460029091015460e060020a90910463ffffffff169060ff161580156124fc5750600063ffffffff8216115b801561251457504263ffffffff168163ffffffff1611155b9392505050565b60009081526004602052604090206005015490565b6006602052600090815260409020805460019091015463ffffffff821691640100000000900460ff169083565b60015460008181526002602090815260408083204390555184519293928592918201918291908401908083835b602083106125a95780518252601f19909201916020918201910161258a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061260c5780518252601f1990920191602091820191016125ed565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000888152600383528581209190915581835289518383015289513397508896507fb87fb721c0a557bb8dff89a86796466931d82ba530a66a239263eb8735ade2e4958b955084939084019290860191908190849084905b838110156126a357818101518382015260200161268b565b50505050905090810190601f1680156126d05780820380516001836020036101000a031916815260200191505b509250505060405180910390a36126ee81600163ffffffff61373916565b60015592915050565b6000908152600460208190526040909120015490565b60009081526004602052604090206002015460ff1690565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006909501549395600160a060020a0384169563ffffffff60a060020a860481169660c060020a870482169660e060020a90049091169460ff169391908a565b60009081526004602052604090206001015460a060020a900463ffffffff1690565b60009081526004602052604090206001015460c060020a900463ffffffff1690565b6000806127e08861255d565b90506127f0818888888888611e18565b98975050505050505050565b600081612808816124be565b151561285e576040805160e560020a62461bcd02815260206004820152601a60248201527f7175657374696f6e206d7573742062652066696e616c697a6564000000000000604482015290519081900360640190fd5b50506000908152600460208190526040909120015490565b60009081526004602052604090206001015460e060020a900463ffffffff1690565b60026020526000908152604090205481565b6000868152600460205260408120600581015460069091015482916128d3918790879087613523565b91508180156128f95750600084815260066020526040902054640100000000900460ff16155b156129995760008481526006602052604090205463ffffffff428116911610612992576040805160e560020a62461bcd02815260206004820152603760248201527f596f75206d757374207761697420666f72207468652072657665616c2064656160448201527f646c696e65206265666f72652066696e616c697a696e67000000000000000000606482015290519081900360840190fd5b50846129bd565b6000888152600460208190526040909120015487146129b857856129ba565b825b90505b6129c8888883613355565b5050505050505050565b600084815260046020526040812060010154819086908290819060c060020a900463ffffffff168110612a3d576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615612aa9576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff169150811580612ae257504263ffffffff168263ffffffff16115b1515612b3a576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff16801580612b7357504263ffffffff168163ffffffff1611155b1515612bb7576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8860003411612c10576040805160e560020a62461bcd02815260206004820152601560248201527f626f6e64206d75737420626520706f7369746976650000000000000000000000604482015290519081900360640190fd5b600081815260046020526040902060060154612c3390600263ffffffff61391616565b341015612cb0576040805160e560020a62461bcd02815260206004820152602a60248201527f626f6e64206d75737420626520646f75626c65206174206c656173742070726560448201527f76696f757320626f6e6400000000000000000000000000000000000000000000606482015290519081900360840190fd5b89886000811115612d1257600082815260046020526040902060060154811015612d12576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b6040805160208082018f90528183018e90523460608084019190915283518084039091018152608090920192839052815191929182918401908083835b60208310612d6e5780518252601f199092019160209182019101612d4f565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209a50505050600160a060020a03891615612db15788612db3565b335b9650612dbf8c89613e91565b612dcd8c8989346001613941565b505050505050505050505050565b6000818152600460205260409020600101548190600160a060020a03163314612e4e576040805160e560020a62461bcd02815260206004820152601d60248201527f6d73672e73656e646572206d7573742062652061726269747261746f72000000604482015290519081900360640190fd5b600082815260046020526040902060020154829060ff161515612ee0576040805160e560020a62461bcd028152602060048201526024808201527f7175657374696f6e206d7573742062652070656e64696e67206172626974726160448201527f74696f6e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600083815260046020526040902060028101805460ff1916905560010154612f1b9063ffffffff4281169160c060020a9004811690613f8516565b600084815260046020526040808220600101805463ffffffff9490941660e060020a027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90941693909317909255905184917f71bf7c2b9df0b8818e7eb6746a5bf69699ebbab041f3795f9ed58e469afa9a3a91a2505050565b6000838152600460205260409020600101548390600160a060020a03163314613004576040805160e560020a62461bcd02815260206004820152601d60248201527f6d73672e73656e646572206d7573742062652061726269747261746f72000000604482015290519081900360640190fd5b600084815260046020526040812060010154859190819060c060020a900463ffffffff16811061306c576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff16156130d8576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff16915081158061311157504263ffffffff168263ffffffff16115b1515613169576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff168015806131a257504263ffffffff168163ffffffff1611155b15156131e6576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8685600081111561324857600082815260046020526040902060060154811015613248576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b600089815260046020526040812060060154116132fb576040805160e560020a62461bcd02815260206004820152604260248201527f5175657374696f6e206d75737420616c7265616479206861766520616e20616e60448201527f73776572207768656e206172626974726174696f6e206973207265717565737460648201527f6564000000000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600089815260046020526040808220600201805460ff1916600117905551600160a060020a038a16918b917f75d7939999bc902187c4aed400872883e445145f1983539166f783fa040b47629190a3505050505050505050565b6000838152600460205260409020600101548390600160a060020a031633146133c8576040805160e560020a62461bcd02815260206004820152601d60248201527f6d73672e73656e646572206d7573742062652061726269747261746f72000000604482015290519081900360640190fd5b600084815260046020526040902060020154849060ff16151561345a576040805160e560020a62461bcd028152602060048201526024808201527f7175657374696f6e206d7573742062652070656e64696e67206172626974726160448201527f74696f6e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03831615156134ba576040805160e560020a62461bcd02815260206004820152601960248201527f616e737765726572206d7573742062652070726f766964656400000000000000604482015290519081900360640190fd5b604051849086907f18d760beffe3717270cd90d9d920ec1a48c194e9ad7bba23eb1c92d3eb974f9790600090a36000858152600460205260408120600201805460ff191690556135109086908690869080613941565b61351c85856000613ab9565b5050505050565b604080516020808201879052818301869052606082018590526c01000000000000000000000000600160a060020a0385160260808301527f01000000000000000000000000000000000000000000000000000000000000006094830152825160758184030181526095909201928390528151600093918291908401908083835b602083106135c25780518252601f1990920191602091820191016135a3565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912089141592506135ff91505057506001613730565b604080516020808201889052818301879052606082018690526c01000000000000000000000000600160a060020a0386160260808301526000609483015282516075818403018152609590920192839052815191929182918401908083835b6020831061367d5780518252601f19909201916020918201910161365e565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912089141592506136ba91505057506000613730565b6040805160e560020a62461bcd02815260206004820152603660248201527f486973746f727920696e7075742070726f766964656420646964206e6f74206d60448201527f6174636820746865206578706563746564206861736800000000000000000000606482015290519081900360840190fd5b95945050505050565b60008282018381101561374857fe5b8091505b5092915050565b60008060008084156137d357600086815260066020526040902054869250640100000000900460ff1615156137ab576000828152600660205260408120805464ffffffffff1916815560010155899350889250613874565b6000828152600660205260408120600181018054825464ffffffffff19169092559190915595505b858b141561386d57600160a060020a038916151561382c5760008c8152600460205260409020600301549798508897613813908b9063ffffffff61373916565b60008d815260046020526040812060030155995061386d565b600160a060020a03888116908a161461386d57868a101561384d578961384f565b865b90506138668c8a610d058d8563ffffffff61388316565b8798508099505b8989935093505b50509850989650505050505050565b60008282111561388f57fe5b50900390565b600160a060020a0382166000908152602081905260409020546138be908263ffffffff61373916565b600160a060020a038316600081815260208181526040918290209390935580518481529051919286927f9c121aff33b50c1a53fef034ebec5f83da2d5a5187048f9c76c397ba27c1a1a69281900390910190a3505050565b600080831515613929576000915061374c565b5082820282848281151561393957fe5b041461374857fe5b600085815260046020908152604080832060050154815180840191909152808201889052606081018690526c01000000000000000000000000600160a060020a0388160260808201527f010000000000000000000000000000000000000000000000000000000000000085151502609482015281516075818303018152609590910191829052805190928291908401908083835b602083106139f45780518252601f1990920191602091820191016139d5565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506000831115613a415760008681526004602052604090206006018390555b600086815260046020908152604091829020600501839055815187815290810183905280820185905242606082015283151560808201529051600160a060020a0386169188917fe47ca4ebbbc2990134d1168821f38c5e177f3d5ee564bffeadeaa351905e62219181900360a00190a3505050505050565b600083815260046020819052604090912001829055613ae263ffffffff428116908390613f8516565b600093845260046020526040909320600101805463ffffffff9490941660e060020a027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff909416939093179092555050565b6000858152600460205260408120600101548190879060c060020a900463ffffffff1615613ba8576040805160e560020a62461bcd02815260206004820152601760248201527f7175657374696f6e206d757374206e6f74206578697374000000000000000000604482015290519081900360640190fd5b600063ffffffff861611613c06576040805160e560020a62461bcd02815260206004820152601860248201527f74696d656f7574206d75737420626520706f7369746976650000000000000000604482015290519081900360640190fd5b6301e1338063ffffffff861610613c8d576040805160e560020a62461bcd02815260206004820152602260248201527f74696d656f7574206d757374206265206c657373207468616e2033363520646160448201527f7973000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0386161515613ced576040805160e560020a62461bcd02815260206004820152601660248201527f61726269747261746f72206d7573742062652073657400000000000000000000604482015290519081900360640190fd5b34925033600160a060020a03871614613dee57600160a060020a038616600090815260076020526040902054915081831015613d98576040805160e560020a62461bcd028152602060048201526024808201527f4554482070726f7669646564206d75737420636f766572207175657374696f6e60448201527f2066656500000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b613da8838363ffffffff61388316565b600160a060020a038716600090815260208190526040902054909350613dd4908363ffffffff61373916565b600160a060020a0387166000908152602081905260409020555b505060009586526004602052604090952093845560018401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03949094169390931777ffffffff0000000000000000000000000000000000000000191660a060020a63ffffffff92831602177fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff1660c060020a929091169190910217905560030155565b60008181526006602052604081205463ffffffff1615613f21576040805160e560020a62461bcd02815260206004820152602160248201527f636f6d6d69746d656e74206d757374206e6f7420616c7265616479206578697360448201527f7400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008381526004602052604090206001015460089060c060020a900463ffffffff16049050613f5a63ffffffff428116908390613f8516565b600092835260066020526040909220805463ffffffff191663ffffffff909316929092179091555050565b600082820163ffffffff808516908216101561374857fe007175657374696f6e206d757374206578697374000000000000000000000000006974726174696f6e000000000000000000000000000000000000000000000000626f6e64206d75737420657863656564206d61785f70726576696f75730000007175657374696f6e206d757374206e6f742062652070656e64696e672061726266696e616c697a6174696f6e20646561646c696e65206d757374206e6f7420686f70656e696e672064617465206d7573742068617665207061737365640000006176652070617373656400000000000000000000000000000000000000000000a165627a7a723058202747a6b32b6d0488200dcab734406fc66af369ae01fb10c2507ed73f6148ca480029
Deployed ByteCode
0x6080604052600436106101b35763ffffffff60e060020a6000350416631101a0fd81146101b8578063111ec138146102bf57806312a203c3146102dc5780632417395c146103215780632518904c1461033957806326d6c97b1461036d57806328828b1e146103855780633ccfd60b146104f75780634dc266b41461050c5780634df6ca2a1461052d5780634e60f8831461054557806351577ea91461055d578063590158a71461057557806359245ff3146105b55780636fa42742146105c057806370a08231146105e1578063762c38fd1461060257806377f325df146106785780637f8d429e1461068957806382ffa9f7146106b5578063839df945146106cd57806383bf46091461070a5780638d552d4614610763578063924532fb1461077b57806395addb90146107935780639e63fa6a1461080f5780639f1025c614610840578063a1130d0414610858578063a462fb7b14610907578063acae8f4e1461091f578063bc52565214610937578063d09cc57e14610907578063d44e293c1461094f578063d7cff98614610984578063ebbdd2b0146109a1578063f6a94ecb146109b9578063fe92049d146109e0575b600080fd5b3480156101c457600080fd5b506040805160206004602480358281013584810280870186019097528086526102bd96843596369660449591949091019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610a079650505050505050565b005b6102bd600435602435604435600160a060020a0360643516610d62565b3480156102e857600080fd5b5061030f600435602435600160a060020a036044351663ffffffff60643516608435611145565b60408051918252519081900360200190f35b34801561032d57600080fd5b5061030f600435611382565b34801561034557600080fd5b50610351600435611397565b60408051600160a060020a039092168252519081900360200190f35b34801561037957600080fd5b5061030f6004356113b5565b34801561039157600080fd5b50604080516020600480358082013583810280860185019096528085526102bd95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506113ca9650505050505050565b34801561050357600080fd5b506102bd6115de565b34801561051857600080fd5b506102bd600435602435604435606435611659565b34801561053957600080fd5b506102bd600435611af9565b34801561055157600080fd5b5061030f600435611b48565b34801561056957600080fd5b5061030f600435611b5a565b34801561058157600080fd5b5061058d600435611b6c565b60408051600160a060020a039094168452602084019290925282820152519081900360600190f35b6102bd600435611b97565b3480156105cc57600080fd5b5061030f600160a060020a0360043516611df4565b3480156105ed57600080fd5b5061030f600160a060020a0360043516611e06565b60408051602060046024803582810135601f810185900485028601850190965285855261030f95833595369560449491939091019190819084018382808284375094975050508335600160a060020a03169450505050602081013563ffffffff9081169160408101359091169060600135611e18565b6102bd60043560243560443561213c565b34801561069557600080fd5b506106a16004356124be565b604080519115158252519081900360200190f35b3480156106c157600080fd5b5061030f60043561251b565b3480156106d957600080fd5b506106e5600435612530565b6040805163ffffffff9094168452911515602084015282820152519081900360600190f35b34801561071657600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261030f94369492936024939284019190819084018382808284375094975061255d9650505050505050565b34801561076f57600080fd5b5061030f6004356126f7565b34801561078757600080fd5b506106a160043561270d565b34801561079f57600080fd5b506107ab600435612725565b604080519a8b52600160a060020a0390991660208b015263ffffffff9788168a8a015295871660608a015293909516608088015290151560a087015260c086015260e085019290925261010084019190915261012083015251908190036101400190f35b34801561081b57600080fd5b50610827600435612790565b6040805163ffffffff9092168252519081900360200190f35b34801561084c57600080fd5b506108276004356127b2565b6040805160206004803580820135601f810184900484028501840190955284845261030f94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050508335600160a060020a03169450505050602081013563ffffffff90811691604081013590911690606001356127d4565b34801561091357600080fd5b5061030f6004356127fc565b34801561092b57600080fd5b50610827600435612876565b34801561094357600080fd5b5061030f600435612898565b34801561095b57600080fd5b506102bd600435602435600160a060020a03604435811690606435906084359060a435166128aa565b6102bd600435602435604435600160a060020a03606435166129d2565b3480156109ad57600080fd5b506102bd600435612ddb565b3480156109c557600080fd5b506102bd600435600160a060020a0360243516604435612f91565b3480156109ec57600080fd5b506102bd600435602435600160a060020a0360443516613355565b60008060008060008060008b610a1c816124be565b1515610a72576040805160e560020a62461bcd02815260206004820152601a60248201527f7175657374696f6e206d7573742062652066696e616c697a6564000000000000604482015290519081900360640190fd5b8b51600010610af1576040805160e560020a62461bcd02815260206004820152603060248201527f6174206c65617374206f6e6520686973746f7279206861736820656e7472792060448201527f6d7573742062652070726f766964656400000000000000000000000000000000606482015290519081900360840190fd5b60008d815260056020818152604080842080546001820154600290920154600494859052928620948501549490930154600160a060020a039093169c509a509850909650945092505b8b51831015610c8557610bac858d85815181101515610b5557fe5b906020019060200201518b86815181101515610b6d57fe5b906020019060200201518d87815181101515610b8557fe5b906020019060200201518f88815181101515610b9d57fe5b90602001906020020151613523565b9150610bbe868863ffffffff61373916565b9550610c158d85888b8f88815181101515610bd557fe5b906020019060200201518f89815181101515610bed57fe5b906020019060200201518f8a815181101515610c0557fe5b9060200190602002015189613753565b8b519099509096508a9084908110610c2957fe5b602090810290910181015160008f815260049092526040909120600601549097508714610c6057610c5d8760288104613883565b96505b8b83815181101515610c6e57fe5b602090810290910101519450600190920191610b3a565b8415610cf057600160a060020a03881615610caa57610ca58d8988613895565b600095505b60008d8152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038a1617815560018101889055600201869055610d3f565b610d0a8d89610d05898b63ffffffff61373916565b613895565b60008d8152600560205260408120805473ffffffffffffffffffffffffffffffffffffffff1916815560018101829055600201555b5050506000998a5250600460205260409098206005019790975550505050505050565b600084815260046020526040812060010154859190819060c060020a900463ffffffff168110610dca576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615610e36576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff169150811580610e6f57504263ffffffff168263ffffffff16115b1515610ec7576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff16801580610f0057504263ffffffff168163ffffffff1611155b1515610f44576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8660003411610f9d576040805160e560020a62461bcd02815260206004820152601560248201527f626f6e64206d75737420626520706f7369746976650000000000000000000000604482015290519081900360640190fd5b600081815260046020526040902060060154610fc090600263ffffffff61391616565b34101561103d576040805160e560020a62461bcd02815260206004820152602a60248201527f626f6e64206d75737420626520646f75626c65206174206c656173742070726560448201527f76696f757320626f6e6400000000000000000000000000000000000000000000606482015290519081900360840190fd5b8786600081111561109f5760008281526004602052604090206006015481101561109f576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b600160a060020a03871615156110ff576040805160e560020a62461bcd02815260206004820152601960248201527f616e737765726572206d757374206265206e6f6e2d7a65726f00000000000000604482015290519081900360640190fd5b61110d8a8a89346000613941565b60008a815260046020526040902060010154611139908b908b9060c060020a900463ffffffff16613ab9565b50505050505050505050565b600085611151816124be565b15156111a7576040805160e560020a62461bcd02815260206004820152601a60248201527f7175657374696f6e206d7573742062652066696e616c697a6564000000000000604482015290519081900360640190fd5b600087815260046020526040902054861461120c576040805160e560020a62461bcd02815260206004820152601760248201527f636f6e74656e742068617368206d757374206d61746368000000000000000000604482015290519081900360640190fd5b600087815260046020526040902060010154600160a060020a03868116911614611280576040805160e560020a62461bcd02815260206004820152601560248201527f61726269747261746f72206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b60008781526004602052604090206001015463ffffffff60c060020a909104811690851611156112fa576040805160e560020a62461bcd02815260206004820152601b60248201527f74696d656f7574206d757374206265206c6f6e6720656e6f7567680000000000604482015290519081900360640190fd5b600087815260046020526040902060060154831115611363576040805160e560020a62461bcd02815260206004820152601860248201527f626f6e64206d757374206265206869676820656e6f7567680000000000000000604482015290519081900360640190fd5b6000878152600460208190526040909120015491505095945050505050565b60009081526004602052604090206003015490565b600090815260046020526040902060010154600160a060020a031690565b60009081526004602052604090206006015490565b60008080806060808080845b8e518910156115c5578e898151811015156113ed57fe5b9060200190602002015196508d8981518110151561140757fe5b9060200190602002015195508560405190808252806020026020018201604052801561143d578160200160208202803883390190505b5094508560405190808252806020026020018201604052801561146a578160200160208202803883390190505b50935085604051908082528060200260200182016040528015611497578160200160208202803883390190505b509250856040519080825280602002602001820160405280156114c4578160200160208202803883390190505b509150600090505b858110156115ad578c888151811015156114e257fe5b9060200190602002015185828151811015156114fa57fe5b602090810290910101528b518c908990811061151257fe5b90602001906020020151848281518110151561152a57fe5b600160a060020a039092166020928302909101909101528a518b908990811061154f57fe5b90602001906020020151838281518110151561156757fe5b6020908102909101015289518a908990811061157f57fe5b90602001906020020151828281518110151561159757fe5b60209081029091010152600197880197016114cc565b6115ba8786868686610a07565b6001909801976113d6565b6115cd6115de565b505050505050505050505050505050565b33600081815260208190526040808220805490839055905190929183156108fc02918491818181858888f1935050505015801561161f573d6000803e3d6000fd5b5060408051828152905133917f4ce7033d118120e254016dccf195288400b28fc8936425acd5f17ce2df3ab708919081900360200190a250565b600084815260046020526040812060010154819086908290819060c060020a900463ffffffff1681106116c4576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206001015460e060020a900463ffffffff1691508115806116fd57504263ffffffff168263ffffffff16115b1515611779576040805160e560020a62461bcd02815260206004820152602960248201527f66696e616c697a6174696f6e206465616c696e65206d757374206e6f7420686160448201527f7665207061737365640000000000000000000000000000000000000000000000606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff168015806117b257504263ffffffff168163ffffffff1611155b15156117f6576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b6040805160208082018b90528183018a9052825180830384018152606090920192839052815191929182918401908083835b602083106118475780518252601f199092019160209182019101611828565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209450888587604051602001808460001916600019168152602001836000191660001916815260200182815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106118e55780518252601f1990920191602091820191016118c6565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600081815260069092529290205491975050640100000000900460ff161591506119a99050576040805160e560020a62461bcd02815260206004820152602a60248201527f636f6d6d69746d656e74206d757374206e6f742068617665206265656e20726560448201527f7665616c65642079657400000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526006602052604090205463ffffffff428116911611611a3c576040805160e560020a62461bcd028152602060048201526024808201527f72657665616c20646561646c696e65206d757374206e6f74206861766520706160448201527f7373656400000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152600660208181526040808420600181018d9055805464ff0000000019166401000000001790558c845260049091529091200154861415611aa757600089815260046020526040902060010154611aa7908a908a9060c060020a900463ffffffff16613ab9565b60408051898152602081018990528082018890529051869133918c917fa7b2d313bc7a062e30b2c3b811aa4c9faf09755a6b4ea3bf42deff920944332f919081900360600190a4505050505050505050565b336000818152600760209081526040918290208490558151928352820183905280517fdca703d022171824d3d639b33c1525fd2338120b4cfb89507c0b59596893acda9281900390910190a150565b60036020526000908152604090205481565b60009081526004602052604090205490565b600560205260009081526040902080546001820154600290920154600160a060020a03909116919083565b600081815260046020526040812060010154829190819060c060020a900463ffffffff168110611bff576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615611c6b576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff169150811580611ca457504263ffffffff168263ffffffff16115b1515611cfc576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff16801580611d3557504263ffffffff168163ffffffff1611155b1515611d79576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b600084815260046020526040902060030154611d9b903463ffffffff61373916565b6000858152600460209081526040918290206003018390558151348152908101929092528051339287927f54d68405b79f2aa4fd4e8db7b67844ad254cf8f208aac476c2894134a9deab6692918290030190a350505050565b60076020526000908152604090205481565b60006020819052908152604090205481565b600086815260026020526040812054819081908110611e81576040805160e560020a62461bcd02815260206004820152601360248201527f74656d706c617465206d75737420657869737400000000000000000000000000604482015290519081900360640190fd5b888589604051602001808481526020018363ffffffff1663ffffffff1660e060020a02815260040182805190602001908083835b60208310611ed45780518252601f199092019160209182019101611eb5565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b60208310611f395780518252601f199092019160209182019101611f1a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828201819052600160a060020a038e166c010000000000000000000000009081028487015263ffffffff8e1660e060020a02605485015233026058840152606c8084018c905285518085039091018152608c9093019485905282519098509195509293508392850191508083835b60208310611fed5780518252601f199092019160209182019101611fce565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506120298183898989613b30565b816000191633600160a060020a031682600019167ffe2dac156a3890636ce13f65f4fdf41dcaee11526e4a5374531572d92194796c8c8c8c8c8c8c42604051808881526020018060200187600160a060020a0316600160a060020a031681526020018663ffffffff1663ffffffff1681526020018563ffffffff1663ffffffff168152602001848152602001838152602001828103825288818151815260200191508051906020019080838360005b838110156120f05781810151838201526020016120d8565b50505050905090810190601f16801561211d5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a498975050505050505050565b600083815260046020526040812060010154849190819060c060020a900463ffffffff1681106121a4576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615612210576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff16915081158061224957504263ffffffff168263ffffffff16115b15156122a1576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff168015806122da57504263ffffffff168163ffffffff1611155b151561231e576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8560003411612377576040805160e560020a62461bcd02815260206004820152601560248201527f626f6e64206d75737420626520706f7369746976650000000000000000000000604482015290519081900360640190fd5b60008181526004602052604090206006015461239a90600263ffffffff61391616565b341015612417576040805160e560020a62461bcd02815260206004820152602a60248201527f626f6e64206d75737420626520646f75626c65206174206c656173742070726560448201527f76696f757320626f6e6400000000000000000000000000000000000000000000606482015290519081900360840190fd5b8685600081111561247957600082815260046020526040902060060154811015612479576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b612487898933346000613941565b6000898152600460205260409020600101546124b3908a908a9060c060020a900463ffffffff16613ab9565b505050505050505050565b6000818152600460205260408120600181015460029091015460e060020a90910463ffffffff169060ff161580156124fc5750600063ffffffff8216115b801561251457504263ffffffff168163ffffffff1611155b9392505050565b60009081526004602052604090206005015490565b6006602052600090815260409020805460019091015463ffffffff821691640100000000900460ff169083565b60015460008181526002602090815260408083204390555184519293928592918201918291908401908083835b602083106125a95780518252601f19909201916020918201910161258a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061260c5780518252601f1990920191602091820191016125ed565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206000888152600383528581209190915581835289518383015289513397508896507fb87fb721c0a557bb8dff89a86796466931d82ba530a66a239263eb8735ade2e4958b955084939084019290860191908190849084905b838110156126a357818101518382015260200161268b565b50505050905090810190601f1680156126d05780820380516001836020036101000a031916815260200191505b509250505060405180910390a36126ee81600163ffffffff61373916565b60015592915050565b6000908152600460208190526040909120015490565b60009081526004602052604090206002015460ff1690565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006909501549395600160a060020a0384169563ffffffff60a060020a860481169660c060020a870482169660e060020a90049091169460ff169391908a565b60009081526004602052604090206001015460a060020a900463ffffffff1690565b60009081526004602052604090206001015460c060020a900463ffffffff1690565b6000806127e08861255d565b90506127f0818888888888611e18565b98975050505050505050565b600081612808816124be565b151561285e576040805160e560020a62461bcd02815260206004820152601a60248201527f7175657374696f6e206d7573742062652066696e616c697a6564000000000000604482015290519081900360640190fd5b50506000908152600460208190526040909120015490565b60009081526004602052604090206001015460e060020a900463ffffffff1690565b60026020526000908152604090205481565b6000868152600460205260408120600581015460069091015482916128d3918790879087613523565b91508180156128f95750600084815260066020526040902054640100000000900460ff16155b156129995760008481526006602052604090205463ffffffff428116911610612992576040805160e560020a62461bcd02815260206004820152603760248201527f596f75206d757374207761697420666f72207468652072657665616c2064656160448201527f646c696e65206265666f72652066696e616c697a696e67000000000000000000606482015290519081900360840190fd5b50846129bd565b6000888152600460208190526040909120015487146129b857856129ba565b825b90505b6129c8888883613355565b5050505050505050565b600084815260046020526040812060010154819086908290819060c060020a900463ffffffff168110612a3d576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff1615612aa9576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff169150811580612ae257504263ffffffff168263ffffffff16115b1515612b3a576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff16801580612b7357504263ffffffff168163ffffffff1611155b1515612bb7576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8860003411612c10576040805160e560020a62461bcd02815260206004820152601560248201527f626f6e64206d75737420626520706f7369746976650000000000000000000000604482015290519081900360640190fd5b600081815260046020526040902060060154612c3390600263ffffffff61391616565b341015612cb0576040805160e560020a62461bcd02815260206004820152602a60248201527f626f6e64206d75737420626520646f75626c65206174206c656173742070726560448201527f76696f757320626f6e6400000000000000000000000000000000000000000000606482015290519081900360840190fd5b89886000811115612d1257600082815260046020526040902060060154811015612d12576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b6040805160208082018f90528183018e90523460608084019190915283518084039091018152608090920192839052815191929182918401908083835b60208310612d6e5780518252601f199092019160209182019101612d4f565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209a50505050600160a060020a03891615612db15788612db3565b335b9650612dbf8c89613e91565b612dcd8c8989346001613941565b505050505050505050505050565b6000818152600460205260409020600101548190600160a060020a03163314612e4e576040805160e560020a62461bcd02815260206004820152601d60248201527f6d73672e73656e646572206d7573742062652061726269747261746f72000000604482015290519081900360640190fd5b600082815260046020526040902060020154829060ff161515612ee0576040805160e560020a62461bcd028152602060048201526024808201527f7175657374696f6e206d7573742062652070656e64696e67206172626974726160448201527f74696f6e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600083815260046020526040902060028101805460ff1916905560010154612f1b9063ffffffff4281169160c060020a9004811690613f8516565b600084815260046020526040808220600101805463ffffffff9490941660e060020a027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90941693909317909255905184917f71bf7c2b9df0b8818e7eb6746a5bf69699ebbab041f3795f9ed58e469afa9a3a91a2505050565b6000838152600460205260409020600101548390600160a060020a03163314613004576040805160e560020a62461bcd02815260206004820152601d60248201527f6d73672e73656e646572206d7573742062652061726269747261746f72000000604482015290519081900360640190fd5b600084815260046020526040812060010154859190819060c060020a900463ffffffff16811061306c576040805160e560020a62461bcd0281526020600482015260136024820152600080516020613f9e833981519152604482015290519081900360640190fd5b60008381526004602052604090206002015460ff16156130d8576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613ffe8339815191526044820152600080516020613fbe833981519152606482015290519081900360840190fd5b60008381526004602052604090206001015460e060020a900463ffffffff16915081158061311157504263ffffffff168263ffffffff16115b1515613169576040805160e560020a62461bcd02815260206004820152602a602482015260008051602061401e833981519152604482015260008051602061405e833981519152606482015290519081900360840190fd5b5060008281526004602052604090206001015460a060020a900463ffffffff168015806131a257504263ffffffff168163ffffffff1611155b15156131e6576040805160e560020a62461bcd02815260206004820152601d602482015260008051602061403e833981519152604482015290519081900360640190fd5b8685600081111561324857600082815260046020526040902060060154811015613248576040805160e560020a62461bcd02815260206004820152601d6024820152600080516020613fde833981519152604482015290519081900360640190fd5b600089815260046020526040812060060154116132fb576040805160e560020a62461bcd02815260206004820152604260248201527f5175657374696f6e206d75737420616c7265616479206861766520616e20616e60448201527f73776572207768656e206172626974726174696f6e206973207265717565737460648201527f6564000000000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b600089815260046020526040808220600201805460ff1916600117905551600160a060020a038a16918b917f75d7939999bc902187c4aed400872883e445145f1983539166f783fa040b47629190a3505050505050505050565b6000838152600460205260409020600101548390600160a060020a031633146133c8576040805160e560020a62461bcd02815260206004820152601d60248201527f6d73672e73656e646572206d7573742062652061726269747261746f72000000604482015290519081900360640190fd5b600084815260046020526040902060020154849060ff16151561345a576040805160e560020a62461bcd028152602060048201526024808201527f7175657374696f6e206d7573742062652070656e64696e67206172626974726160448201527f74696f6e00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03831615156134ba576040805160e560020a62461bcd02815260206004820152601960248201527f616e737765726572206d7573742062652070726f766964656400000000000000604482015290519081900360640190fd5b604051849086907f18d760beffe3717270cd90d9d920ec1a48c194e9ad7bba23eb1c92d3eb974f9790600090a36000858152600460205260408120600201805460ff191690556135109086908690869080613941565b61351c85856000613ab9565b5050505050565b604080516020808201879052818301869052606082018590526c01000000000000000000000000600160a060020a0385160260808301527f01000000000000000000000000000000000000000000000000000000000000006094830152825160758184030181526095909201928390528151600093918291908401908083835b602083106135c25780518252601f1990920191602091820191016135a3565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912089141592506135ff91505057506001613730565b604080516020808201889052818301879052606082018690526c01000000000000000000000000600160a060020a0386160260808301526000609483015282516075818403018152609590920192839052815191929182918401908083835b6020831061367d5780518252601f19909201916020918201910161365e565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912089141592506136ba91505057506000613730565b6040805160e560020a62461bcd02815260206004820152603660248201527f486973746f727920696e7075742070726f766964656420646964206e6f74206d60448201527f6174636820746865206578706563746564206861736800000000000000000000606482015290519081900360840190fd5b95945050505050565b60008282018381101561374857fe5b8091505b5092915050565b60008060008084156137d357600086815260066020526040902054869250640100000000900460ff1615156137ab576000828152600660205260408120805464ffffffffff1916815560010155899350889250613874565b6000828152600660205260408120600181018054825464ffffffffff19169092559190915595505b858b141561386d57600160a060020a038916151561382c5760008c8152600460205260409020600301549798508897613813908b9063ffffffff61373916565b60008d815260046020526040812060030155995061386d565b600160a060020a03888116908a161461386d57868a101561384d578961384f565b865b90506138668c8a610d058d8563ffffffff61388316565b8798508099505b8989935093505b50509850989650505050505050565b60008282111561388f57fe5b50900390565b600160a060020a0382166000908152602081905260409020546138be908263ffffffff61373916565b600160a060020a038316600081815260208181526040918290209390935580518481529051919286927f9c121aff33b50c1a53fef034ebec5f83da2d5a5187048f9c76c397ba27c1a1a69281900390910190a3505050565b600080831515613929576000915061374c565b5082820282848281151561393957fe5b041461374857fe5b600085815260046020908152604080832060050154815180840191909152808201889052606081018690526c01000000000000000000000000600160a060020a0388160260808201527f010000000000000000000000000000000000000000000000000000000000000085151502609482015281516075818303018152609590910191829052805190928291908401908083835b602083106139f45780518252601f1990920191602091820191016139d5565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506000831115613a415760008681526004602052604090206006018390555b600086815260046020908152604091829020600501839055815187815290810183905280820185905242606082015283151560808201529051600160a060020a0386169188917fe47ca4ebbbc2990134d1168821f38c5e177f3d5ee564bffeadeaa351905e62219181900360a00190a3505050505050565b600083815260046020819052604090912001829055613ae263ffffffff428116908390613f8516565b600093845260046020526040909320600101805463ffffffff9490941660e060020a027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff909416939093179092555050565b6000858152600460205260408120600101548190879060c060020a900463ffffffff1615613ba8576040805160e560020a62461bcd02815260206004820152601760248201527f7175657374696f6e206d757374206e6f74206578697374000000000000000000604482015290519081900360640190fd5b600063ffffffff861611613c06576040805160e560020a62461bcd02815260206004820152601860248201527f74696d656f7574206d75737420626520706f7369746976650000000000000000604482015290519081900360640190fd5b6301e1338063ffffffff861610613c8d576040805160e560020a62461bcd02815260206004820152602260248201527f74696d656f7574206d757374206265206c657373207468616e2033363520646160448201527f7973000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0386161515613ced576040805160e560020a62461bcd02815260206004820152601660248201527f61726269747261746f72206d7573742062652073657400000000000000000000604482015290519081900360640190fd5b34925033600160a060020a03871614613dee57600160a060020a038616600090815260076020526040902054915081831015613d98576040805160e560020a62461bcd028152602060048201526024808201527f4554482070726f7669646564206d75737420636f766572207175657374696f6e60448201527f2066656500000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b613da8838363ffffffff61388316565b600160a060020a038716600090815260208190526040902054909350613dd4908363ffffffff61373916565b600160a060020a0387166000908152602081905260409020555b505060009586526004602052604090952093845560018401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03949094169390931777ffffffff0000000000000000000000000000000000000000191660a060020a63ffffffff92831602177fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff1660c060020a929091169190910217905560030155565b60008181526006602052604081205463ffffffff1615613f21576040805160e560020a62461bcd02815260206004820152602160248201527f636f6d6d69746d656e74206d757374206e6f7420616c7265616479206578697360448201527f7400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008381526004602052604090206001015460089060c060020a900463ffffffff16049050613f5a63ffffffff428116908390613f8516565b600092835260066020526040909220805463ffffffff191663ffffffff909316929092179091555050565b600082820163ffffffff808516908216101561374857fe007175657374696f6e206d757374206578697374000000000000000000000000006974726174696f6e000000000000000000000000000000000000000000000000626f6e64206d75737420657863656564206d61785f70726576696f75730000007175657374696f6e206d757374206e6f742062652070656e64696e672061726266696e616c697a6174696f6e20646561646c696e65206d757374206e6f7420686f70656e696e672064617465206d7573742068617665207061737365640000006176652070617373656400000000000000000000000000000000000000000000a165627a7a723058202747a6b32b6d0488200dcab734406fc66af369ae01fb10c2507ed73f6148ca480029