Address Details
contract
0x19F78d207493Bf6f7E8D54900d01bb387F211b28
- Contract Name
- Governance
- Creator
- 0xf3eb91–a79239 at 0x4f6b5b–39e366
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 2 Transactions
- Transfers
- 1 Transfers
- Gas Used
- 63,284
- Last Balance Update
- 28574610
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Governance
- Optimization enabled
- false
- Compiler version
- v0.5.13+commit.5b0b510c
- EVM Version
- istanbul
- Verified at
- 2024-04-12T14:36:37.642498Z
project:/contracts/governance/Governance.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity/contracts/math/Math.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/utils/Address.sol"; import "./interfaces/IGovernance.sol"; import "./Proposals.sol"; import "../common/interfaces/IAccounts.sol"; import "../common/ExtractFunctionSignature.sol"; import "../common/Initializable.sol"; import "../common/FixidityLib.sol"; import "../common/linkedlists/IntegerSortedLinkedList.sol"; import "../common/UsingRegistry.sol"; import "../common/UsingPrecompiles.sol"; import "../common/interfaces/ICeloVersionedContract.sol"; import "../common/libraries/ReentrancyGuard.sol"; /** * @title A contract for making, passing, and executing on-chain governance proposals. */ contract Governance is IGovernance, ICeloVersionedContract, Ownable, Initializable, ReentrancyGuard, UsingRegistry, UsingPrecompiles { using Proposals for Proposals.Proposal; using FixidityLib for FixidityLib.Fraction; using SafeMath for uint256; using IntegerSortedLinkedList for SortedLinkedList.List; using BytesLib for bytes; using Address for address payable; // prettier-ignore uint256 private constant FIXED_HALF = 500000000000000000000000; enum VoteValue { None, Abstain, No, Yes } struct UpvoteRecord { uint256 proposalId; uint256 weight; } struct VoteRecord { Proposals.VoteValue deprecated_value; // obsolete uint256 proposalId; uint256 deprecated_weight; // obsolete uint256 yesVotes; uint256 noVotes; uint256 abstainVotes; } struct Voter { // Key of the proposal voted for in the proposal queue UpvoteRecord upvote; uint256 mostRecentReferendumProposal; // Maps a `dequeued` index to a voter's vote record. mapping(uint256 => VoteRecord) referendumVotes; } struct ContractConstitution { FixidityLib.Fraction defaultThreshold; // Maps a function ID to a corresponding threshold, overriding the default. mapping(bytes4 => FixidityLib.Fraction) functionThresholds; } struct HotfixRecord { bool executed; bool approved; uint256 preparedEpoch; mapping(address => bool) whitelisted; } // The baseline is updated as // max{floor, (1 - baselineUpdateFactor) * baseline + baselineUpdateFactor * participation} struct ParticipationParameters { // The average network participation in governance, weighted toward recent proposals. FixidityLib.Fraction baseline; // The lower bound on the participation baseline. FixidityLib.Fraction baselineFloor; // The weight of the most recent proposal's participation on the baseline. FixidityLib.Fraction baselineUpdateFactor; // The proportion of the baseline that constitutes quorum. FixidityLib.Fraction baselineQuorumFactor; } Proposals.StageDurations public stageDurations; uint256 public queueExpiry; uint256 public dequeueFrequency; address public approver; uint256 public lastDequeue; uint256 public concurrentProposals; uint256 public proposalCount; uint256 public minDeposit; mapping(address => uint256) public refundedDeposits; mapping(address => ContractConstitution) private constitution; mapping(uint256 => Proposals.Proposal) private proposals; mapping(address => Voter) internal voters; mapping(bytes32 => HotfixRecord) public hotfixes; SortedLinkedList.List private queue; uint256[] public dequeued; uint256[] public emptyIndices; ParticipationParameters private participationParameters; event ApproverSet(address indexed approver); event ConcurrentProposalsSet(uint256 concurrentProposals); event MinDepositSet(uint256 minDeposit); event QueueExpirySet(uint256 queueExpiry); event DequeueFrequencySet(uint256 dequeueFrequency); event ReferendumStageDurationSet(uint256 referendumStageDuration); event ExecutionStageDurationSet(uint256 executionStageDuration); event ConstitutionSet(address indexed destination, bytes4 indexed functionId, uint256 threshold); event ProposalQueued( uint256 indexed proposalId, address indexed proposer, uint256 transactionCount, uint256 deposit, uint256 timestamp ); event ProposalUpvoted(uint256 indexed proposalId, address indexed account, uint256 upvotes); event ProposalUpvoteRevoked( uint256 indexed proposalId, address indexed account, uint256 revokedUpvotes ); event ProposalDequeued(uint256 indexed proposalId, uint256 timestamp); event ProposalApproved(uint256 indexed proposalId); event ProposalVoted( uint256 indexed proposalId, address indexed account, uint256 value, uint256 weight ); event ProposalVotedV2( uint256 indexed proposalId, address indexed account, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ); event ProposalVoteRevoked( uint256 indexed proposalId, address indexed account, uint256 value, uint256 weight ); event ProposalVoteRevokedV2( uint256 indexed proposalId, address indexed account, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ); event ProposalExecuted(uint256 indexed proposalId); event ProposalExpired(uint256 indexed proposalId); event ParticipationBaselineUpdated(uint256 participationBaseline); event ParticipationFloorSet(uint256 participationFloor); event ParticipationBaselineUpdateFactorSet(uint256 baselineUpdateFactor); event ParticipationBaselineQuorumFactorSet(uint256 baselineQuorumFactor); event HotfixWhitelisted(bytes32 indexed hash, address whitelister); event HotfixApproved(bytes32 indexed hash); event HotfixPrepared(bytes32 indexed hash, uint256 indexed epoch); event HotfixExecuted(bytes32 indexed hash); modifier hotfixNotExecuted(bytes32 hash) { require(!hotfixes[hash].executed, "hotfix already executed"); _; } modifier onlyApprover() { require(msg.sender == approver, "msg.sender not approver"); _; } modifier onlyLockedGold() { require(msg.sender == address(getLockedGold()), "msg.sender not lockedGold"); _; } /** * @notice Sets initialized == true on implementation contracts * @param test Set to true to skip implementation initialization */ constructor(bool test) public Initializable(test) {} function() external payable { require(msg.data.length == 0, "unknown method"); } /** * @notice Returns the storage, major, minor, and patch version of the contract. * @return Storage version of the contract. * @return Major version of the contract. * @return Minor version of the contract. * @return Patch version of the contract. */ function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { return (1, 4, 1, 0); } /** * @notice Used in place of the constructor to allow the contract to be upgradable via proxy. * @param registryAddress The address of the registry contract. * @param _approver The address that needs to approve proposals to move to the referendum stage. * @param _concurrentProposals The number of proposals to dequeue at once. * @param _minDeposit The minimum CELO deposit needed to make a proposal. * @param _queueExpiry The number of seconds a proposal can stay in the queue before expiring. * @param _dequeueFrequency The number of seconds before the next batch of proposals can be * dequeued. * @param referendumStageDuration The number of seconds users have to vote on a dequeued proposal * after the approval stage ends. * @param executionStageDuration The number of seconds users have to execute a passed proposal * after the referendum stage ends. * @param participationBaseline The initial value of the participation baseline. * @param participationFloor The participation floor. * @param baselineUpdateFactor The weight of the new participation in the baseline update rule. * @param baselineQuorumFactor The proportion of the baseline that constitutes quorum. * @dev Should be called only once. */ function initialize( address registryAddress, address _approver, uint256 _concurrentProposals, uint256 _minDeposit, uint256 _queueExpiry, uint256 _dequeueFrequency, uint256 referendumStageDuration, uint256 executionStageDuration, uint256 participationBaseline, uint256 participationFloor, uint256 baselineUpdateFactor, uint256 baselineQuorumFactor ) external initializer { _transferOwnership(msg.sender); setRegistry(registryAddress); setApprover(_approver); setConcurrentProposals(_concurrentProposals); setMinDeposit(_minDeposit); setQueueExpiry(_queueExpiry); setDequeueFrequency(_dequeueFrequency); setReferendumStageDuration(referendumStageDuration); setExecutionStageDuration(executionStageDuration); setParticipationBaseline(participationBaseline); setParticipationFloor(participationFloor); setBaselineUpdateFactor(baselineUpdateFactor); setBaselineQuorumFactor(baselineQuorumFactor); // solhint-disable-next-line not-rely-on-time lastDequeue = now; } /** * @notice Updates the address that has permission to approve proposals in the approval stage. * @param _approver The address that has permission to approve proposals in the approval stage. */ function setApprover(address _approver) public onlyOwner { require(_approver != address(0), "Approver cannot be 0"); require(_approver != approver, "Approver unchanged"); approver = _approver; emit ApproverSet(_approver); } /** * @notice Updates the number of proposals to dequeue at a time. * @param _concurrentProposals The number of proposals to dequeue at at a time. */ function setConcurrentProposals(uint256 _concurrentProposals) public onlyOwner { require(_concurrentProposals != 0, "Number of proposals must be larger than zero"); require(_concurrentProposals != concurrentProposals, "Number of proposals unchanged"); concurrentProposals = _concurrentProposals; emit ConcurrentProposalsSet(_concurrentProposals); } /** * @notice Updates the minimum deposit needed to make a proposal. * @param _minDeposit The minimum CELO deposit needed to make a proposal. */ function setMinDeposit(uint256 _minDeposit) public onlyOwner { require(_minDeposit != 0, "minDeposit must be larger than 0"); require(_minDeposit != minDeposit, "Minimum deposit unchanged"); minDeposit = _minDeposit; emit MinDepositSet(_minDeposit); } /** * @notice Updates the number of seconds before a queued proposal expires. * @param _queueExpiry The number of seconds a proposal can stay in the queue before expiring. */ function setQueueExpiry(uint256 _queueExpiry) public onlyOwner { require(_queueExpiry != 0, "QueueExpiry must be larger than 0"); require(_queueExpiry != queueExpiry, "QueueExpiry unchanged"); queueExpiry = _queueExpiry; emit QueueExpirySet(_queueExpiry); } /** * @notice Updates the minimum number of seconds before the next batch of proposals can be * dequeued. * @param _dequeueFrequency The number of seconds before the next batch of proposals can be * dequeued. */ function setDequeueFrequency(uint256 _dequeueFrequency) public onlyOwner { require(_dequeueFrequency != 0, "dequeueFrequency must be larger than 0"); require(_dequeueFrequency != dequeueFrequency, "dequeueFrequency unchanged"); dequeueFrequency = _dequeueFrequency; emit DequeueFrequencySet(_dequeueFrequency); } /** * @notice Updates the number of seconds proposals stay in the referendum stage. * @param referendumStageDuration The number of seconds proposals stay in the referendum stage. */ function setReferendumStageDuration(uint256 referendumStageDuration) public onlyOwner { require(referendumStageDuration != 0, "Duration must be larger than 0"); require(referendumStageDuration != stageDurations.referendum, "Duration unchanged"); stageDurations.referendum = referendumStageDuration; emit ReferendumStageDurationSet(referendumStageDuration); } /** * @notice Updates the number of seconds proposals stay in the execution stage. * @param executionStageDuration The number of seconds proposals stay in the execution stage. */ function setExecutionStageDuration(uint256 executionStageDuration) public onlyOwner { require(executionStageDuration != 0, "Duration must be larger than 0"); require(executionStageDuration != stageDurations.execution, "Duration unchanged"); stageDurations.execution = executionStageDuration; emit ExecutionStageDurationSet(executionStageDuration); } /** * @notice Updates the participation baseline. * @param participationBaseline The value of the baseline. */ function setParticipationBaseline(uint256 participationBaseline) public onlyOwner { FixidityLib.Fraction memory participationBaselineFrac = FixidityLib.wrap(participationBaseline); require( FixidityLib.isProperFraction(participationBaselineFrac), "Participation baseline greater than one" ); require( !participationBaselineFrac.equals(participationParameters.baseline), "Participation baseline unchanged" ); participationParameters.baseline = participationBaselineFrac; emit ParticipationBaselineUpdated(participationBaseline); } /** * @notice Updates the floor of the participation baseline. * @param participationFloor The value at which the baseline is floored. */ function setParticipationFloor(uint256 participationFloor) public onlyOwner { FixidityLib.Fraction memory participationFloorFrac = FixidityLib.wrap(participationFloor); require( FixidityLib.isProperFraction(participationFloorFrac), "Participation floor greater than one" ); require( !participationFloorFrac.equals(participationParameters.baselineFloor), "Participation baseline floor unchanged" ); participationParameters.baselineFloor = participationFloorFrac; emit ParticipationFloorSet(participationFloor); } /** * @notice Updates the weight of the new participation in the baseline update rule. * @param baselineUpdateFactor The new baseline update factor. */ function setBaselineUpdateFactor(uint256 baselineUpdateFactor) public onlyOwner { FixidityLib.Fraction memory baselineUpdateFactorFrac = FixidityLib.wrap(baselineUpdateFactor); require( FixidityLib.isProperFraction(baselineUpdateFactorFrac), "Baseline update factor greater than one" ); require( !baselineUpdateFactorFrac.equals(participationParameters.baselineUpdateFactor), "Baseline update factor unchanged" ); participationParameters.baselineUpdateFactor = baselineUpdateFactorFrac; emit ParticipationBaselineUpdateFactorSet(baselineUpdateFactor); } /** * @notice Updates the proportion of the baseline that constitutes quorum. * @param baselineQuorumFactor The new baseline quorum factor. */ function setBaselineQuorumFactor(uint256 baselineQuorumFactor) public onlyOwner { FixidityLib.Fraction memory baselineQuorumFactorFrac = FixidityLib.wrap(baselineQuorumFactor); require( FixidityLib.isProperFraction(baselineQuorumFactorFrac), "Baseline quorum factor greater than one" ); require( !baselineQuorumFactorFrac.equals(participationParameters.baselineQuorumFactor), "Baseline quorum factor unchanged" ); participationParameters.baselineQuorumFactor = baselineQuorumFactorFrac; emit ParticipationBaselineQuorumFactorSet(baselineQuorumFactor); } /** * @notice Updates the ratio of yes:yes+no votes needed for a specific class of proposals to pass. * @param destination The destination of proposals for which this threshold should apply. * @param functionId The function ID of proposals for which this threshold should apply. Zero * will set the default. * @param threshold The threshold. * @dev If no constitution is explicitly set the default is a simple majority, i.e. 1:2. */ function setConstitution(address destination, bytes4 functionId, uint256 threshold) external onlyOwner { require(destination != address(0), "Destination cannot be zero"); require( threshold > FIXED_HALF && threshold <= FixidityLib.fixed1().unwrap(), "Threshold has to be greater than majority and not greater than unanimity" ); if (functionId == 0) { constitution[destination].defaultThreshold = FixidityLib.wrap(threshold); } else { constitution[destination].functionThresholds[functionId] = FixidityLib.wrap(threshold); } emit ConstitutionSet(destination, functionId, threshold); } /** * @notice Creates a new proposal and adds it to end of the queue with no upvotes. * @param values The values of CELO to be sent in the proposed transactions. * @param destinations The destination addresses of the proposed transactions. * @param data The concatenated data to be included in the proposed transactions. * @param dataLengths The lengths of each transaction's data. * @return The ID of the newly proposed proposal. * @dev The minimum deposit must be included with the proposal, returned if/when the proposal is * dequeued. */ function propose( uint256[] calldata values, address[] calldata destinations, bytes calldata data, uint256[] calldata dataLengths, string calldata descriptionUrl ) external payable returns (uint256) { dequeueProposalsIfReady(); require(msg.value >= minDeposit, "Too small deposit"); proposalCount = proposalCount.add(1); Proposals.Proposal storage proposal = proposals[proposalCount]; proposal.make(values, destinations, data, dataLengths, msg.sender, msg.value); proposal.setDescriptionUrl(descriptionUrl); queue.push(proposalCount); // solhint-disable-next-line not-rely-on-time emit ProposalQueued(proposalCount, msg.sender, proposal.transactions.length, msg.value, now); return proposalCount; } /** * @notice Removes a proposal if it is queued and expired. * @param proposalId The ID of the proposal to remove. * @return Whether the proposal was removed. */ function removeIfQueuedAndExpired(uint256 proposalId) private returns (bool) { if (isQueued(proposalId) && isQueuedProposalExpired(proposalId)) { queue.remove(proposalId); emit ProposalExpired(proposalId); return true; } return false; } /** * @notice Requires a proposal is dequeued and removes it if expired. * @param proposalId The ID of the proposal. * @return The proposal storage struct corresponding to `proposalId`. * @return The proposal stage corresponding to `proposalId`. */ function requireDequeuedAndDeleteExpired(uint256 proposalId, uint256 index) private returns (Proposals.Proposal storage, Proposals.Stage) { Proposals.Proposal storage proposal = proposals[proposalId]; require(_isDequeuedProposal(proposal, proposalId, index), "Proposal not dequeued"); Proposals.Stage stage = getProposalDequeuedStage(proposal); if (_isDequeuedProposalExpired(proposal, stage)) { deleteDequeuedProposal(proposal, proposalId, index); return (proposal, Proposals.Stage.Expiration); } return (proposal, stage); } /** * @notice Upvotes a queued proposal. * @param proposalId The ID of the proposal to upvote. * @param lesser The ID of the proposal that will be just behind `proposalId` in the queue. * @param greater The ID of the proposal that will be just ahead `proposalId` in the queue. * @return Whether or not the upvote was made successfully. * @dev Provide 0 for `lesser`/`greater` when the proposal will be at the tail/head of the queue. * @dev Reverts if the account has already upvoted a proposal in the queue. */ function upvote(uint256 proposalId, uint256 lesser, uint256 greater) external nonReentrant returns (bool) { dequeueProposalsIfReady(); // If acting on an expired proposal, expire the proposal and take no action. if (removeIfQueuedAndExpired(proposalId)) { return false; } address account = getAccounts().voteSignerToAccount(msg.sender); Voter storage voter = voters[account]; removeIfQueuedAndExpired(voter.upvote.proposalId); // We can upvote a proposal in the queue if we're not already upvoting a proposal in the queue. uint256 weight = getLockedGold().getAccountTotalLockedGold(account); require(weight > 0, "cannot upvote without locking gold"); require(queue.contains(proposalId), "cannot upvote a proposal not in the queue"); require( voter.upvote.proposalId == 0 || !queue.contains(voter.upvote.proposalId), "cannot upvote more than one queued proposal" ); uint256 upvotes = queue.getValue(proposalId).add(weight); queue.update(proposalId, upvotes, lesser, greater); voter.upvote = UpvoteRecord(proposalId, weight); emit ProposalUpvoted(proposalId, account, weight); return true; } /** * @notice Returns stage of governance process given proposal is in * @param proposalId The ID of the proposal to query. * @return proposal stage */ function getProposalStage(uint256 proposalId) external view returns (Proposals.Stage) { if (proposalId == 0 || proposalId > proposalCount) { return Proposals.Stage.None; } Proposals.Proposal storage proposal = proposals[proposalId]; if (isQueued(proposalId)) { return _isQueuedProposalExpired(proposal) ? Proposals.Stage.Expiration : Proposals.Stage.Queued; } else { Proposals.Stage stage = getProposalDequeuedStage(proposal); return _isDequeuedProposalExpired(proposal, stage) ? Proposals.Stage.Expiration : stage; } } /** * @notice Revokes an upvote on a queued proposal. * @param lesser The ID of the proposal that will be just behind the previously upvoted proposal * in the queue. * @param greater The ID of the proposal that will be just ahead of the previously upvoted * proposal in the queue. * @return Whether or not the upvote was revoked successfully. * @dev Provide 0 for `lesser`/`greater` when the proposal will be at the tail/head of the queue. */ function revokeUpvote(uint256 lesser, uint256 greater) external nonReentrant returns (bool) { dequeueProposalsIfReady(); address account = getAccounts().voteSignerToAccount(msg.sender); Voter storage voter = voters[account]; uint256 proposalId = voter.upvote.proposalId; require(proposalId != 0, "Account has no historical upvote"); removeIfQueuedAndExpired(proposalId); if (queue.contains(proposalId)) { queue.update( proposalId, queue.getValue(proposalId).sub(voter.upvote.weight), lesser, greater ); emit ProposalUpvoteRevoked(proposalId, account, voter.upvote.weight); } voter.upvote = UpvoteRecord(0, 0); return true; } /** * @notice Approves a proposal in the approval stage. * @param proposalId The ID of the proposal to approve. * @param index The index of the proposal ID in `dequeued`. * @return Whether or not the approval was made successfully. */ function approve(uint256 proposalId, uint256 index) external onlyApprover returns (bool) { dequeueProposalsIfReady(); (Proposals.Proposal storage proposal, Proposals.Stage stage) = requireDequeuedAndDeleteExpired( proposalId, index ); if (!proposal.exists()) { return false; } require(!proposal.isApproved(), "Proposal already approved"); require( stage == Proposals.Stage.Referendum || stage == Proposals.Stage.Execution, "Proposal not in correct stage" ); proposal.approved = true; // Ensures networkWeight is set by the end of the Referendum stage, even if 0 votes are cast. proposal.networkWeight = getLockedGold().getTotalLockedGold(); emit ProposalApproved(proposalId); return true; } /** * @notice Votes on a proposal in the referendum stage. * @param proposalId The ID of the proposal to vote on. * @param index The index of the proposal ID in `dequeued`. * @param value Whether to vote yes, no, or abstain. * @return Whether or not the vote was cast successfully. */ /* solhint-disable code-complexity */ function vote(uint256 proposalId, uint256 index, Proposals.VoteValue value) external nonReentrant returns (bool) { dequeueProposalsIfReady(); (Proposals.Proposal storage proposal, Proposals.Stage stage) = requireDequeuedAndDeleteExpired( proposalId, index ); if (!proposal.exists()) { return false; } require(stage == Proposals.Stage.Referendum, "Incorrect proposal state"); require(value != Proposals.VoteValue.None, "Vote value unset"); address account = getAccounts().voteSignerToAccount(msg.sender); uint256 weight = getLockedGold().getAccountTotalGovernanceVotingPower(account); require(weight != 0, "Voter weight zero"); _vote( proposal, proposalId, index, account, value == Proposals.VoteValue.Yes ? weight : 0, value == Proposals.VoteValue.No ? weight : 0, value == Proposals.VoteValue.Abstain ? weight : 0 ); return true; } /** * @notice Votes partially on a proposal in the referendum stage. * @param proposalId The ID of the proposal to vote on. * @param index The index of the proposal ID in `dequeued`. * @param yesVotes The yes votes weight. * @param noVotes The no votes weight. * @param abstainVotes The abstain votes weight. * @return Whether or not the vote was cast successfully. */ /* solhint-disable code-complexity */ function votePartially( uint256 proposalId, uint256 index, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) external nonReentrant returns (bool) { dequeueProposalsIfReady(); (Proposals.Proposal storage proposal, Proposals.Stage stage) = requireDequeuedAndDeleteExpired( proposalId, index ); if (!proposal.exists()) { return false; } require(stage == Proposals.Stage.Referendum, "Incorrect proposal state"); address account = getAccounts().voteSignerToAccount(msg.sender); uint256 totalVotingPower = getLockedGold().getAccountTotalGovernanceVotingPower(account); require( totalVotingPower >= yesVotes.add(noVotes).add(abstainVotes), "Voter doesn't have enough locked Celo (formerly known as Celo Gold)" ); _vote(proposal, proposalId, index, account, yesVotes, noVotes, abstainVotes); return true; } /** * @notice Votes on a proposal in the referendum stage. * @param proposal The proposal struct. * @param proposalId The ID of the proposal to vote on. * @param index The index of the proposal ID in `dequeued`. * @param account Account based on signer. * @param yesVotes The yes votes weight. * @param noVotes The no votes weight. * @param abstainVotes The abstain votes weight. * @return Whether or not the proposal is passing. */ function _vote( Proposals.Proposal storage proposal, uint256 proposalId, uint256 index, address account, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) private { Voter storage voter = voters[account]; VoteRecord storage previousVoteRecord = voter.referendumVotes[index]; if (previousVoteRecord.proposalId != proposalId) { // VoteRecord is being stored based on index (in `dequeued`) rather than proposalId. // It can happen that user voted on proposal that later gets deleted. // VoteRecord will still stay in `referendumVotes` mapping. // Once new proposal is created it might get same index as previous proposal. // In such case we need to check whether existing VoteRecord is relevant to new // proposal of whether it is just left over data. proposal.updateVote(0, 0, 0, yesVotes, noVotes, abstainVotes); } else if (previousVoteRecord.deprecated_weight != 0) { // backward compatibility for transition period - this should be deleted later on proposal.updateVote( previousVoteRecord.deprecated_value == Proposals.VoteValue.Yes ? previousVoteRecord.deprecated_weight : 0, previousVoteRecord.deprecated_value == Proposals.VoteValue.No ? previousVoteRecord.deprecated_weight : 0, previousVoteRecord.deprecated_value == Proposals.VoteValue.Abstain ? previousVoteRecord.deprecated_weight : 0, yesVotes, noVotes, abstainVotes ); } else { proposal.updateVote( previousVoteRecord.yesVotes, previousVoteRecord.noVotes, previousVoteRecord.abstainVotes, yesVotes, noVotes, abstainVotes ); } proposal.networkWeight = getLockedGold().getTotalLockedGold(); voter.referendumVotes[index] = VoteRecord( Proposals.VoteValue.None, proposalId, 0, yesVotes, noVotes, abstainVotes ); if (proposal.timestamp > proposals[voter.mostRecentReferendumProposal].timestamp) { voter.mostRecentReferendumProposal = proposalId; } emit ProposalVotedV2(proposalId, account, yesVotes, noVotes, abstainVotes); } /* solhint-enable code-complexity */ /** * @notice Revoke votes on all proposals of sender in the referendum stage. * @return Whether or not all votes of an account were successfully revoked. */ function revokeVotes() external nonReentrant returns (bool) { address account = getAccounts().voteSignerToAccount(msg.sender); Voter storage voter = voters[account]; for ( uint256 dequeueIndex = 0; dequeueIndex < dequeued.length; dequeueIndex = dequeueIndex.add(1) ) { VoteRecord storage voteRecord = voter.referendumVotes[dequeueIndex]; // Skip proposals where there was no vote cast by the user AND // ensure vote record proposal matches identifier of dequeued index proposal. if ( voteRecord.proposalId == dequeued[dequeueIndex] && (voteRecord.yesVotes != 0 || voteRecord.noVotes != 0 || voteRecord.abstainVotes != 0 || voteRecord.deprecated_weight != 0) ) { (Proposals.Proposal storage proposal, Proposals.Stage stage) = requireDequeuedAndDeleteExpired(voteRecord.proposalId, dequeueIndex); // prettier-ignore // only revoke from proposals which are still in referendum if (stage == Proposals.Stage.Referendum) { if (voteRecord.deprecated_weight != 0) { // backward compatibility for transition period - this should be deleted later on uint256 previousYes = voteRecord.deprecated_value == Proposals.VoteValue.Yes ? voteRecord.deprecated_weight : 0; uint256 previousNo = voteRecord.deprecated_value == Proposals.VoteValue.No ? voteRecord.deprecated_weight : 0; uint256 previousAbstain = voteRecord.deprecated_value == Proposals.VoteValue.Abstain ? voteRecord.deprecated_weight : 0; proposal.updateVote(previousYes, previousNo, previousAbstain, 0, 0, 0); proposal.networkWeight = getLockedGold().getTotalLockedGold(); emit ProposalVoteRevokedV2( voteRecord.proposalId, account, previousYes, previousNo, previousAbstain ); } else { proposal.updateVote( voteRecord.yesVotes, voteRecord.noVotes, voteRecord.abstainVotes, 0, 0, 0 ); proposal.networkWeight = getLockedGold().getTotalLockedGold(); emit ProposalVoteRevokedV2( voteRecord.proposalId, account, voteRecord.yesVotes, voteRecord.noVotes, voteRecord.abstainVotes ); } } // always delete dequeue vote records for gas refund as they must be expired or revoked delete voter.referendumVotes[dequeueIndex]; } } // reset most recent referendum proposal ID to guarantee isVotingReferendum == false voter.mostRecentReferendumProposal = 0; return true; } /** * @notice Executes a proposal in the execution stage, removing it from `dequeued`. * @param proposalId The ID of the proposal to vote on. * @param index The index of the proposal ID in `dequeued`. * @return Whether or not the proposal was executed successfully. * @dev Does not remove the proposal if the execution fails. */ function execute(uint256 proposalId, uint256 index) external nonReentrant returns (bool) { dequeueProposalsIfReady(); (Proposals.Proposal storage proposal, Proposals.Stage stage) = requireDequeuedAndDeleteExpired( proposalId, index ); bool notExpired = proposal.exists(); if (notExpired) { require(proposal.isApproved(), "Proposal not approved"); require( stage == Proposals.Stage.Execution && _isProposalPassing(proposal), "Proposal not in execution stage or not passing" ); proposal.execute(); emit ProposalExecuted(proposalId); deleteDequeuedProposal(proposal, proposalId, index); } return notExpired; } /** * @notice Approves the hash of a hotfix transaction(s). * @param hash The abi encoded keccak256 hash of the hotfix transaction(s) to be approved. */ function approveHotfix(bytes32 hash) external hotfixNotExecuted(hash) onlyApprover { hotfixes[hash].approved = true; emit HotfixApproved(hash); } /** * @notice Returns whether given hotfix hash has been whitelisted by given address. * @param hash The abi encoded keccak256 hash of the hotfix transaction(s) to be whitelisted. * @param whitelister Address to check whitelist status of. */ function isHotfixWhitelistedBy(bytes32 hash, address whitelister) public view returns (bool) { return hotfixes[hash].whitelisted[whitelister]; } /** * @notice Whitelists the hash of a hotfix transaction(s). * @param hash The abi encoded keccak256 hash of the hotfix transaction(s) to be whitelisted. */ function whitelistHotfix(bytes32 hash) external hotfixNotExecuted(hash) { hotfixes[hash].whitelisted[msg.sender] = true; emit HotfixWhitelisted(hash, msg.sender); } /** * @notice Gives hotfix a prepared epoch for execution. * @param hash The hash of the hotfix to be prepared. */ function prepareHotfix(bytes32 hash) external hotfixNotExecuted(hash) { require(isHotfixPassing(hash), "hotfix not whitelisted by 2f+1 validators"); uint256 epoch = getEpochNumber(); require(hotfixes[hash].preparedEpoch < epoch, "hotfix already prepared for this epoch"); hotfixes[hash].preparedEpoch = epoch; emit HotfixPrepared(hash, epoch); } /** * @notice Executes a whitelisted proposal. * @param values The values of CELO to be sent in the proposed transactions. * @param destinations The destination addresses of the proposed transactions. * @param data The concatenated data to be included in the proposed transactions. * @param dataLengths The lengths of each transaction's data. * @param salt Arbitrary salt associated with hotfix which guarantees uniqueness of hash. * @dev Reverts if hotfix is already executed, not approved, or not prepared for current epoch. */ function executeHotfix( uint256[] calldata values, address[] calldata destinations, bytes calldata data, uint256[] calldata dataLengths, bytes32 salt ) external { bytes32 hash = keccak256(abi.encode(values, destinations, data, dataLengths, salt)); (bool approved, bool executed, uint256 preparedEpoch) = getHotfixRecord(hash); require(!executed, "hotfix already executed"); require(approved, "hotfix not approved"); require(preparedEpoch == getEpochNumber(), "hotfix must be prepared for this epoch"); Proposals.makeMem(values, destinations, data, dataLengths, msg.sender, 0).executeMem(); hotfixes[hash].executed = true; emit HotfixExecuted(hash); } /** * @notice Withdraws refunded CELO deposits. * @return Whether or not the withdraw was successful. */ function withdraw() external nonReentrant returns (bool) { uint256 value = refundedDeposits[msg.sender]; require(value != 0, "Nothing to withdraw"); require(value <= address(this).balance, "Inconsistent balance"); refundedDeposits[msg.sender] = 0; msg.sender.sendValue(value); return true; } /** * @notice Returns whether or not a particular account is voting on proposals. * @param account The address of the account. * @return Whether or not the account is voting on proposals. */ function isVoting(address account) external view returns (bool) { Voter storage voter = voters[account]; uint256 upvotedProposal = voter.upvote.proposalId; bool isVotingQueue = upvotedProposal != 0 && isQueued(upvotedProposal) && !isQueuedProposalExpired(upvotedProposal); Proposals.Proposal storage proposal = proposals[voter.mostRecentReferendumProposal]; bool isVotingReferendum = (getProposalDequeuedStage(proposal) == Proposals.Stage.Referendum); return isVotingQueue || isVotingReferendum; } /** * @notice Returns the number of seconds proposals stay in the referendum stage. * @return The number of seconds proposals stay in the referendum stage. */ function getReferendumStageDuration() external view returns (uint256) { return stageDurations.referendum; } /** * @notice Returns the number of seconds proposals stay in the execution stage. * @return The number of seconds proposals stay in the execution stage. */ function getExecutionStageDuration() external view returns (uint256) { return stageDurations.execution; } /** * @notice Returns the participation parameters. * @return baseline The participation baseline parameter. * @return baselineFloor The participation baseline floor parameter. * @return baselineUpdateFactor The participation baseline update factor parameter. * @return baselineQuorumFactor The participation baseline quorum factor parameter. */ function getParticipationParameters() external view returns (uint256, uint256, uint256, uint256) { return ( participationParameters.baseline.unwrap(), participationParameters.baselineFloor.unwrap(), participationParameters.baselineUpdateFactor.unwrap(), participationParameters.baselineQuorumFactor.unwrap() ); } /** * @notice Returns whether or not a proposal exists. * @param proposalId The ID of the proposal. * @return Whether or not the proposal exists. */ function proposalExists(uint256 proposalId) external view returns (bool) { return proposals[proposalId].exists(); } /** * @notice Returns an unpacked proposal struct with its transaction count. * @param proposalId The ID of the proposal to unpack. * @return proposer * @return deposit * @return timestamp * @return transaction Transaction count. * @return description Description url. */ function getProposal(uint256 proposalId) external view returns (address, uint256, uint256, uint256, string memory, uint256, bool) { return proposals[proposalId].unpack(); } /** * @notice Returns a specified transaction in a proposal. * @param proposalId The ID of the proposal to query. * @param index The index of the specified transaction in the proposal's transaction list. * @return value Transaction value. * @return destination Transaction destination. * @return data Transaction data. */ function getProposalTransaction(uint256 proposalId, uint256 index) external view returns (uint256, address, bytes memory) { return proposals[proposalId].getTransaction(index); } /** * @notice Returns whether or not a proposal has been approved. * @param proposalId The ID of the proposal. * @return Whether or not the proposal has been approved. */ function isApproved(uint256 proposalId) external view returns (bool) { return proposals[proposalId].isApproved(); } /** * @notice Returns the referendum vote totals for a proposal. * @param proposalId The ID of the proposal. * @return yes The yes vote totals. * @return no The no vote totals. * @return abstain The abstain vote totals. */ function getVoteTotals(uint256 proposalId) external view returns (uint256, uint256, uint256) { return proposals[proposalId].getVoteTotals(); } /** * @notice Returns an accounts vote record on a particular index in `dequeued`. * @param account The address of the account to get the record for. * @param index The index in `dequeued`. * @return The corresponding proposal ID, vote value, and weight. * @return The depreciated vote value. * @return The deprecieated weight. * @return The yes weight. * @return The no weight. * @return The abstain weight. */ function getVoteRecord(address account, uint256 index) external view returns (uint256, uint256, uint256, uint256, uint256, uint256) { VoteRecord storage record = voters[account].referendumVotes[index]; return ( record.proposalId, uint256(record.deprecated_value), record.deprecated_weight, record.yesVotes, record.noVotes, record.abstainVotes ); } /** * @notice Returns the number of proposals in the queue. * @return The number of proposals in the queue. */ function getQueueLength() external view returns (uint256) { return queue.list.numElements; } /** * @notice Returns the number of upvotes the queued proposal has received. * @param proposalId The ID of the proposal. * @return The number of upvotes a queued proposal has received. */ function getUpvotes(uint256 proposalId) external view returns (uint256) { require(isQueued(proposalId), "Proposal not queued"); return queue.getValue(proposalId); } /** * @notice Returns the proposal ID and upvote total for all queued proposals. * @return proposalID The proposal ID for all queued proposals. * @return total The upvote total for all queued proposals. * @dev Note that this includes expired proposals that have yet to be removed from the queue. */ function getQueue() external view returns (uint256[] memory, uint256[] memory) { return queue.getElements(); } /** * @notice Returns the dequeued proposal IDs. * @return The dequeued proposal IDs. * @dev Note that this includes unused indices with proposalId == 0 from deleted proposals. */ function getDequeue() external view returns (uint256[] memory) { return dequeued; } /** * @notice Returns the ID of the proposal upvoted by `account` and the weight of that upvote. * @param account The address of the account. * @return The ID of the proposal upvoted by `account`. * @return The weight of that upvote. */ function getUpvoteRecord(address account) external view returns (uint256, uint256) { UpvoteRecord memory upvoteRecord = voters[account].upvote; return (upvoteRecord.proposalId, upvoteRecord.weight); } /** * @notice Returns the ID of the most recently dequeued proposal voted on by `account`. * @param account The address of the account. * @return The ID of the most recently dequeued proposal voted on by `account`.. */ function getMostRecentReferendumProposal(address account) external view returns (uint256) { return voters[account].mostRecentReferendumProposal; } /** * @notice Returns number of validators from current set which have whitelisted the given hotfix. * @param hash The abi encoded keccak256 hash of the hotfix transaction. * @return Whitelist tally */ function hotfixWhitelistValidatorTally(bytes32 hash) public view returns (uint256) { uint256 tally = 0; uint256 n = numberValidatorsInCurrentSet(); IAccounts accounts = getAccounts(); for (uint256 i = 0; i < n; i = i.add(1)) { address validatorSigner = validatorSignerAddressFromCurrentSet(i); address validatorAccount = accounts.signerToAccount(validatorSigner); if ( isHotfixWhitelistedBy(hash, validatorSigner) || isHotfixWhitelistedBy(hash, validatorAccount) ) { tally = tally.add(1); } } return tally; } /** * @notice Checks if a byzantine quorum of validators has whitelisted the given hotfix. * @param hash The abi encoded keccak256 hash of the hotfix transaction. * @return Whether validator whitelist tally >= validator byzantine quorum */ function isHotfixPassing(bytes32 hash) public view returns (bool) { return hotfixWhitelistValidatorTally(hash) >= minQuorumSizeInCurrentSet(); } /** * @notice Gets information about a hotfix. * @param hash The abi encoded keccak256 hash of the hotfix transaction. * @return Hotfix approved. * @return Hotfix executed. * @return Hotfix preparedEpoch. */ function getHotfixRecord(bytes32 hash) public view returns (bool, bool, uint256) { return (hotfixes[hash].approved, hotfixes[hash].executed, hotfixes[hash].preparedEpoch); } /** * @notice Removes the proposals with the most upvotes from the queue, moving them to the * approval stage. * @dev If any of the top proposals have expired, they are deleted. */ function dequeueProposalsIfReady() public { // solhint-disable-next-line not-rely-on-time if (now >= lastDequeue.add(dequeueFrequency)) { uint256 numProposalsToDequeue = Math.min(concurrentProposals, queue.list.numElements); uint256[] memory dequeuedIds = queue.popN(numProposalsToDequeue); bool wasAnyProposalDequeued = false; for (uint256 i = 0; i < numProposalsToDequeue; i = i.add(1)) { uint256 proposalId = dequeuedIds[i]; Proposals.Proposal storage proposal = proposals[proposalId]; if (_isQueuedProposalExpired(proposal)) { emit ProposalExpired(proposalId); continue; } refundedDeposits[proposal.proposer] = refundedDeposits[proposal.proposer].add( proposal.deposit ); // solhint-disable-next-line not-rely-on-time proposal.timestamp = now; if (emptyIndices.length != 0) { uint256 indexOfLastEmptyIndex = emptyIndices.length.sub(1); dequeued[emptyIndices[indexOfLastEmptyIndex]] = proposalId; delete emptyIndices[indexOfLastEmptyIndex]; emptyIndices.length = indexOfLastEmptyIndex; } else { dequeued.push(proposalId); } // solhint-disable-next-line not-rely-on-time emit ProposalDequeued(proposalId, now); wasAnyProposalDequeued = true; } if (wasAnyProposalDequeued) { // solhint-disable-next-line not-rely-on-time lastDequeue = now; } } } /** * @notice Returns whether or not a proposal is in the queue. * @dev NOTE: proposal may be expired * @param proposalId The ID of the proposal. * @return Whether or not the proposal is in the queue. */ function isQueued(uint256 proposalId) public view returns (bool) { return queue.contains(proposalId); } /** * @notice Returns whether or not a particular proposal is passing according to the constitution * and the participation levels. * @param proposalId The ID of the proposal. * @return Whether or not the proposal is passing. */ function isProposalPassing(uint256 proposalId) external view returns (bool) { return _isProposalPassing(proposals[proposalId]); } /** * @notice Returns whether or not a particular proposal is passing according to the constitution * and the participation levels. * @param proposal The proposal struct. * @return Whether or not the proposal is passing. */ function _isProposalPassing(Proposals.Proposal storage proposal) private view returns (bool) { FixidityLib.Fraction memory support = proposal.getSupportWithQuorumPadding( participationParameters.baseline.multiply(participationParameters.baselineQuorumFactor) ); if (proposal.transactions.length == 0) { // default treshold FixidityLib.Fraction memory threshold = _getConstitution(address(0), ""); return support.gt(threshold); } for (uint256 i = 0; i < proposal.transactions.length; i = i.add(1)) { bytes4 functionId = ExtractFunctionSignature.extractFunctionSignature( proposal.transactions[i].data ); FixidityLib.Fraction memory threshold = _getConstitution( proposal.transactions[i].destination, functionId ); if (support.lte(threshold)) { return false; } } return true; } /** * @notice Returns whether a proposal is dequeued at the given index. * @param proposalId The ID of the proposal. * @param index The index of the proposal ID in `dequeued`. * @return Whether the proposal is in `dequeued`. */ function isDequeuedProposal(uint256 proposalId, uint256 index) external view returns (bool) { return _isDequeuedProposal(proposals[proposalId], proposalId, index); } /** * @notice Returns whether a proposal is dequeued at the given index. * @param proposal The proposal struct. * @param proposalId The ID of the proposal. * @param index The index of the proposal ID in `dequeued`. * @return Whether the proposal is in `dequeued` at index. */ function _isDequeuedProposal( Proposals.Proposal storage proposal, uint256 proposalId, uint256 index ) private view returns (bool) { require(index < dequeued.length, "Provided index greater than dequeue length."); return proposal.exists() && dequeued[index] == proposalId; } /** * @notice Returns whether or not a dequeued proposal has expired. * @param proposalId The ID of the proposal. * @return Whether or not the dequeued proposal has expired. */ function isDequeuedProposalExpired(uint256 proposalId) external view returns (bool) { Proposals.Proposal storage proposal = proposals[proposalId]; return _isDequeuedProposalExpired(proposal, getProposalDequeuedStage(proposal)); } /** * @notice Returns whether or not a dequeued proposal has expired. * @param proposal The proposal struct. * @return Whether or not the dequeued proposal has expired. */ function _isDequeuedProposalExpired(Proposals.Proposal storage proposal, Proposals.Stage stage) private view returns (bool) { // The proposal is considered expired under the following conditions: // 1. Past the referendum stage and not passing. // 2. Past the execution stage. return ((stage > Proposals.Stage.Execution) || (stage > Proposals.Stage.Referendum && !_isProposalPassing(proposal))); } /** * @notice Returns whether or not a queued proposal has expired. * @param proposalId The ID of the proposal. * @return Whether or not the dequeued proposal has expired. */ function isQueuedProposalExpired(uint256 proposalId) public view returns (bool) { return _isQueuedProposalExpired(proposals[proposalId]); } /** * @notice Returns whether or not a queued proposal has expired. * @param proposal The proposal struct. * @return Whether or not the dequeued proposal has expired. */ function _isQueuedProposalExpired(Proposals.Proposal storage proposal) private view returns (bool) { // solhint-disable-next-line not-rely-on-time return now >= proposal.timestamp.add(queueExpiry); } /** * @notice Deletes a dequeued proposal. * @param proposal The proposal struct. * @param proposalId The ID of the proposal to delete. * @param index The index of the proposal ID in `dequeued`. * @dev Must always be preceded by `isDequeuedProposal`, which checks `index`. */ function deleteDequeuedProposal( Proposals.Proposal storage proposal, uint256 proposalId, uint256 index ) private { if (proposal.isApproved() && proposal.networkWeight != 0) { updateParticipationBaseline(proposal); } dequeued[index] = 0; emptyIndices.push(index); delete proposals[proposalId]; } /** * @notice Updates the participation baseline based on the proportion of BondedDeposit weight * that participated in the proposal's Referendum stage. * @param proposal The proposal struct. */ function updateParticipationBaseline(Proposals.Proposal storage proposal) private { FixidityLib.Fraction memory participation = proposal.getParticipation(); FixidityLib.Fraction memory participationComponent = participation.multiply( participationParameters.baselineUpdateFactor ); FixidityLib.Fraction memory baselineComponent = participationParameters.baseline.multiply( FixidityLib.fixed1().subtract(participationParameters.baselineUpdateFactor) ); participationParameters.baseline = participationComponent.add(baselineComponent); if (participationParameters.baseline.lt(participationParameters.baselineFloor)) { participationParameters.baseline = participationParameters.baselineFloor; } emit ParticipationBaselineUpdated(participationParameters.baseline.unwrap()); } /** * @notice Returns the constitution for a particular destination and function ID. * @param destination The destination address to get the constitution for. * @param functionId The function ID to get the constitution for, zero for the destination * default. * @return The ratio of yes:no votes needed to exceed in order to pass the proposal. */ function getConstitution(address destination, bytes4 functionId) external view returns (uint256) { return _getConstitution(destination, functionId).unwrap(); } function _getConstitution(address destination, bytes4 functionId) internal view returns (FixidityLib.Fraction memory) { // Default to a simple majority. FixidityLib.Fraction memory threshold = FixidityLib.wrap(FIXED_HALF); if (constitution[destination].functionThresholds[functionId].unwrap() != 0) { threshold = constitution[destination].functionThresholds[functionId]; } else if (constitution[destination].defaultThreshold.unwrap() != 0) { threshold = constitution[destination].defaultThreshold; } return threshold; } /** * @notice Returns max number of votes cast by an account. * @param account The address of the account. * @return The total number of votes cast by an account. */ function getAmountOfGoldUsedForVoting(address account) public view returns (uint256) { Voter storage voter = voters[account]; uint256 upvotedProposalId = voter.upvote.proposalId; bool isVotingQueue = upvotedProposalId != 0 && isQueued(upvotedProposalId) && !isQueuedProposalExpired(upvotedProposalId); if (isVotingQueue) { uint256 weight = getLockedGold().getAccountTotalLockedGold(account); return weight; } uint256 maxUsed = 0; for (uint256 index = 0; index < dequeued.length; index = index.add(1)) { uint256 proposalId = dequeued[index]; Proposals.Proposal storage proposal = proposals[proposalId]; bool isVotingReferendum = (getProposalDequeuedStage(proposal) == Proposals.Stage.Referendum); if (!isVotingReferendum) { continue; } VoteRecord storage voteRecord = voter.referendumVotes[index]; // skip if vote record is not for this proposal if (voteRecord.proposalId != proposalId) { continue; } uint256 votesCast = voteRecord.yesVotes.add(voteRecord.noVotes).add(voteRecord.abstainVotes); maxUsed = Math.max( maxUsed, // backward compatibility for transition period - this should be updated later on votesCast == 0 ? voteRecord.deprecated_weight : votesCast ); } return maxUsed; } /** * @notice When delegator removes votes from delegatee during the time when delegator is voting * for governance proposal, this method will remove votes from voted proposal proportionally. * @param account The address of the account. * @param newVotingPower The adjusted voting power of delegatee. */ function removeVotesWhenRevokingDelegatedVotes(address account, uint256 newVotingPower) public onlyLockedGold { _removeVotesWhenRevokingDelegatedVotes(account, newVotingPower); } /** * @notice When delegator removes votes from delegatee during the time when delegator is voting * for governance proposal, this method will remove votes from voted proposal proportionally. * @param account The address of the account. * @param newVotingPower The adjusted voting power of delegatee. */ function _removeVotesWhenRevokingDelegatedVotes(address account, uint256 newVotingPower) internal { Voter storage voter = voters[account]; for (uint256 index = 0; index < dequeued.length; index = index.add(1)) { uint256 proposalId = dequeued[index]; Proposals.Proposal storage proposal = proposals[proposalId]; bool isVotingReferendum = (getProposalDequeuedStage(proposal) == Proposals.Stage.Referendum); if (!isVotingReferendum) { continue; } VoteRecord storage voteRecord = voter.referendumVotes[index]; // skip if vote record is not for this proposal if (voteRecord.proposalId != proposalId) { delete voter.referendumVotes[index]; continue; } uint256 sumOfVotes = voteRecord.yesVotes.add(voteRecord.noVotes).add(voteRecord.abstainVotes); if (sumOfVotes > newVotingPower) { uint256 toRemove = sumOfVotes.sub(newVotingPower); uint256 abstainToRemove = getVotesPortion(toRemove, voteRecord.abstainVotes, sumOfVotes); uint256 yesToRemove = getVotesPortion(toRemove, voteRecord.yesVotes, sumOfVotes); uint256 noToRemove = getVotesPortion(toRemove, voteRecord.noVotes, sumOfVotes); uint256 totalRemoved = abstainToRemove.add(yesToRemove).add(noToRemove); uint256 yesVotes = voteRecord.yesVotes.sub(yesToRemove); uint256 noVotes = voteRecord.noVotes.sub(noToRemove); uint256 abstainVotes = voteRecord.abstainVotes.sub(abstainToRemove); if (totalRemoved < toRemove) { // in case of rounding error uint256 roundingToRemove = toRemove.sub(totalRemoved); uint256 toRemoveRounding = Math.min(roundingToRemove, yesVotes); yesVotes = yesVotes.sub(toRemoveRounding); roundingToRemove = roundingToRemove.sub(toRemoveRounding); if (roundingToRemove != 0) { toRemoveRounding = Math.min(roundingToRemove, noVotes); noVotes = noVotes.sub(toRemoveRounding); roundingToRemove = roundingToRemove.sub(toRemoveRounding); } if (roundingToRemove != 0) { toRemoveRounding = Math.min(roundingToRemove, abstainVotes); abstainVotes = abstainVotes.sub(toRemoveRounding); } } proposal.updateVote( voteRecord.yesVotes, voteRecord.noVotes, voteRecord.abstainVotes, yesVotes, noVotes, abstainVotes ); voteRecord.abstainVotes = abstainVotes; voteRecord.yesVotes = yesVotes; voteRecord.noVotes = noVotes; } } } /** * Returns amount of votes that should be removed from delegatee's proposal voting. * @param totalToRemove Total votes to be removed. * @param votes Yes/no/abstrain votes * @param sumOfAllVotes Sum of yes, no, and abstain votes. */ function getVotesPortion(uint256 totalToRemove, uint256 votes, uint256 sumOfAllVotes) private pure returns (uint256) { return FixidityLib .newFixed(totalToRemove) .multiply(FixidityLib.newFixedFraction(votes, sumOfAllVotes)) .fromFixed(); } /** * @param values The values of CELO to be sent in the proposed transactions. * @param destinations The destination addresses of the proposed transactions. * @param data The concatenated data to be included in the proposed transactions. * @param dataLengths The lengths of each transaction's data. * @param salt Arbitrary salt associated with hotfix which guarantees uniqueness of hash. * @return The hash of the hotfix. */ function getHotfixHash( uint256[] calldata values, address[] calldata destinations, bytes calldata data, uint256[] calldata dataLengths, bytes32 salt ) external pure returns (bytes32) { return keccak256(abi.encode(values, destinations, data, dataLengths, salt)); } /** * @notice Returns the stage of a dequeued proposal. * @param proposal The proposal struct. * @return The stage of the dequeued proposal. * @dev Must be called on a dequeued proposal. */ function getProposalDequeuedStage(Proposals.Proposal storage proposal) internal view returns (Proposals.Stage) { uint256 stageStartTime = proposal.timestamp.add(stageDurations.referendum).add( stageDurations.execution ); // solhint-disable-next-line not-rely-on-time if ( now >= stageStartTime && (proposal.transactions.length != 0 || // proposals with 0 transactions can expire only when not approved or not passing !proposal.isApproved() || !_isProposalPassing(proposal)) ) { return Proposals.Stage.Expiration; } stageStartTime = stageStartTime.sub(stageDurations.execution); // solhint-disable-next-line not-rely-on-time if (now >= stageStartTime) { return Proposals.Stage.Execution; } return Proposals.Stage.Referendum; } }
/openzeppelin-solidity/contracts/GSN/Context.sol
pragma solidity ^0.5.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
/openzeppelin-solidity/contracts/math/Math.sol
pragma solidity ^0.5.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
/openzeppelin-solidity/contracts/math/SafeMath.sol
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
/openzeppelin-solidity/contracts/ownership/Ownable.sol
pragma solidity ^0.5.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
/openzeppelin-solidity/contracts/utils/Address.sol
pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
/project:/contracts/common/ExtractFunctionSignature.sol
pragma solidity ^0.5.13; library ExtractFunctionSignature { /** * @notice Extracts the first four bytes of a byte array. * @param input The byte array. * @return The first four bytes of `input`. */ function extractFunctionSignature(bytes memory input) internal pure returns (bytes4) { return (bytes4(input[0]) | (bytes4(input[1]) >> 8) | (bytes4(input[2]) >> 16) | (bytes4(input[3]) >> 24)); } }
/project:/contracts/common/FixidityLib.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; /** * @title FixidityLib * @author Gadi Guy, Alberto Cuesta Canada * @notice This library provides fixed point arithmetic with protection against * overflow. * All operations are done with uint256 and the operands must have been created * with any of the newFrom* functions, which shift the comma digits() to the * right and check for limits, or with wrap() which expects a number already * in the internal representation of a fraction. * When using this library be sure to use maxNewFixed() as the upper limit for * creation of fixed point numbers. * @dev All contained functions are pure and thus marked internal to be inlined * on consuming contracts at compile time for gas efficiency. */ library FixidityLib { struct Fraction { uint256 value; } /** * @notice Number of positions that the comma is shifted to the right. */ function digits() internal pure returns (uint8) { return 24; } uint256 private constant FIXED1_UINT = 1000000000000000000000000; /** * @notice This is 1 in the fixed point units used in this library. * @dev Test fixed1() equals 10^digits() * Hardcoded to 24 digits. */ function fixed1() internal pure returns (Fraction memory) { return Fraction(FIXED1_UINT); } /** * @notice Wrap a uint256 that represents a 24-decimal fraction in a Fraction * struct. * @param x Number that already represents a 24-decimal fraction. * @return A Fraction struct with contents x. */ function wrap(uint256 x) internal pure returns (Fraction memory) { return Fraction(x); } /** * @notice Unwraps the uint256 inside of a Fraction struct. */ function unwrap(Fraction memory x) internal pure returns (uint256) { return x.value; } /** * @notice The amount of decimals lost on each multiplication operand. * @dev Test mulPrecision() equals sqrt(fixed1) */ function mulPrecision() internal pure returns (uint256) { return 1000000000000; } /** * @notice Maximum value that can be converted to fixed point. Optimize for deployment. * @dev * Test maxNewFixed() equals maxUint256() / fixed1() */ function maxNewFixed() internal pure returns (uint256) { return 115792089237316195423570985008687907853269984665640564; } /** * @notice Converts a uint256 to fixed point Fraction * @dev Test newFixed(0) returns 0 * Test newFixed(1) returns fixed1() * Test newFixed(maxNewFixed()) returns maxNewFixed() * fixed1() * Test newFixed(maxNewFixed()+1) fails */ function newFixed(uint256 x) internal pure returns (Fraction memory) { require(x <= maxNewFixed(), "can't create fixidity number larger than maxNewFixed()"); return Fraction(x * FIXED1_UINT); } /** * @notice Converts a uint256 in the fixed point representation of this * library to a non decimal. All decimal digits will be truncated. */ function fromFixed(Fraction memory x) internal pure returns (uint256) { return x.value / FIXED1_UINT; } /** * @notice Converts two uint256 representing a fraction to fixed point units, * equivalent to multiplying dividend and divisor by 10^digits(). * @param numerator numerator must be <= maxNewFixed() * @param denominator denominator must be <= maxNewFixed() and denominator can't be 0 * @dev * Test newFixedFraction(1,0) fails * Test newFixedFraction(0,1) returns 0 * Test newFixedFraction(1,1) returns fixed1() * Test newFixedFraction(1,fixed1()) returns 1 */ function newFixedFraction(uint256 numerator, uint256 denominator) internal pure returns (Fraction memory) { Fraction memory convertedNumerator = newFixed(numerator); Fraction memory convertedDenominator = newFixed(denominator); return divide(convertedNumerator, convertedDenominator); } /** * @notice Returns the integer part of a fixed point number. * @dev * Test integer(0) returns 0 * Test integer(fixed1()) returns fixed1() * Test integer(newFixed(maxNewFixed())) returns maxNewFixed()*fixed1() */ function integer(Fraction memory x) internal pure returns (Fraction memory) { return Fraction((x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow } /** * @notice Returns the fractional part of a fixed point number. * In the case of a negative number the fractional is also negative. * @dev * Test fractional(0) returns 0 * Test fractional(fixed1()) returns 0 * Test fractional(fixed1()-1) returns 10^24-1 */ function fractional(Fraction memory x) internal pure returns (Fraction memory) { return Fraction(x.value - (x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow } /** * @notice x+y. * @dev The maximum value that can be safely used as an addition operator is defined as * maxFixedAdd = maxUint256()-1 / 2, or * 57896044618658097711785492504343953926634992332820282019728792003956564819967. * Test add(maxFixedAdd,maxFixedAdd) equals maxFixedAdd + maxFixedAdd * Test add(maxFixedAdd+1,maxFixedAdd+1) throws */ function add(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { uint256 z = x.value + y.value; require(z >= x.value, "add overflow detected"); return Fraction(z); } /** * @notice x-y. * @dev * Test subtract(6, 10) fails */ function subtract(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { require(x.value >= y.value, "substraction underflow detected"); return Fraction(x.value - y.value); } /** * @notice x*y. If any of the operators is higher than the max multiplier value it * might overflow. * @dev The maximum value that can be safely used as a multiplication operator * (maxFixedMul) is calculated as sqrt(maxUint256()*fixed1()), * or 340282366920938463463374607431768211455999999999999 * Test multiply(0,0) returns 0 * Test multiply(maxFixedMul,0) returns 0 * Test multiply(0,maxFixedMul) returns 0 * Test multiply(fixed1()/mulPrecision(),fixed1()*mulPrecision()) returns fixed1() * Test multiply(maxFixedMul,maxFixedMul) is around maxUint256() * Test multiply(maxFixedMul+1,maxFixedMul+1) fails */ function multiply(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { if (x.value == 0 || y.value == 0) return Fraction(0); if (y.value == FIXED1_UINT) return x; if (x.value == FIXED1_UINT) return y; // Separate into integer and fractional parts // x = x1 + x2, y = y1 + y2 uint256 x1 = integer(x).value / FIXED1_UINT; uint256 x2 = fractional(x).value; uint256 y1 = integer(y).value / FIXED1_UINT; uint256 y2 = fractional(y).value; // (x1 + x2) * (y1 + y2) = (x1 * y1) + (x1 * y2) + (x2 * y1) + (x2 * y2) uint256 x1y1 = x1 * y1; if (x1 != 0) require(x1y1 / x1 == y1, "overflow x1y1 detected"); // x1y1 needs to be multiplied back by fixed1 // solium-disable-next-line mixedcase uint256 fixed_x1y1 = x1y1 * FIXED1_UINT; if (x1y1 != 0) require(fixed_x1y1 / x1y1 == FIXED1_UINT, "overflow x1y1 * fixed1 detected"); x1y1 = fixed_x1y1; uint256 x2y1 = x2 * y1; if (x2 != 0) require(x2y1 / x2 == y1, "overflow x2y1 detected"); uint256 x1y2 = x1 * y2; if (x1 != 0) require(x1y2 / x1 == y2, "overflow x1y2 detected"); x2 = x2 / mulPrecision(); y2 = y2 / mulPrecision(); uint256 x2y2 = x2 * y2; if (x2 != 0) require(x2y2 / x2 == y2, "overflow x2y2 detected"); // result = fixed1() * x1 * y1 + x1 * y2 + x2 * y1 + x2 * y2 / fixed1(); Fraction memory result = Fraction(x1y1); result = add(result, Fraction(x2y1)); // Add checks for overflow result = add(result, Fraction(x1y2)); // Add checks for overflow result = add(result, Fraction(x2y2)); // Add checks for overflow return result; } /** * @notice 1/x * @dev * Test reciprocal(0) fails * Test reciprocal(fixed1()) returns fixed1() * Test reciprocal(fixed1()*fixed1()) returns 1 // Testing how the fractional is truncated * Test reciprocal(1+fixed1()*fixed1()) returns 0 // Testing how the fractional is truncated * Test reciprocal(newFixedFraction(1, 1e24)) returns newFixed(1e24) */ function reciprocal(Fraction memory x) internal pure returns (Fraction memory) { require(x.value != 0, "can't call reciprocal(0)"); return Fraction((FIXED1_UINT * FIXED1_UINT) / x.value); // Can't overflow } /** * @notice x/y. If the dividend is higher than the max dividend value, it * might overflow. You can use multiply(x,reciprocal(y)) instead. * @dev The maximum value that can be safely used as a dividend (maxNewFixed) is defined as * divide(maxNewFixed,newFixedFraction(1,fixed1())) is around maxUint256(). * This yields the value 115792089237316195423570985008687907853269984665640564. * Test maxNewFixed equals maxUint256()/fixed1() * Test divide(maxNewFixed,1) equals maxNewFixed*(fixed1) * Test divide(maxNewFixed+1,multiply(mulPrecision(),mulPrecision())) throws * Test divide(fixed1(),0) fails * Test divide(maxNewFixed,1) = maxNewFixed*(10^digits()) * Test divide(maxNewFixed+1,1) throws */ function divide(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { require(y.value != 0, "can't divide by 0"); uint256 X = x.value * FIXED1_UINT; require(X / FIXED1_UINT == x.value, "overflow at divide"); return Fraction(X / y.value); } /** * @notice x > y */ function gt(Fraction memory x, Fraction memory y) internal pure returns (bool) { return x.value > y.value; } /** * @notice x >= y */ function gte(Fraction memory x, Fraction memory y) internal pure returns (bool) { return x.value >= y.value; } /** * @notice x < y */ function lt(Fraction memory x, Fraction memory y) internal pure returns (bool) { return x.value < y.value; } /** * @notice x <= y */ function lte(Fraction memory x, Fraction memory y) internal pure returns (bool) { return x.value <= y.value; } /** * @notice x == y */ function equals(Fraction memory x, Fraction memory y) internal pure returns (bool) { return x.value == y.value; } /** * @notice x <= 1 */ function isProperFraction(Fraction memory x) internal pure returns (bool) { return lte(x, fixed1()); } }
/project:/contracts/common/Initializable.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; contract Initializable { bool public initialized; constructor(bool testingDeployment) public { if (!testingDeployment) { initialized = true; } } modifier initializer() { require(!initialized, "contract already initialized"); initialized = true; _; } }
/project:/contracts/common/UsingPrecompiles.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../common/interfaces/ICeloVersionedContract.sol"; contract UsingPrecompiles { using SafeMath for uint256; address constant TRANSFER = address(0xff - 2); address constant FRACTION_MUL = address(0xff - 3); address constant PROOF_OF_POSSESSION = address(0xff - 4); address constant GET_VALIDATOR = address(0xff - 5); address constant NUMBER_VALIDATORS = address(0xff - 6); address constant EPOCH_SIZE = address(0xff - 7); address constant BLOCK_NUMBER_FROM_HEADER = address(0xff - 8); address constant HASH_HEADER = address(0xff - 9); address constant GET_PARENT_SEAL_BITMAP = address(0xff - 10); address constant GET_VERIFIED_SEAL_BITMAP = address(0xff - 11); /** * @notice calculate a * b^x for fractions a, b to `decimals` precision * @param aNumerator Numerator of first fraction * @param aDenominator Denominator of first fraction * @param bNumerator Numerator of exponentiated fraction * @param bDenominator Denominator of exponentiated fraction * @param exponent exponent to raise b to * @param _decimals precision * @return Numerator of the computed quantity (not reduced). * @return Denominator of the computed quantity (not reduced). */ function fractionMulExp( uint256 aNumerator, uint256 aDenominator, uint256 bNumerator, uint256 bDenominator, uint256 exponent, uint256 _decimals ) public view returns (uint256, uint256) { require(aDenominator != 0 && bDenominator != 0, "a denominator is zero"); uint256 returnNumerator; uint256 returnDenominator; bool success; bytes memory out; (success, out) = FRACTION_MUL.staticcall( abi.encodePacked(aNumerator, aDenominator, bNumerator, bDenominator, exponent, _decimals) ); require(success, "error calling fractionMulExp precompile"); returnNumerator = getUint256FromBytes(out, 0); returnDenominator = getUint256FromBytes(out, 32); return (returnNumerator, returnDenominator); } /** * @notice Returns the current epoch size in blocks. * @return The current epoch size in blocks. */ function getEpochSize() public view returns (uint256) { bytes memory out; bool success; (success, out) = EPOCH_SIZE.staticcall(abi.encodePacked()); require(success, "error calling getEpochSize precompile"); return getUint256FromBytes(out, 0); } /** * @notice Returns the epoch number at a block. * @param blockNumber Block number where epoch number is calculated. * @return Epoch number. */ function getEpochNumberOfBlock(uint256 blockNumber) public view returns (uint256) { return epochNumberOfBlock(blockNumber, getEpochSize()); } /** * @notice Returns the epoch number at a block. * @return Current epoch number. */ function getEpochNumber() public view returns (uint256) { return getEpochNumberOfBlock(block.number); } /** * @notice Returns the epoch number at a block. * @param blockNumber Block number where epoch number is calculated. * @param epochSize The epoch size in blocks. * @return Epoch number. */ function epochNumberOfBlock(uint256 blockNumber, uint256 epochSize) internal pure returns (uint256) { // Follows GetEpochNumber from celo-blockchain/blob/master/consensus/istanbul/utils.go uint256 epochNumber = blockNumber / epochSize; if (blockNumber % epochSize == 0) { return epochNumber; } else { return epochNumber.add(1); } } /** * @notice Gets a validator address from the current validator set. * @param index Index of requested validator in the validator set. * @return Address of validator at the requested index. */ function validatorSignerAddressFromCurrentSet(uint256 index) public view returns (address) { bytes memory out; bool success; (success, out) = GET_VALIDATOR.staticcall(abi.encodePacked(index, uint256(block.number))); require(success, "error calling validatorSignerAddressFromCurrentSet precompile"); return address(getUint256FromBytes(out, 0)); } /** * @notice Gets a validator address from the validator set at the given block number. * @param index Index of requested validator in the validator set. * @param blockNumber Block number to retrieve the validator set from. * @return Address of validator at the requested index. */ function validatorSignerAddressFromSet(uint256 index, uint256 blockNumber) public view returns (address) { bytes memory out; bool success; (success, out) = GET_VALIDATOR.staticcall(abi.encodePacked(index, blockNumber)); require(success, "error calling validatorSignerAddressFromSet precompile"); return address(getUint256FromBytes(out, 0)); } /** * @notice Gets the size of the current elected validator set. * @return Size of the current elected validator set. */ function numberValidatorsInCurrentSet() public view returns (uint256) { bytes memory out; bool success; (success, out) = NUMBER_VALIDATORS.staticcall(abi.encodePacked(uint256(block.number))); require(success, "error calling numberValidatorsInCurrentSet precompile"); return getUint256FromBytes(out, 0); } /** * @notice Gets the size of the validator set that must sign the given block number. * @param blockNumber Block number to retrieve the validator set from. * @return Size of the validator set. */ function numberValidatorsInSet(uint256 blockNumber) public view returns (uint256) { bytes memory out; bool success; (success, out) = NUMBER_VALIDATORS.staticcall(abi.encodePacked(blockNumber)); require(success, "error calling numberValidatorsInSet precompile"); return getUint256FromBytes(out, 0); } /** * @notice Checks a BLS proof of possession. * @param sender The address signed by the BLS key to generate the proof of possession. * @param blsKey The BLS public key that the validator is using for consensus, should pass proof * of possession. 48 bytes. * @param blsPop The BLS public key proof-of-possession, which consists of a signature on the * account address. 96 bytes. * @return True upon success. */ function checkProofOfPossession(address sender, bytes memory blsKey, bytes memory blsPop) public view returns (bool) { bool success; (success, ) = PROOF_OF_POSSESSION.staticcall(abi.encodePacked(sender, blsKey, blsPop)); return success; } /** * @notice Parses block number out of header. * @param header RLP encoded header * @return Block number. */ function getBlockNumberFromHeader(bytes memory header) public view returns (uint256) { bytes memory out; bool success; (success, out) = BLOCK_NUMBER_FROM_HEADER.staticcall(abi.encodePacked(header)); require(success, "error calling getBlockNumberFromHeader precompile"); return getUint256FromBytes(out, 0); } /** * @notice Computes hash of header. * @param header RLP encoded header * @return Header hash. */ function hashHeader(bytes memory header) public view returns (bytes32) { bytes memory out; bool success; (success, out) = HASH_HEADER.staticcall(abi.encodePacked(header)); require(success, "error calling hashHeader precompile"); return getBytes32FromBytes(out, 0); } /** * @notice Gets the parent seal bitmap from the header at the given block number. * @param blockNumber Block number to retrieve. Must be within 4 epochs of the current number. * @return Bitmap parent seal with set bits at indices corresponding to signing validators. */ function getParentSealBitmap(uint256 blockNumber) public view returns (bytes32) { bytes memory out; bool success; (success, out) = GET_PARENT_SEAL_BITMAP.staticcall(abi.encodePacked(blockNumber)); require(success, "error calling getParentSealBitmap precompile"); return getBytes32FromBytes(out, 0); } /** * @notice Verifies the BLS signature on the header and returns the seal bitmap. * The validator set used for verification is retrieved based on the parent hash field of the * header. If the parent hash is not in the blockchain, verification fails. * @param header RLP encoded header * @return Bitmap parent seal with set bits at indices correspoinding to signing validators. */ function getVerifiedSealBitmapFromHeader(bytes memory header) public view returns (bytes32) { bytes memory out; bool success; (success, out) = GET_VERIFIED_SEAL_BITMAP.staticcall(abi.encodePacked(header)); require(success, "error calling getVerifiedSealBitmapFromHeader precompile"); return getBytes32FromBytes(out, 0); } /** * @notice Converts bytes to uint256. * @param bs byte[] data * @param start offset into byte data to convert * @return uint256 data */ function getUint256FromBytes(bytes memory bs, uint256 start) internal pure returns (uint256) { return uint256(getBytes32FromBytes(bs, start)); } /** * @notice Converts bytes to bytes32. * @param bs byte[] data * @param start offset into byte data to convert * @return bytes32 data */ function getBytes32FromBytes(bytes memory bs, uint256 start) internal pure returns (bytes32) { require(bs.length >= start.add(32), "slicing out of range"); bytes32 x; assembly { x := mload(add(bs, add(start, 32))) } return x; } /** * @notice Returns the minimum number of required signers for a given block number. * @dev Computed in celo-blockchain as int(math.Ceil(float64(2*valSet.Size()) / 3)) */ function minQuorumSize(uint256 blockNumber) public view returns (uint256) { return numberValidatorsInSet(blockNumber).mul(2).add(2).div(3); } /** * @notice Computes byzantine quorum from current validator set size * @return Byzantine quorum of validators. */ function minQuorumSizeInCurrentSet() public view returns (uint256) { return minQuorumSize(block.number); } }
/project:/contracts/common/UsingRegistry.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IAccounts.sol"; import "./interfaces/IFeeCurrencyWhitelist.sol"; import "./interfaces/IFreezer.sol"; import "./interfaces/IRegistry.sol"; import "../governance/interfaces/IElection.sol"; import "../governance/interfaces/IGovernance.sol"; import "../governance/interfaces/ILockedGold.sol"; import "../governance/interfaces/IValidators.sol"; import "../identity/interfaces/IRandom.sol"; import "../identity/interfaces/IAttestations.sol"; import "../../lib/mento-core/contracts/interfaces/IExchange.sol"; import "../../lib/mento-core/contracts/interfaces/IReserve.sol"; import "../../lib/mento-core/contracts/interfaces/IStableToken.sol"; import "../stability/interfaces/ISortedOracles.sol"; contract UsingRegistry is Ownable { event RegistrySet(address indexed registryAddress); // solhint-disable state-visibility bytes32 constant ACCOUNTS_REGISTRY_ID = keccak256(abi.encodePacked("Accounts")); bytes32 constant ATTESTATIONS_REGISTRY_ID = keccak256(abi.encodePacked("Attestations")); bytes32 constant DOWNTIME_SLASHER_REGISTRY_ID = keccak256(abi.encodePacked("DowntimeSlasher")); bytes32 constant DOUBLE_SIGNING_SLASHER_REGISTRY_ID = keccak256( abi.encodePacked("DoubleSigningSlasher") ); bytes32 constant ELECTION_REGISTRY_ID = keccak256(abi.encodePacked("Election")); bytes32 constant EXCHANGE_REGISTRY_ID = keccak256(abi.encodePacked("Exchange")); bytes32 constant FEE_CURRENCY_WHITELIST_REGISTRY_ID = keccak256( abi.encodePacked("FeeCurrencyWhitelist") ); bytes32 constant FREEZER_REGISTRY_ID = keccak256(abi.encodePacked("Freezer")); bytes32 constant GOLD_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("GoldToken")); bytes32 constant GOVERNANCE_REGISTRY_ID = keccak256(abi.encodePacked("Governance")); bytes32 constant GOVERNANCE_SLASHER_REGISTRY_ID = keccak256( abi.encodePacked("GovernanceSlasher") ); bytes32 constant LOCKED_GOLD_REGISTRY_ID = keccak256(abi.encodePacked("LockedGold")); bytes32 constant RESERVE_REGISTRY_ID = keccak256(abi.encodePacked("Reserve")); bytes32 constant RANDOM_REGISTRY_ID = keccak256(abi.encodePacked("Random")); bytes32 constant SORTED_ORACLES_REGISTRY_ID = keccak256(abi.encodePacked("SortedOracles")); bytes32 constant STABLE_TOKEN_REGISTRY_ID = keccak256(abi.encodePacked("StableToken")); bytes32 constant VALIDATORS_REGISTRY_ID = keccak256(abi.encodePacked("Validators")); // solhint-enable state-visibility IRegistry public registry; modifier onlyRegisteredContract(bytes32 identifierHash) { require(registry.getAddressForOrDie(identifierHash) == msg.sender, "only registered contract"); _; } modifier onlyRegisteredContracts(bytes32[] memory identifierHashes) { require(registry.isOneOf(identifierHashes, msg.sender), "only registered contracts"); _; } /** * @notice Updates the address pointing to a Registry contract. * @param registryAddress The address of a registry contract for routing to other contracts. */ function setRegistry(address registryAddress) public onlyOwner { require(registryAddress != address(0), "Cannot register the null address"); registry = IRegistry(registryAddress); emit RegistrySet(registryAddress); } function getAccounts() internal view returns (IAccounts) { return IAccounts(registry.getAddressForOrDie(ACCOUNTS_REGISTRY_ID)); } function getAttestations() internal view returns (IAttestations) { return IAttestations(registry.getAddressForOrDie(ATTESTATIONS_REGISTRY_ID)); } function getElection() internal view returns (IElection) { return IElection(registry.getAddressForOrDie(ELECTION_REGISTRY_ID)); } function getExchange() internal view returns (IExchange) { return IExchange(registry.getAddressForOrDie(EXCHANGE_REGISTRY_ID)); } function getFeeCurrencyWhitelistRegistry() internal view returns (IFeeCurrencyWhitelist) { return IFeeCurrencyWhitelist(registry.getAddressForOrDie(FEE_CURRENCY_WHITELIST_REGISTRY_ID)); } function getFreezer() internal view returns (IFreezer) { return IFreezer(registry.getAddressForOrDie(FREEZER_REGISTRY_ID)); } function getGoldToken() internal view returns (IERC20) { return IERC20(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)); } function getGovernance() internal view returns (IGovernance) { return IGovernance(registry.getAddressForOrDie(GOVERNANCE_REGISTRY_ID)); } function getLockedGold() internal view returns (ILockedGold) { return ILockedGold(registry.getAddressForOrDie(LOCKED_GOLD_REGISTRY_ID)); } function getRandom() internal view returns (IRandom) { return IRandom(registry.getAddressForOrDie(RANDOM_REGISTRY_ID)); } function getReserve() internal view returns (IReserve) { return IReserve(registry.getAddressForOrDie(RESERVE_REGISTRY_ID)); } function getSortedOracles() internal view returns (ISortedOracles) { return ISortedOracles(registry.getAddressForOrDie(SORTED_ORACLES_REGISTRY_ID)); } function getStableToken() internal view returns (IStableToken) { return IStableToken(registry.getAddressForOrDie(STABLE_TOKEN_REGISTRY_ID)); } function getValidators() internal view returns (IValidators) { return IValidators(registry.getAddressForOrDie(VALIDATORS_REGISTRY_ID)); } }
/project:/contracts/common/interfaces/IAccounts.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IAccounts { function isAccount(address) external view returns (bool); function voteSignerToAccount(address) external view returns (address); function validatorSignerToAccount(address) external view returns (address); function attestationSignerToAccount(address) external view returns (address); function signerToAccount(address) external view returns (address); function getAttestationSigner(address) external view returns (address); function getValidatorSigner(address) external view returns (address); function getVoteSigner(address) external view returns (address); function hasAuthorizedVoteSigner(address) external view returns (bool); function hasAuthorizedValidatorSigner(address) external view returns (bool); function hasAuthorizedAttestationSigner(address) external view returns (bool); function setAccountDataEncryptionKey(bytes calldata) external; function setMetadataURL(string calldata) external; function setName(string calldata) external; function setWalletAddress(address, uint8, bytes32, bytes32) external; function setAccount(string calldata, bytes calldata, address, uint8, bytes32, bytes32) external; function getDataEncryptionKey(address) external view returns (bytes memory); function getWalletAddress(address) external view returns (address); function getMetadataURL(address) external view returns (string memory); function batchGetMetadataURL(address[] calldata) external view returns (uint256[] memory, bytes memory); function getName(address) external view returns (string memory); function authorizeVoteSigner(address, uint8, bytes32, bytes32) external; function authorizeValidatorSigner(address, uint8, bytes32, bytes32) external; function authorizeValidatorSignerWithPublicKey(address, uint8, bytes32, bytes32, bytes calldata) external; function authorizeValidatorSignerWithKeys( address, uint8, bytes32, bytes32, bytes calldata, bytes calldata, bytes calldata ) external; function authorizeAttestationSigner(address, uint8, bytes32, bytes32) external; function createAccount() external returns (bool); function setPaymentDelegation(address, uint256) external; function getPaymentDelegation(address) external view returns (address, uint256); function isSigner(address, address, bytes32) external view returns (bool); }
/project:/contracts/common/interfaces/ICeloVersionedContract.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface ICeloVersionedContract { /** * @notice Returns the storage, major, minor, and patch version of the contract. * @return Storage version of the contract. * @return Major version of the contract. * @return Minor version of the contract. * @return Patch version of the contract. */ function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256); }
/project:/contracts/common/interfaces/IFeeCurrencyWhitelist.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IFeeCurrencyWhitelist { function addToken(address) external; function getWhitelist() external view returns (address[] memory); }
/project:/contracts/common/interfaces/IFreezer.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IFreezer { function isFrozen(address) external view returns (bool); }
/project:/contracts/common/interfaces/IRegistry.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IRegistry { function setAddressFor(string calldata, address) external; function getAddressForOrDie(bytes32) external view returns (address); function getAddressFor(bytes32) external view returns (address); function getAddressForStringOrDie(string calldata identifier) external view returns (address); function getAddressForString(string calldata identifier) external view returns (address); function isOneOf(bytes32[] calldata, address) external view returns (bool); }
/project:/contracts/common/libraries/ReentrancyGuard.sol
pragma solidity ^0.5.13; /** * @title Helps contracts guard against reentrancy attacks. * @author Remco Bloemen <remco@2π.com>, Eenae <alexey@mixbytes.io> * @dev If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; constructor() internal { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "reentrant call"); } }
/project:/contracts/common/linkedlists/IntegerSortedLinkedList.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./SortedLinkedList.sol"; /** * @title Maintains a sorted list of unsigned ints keyed by uint256. */ library IntegerSortedLinkedList { using SafeMath for uint256; using SortedLinkedList for SortedLinkedList.List; /** * @notice Inserts an element into a doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to insert. * @param value The element value. * @param lesserKey The key of the element less than the element to insert. * @param greaterKey The key of the element greater than the element to insert. */ function insert( SortedLinkedList.List storage list, uint256 key, uint256 value, uint256 lesserKey, uint256 greaterKey ) public { list.insert(bytes32(key), value, bytes32(lesserKey), bytes32(greaterKey)); } /** * @notice Removes an element from the doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to remove. */ function remove(SortedLinkedList.List storage list, uint256 key) public { list.remove(bytes32(key)); } /** * @notice Updates an element in the list. * @param list A storage pointer to the underlying list. * @param key The element key. * @param value The element value. * @param lesserKey The key of the element will be just left of `key` after the update. * @param greaterKey The key of the element will be just right of `key` after the update. * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction. */ function update( SortedLinkedList.List storage list, uint256 key, uint256 value, uint256 lesserKey, uint256 greaterKey ) public { list.update(bytes32(key), value, bytes32(lesserKey), bytes32(greaterKey)); } /** * @notice Inserts an element at the end of the doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to insert. */ function push(SortedLinkedList.List storage list, uint256 key) public { list.push(bytes32(key)); } /** * @notice Removes N elements from the head of the list and returns their keys. * @param list A storage pointer to the underlying list. * @param n The number of elements to pop. * @return The keys of the popped elements. */ function popN(SortedLinkedList.List storage list, uint256 n) public returns (uint256[] memory) { bytes32[] memory byteKeys = list.popN(n); uint256[] memory keys = new uint256[](byteKeys.length); for (uint256 i = 0; i < byteKeys.length; i = i.add(1)) { keys[i] = uint256(byteKeys[i]); } return keys; } /** * @notice Returns whether or not a particular key is present in the sorted list. * @param list A storage pointer to the underlying list. * @param key The element key. * @return Whether or not the key is in the sorted list. */ function contains(SortedLinkedList.List storage list, uint256 key) public view returns (bool) { return list.contains(bytes32(key)); } /** * @notice Returns the value for a particular key in the sorted list. * @param list A storage pointer to the underlying list. * @param key The element key. * @return The element value. */ function getValue(SortedLinkedList.List storage list, uint256 key) public view returns (uint256) { return list.getValue(bytes32(key)); } /** * @notice Gets all elements from the doubly linked list. * @param list A storage pointer to the underlying list. * @return Array of all keys in the list. * @return Values corresponding to keys, which will be ordered largest to smallest. */ function getElements(SortedLinkedList.List storage list) public view returns (uint256[] memory, uint256[] memory) { bytes32[] memory byteKeys = list.getKeys(); uint256[] memory keys = new uint256[](byteKeys.length); uint256[] memory values = new uint256[](byteKeys.length); for (uint256 i = 0; i < byteKeys.length; i = i.add(1)) { keys[i] = uint256(byteKeys[i]); values[i] = list.values[byteKeys[i]]; } return (keys, values); } }
/project:/contracts/common/linkedlists/LinkedList.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** * @title Maintains a doubly linked list keyed by bytes32. * @dev Following the `next` pointers will lead you to the head, rather than the tail. */ library LinkedList { using SafeMath for uint256; struct Element { bytes32 previousKey; bytes32 nextKey; bool exists; } struct List { bytes32 head; bytes32 tail; uint256 numElements; mapping(bytes32 => Element) elements; } /** * @notice Inserts an element into a doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to insert. * @param previousKey The key of the element that comes before the element to insert. * @param nextKey The key of the element that comes after the element to insert. */ function insert(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal { require(key != bytes32(0), "Key must be defined"); require(!contains(list, key), "Can't insert an existing element"); require( previousKey != key && nextKey != key, "Key cannot be the same as previousKey or nextKey" ); Element storage element = list.elements[key]; element.exists = true; if (list.numElements == 0) { list.tail = key; list.head = key; } else { require( previousKey != bytes32(0) || nextKey != bytes32(0), "Either previousKey or nextKey must be defined" ); element.previousKey = previousKey; element.nextKey = nextKey; if (previousKey != bytes32(0)) { require( contains(list, previousKey), "If previousKey is defined, it must exist in the list" ); Element storage previousElement = list.elements[previousKey]; require(previousElement.nextKey == nextKey, "previousKey must be adjacent to nextKey"); previousElement.nextKey = key; } else { list.tail = key; } if (nextKey != bytes32(0)) { require(contains(list, nextKey), "If nextKey is defined, it must exist in the list"); Element storage nextElement = list.elements[nextKey]; require(nextElement.previousKey == previousKey, "previousKey must be adjacent to nextKey"); nextElement.previousKey = key; } else { list.head = key; } } list.numElements = list.numElements.add(1); } /** * @notice Inserts an element at the tail of the doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to insert. */ function push(List storage list, bytes32 key) internal { insert(list, key, bytes32(0), list.tail); } /** * @notice Removes an element from the doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to remove. */ function remove(List storage list, bytes32 key) internal { Element storage element = list.elements[key]; require(key != bytes32(0) && contains(list, key), "key not in list"); if (element.previousKey != bytes32(0)) { Element storage previousElement = list.elements[element.previousKey]; previousElement.nextKey = element.nextKey; } else { list.tail = element.nextKey; } if (element.nextKey != bytes32(0)) { Element storage nextElement = list.elements[element.nextKey]; nextElement.previousKey = element.previousKey; } else { list.head = element.previousKey; } delete list.elements[key]; list.numElements = list.numElements.sub(1); } /** * @notice Updates an element in the list. * @param list A storage pointer to the underlying list. * @param key The element key. * @param previousKey The key of the element that comes before the updated element. * @param nextKey The key of the element that comes after the updated element. */ function update(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal { require( key != bytes32(0) && key != previousKey && key != nextKey && contains(list, key), "key on in list" ); remove(list, key); insert(list, key, previousKey, nextKey); } /** * @notice Returns whether or not a particular key is present in the sorted list. * @param list A storage pointer to the underlying list. * @param key The element key. * @return Whether or not the key is in the sorted list. */ function contains(List storage list, bytes32 key) internal view returns (bool) { return list.elements[key].exists; } /** * @notice Returns the keys of the N elements at the head of the list. * @param list A storage pointer to the underlying list. * @param n The number of elements to return. * @return The keys of the N elements at the head of the list. * @dev Reverts if n is greater than the number of elements in the list. */ function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) { require(n <= list.numElements, "not enough elements"); bytes32[] memory keys = new bytes32[](n); bytes32 key = list.head; for (uint256 i = 0; i < n; i = i.add(1)) { keys[i] = key; key = list.elements[key].previousKey; } return keys; } /** * @notice Gets all element keys from the doubly linked list. * @param list A storage pointer to the underlying list. * @return All element keys from head to tail. */ function getKeys(List storage list) internal view returns (bytes32[] memory) { return headN(list, list.numElements); } }
/project:/contracts/common/linkedlists/SortedLinkedList.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./LinkedList.sol"; /** * @title Maintains a sorted list of unsigned ints keyed by bytes32. */ library SortedLinkedList { using SafeMath for uint256; using LinkedList for LinkedList.List; struct List { LinkedList.List list; mapping(bytes32 => uint256) values; } /** * @notice Inserts an element into a doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to insert. * @param value The element value. * @param lesserKey The key of the element less than the element to insert. * @param greaterKey The key of the element greater than the element to insert. */ function insert( List storage list, bytes32 key, uint256 value, bytes32 lesserKey, bytes32 greaterKey ) internal { require( key != bytes32(0) && key != lesserKey && key != greaterKey && !contains(list, key), "invalid key" ); require( (lesserKey != bytes32(0) || greaterKey != bytes32(0)) || list.list.numElements == 0, "greater and lesser key zero" ); require(contains(list, lesserKey) || lesserKey == bytes32(0), "invalid lesser key"); require(contains(list, greaterKey) || greaterKey == bytes32(0), "invalid greater key"); (lesserKey, greaterKey) = getLesserAndGreater(list, value, lesserKey, greaterKey); list.list.insert(key, lesserKey, greaterKey); list.values[key] = value; } /** * @notice Removes an element from the doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to remove. */ function remove(List storage list, bytes32 key) internal { list.list.remove(key); list.values[key] = 0; } /** * @notice Updates an element in the list. * @param list A storage pointer to the underlying list. * @param key The element key. * @param value The element value. * @param lesserKey The key of the element will be just left of `key` after the update. * @param greaterKey The key of the element will be just right of `key` after the update. * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction. */ function update( List storage list, bytes32 key, uint256 value, bytes32 lesserKey, bytes32 greaterKey ) internal { remove(list, key); insert(list, key, value, lesserKey, greaterKey); } /** * @notice Inserts an element at the tail of the doubly linked list. * @param list A storage pointer to the underlying list. * @param key The key of the element to insert. */ function push(List storage list, bytes32 key) internal { insert(list, key, 0, bytes32(0), list.list.tail); } /** * @notice Removes N elements from the head of the list and returns their keys. * @param list A storage pointer to the underlying list. * @param n The number of elements to pop. * @return The keys of the popped elements. */ function popN(List storage list, uint256 n) internal returns (bytes32[] memory) { require(n <= list.list.numElements, "not enough elements"); bytes32[] memory keys = new bytes32[](n); for (uint256 i = 0; i < n; i = i.add(1)) { bytes32 key = list.list.head; keys[i] = key; remove(list, key); } return keys; } /** * @notice Returns whether or not a particular key is present in the sorted list. * @param list A storage pointer to the underlying list. * @param key The element key. * @return Whether or not the key is in the sorted list. */ function contains(List storage list, bytes32 key) internal view returns (bool) { return list.list.contains(key); } /** * @notice Returns the value for a particular key in the sorted list. * @param list A storage pointer to the underlying list. * @param key The element key. * @return The element value. */ function getValue(List storage list, bytes32 key) internal view returns (uint256) { return list.values[key]; } /** * @notice Gets all elements from the doubly linked list. * @param list A storage pointer to the underlying list. * @return Array of all keys in the list. * @return Values corresponding to keys, which will be ordered largest to smallest. */ function getElements(List storage list) internal view returns (bytes32[] memory, uint256[] memory) { bytes32[] memory keys = getKeys(list); uint256[] memory values = new uint256[](keys.length); for (uint256 i = 0; i < keys.length; i = i.add(1)) { values[i] = list.values[keys[i]]; } return (keys, values); } /** * @notice Gets all element keys from the doubly linked list. * @param list A storage pointer to the underlying list. * @return All element keys from head to tail. */ function getKeys(List storage list) internal view returns (bytes32[] memory) { return list.list.getKeys(); } /** * @notice Returns first N greatest elements of the list. * @param list A storage pointer to the underlying list. * @param n The number of elements to return. * @return The keys of the first n elements. * @dev Reverts if n is greater than the number of elements in the list. */ function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) { return list.list.headN(n); } /** * @notice Returns the keys of the elements greaterKey than and less than the provided value. * @param list A storage pointer to the underlying list. * @param value The element value. * @param lesserKey The key of the element which could be just left of the new value. * @param greaterKey The key of the element which could be just right of the new value. * @return The correct lesserKey keys. * @return The correct greaterKey keys. */ function getLesserAndGreater( List storage list, uint256 value, bytes32 lesserKey, bytes32 greaterKey ) private view returns (bytes32, bytes32) { // Check for one of the following conditions and fail if none are met: // 1. The value is less than the current lowest value // 2. The value is greater than the current greatest value // 3. The value is just greater than the value for `lesserKey` // 4. The value is just less than the value for `greaterKey` if (lesserKey == bytes32(0) && isValueBetween(list, value, lesserKey, list.list.tail)) { return (lesserKey, list.list.tail); } else if ( greaterKey == bytes32(0) && isValueBetween(list, value, list.list.head, greaterKey) ) { return (list.list.head, greaterKey); } else if ( lesserKey != bytes32(0) && isValueBetween(list, value, lesserKey, list.list.elements[lesserKey].nextKey) ) { return (lesserKey, list.list.elements[lesserKey].nextKey); } else if ( greaterKey != bytes32(0) && isValueBetween(list, value, list.list.elements[greaterKey].previousKey, greaterKey) ) { return (list.list.elements[greaterKey].previousKey, greaterKey); } else { require(false, "get lesser and greater failure"); } } /** * @notice Returns whether or not a given element is between two other elements. * @param list A storage pointer to the underlying list. * @param value The element value. * @param lesserKey The key of the element whose value should be lesserKey. * @param greaterKey The key of the element whose value should be greaterKey. * @return True if the given element is between the two other elements. */ function isValueBetween(List storage list, uint256 value, bytes32 lesserKey, bytes32 greaterKey) private view returns (bool) { bool isLesser = lesserKey == bytes32(0) || list.values[lesserKey] <= value; bool isGreater = greaterKey == bytes32(0) || list.values[greaterKey] >= value; return isLesser && isGreater; } }
/project:/contracts/governance/Proposals.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/utils/Address.sol"; import "solidity-bytes-utils/contracts/BytesLib.sol"; import "../common/FixidityLib.sol"; /** * @title A library operating on Celo Governance proposals. */ library Proposals { using FixidityLib for FixidityLib.Fraction; using SafeMath for uint256; using BytesLib for bytes; enum Stage { None, Queued, Approval, Referendum, Execution, Expiration } enum VoteValue { None, Abstain, No, Yes } struct StageDurations { uint256 approval; uint256 referendum; uint256 execution; } struct VoteTotals { uint256 yes; uint256 no; uint256 abstain; } struct Transaction { uint256 value; address destination; bytes data; } struct Proposal { address proposer; uint256 deposit; uint256 timestamp; VoteTotals votes; Transaction[] transactions; bool approved; uint256 networkWeight; string descriptionUrl; } /** * @notice Constructs a proposal. * @param proposal The proposal struct to be constructed. * @param values The values of CELO to be sent in the proposed transactions. * @param destinations The destination addresses of the proposed transactions. * @param data The concatenated data to be included in the proposed transactions. * @param dataLengths The lengths of each transaction's data. * @param proposer The proposer. * @param deposit The proposal deposit. */ function make( Proposal storage proposal, uint256[] memory values, address[] memory destinations, bytes memory data, uint256[] memory dataLengths, address proposer, uint256 deposit ) public { require( values.length == destinations.length && destinations.length == dataLengths.length, "Array length mismatch" ); uint256 transactionCount = values.length; proposal.proposer = proposer; proposal.deposit = deposit; // solhint-disable-next-line not-rely-on-time proposal.timestamp = now; uint256 dataPosition = 0; delete proposal.transactions; for (uint256 i = 0; i < transactionCount; i = i.add(1)) { proposal.transactions.push( Transaction(values[i], destinations[i], data.slice(dataPosition, dataLengths[i])) ); dataPosition = dataPosition.add(dataLengths[i]); } } function setDescriptionUrl(Proposal storage proposal, string memory descriptionUrl) internal { require(bytes(descriptionUrl).length != 0, "Description url must have non-zero length"); proposal.descriptionUrl = descriptionUrl; } /** * @notice Constructs a proposal for use in memory. * @param values The values of CELO to be sent in the proposed transactions. * @param destinations The destination addresses of the proposed transactions. * @param data The concatenated data to be included in the proposed transactions. * @param dataLengths The lengths of each transaction's data. * @param proposer The proposer. * @param deposit The proposal deposit. */ function makeMem( uint256[] memory values, address[] memory destinations, bytes memory data, uint256[] memory dataLengths, address proposer, uint256 deposit ) internal view returns (Proposal memory) { require( values.length == destinations.length && destinations.length == dataLengths.length, "Array length mismatch" ); uint256 transactionCount = values.length; Proposal memory proposal; proposal.proposer = proposer; proposal.deposit = deposit; // solhint-disable-next-line not-rely-on-time proposal.timestamp = now; uint256 dataPosition = 0; proposal.transactions = new Transaction[](transactionCount); for (uint256 i = 0; i < transactionCount; i = i.add(1)) { proposal.transactions[i] = Transaction( values[i], destinations[i], data.slice(dataPosition, dataLengths[i]) ); dataPosition = dataPosition.add(dataLengths[i]); } return proposal; } /** * @notice Adds or changes a vote on a proposal. * @param proposal The proposal struct. * @param previousYesVotes The previous yes votes weight. * @param previousNoVotes The previous no votes weight. * @param previousAbstainVotes The previous abstain votes weight. * @param yesVotes The current yes votes weight. * @param noVotes The current no votes weight. * @param abstainVotes The current abstain votes weight. */ function updateVote( Proposal storage proposal, uint256 previousYesVotes, uint256 previousNoVotes, uint256 previousAbstainVotes, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) public { // Subtract previous vote. proposal.votes.yes = proposal.votes.yes.sub(previousYesVotes); proposal.votes.no = proposal.votes.no.sub(previousNoVotes); proposal.votes.abstain = proposal.votes.abstain.sub(previousAbstainVotes); // Add new vote. proposal.votes.yes = proposal.votes.yes.add(yesVotes); proposal.votes.no = proposal.votes.no.add(noVotes); proposal.votes.abstain = proposal.votes.abstain.add(abstainVotes); } /** * @notice Executes the proposal. * @param proposal The proposal struct. * @dev Reverts if any transaction fails. */ function execute(Proposal storage proposal) public { executeTransactions(proposal.transactions); } /** * @notice Executes the proposal. * @param proposal The proposal struct. * @dev Reverts if any transaction fails. */ function executeMem(Proposal memory proposal) internal { executeTransactions(proposal.transactions); } function executeTransactions(Transaction[] memory transactions) internal { for (uint256 i = 0; i < transactions.length; i = i.add(1)) { require( externalCall( transactions[i].destination, transactions[i].value, transactions[i].data.length, transactions[i].data ), "Proposal execution failed" ); } } /** * @notice Computes the support ratio for a proposal with the quorum condition: * If the total number of votes (yes + no + abstain) is less than the required number of votes, * "no" votes are added to increase particiption to this level. The ratio of yes / (yes + no) * votes is returned. * @param proposal The proposal struct. * @param quorum The minimum participation at which "no" votes are not added. * @return The support ratio with the quorum condition. */ function getSupportWithQuorumPadding( Proposal storage proposal, FixidityLib.Fraction memory quorum ) internal view returns (FixidityLib.Fraction memory) { uint256 yesVotes = proposal.votes.yes; if (yesVotes == 0) { return FixidityLib.newFixed(0); } uint256 noVotes = proposal.votes.no; uint256 totalVotes = yesVotes.add(noVotes).add(proposal.votes.abstain); uint256 requiredVotes = quorum .multiply(FixidityLib.newFixed(proposal.networkWeight)) .fromFixed(); if (requiredVotes > totalVotes) { noVotes = noVotes.add(requiredVotes.sub(totalVotes)); } return FixidityLib.newFixedFraction(yesVotes, yesVotes.add(noVotes)); } /** * @notice Returns the number of votes cast on the proposal over the total number * of votes in the network as a fraction. * @param proposal The proposal struct. * @return The participation of the proposal. */ function getParticipation(Proposal storage proposal) internal view returns (FixidityLib.Fraction memory) { uint256 totalVotes = proposal.votes.yes.add(proposal.votes.no).add(proposal.votes.abstain); return FixidityLib.newFixedFraction(totalVotes, proposal.networkWeight); } /** * @notice Returns a specified transaction in a proposal. * @param proposal The proposal struct. * @param index The index of the specified transaction in the proposal's transaction list. * @return Transaction value. * @return Transaction destination. * @return Transaction data. */ function getTransaction(Proposal storage proposal, uint256 index) public view returns (uint256, address, bytes memory) { require(index < proposal.transactions.length, "getTransaction: bad index"); Transaction storage transaction = proposal.transactions[index]; return (transaction.value, transaction.destination, transaction.data); } /** * @notice Returns an unpacked proposal struct with its transaction count. * @param proposal The proposal struct. * @return proposer * @return deposit * @return timestamp * @return transaction Transaction count. * @return description Description url. * @return networkWeight Network weight. */ function unpack(Proposal storage proposal) internal view returns (address, uint256, uint256, uint256, string storage, uint256, bool) { return ( proposal.proposer, proposal.deposit, proposal.timestamp, proposal.transactions.length, proposal.descriptionUrl, proposal.networkWeight, proposal.approved ); } /** * @notice Returns the referendum vote totals for a proposal. * @param proposal The proposal struct. * @return The yes vote totals. * @return The no vote totals. * @return The abstain vote totals. */ function getVoteTotals(Proposal storage proposal) internal view returns (uint256, uint256, uint256) { return (proposal.votes.yes, proposal.votes.no, proposal.votes.abstain); } /** * @notice Returns whether or not a proposal has been approved. * @param proposal The proposal struct. * @return Whether or not the proposal has been approved. */ function isApproved(Proposal storage proposal) internal view returns (bool) { return proposal.approved; } /** * @notice Returns whether or not a proposal exists. * @param proposal The proposal struct. * @return Whether or not the proposal exists. */ function exists(Proposal storage proposal) internal view returns (bool) { return proposal.timestamp > 0; } // call has been separated into its own function in order to take advantage // of the Solidity's code generator to produce a loop that copies tx.data into memory. /** * @notice Executes a function call. * @param value The value of CELO to be sent with the function call. * @param destination The destination address of the function call. * @param dataLength The length of the data to be included in the function call. * @param data The data to be included in the function call. */ function externalCall(address destination, uint256 value, uint256 dataLength, bytes memory data) private returns (bool) { bool result; if (dataLength > 0) require(Address.isContract(destination), "Invalid contract address"); /* solhint-disable no-inline-assembly */ assembly { /* solhint-disable max-line-length */ let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( sub(gas, 34710), // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) + // callNewAccountGas (25000, in case the destination address does not exist and needs creating) destination, value, d, dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) /* solhint-enable max-line-length */ } /* solhint-enable no-inline-assembly */ return result; } }
/project:/contracts/governance/interfaces/IElection.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IElection { function electValidatorSigners() external view returns (address[] memory); function electNValidatorSigners(uint256, uint256) external view returns (address[] memory); function vote(address, uint256, address, address) external returns (bool); function activate(address) external returns (bool); function revokeActive(address, uint256, address, address, uint256) external returns (bool); function revokeAllActive(address, address, address, uint256) external returns (bool); function revokePending(address, uint256, address, address, uint256) external returns (bool); function markGroupIneligible(address) external; function markGroupEligible(address, address, address) external; function allowedToVoteOverMaxNumberOfGroups(address) external returns (bool); function forceDecrementVotes( address, uint256, address[] calldata, address[] calldata, uint256[] calldata ) external returns (uint256); function setAllowedToVoteOverMaxNumberOfGroups(bool flag) external; // view functions function getElectableValidators() external view returns (uint256, uint256); function getElectabilityThreshold() external view returns (uint256); function getNumVotesReceivable(address) external view returns (uint256); function getTotalVotes() external view returns (uint256); function getActiveVotes() external view returns (uint256); function getTotalVotesByAccount(address) external view returns (uint256); function getPendingVotesForGroupByAccount(address, address) external view returns (uint256); function getActiveVotesForGroupByAccount(address, address) external view returns (uint256); function getTotalVotesForGroupByAccount(address, address) external view returns (uint256); function getActiveVoteUnitsForGroupByAccount(address, address) external view returns (uint256); function getTotalVotesForGroup(address) external view returns (uint256); function getActiveVotesForGroup(address) external view returns (uint256); function getPendingVotesForGroup(address) external view returns (uint256); function getGroupEligibility(address) external view returns (bool); function getGroupEpochRewards(address, uint256, uint256[] calldata) external view returns (uint256); function getGroupsVotedForByAccount(address) external view returns (address[] memory); function getEligibleValidatorGroups() external view returns (address[] memory); function getTotalVotesForEligibleValidatorGroups() external view returns (address[] memory, uint256[] memory); function getCurrentValidatorSigners() external view returns (address[] memory); function canReceiveVotes(address, uint256) external view returns (bool); function hasActivatablePendingVotes(address, address) external view returns (bool); function validatorSignerAddressFromCurrentSet(uint256 index) external view returns (address); function numberValidatorsInCurrentSet() external view returns (uint256); // only owner function setElectableValidators(uint256, uint256) external returns (bool); function setMaxNumGroupsVotedFor(uint256) external returns (bool); function setElectabilityThreshold(uint256) external returns (bool); // only VM function distributeEpochRewards(address, uint256, address, address) external; }
/project:/contracts/governance/interfaces/IGovernance.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IGovernance { function removeVotesWhenRevokingDelegatedVotes(address account, uint256 maxAmountAllowed) external; function votePartially( uint256 proposalId, uint256 index, uint256 yesVotes, uint256 noVotes, uint256 abstainVotes ) external returns (bool); function isVoting(address) external view returns (bool); function getAmountOfGoldUsedForVoting(address account) external view returns (uint256); function getProposal(uint256 proposalId) external view returns (address, uint256, uint256, uint256, string memory, uint256, bool); function getReferendumStageDuration() external view returns (uint256); }
/project:/contracts/governance/interfaces/ILockedGold.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface ILockedGold { function lock() external payable; function incrementNonvotingAccountBalance(address, uint256) external; function decrementNonvotingAccountBalance(address, uint256) external; function getAccountTotalLockedGold(address) external view returns (uint256); function getTotalLockedGold() external view returns (uint256); function getPendingWithdrawals(address) external view returns (uint256[] memory, uint256[] memory); function getPendingWithdrawal(address account, uint256 index) external view returns (uint256, uint256); function getTotalPendingWithdrawals(address) external view returns (uint256); function unlock(uint256) external; function relock(uint256, uint256) external; function withdraw(uint256) external; function slash( address account, uint256 penalty, address reporter, uint256 reward, address[] calldata lessers, address[] calldata greaters, uint256[] calldata indices ) external; function isSlasher(address) external view returns (bool); function getAccountTotalDelegatedFraction(address account) external view returns (uint256); function getAccountTotalGovernanceVotingPower(address account) external view returns (uint256); function unlockingPeriod() external view returns (uint256); function getAccountNonvotingLockedGold(address account) external view returns (uint256); }
/project:/contracts/governance/interfaces/IValidators.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IValidators { function registerValidator(bytes calldata, bytes calldata, bytes calldata) external returns (bool); function deregisterValidator(uint256) external returns (bool); function affiliate(address) external returns (bool); function deaffiliate() external returns (bool); function updateBlsPublicKey(bytes calldata, bytes calldata) external returns (bool); function registerValidatorGroup(uint256) external returns (bool); function deregisterValidatorGroup(uint256) external returns (bool); function addMember(address) external returns (bool); function addFirstMember(address, address, address) external returns (bool); function removeMember(address) external returns (bool); function reorderMember(address, address, address) external returns (bool); function updateCommission() external; function setNextCommissionUpdate(uint256) external; function resetSlashingMultiplier() external; // only owner function setCommissionUpdateDelay(uint256) external; function setMaxGroupSize(uint256) external returns (bool); function setMembershipHistoryLength(uint256) external returns (bool); function setValidatorScoreParameters(uint256, uint256) external returns (bool); function setGroupLockedGoldRequirements(uint256, uint256) external returns (bool); function setValidatorLockedGoldRequirements(uint256, uint256) external returns (bool); function setSlashingMultiplierResetPeriod(uint256) external; // view functions function getMaxGroupSize() external view returns (uint256); function getCommissionUpdateDelay() external view returns (uint256); function getValidatorScoreParameters() external view returns (uint256, uint256); function getMembershipHistory(address) external view returns (uint256[] memory, address[] memory, uint256, uint256); function calculateEpochScore(uint256) external view returns (uint256); function calculateGroupEpochScore(uint256[] calldata) external view returns (uint256); function getAccountLockedGoldRequirement(address) external view returns (uint256); function meetsAccountLockedGoldRequirements(address) external view returns (bool); function getValidatorBlsPublicKeyFromSigner(address) external view returns (bytes memory); function getValidator(address account) external view returns (bytes memory, bytes memory, address, uint256, address); function getValidatorGroup(address) external view returns (address[] memory, uint256, uint256, uint256, uint256[] memory, uint256, uint256); function getGroupNumMembers(address) external view returns (uint256); function getTopGroupValidators(address, uint256) external view returns (address[] memory); function getGroupsNumMembers(address[] calldata accounts) external view returns (uint256[] memory); function getNumRegisteredValidators() external view returns (uint256); function groupMembershipInEpoch(address, uint256, uint256) external view returns (address); // only registered contract function updateEcdsaPublicKey(address, address, bytes calldata) external returns (bool); function updatePublicKeys(address, address, bytes calldata, bytes calldata, bytes calldata) external returns (bool); function getValidatorLockedGoldRequirements() external view returns (uint256, uint256); function getGroupLockedGoldRequirements() external view returns (uint256, uint256); function getRegisteredValidators() external view returns (address[] memory); function getRegisteredValidatorSigners() external view returns (address[] memory); function getRegisteredValidatorGroups() external view returns (address[] memory); function isValidatorGroup(address) external view returns (bool); function isValidator(address) external view returns (bool); function getValidatorGroupSlashingMultiplier(address) external view returns (uint256); function getMembershipInLastEpoch(address) external view returns (address); function getMembershipInLastEpochFromSigner(address) external view returns (address); // only VM function updateValidatorScoreFromSigner(address, uint256) external; function distributeEpochPaymentsFromSigner(address, uint256) external returns (uint256); // only slasher function forceDeaffiliateIfValidator(address) external; function halveSlashingMultiplier(address) external; }
/project:/contracts/identity/interfaces/IAttestations.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IAttestations { function revoke(bytes32, uint256) external; function withdraw(address) external; // view functions function getUnselectedRequest(bytes32, address) external view returns (uint32, uint32, address); function getAttestationIssuers(bytes32, address) external view returns (address[] memory); function getAttestationStats(bytes32, address) external view returns (uint32, uint32); function batchGetAttestationStats(bytes32[] calldata) external view returns (uint256[] memory, address[] memory, uint64[] memory, uint64[] memory); function getAttestationState(bytes32, address, address) external view returns (uint8, uint32, address); function getCompletableAttestations(bytes32, address) external view returns (uint32[] memory, address[] memory, uint256[] memory, bytes memory); function getAttestationRequestFee(address) external view returns (uint256); function getMaxAttestations() external view returns (uint256); function validateAttestationCode(bytes32, address, uint8, bytes32, bytes32) external view returns (address); function lookupAccountsForIdentifier(bytes32) external view returns (address[] memory); function requireNAttestationsRequested(bytes32, address, uint32) external view; // only owner function setAttestationRequestFee(address, uint256) external; function setAttestationExpiryBlocks(uint256) external; function setSelectIssuersWaitBlocks(uint256) external; function setMaxAttestations(uint256) external; }
/project:/contracts/identity/interfaces/IRandom.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface IRandom { function revealAndCommit(bytes32, bytes32, address) external; function randomnessBlockRetentionWindow() external view returns (uint256); function random() external view returns (bytes32); function getBlockRandomness(uint256) external view returns (bytes32); }
/project:/contracts/stability/interfaces/ISortedOracles.sol
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.5.13 <0.9.0; interface ISortedOracles { function addOracle(address, address) external; function removeOracle(address, address, uint256) external; function report(address, uint256, address, address) external; function removeExpiredReports(address, uint256) external; function isOldestReportExpired(address token) external view returns (bool, address); function numRates(address) external view returns (uint256); function medianRate(address) external view returns (uint256, uint256); function numTimestamps(address) external view returns (uint256); function medianTimestamp(address) external view returns (uint256); }
/project:/lib/mento-core/contracts/interfaces/IExchange.sol
pragma solidity ^0.5.13; interface IExchange { function buy( uint256, uint256, bool ) external returns (uint256); function sell( uint256, uint256, bool ) external returns (uint256); function exchange( uint256, uint256, bool ) external returns (uint256); function setUpdateFrequency(uint256) external; function getBuyTokenAmount(uint256, bool) external view returns (uint256); function getSellTokenAmount(uint256, bool) external view returns (uint256); function getBuyAndSellBuckets(bool) external view returns (uint256, uint256); }
/project:/lib/mento-core/contracts/interfaces/IReserve.sol
pragma solidity ^0.5.13; interface IReserve { function setTobinTaxStalenessThreshold(uint256) external; function addToken(address) external returns (bool); function removeToken(address, uint256) external returns (bool); function transferGold(address payable, uint256) external returns (bool); function transferExchangeGold(address payable, uint256) external returns (bool); function getReserveGoldBalance() external view returns (uint256); function getUnfrozenReserveGoldBalance() external view returns (uint256); function getOrComputeTobinTax() external returns (uint256, uint256); function getTokens() external view returns (address[] memory); function getReserveRatio() external view returns (uint256); function addExchangeSpender(address) external; function removeExchangeSpender(address, uint256) external; function addSpender(address) external; function removeSpender(address) external; }
/project:/lib/mento-core/contracts/interfaces/IStableToken.sol
pragma solidity ^0.5.13; /** * @title This interface describes the functions specific to Celo Stable Tokens, and in the * absence of interface inheritance is intended as a companion to IERC20.sol and ICeloToken.sol. */ interface IStableToken { function mint(address, uint256) external returns (bool); function burn(uint256) external returns (bool); function setInflationParameters(uint256, uint256) external; function valueToUnits(uint256) external view returns (uint256); function unitsToValue(uint256) external view returns (uint256); function getInflationParameters() external view returns ( uint256, uint256, uint256, uint256 ); // NOTE: duplicated with IERC20.sol, remove once interface inheritance is supported. function balanceOf(address) external view returns (uint256); }
/solidity-bytes-utils/contracts/BytesLib.sol
/* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <goncalo.sa@consensys.net> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity ^0.5.0; library BytesLib { function concat( bytes memory _preBytes, bytes memory _postBytes ) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore(0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. )) } return tempBytes; } function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal { assembly { // Read the first 32 bytes of _preBytes storage, which is the length // of the array. (We don't need to use the offset into the slot // because arrays use the entire slot.) let fslot := sload(_preBytes_slot) // Arrays of 31 bytes or less have an even value in their slot, // while longer arrays have an odd value. The actual length is // the slot divided by two for odd values, and the lowest order // byte divided by two for even values. // If the slot is even, bitwise and the slot with 255 and divide by // two to get the length. If the slot is odd, bitwise and the slot // with -1 and divide by two. let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) let newlength := add(slength, mlength) // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since the new array still fits in the slot, we just need to // update the contents of the slot. // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length sstore( _preBytes_slot, // all the modifications to the slot are inside this // next block add( // we can just add to the slot contents because the // bytes we want to change are the LSBs fslot, add( mul( div( // load the bytes from memory mload(add(_postBytes, 0x20)), // zero all bytes to the right exp(0x100, sub(32, mlength)) ), // and now shift left the number of bytes to // leave space for the length in the slot exp(0x100, sub(32, newlength)) ), // increase length by the double of the memory // bytes length mul(mlength, 2) ) ) ) } case 1 { // The stored value fits in the slot, but the combined value // will exceed it. // get the keccak hash to get the contents of the array mstore(0x0, _preBytes_slot) let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes_slot, add(mul(newlength, 2), 1)) // The contents of the _postBytes array start 32 bytes into // the structure. Our first read should obtain the `submod` // bytes that can fit into the unused space in the last word // of the stored array. To get this, we read 32 bytes starting // from `submod`, so the data we read overlaps with the array // contents by `submod` bytes. Masking the lowest-order // `submod` bytes allows us to add that value directly to the // stored value. let submod := sub(32, slength) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore( sc, add( and( fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 ), and(mload(mc), mask) ) ) for { mc := add(mc, 0x20) sc := add(sc, 1) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } default { // get the keccak hash to get the contents of the array mstore(0x0, _preBytes_slot) // Start copying to the last used word of the stored array. let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes_slot, add(mul(newlength, 2), 1)) // Copy over the first `submod` bytes of the new data as in // case 1 above. let slengthmod := mod(slength, 32) let mlengthmod := mod(mlength, 32) let submod := sub(32, slengthmod) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(sload(sc), and(mload(mc), mask))) for { sc := add(sc, 1) mc := add(mc, 0x20) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } } } function slice( bytes memory _bytes, uint _start, uint _length ) internal pure returns (bytes memory) { require(_bytes.length >= (_start + _length)); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) { require(_bytes.length >= (_start + 20)); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) { require(_bytes.length >= (_start + 1)); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) { require(_bytes.length >= (_start + 2)); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) { require(_bytes.length >= (_start + 4)); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint(bytes memory _bytes, uint _start) internal pure returns (uint256) { require(_bytes.length >= (_start + 32)); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) { require(_bytes.length >= (_start + 32)); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage( bytes storage _preBytes, bytes memory _postBytes ) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes_slot) // Decode the length of the stored array like in concatStorage(). let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes_slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint(mc < end) + cb == 2) for {} eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":false},"metadata":{"useLiteralContent":true},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"project:/contracts/governance/Governance.sol":"Governance"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bool","name":"test","internalType":"bool"}]},{"type":"event","name":"ApproverSet","inputs":[{"type":"address","name":"approver","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ConcurrentProposalsSet","inputs":[{"type":"uint256","name":"concurrentProposals","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ConstitutionSet","inputs":[{"type":"address","name":"destination","internalType":"address","indexed":true},{"type":"bytes4","name":"functionId","internalType":"bytes4","indexed":true},{"type":"uint256","name":"threshold","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DequeueFrequencySet","inputs":[{"type":"uint256","name":"dequeueFrequency","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ExecutionStageDurationSet","inputs":[{"type":"uint256","name":"executionStageDuration","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"HotfixApproved","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"HotfixExecuted","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"HotfixPrepared","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32","indexed":true},{"type":"uint256","name":"epoch","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"HotfixWhitelisted","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32","indexed":true},{"type":"address","name":"whitelister","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"MinDepositSet","inputs":[{"type":"uint256","name":"minDeposit","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ParticipationBaselineQuorumFactorSet","inputs":[{"type":"uint256","name":"baselineQuorumFactor","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ParticipationBaselineUpdateFactorSet","inputs":[{"type":"uint256","name":"baselineUpdateFactor","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ParticipationBaselineUpdated","inputs":[{"type":"uint256","name":"participationBaseline","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ParticipationFloorSet","inputs":[{"type":"uint256","name":"participationFloor","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalApproved","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ProposalDequeued","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalExecuted","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ProposalExpired","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ProposalQueued","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"proposer","internalType":"address","indexed":true},{"type":"uint256","name":"transactionCount","internalType":"uint256","indexed":false},{"type":"uint256","name":"deposit","internalType":"uint256","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalUpvoteRevoked","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"revokedUpvotes","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalUpvoted","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"upvotes","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalVoteRevoked","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"weight","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalVoteRevokedV2","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"yesVotes","internalType":"uint256","indexed":false},{"type":"uint256","name":"noVotes","internalType":"uint256","indexed":false},{"type":"uint256","name":"abstainVotes","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalVoted","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"weight","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ProposalVotedV2","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"yesVotes","internalType":"uint256","indexed":false},{"type":"uint256","name":"noVotes","internalType":"uint256","indexed":false},{"type":"uint256","name":"abstainVotes","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"QueueExpirySet","inputs":[{"type":"uint256","name":"queueExpiry","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ReferendumStageDurationSet","inputs":[{"type":"uint256","name":"referendumStageDuration","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RegistrySet","inputs":[{"type":"address","name":"registryAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"approveHotfix","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"approver","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"checkProofOfPossession","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"bytes","name":"blsKey","internalType":"bytes"},{"type":"bytes","name":"blsPop","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"concurrentProposals","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dequeueFrequency","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"dequeueProposalsIfReady","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dequeued","inputs":[{"type":"uint256","name":"","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"emptyIndices","inputs":[{"type":"uint256","name":"","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"execute","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"executeHotfix","inputs":[{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"address[]","name":"destinations","internalType":"address[]"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"uint256[]","name":"dataLengths","internalType":"uint256[]"},{"type":"bytes32","name":"salt","internalType":"bytes32"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"fractionMulExp","inputs":[{"type":"uint256","name":"aNumerator","internalType":"uint256"},{"type":"uint256","name":"aDenominator","internalType":"uint256"},{"type":"uint256","name":"bNumerator","internalType":"uint256"},{"type":"uint256","name":"bDenominator","internalType":"uint256"},{"type":"uint256","name":"exponent","internalType":"uint256"},{"type":"uint256","name":"_decimals","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAmountOfGoldUsedForVoting","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBlockNumberFromHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getConstitution","inputs":[{"type":"address","name":"destination","internalType":"address"},{"type":"bytes4","name":"functionId","internalType":"bytes4"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getDequeue","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getEpochNumber","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getEpochNumberOfBlock","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getEpochSize","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getExecutionStageDuration","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getHotfixHash","inputs":[{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"address[]","name":"destinations","internalType":"address[]"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"uint256[]","name":"dataLengths","internalType":"uint256[]"},{"type":"bytes32","name":"salt","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"},{"type":"bool","name":"","internalType":"bool"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getHotfixRecord","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMostRecentReferendumProposal","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getParentSealBitmap","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getParticipationParameters","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"string","name":"","internalType":"string"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"bool","name":"","internalType":"bool"}],"name":"getProposal","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":"","internalType":"enum Proposals.Stage"}],"name":"getProposalStage","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"},{"type":"bytes","name":"","internalType":"bytes"}],"name":"getProposalTransaction","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getQueue","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getQueueLength","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getReferendumStageDuration","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUpvoteRecord","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUpvotes","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getVerifiedSealBitmapFromHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVersionNumber","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVoteRecord","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVoteTotals","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"hashHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"hotfixWhitelistValidatorTally","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"executed","internalType":"bool"},{"type":"bool","name":"approved","internalType":"bool"},{"type":"uint256","name":"preparedEpoch","internalType":"uint256"}],"name":"hotfixes","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"initialize","inputs":[{"type":"address","name":"registryAddress","internalType":"address"},{"type":"address","name":"_approver","internalType":"address"},{"type":"uint256","name":"_concurrentProposals","internalType":"uint256"},{"type":"uint256","name":"_minDeposit","internalType":"uint256"},{"type":"uint256","name":"_queueExpiry","internalType":"uint256"},{"type":"uint256","name":"_dequeueFrequency","internalType":"uint256"},{"type":"uint256","name":"referendumStageDuration","internalType":"uint256"},{"type":"uint256","name":"executionStageDuration","internalType":"uint256"},{"type":"uint256","name":"participationBaseline","internalType":"uint256"},{"type":"uint256","name":"participationFloor","internalType":"uint256"},{"type":"uint256","name":"baselineUpdateFactor","internalType":"uint256"},{"type":"uint256","name":"baselineQuorumFactor","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"initialized","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApproved","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isDequeuedProposal","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isDequeuedProposalExpired","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isHotfixPassing","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isHotfixWhitelistedBy","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"},{"type":"address","name":"whitelister","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isProposalPassing","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isQueued","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isQueuedProposalExpired","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isVoting","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastDequeue","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minDeposit","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minQuorumSize","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minQuorumSizeInCurrentSet","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"numberValidatorsInCurrentSet","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"numberValidatorsInSet","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"prepareHotfix","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"proposalCount","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"proposalExists","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"propose","inputs":[{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"address[]","name":"destinations","internalType":"address[]"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"uint256[]","name":"dataLengths","internalType":"uint256[]"},{"type":"string","name":"descriptionUrl","internalType":"string"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"queueExpiry","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"refundedDeposits","inputs":[{"type":"address","name":"","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IRegistry"}],"name":"registry","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"removeVotesWhenRevokingDelegatedVotes","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"newVotingPower","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceOwnership","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"revokeUpvote","inputs":[{"type":"uint256","name":"lesser","internalType":"uint256"},{"type":"uint256","name":"greater","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"revokeVotes","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setApprover","inputs":[{"type":"address","name":"_approver","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setBaselineQuorumFactor","inputs":[{"type":"uint256","name":"baselineQuorumFactor","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setBaselineUpdateFactor","inputs":[{"type":"uint256","name":"baselineUpdateFactor","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setConcurrentProposals","inputs":[{"type":"uint256","name":"_concurrentProposals","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setConstitution","inputs":[{"type":"address","name":"destination","internalType":"address"},{"type":"bytes4","name":"functionId","internalType":"bytes4"},{"type":"uint256","name":"threshold","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setDequeueFrequency","inputs":[{"type":"uint256","name":"_dequeueFrequency","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setExecutionStageDuration","inputs":[{"type":"uint256","name":"executionStageDuration","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setMinDeposit","inputs":[{"type":"uint256","name":"_minDeposit","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setParticipationBaseline","inputs":[{"type":"uint256","name":"participationBaseline","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setParticipationFloor","inputs":[{"type":"uint256","name":"participationFloor","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setQueueExpiry","inputs":[{"type":"uint256","name":"_queueExpiry","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setReferendumStageDuration","inputs":[{"type":"uint256","name":"referendumStageDuration","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setRegistry","inputs":[{"type":"address","name":"registryAddress","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"approval","internalType":"uint256"},{"type":"uint256","name":"referendum","internalType":"uint256"},{"type":"uint256","name":"execution","internalType":"uint256"}],"name":"stageDurations","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"upvote","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"lesser","internalType":"uint256"},{"type":"uint256","name":"greater","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"validatorSignerAddressFromCurrentSet","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"validatorSignerAddressFromSet","inputs":[{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"blockNumber","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"vote","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint8","name":"value","internalType":"enum Proposals.VoteValue"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"votePartially","inputs":[{"type":"uint256","name":"proposalId","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"yesVotes","internalType":"uint256"},{"type":"uint256","name":"noVotes","internalType":"uint256"},{"type":"uint256","name":"abstainVotes","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"whitelistHotfix","inputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"withdraw","inputs":[],"constant":false}]
Contract Creation Code
0x60806040523480156200001157600080fd5b506040516200d4353803806200d435833981810160405260208110156200003757600080fd5b81019080805190602001909291905050508060006200005b6200012a60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350806200011b576001600060146101000a81548160ff0219169083151502179055505b50600180819055505062000132565b600033905090565b61d2f380620001426000396000f3fe6080604052600436106104f75760003560e01c80637910867b1161028c578063b15f0f581161015a578063cea69e74116100cc578063e50e652d11610085578063e50e652d1461281e578063ec6830721461286d578063ed385274146128f5578063f2fde38b14612979578063f3f6da2c146129ca578063fae8db0a14612a25576104f7565b8063cea69e74146124a9578063cf48eb94146124e4578063d704f0c514612673578063da35c6641461276b578063df4da46114612796578063e41db455146127c1576104f7565b8063c134b2fc1161011e578063c134b2fc1461220e578063c73a6d7814612261578063c7f758a8146122b4578063c805956d146123c2578063c8d8d2b514612402578063cd845a761461243d576104f7565b8063b15f0f5814611f70578063b8f7700514611fab578063bab0808914611fd6578063bbb2eab914612179578063c0aee5f4146121e3576104f7565b806397b9eba6116101fe578063aa2feb83116101b7578063aa2feb8314611d39578063ad78c10914611d88578063add004df14611db3578063af108a0e14611e02578063af20311014611e5f578063b0f9984214611f35576104f7565b806397b9eba614611b5657806398f4270214611be45780639a7b3be714611c335780639b2b592f14611c5e5780639cb02dfc14611cad578063a91ee0dc14611ce8576104f7565b80638a883626116102505780638a8836261461195f5780638da5cb5b14611a3b5780638e905ed614611a925780638f32d59b14611abd5780638fcc9cfb14611aec5780639381ab2514611b27576104f7565b80637910867b146118005780637b103999146118535780638018556e146118aa57806381d4728d146118e557806387ee8a0f14611934576104f7565b80633fa5fed0116103c95780635f115a851161033b57806367960e91116102f457806367960e91146115f85780636de8a63b146116d45780636f2ab69314611740578063715018a6146117935780637385e5da146117aa57806377d26a2a146117d5576104f7565b80635f115a85146112175780635f8dd649146112a957806360b4d34d1461131257806365bbdaa0146113775780636643ac58146115585780636654716314611593576104f7565b80635601eaea1161038d5780635601eaea14610fd95780635733397814611036578063582ae53b1461109d5780635c759394146110fa5780635d180adb146111355780635d35a3d9146111ba576104f7565b80633fa5fed014610dba57806341b3d18514610e2d57806345a7849914610e585780634b2c2f4414610ebd57806354255be014610f99576104f7565b806323f0ab651161046d5780633156560e116104265780633156560e14610c46578063344944cf14610c975780633b1eb4bf14610cea5780633bb0ed2b14610d395780633ccfd60b14610d505780633db9dd9a14610d7f576104f7565b806323f0ab65146109165780632762132114610aad578063283aaefb14610b005780632c05235514610b655780632edfd12e14610ba057806330a095d014610c1b576104f7565b8063123633ea116104bf578063123633ea1461072a5780631374b22d146107a5578063141a8dd8146107f8578063152b48341461084f578063158ef93e146108ac5780631c65bc61146108db576104f7565b806301fce27e1461057257806304acaec9146106265780630e0b78ae146106615780630f717e42146106c65780631201a0fb146106ff575b60008036905014610570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f756e6b6e6f776e206d6574686f6400000000000000000000000000000000000081525060200191505060405180910390fd5b005b34801561057e57600080fd5b50610587612a74565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156105ce5780820151818401526020810190506105b3565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156106105780820151818401526020810190506105f5565b5050505090500194505050505060405180910390f35b34801561063257600080fd5b5061065f6004803603602081101561064957600080fd5b8101908080359060200190929190505050612c39565b005b34801561066d57600080fd5b5061069a6004803603602081101561068457600080fd5b8101908080359060200190929190505050612e11565b604051808415151515815260200183151515158152602001828152602001935050505060405180910390f35b3480156106d257600080fd5b506106db612e82565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561070b57600080fd5b50610714612e9a565b6040518082815260200191505060405180910390f35b34801561073657600080fd5b506107636004803603602081101561074d57600080fd5b8101908080359060200190929190505050612ea0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107b157600080fd5b506107de600480360360208110156107c857600080fd5b8101908080359060200190929190505050612ff1565b604051808215151515815260200191505060405180910390f35b34801561080457600080fd5b5061080d613015565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561085b57600080fd5b506108926004803603604081101561087257600080fd5b81019080803590602001909291908035906020019092919050505061303b565b604051808215151515815260200191505060405180910390f35b3480156108b857600080fd5b506108c1613062565b604051808215151515815260200191505060405180910390f35b3480156108e757600080fd5b50610914600480360360208110156108fe57600080fd5b8101908080359060200190929190505050613075565b005b34801561092257600080fd5b50610a936004803603606081101561093957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561097657600080fd5b82018360208201111561098857600080fd5b803590602001918460018302840111640100000000831117156109aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a0d57600080fd5b820183602082011115610a1f57600080fd5b80359060200191846001830284011164010000000083111715610a4157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613230565b604051808215151515815260200191505060405180910390f35b348015610ab957600080fd5b50610ae660048036036020811015610ad057600080fd5b81019080803590602001909291905050506133e9565b604051808215151515815260200191505060405180910390f35b348015610b0c57600080fd5b50610b4f60048036036020811015610b2357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061340d565b6040518082815260200191505060405180910390f35b348015610b7157600080fd5b50610b9e60048036036020811015610b8857600080fd5b8101908080359060200190929190505050613459565b005b348015610bac57600080fd5b50610c01600480360360a0811015610bc357600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506135e6565b604051808215151515815260200191505060405180910390f35b348015610c2757600080fd5b50610c30613958565b6040518082815260200191505060405180910390f35b348015610c5257600080fd5b50610c9560048036036020811015610c6957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613965565b005b348015610ca357600080fd5b50610cd060048036036020811015610cba57600080fd5b8101908080359060200190929190505050613bcd565b604051808215151515815260200191505060405180910390f35b348015610cf657600080fd5b50610d2360048036036020811015610d0d57600080fd5b8101908080359060200190929190505050613be9565b6040518082815260200191505060405180910390f35b348015610d4557600080fd5b50610d4e613c03565b005b348015610d5c57600080fd5b50610d65614002565b604051808215151515815260200191505060405180910390f35b348015610d8b57600080fd5b50610db860048036036020811015610da257600080fd5b810190808035906020019092919050505061423a565b005b348015610dc657600080fd5b50610e1360048036036040811015610ddd57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614412565b604051808215151515815260200191505060405180910390f35b348015610e3957600080fd5b50610e4261447d565b6040518082815260200191505060405180910390f35b348015610e6457600080fd5b50610e9160048036036020811015610e7b57600080fd5b8101908080359060200190929190505050614483565b604051808415151515815260200183151515158152602001828152602001935050505060405180910390f35b348015610ec957600080fd5b50610f8360048036036020811015610ee057600080fd5b8101908080359060200190640100000000811115610efd57600080fd5b820183602082011115610f0f57600080fd5b80359060200191846001830284011164010000000083111715610f3157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506144c7565b6040518082815260200191505060405180910390f35b348015610fa557600080fd5b50610fae61465b565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b348015610fe557600080fd5b5061101c60048036036040811015610ffc57600080fd5b810190808035906020019092919080359060200190929190505050614683565b604051808215151515815260200191505060405180910390f35b34801561104257600080fd5b506110836004803603606081101561105957600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506148e9565b604051808215151515815260200191505060405180910390f35b3480156110a957600080fd5b506110d6600480360360208110156110c057600080fd5b8101908080359060200190929190505050614f7e565b604051808260058111156110e657fe5b60ff16815260200191505060405180910390f35b34801561110657600080fd5b506111336004803603602081101561111d57600080fd5b810190808035906020019092919050505061500f565b005b34801561114157600080fd5b506111786004803603604081101561115857600080fd5b8101908080359060200190929190803590602001909291905050506151e7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156111c657600080fd5b506111fd600480360360408110156111dd57600080fd5b810190808035906020019092919080359060200190929190505050615339565b604051808215151515815260200191505060405180910390f35b34801561122357600080fd5b506112706004803603604081101561123a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061563f565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b3480156112b557600080fd5b506112f8600480360360208110156112cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506156ec565b604051808215151515815260200191505060405180910390f35b34801561131e57600080fd5b506113616004803603602081101561133557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506157bd565b6040518082815260200191505060405180910390f35b611542600480360360a081101561138d57600080fd5b81019080803590602001906401000000008111156113aa57600080fd5b8201836020820111156113bc57600080fd5b803590602001918460208302840111640100000000831117156113de57600080fd5b9091929391929390803590602001906401000000008111156113ff57600080fd5b82018360208201111561141157600080fd5b8035906020019184602083028401116401000000008311171561143357600080fd5b90919293919293908035906020019064010000000081111561145457600080fd5b82018360208201111561146657600080fd5b8035906020019184600183028401116401000000008311171561148857600080fd5b9091929391929390803590602001906401000000008111156114a957600080fd5b8201836020820111156114bb57600080fd5b803590602001918460208302840111640100000000831117156114dd57600080fd5b9091929391929390803590602001906401000000008111156114fe57600080fd5b82018360208201111561151057600080fd5b8035906020019184600183028401116401000000008311171561153257600080fd5b90919293919293905050506157d5565b6040518082815260200191505060405180910390f35b34801561156457600080fd5b506115916004803603602081101561157b57600080fd5b8101908080359060200190929190505050615b51565b005b34801561159f57600080fd5b506115e2600480360360208110156115b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615d01565b6040518082815260200191505060405180910390f35b34801561160457600080fd5b506116be6004803603602081101561161b57600080fd5b810190808035906020019064010000000081111561163857600080fd5b82018360208201111561164a57600080fd5b8035906020019184600183028401116401000000008311171561166c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050615f7f565b6040518082815260200191505060405180910390f35b3480156116e057600080fd5b506116e9616113565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561172c578082015181840152602081019050611711565b505050509050019250505060405180910390f35b34801561174c57600080fd5b506117796004803603602081101561176357600080fd5b810190808035906020019092919050505061616b565b604051808215151515815260200191505060405180910390f35b34801561179f57600080fd5b506117a861619d565b005b3480156117b657600080fd5b506117bf6162d6565b6040518082815260200191505060405180910390f35b3480156117e157600080fd5b506117ea6162e6565b6040518082815260200191505060405180910390f35b34801561180c57600080fd5b506118396004803603602081101561182357600080fd5b81019080803590602001909291905050506162ec565b604051808215151515815260200191505060405180910390f35b34801561185f57600080fd5b50611868616310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156118b657600080fd5b506118e3600480360360208110156118cd57600080fd5b8101908080359060200190929190505050616336565b005b3480156118f157600080fd5b5061191e6004803603602081101561190857600080fd5b81019080803590602001909291905050506164c3565b6040518082815260200191505060405180910390f35b34801561194057600080fd5b50611949616619565b6040518082815260200191505060405180910390f35b34801561196b57600080fd5b50611a256004803603602081101561198257600080fd5b810190808035906020019064010000000081111561199f57600080fd5b8201836020820111156119b157600080fd5b803590602001918460018302840111640100000000831117156119d357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050616760565b6040518082815260200191505060405180910390f35b348015611a4757600080fd5b50611a506168f4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015611a9e57600080fd5b50611aa761691d565b6040518082815260200191505060405180910390f35b348015611ac957600080fd5b50611ad2616923565b604051808215151515815260200191505060405180910390f35b348015611af857600080fd5b50611b2560048036036020811015611b0f57600080fd5b8101908080359060200190929190505050616981565b005b348015611b3357600080fd5b50611b3c616b2b565b604051808215151515815260200191505060405180910390f35b348015611b6257600080fd5b50611bce60048036036040811015611b7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050617216565b6040518082815260200191505060405180910390f35b348015611bf057600080fd5b50611c1d60048036036020811015611c0757600080fd5b8101908080359060200190929190505050617232565b6040518082815260200191505060405180910390f35b348015611c3f57600080fd5b50611c4861734b565b6040518082815260200191505060405180910390f35b348015611c6a57600080fd5b50611c9760048036036020811015611c8157600080fd5b810190808035906020019092919050505061735b565b6040518082815260200191505060405180910390f35b348015611cb957600080fd5b50611ce660048036036020811015611cd057600080fd5b81019080803590602001909291905050506174a4565b005b348015611cf457600080fd5b50611d3760048036036020811015611d0b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050617662565b005b348015611d4557600080fd5b50611d7260048036036020811015611d5c57600080fd5b8101908080359060200190929190505050617806565b6040518082815260200191505060405180910390f35b348015611d9457600080fd5b50611d9d617827565b6040518082815260200191505060405180910390f35b348015611dbf57600080fd5b50611dec60048036036020811015611dd657600080fd5b8101908080359060200190929190505050617834565b6040518082815260200191505060405180910390f35b348015611e0e57600080fd5b50611e4560048036036040811015611e2557600080fd5b810190808035906020019092919080359060200190929190505050617855565b604051808215151515815260200191505060405180910390f35b348015611e6b57600080fd5b50611f336004803603610180811015611e8357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050617ce8565b005b348015611f4157600080fd5b50611f6e60048036036020811015611f5857600080fd5b8101908080359060200190929190505050617e10565b005b348015611f7c57600080fd5b50611fa960048036036020811015611f9357600080fd5b8101908080359060200190929190505050617fcb565b005b348015611fb757600080fd5b50611fc0618137565b6040518082815260200191505060405180910390f35b348015611fe257600080fd5b50612163600480360360a0811015611ff957600080fd5b810190808035906020019064010000000081111561201657600080fd5b82018360208201111561202857600080fd5b8035906020019184602083028401116401000000008311171561204a57600080fd5b90919293919293908035906020019064010000000081111561206b57600080fd5b82018360208201111561207d57600080fd5b8035906020019184602083028401116401000000008311171561209f57600080fd5b9091929391929390803590602001906401000000008111156120c057600080fd5b8201836020820111156120d257600080fd5b803590602001918460018302840111640100000000831117156120f457600080fd5b90919293919293908035906020019064010000000081111561211557600080fd5b82018360208201111561212757600080fd5b8035906020019184602083028401116401000000008311171561214957600080fd5b909192939192939080359060200190929190505050618147565b6040518082815260200191505060405180910390f35b34801561218557600080fd5b506121c96004803603606081101561219c57600080fd5b810190808035906020019092919080359060200190929190803560ff169060200190929190505050618258565b604051808215151515815260200191505060405180910390f35b3480156121ef57600080fd5b506121f86186c0565b6040518082815260200191505060405180910390f35b34801561221a57600080fd5b506122476004803603602081101561223157600080fd5b81019080803590602001909291905050506186c6565b604051808215151515815260200191505060405180910390f35b34801561226d57600080fd5b5061229a6004803603602081101561228457600080fd5b81019080803590602001909291905050506186ea565b604051808215151515815260200191505060405180910390f35b3480156122c057600080fd5b506122ed600480360360208110156122d757600080fd5b8101908080359060200190929190505050618788565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018060200184815260200183151515158152602001828103825285818151815260200191508051906020019080838360005b83811015612381578082015181840152602081019050612366565b50505050905090810190601f1680156123ae5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b3480156123ce57600080fd5b506123d7618863565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34801561240e57600080fd5b5061243b6004803603602081101561242557600080fd5b81019080803590602001909291905050506188ff565b005b34801561244957600080fd5b5061248c6004803603602081101561246057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050618a8c565b604051808381526020018281526020019250505060405180910390f35b3480156124b557600080fd5b506124e2600480360360208110156124cc57600080fd5b8101908080359060200190929190505050618b0e565b005b3480156124f057600080fd5b50612671600480360360a081101561250757600080fd5b810190808035906020019064010000000081111561252457600080fd5b82018360208201111561253657600080fd5b8035906020019184602083028401116401000000008311171561255857600080fd5b90919293919293908035906020019064010000000081111561257957600080fd5b82018360208201111561258b57600080fd5b803590602001918460208302840111640100000000831117156125ad57600080fd5b9091929391929390803590602001906401000000008111156125ce57600080fd5b8201836020820111156125e057600080fd5b8035906020019184600183028401116401000000008311171561260257600080fd5b90919293919293908035906020019064010000000081111561262357600080fd5b82018360208201111561263557600080fd5b8035906020019184602083028401116401000000008311171561265757600080fd5b909192939192939080359060200190929190505050618cbe565b005b34801561267f57600080fd5b506126b66004803603604081101561269657600080fd5b8101908080359060200190929190803590602001909291905050506190a5565b604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561272e578082015181840152602081019050612713565b50505050905090810190601f16801561275b5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561277757600080fd5b5061278061922f565b6040518082815260200191505060405180910390f35b3480156127a257600080fd5b506127ab619235565b6040518082815260200191505060405180910390f35b3480156127cd57600080fd5b506127fa600480360360208110156127e457600080fd5b8101908080359060200190929190505050619371565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561282a57600080fd5b506128576004803603602081101561284157600080fd5b810190808035906020019092919050505061939e565b6040518082815260200191505060405180910390f35b34801561287957600080fd5b506128d8600480360360c081101561289057600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506193e9565b604051808381526020018281526020019250505060405180910390f35b34801561290157600080fd5b506129776004803603606081101561291857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803590602001909291905050506195fd565b005b34801561298557600080fd5b506129c86004803603602081101561299c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061993a565b005b3480156129d657600080fd5b50612a23600480360360408110156129ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506199c0565b005b348015612a3157600080fd5b50612a5e60048036036020811015612a4857600080fd5b8101908080359060200190929190505050619a76565b6040518082815260200191505060405180910390f35b606080601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef6369b317e390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015612ac957600080fd5b505af4158015612add573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506040811015612b0757600080fd5b8101908080516040519392919084640100000000821115612b2757600080fd5b83820191506020820185811115612b3d57600080fd5b8251866020820283011164010000000082111715612b5a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612b91578082015181840152602081019050612b76565b5050505090500160405260200180516040519392919084640100000000821115612bba57600080fd5b83820191506020820185811115612bd057600080fd5b8251866020820283011164010000000082111715612bed57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612c24578082015181840152602081019050612c09565b50505050905001604052505050915091509091565b612c41616923565b612cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b612cbb61ca38565b612cc482619bbf565b9050612ccf81619bdd565b612d24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ce1b6027913960400191505060405180910390fd5b612d50601960030160405180602001604052908160008201548152505082619bf790919063ffffffff16565b15612dc3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f426173656c696e652071756f72756d20666163746f7220756e6368616e67656481525060200191505060405180910390fd5b806019600301600082015181600001559050507fddfdbe55eaaa70fe2b8bc82a9b0734c25cabe7cb6f1457f9644019f0b5ff91fc826040518082815260200191505060405180910390a15050565b60008060006011600085815260200190815260200160002060000160019054906101000a900460ff166011600086815260200190815260200160002060000160009054906101000a900460ff1660116000878152602001908152602001600020600101549250925092509193909250565b60038060000154908060010154908060020154905083565b600a5481565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310612f195780518252602082019150602081019050602083039250612ef6565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612f79576040519150601f19603f3d011682016040523d82523d6000602084013e612f7e565b606091505b50809350819250505080612fdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061cfa8603d913960400191505060405180910390fd5b612fe8826000619c0c565b92505050919050565b600061300e600f6000848152602001908152602001600020619c23565b9050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061305a600f60008581526020019081526020016000208484619c33565b905092915050565b600060149054906101000a900460ff1681565b61307d616923565b6130ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6130f761ca38565b61310082619bbf565b905061310b81619bdd565b613160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061d1826024913960400191505060405180910390fd5b61318c601960010160405180602001604052908160008201548152505082619bf790919063ffffffff16565b156131e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061ce8a6026913960400191505060405180910390fd5b806019600101600082015181600001559050507f122a37b609e0f758b6a23c43506cb567017a4d18b21fa91312fb42b44975a5b5826040518082815260200191505060405180910390a15050565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b602083106132b95780518252602082019150602081019050602083039250613296565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061330a57805182526020820191506020810190506020830392506132e7565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b602083106133735780518252602082019150602081019050602083039250613350565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146133d3576040519150601f19603f3d011682016040523d82523d6000602084013e6133d8565b606091505b505080915050809150509392505050565b6000613406600f6000848152602001908152602001600020619cc6565b9050919050565b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b613461616923565b6134d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600081141561352d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061cd2a6021913960400191505060405180910390fd5b6006548114156135a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f517565756545787069727920756e6368616e676564000000000000000000000081525060200191505060405180910390fd5b806006819055507f4ecbf0bb0701615e2d6f9b0a0996056c959fe359ce76aa7ce06c5f1d57dae4d7816040518082815260200191505060405180910390a150565b60006001806000828254019250508190555060006001549050613607613c03565b6000806136148989619ee6565b9150915061362182619c23565b613630576000935050506138d7565b6003600581111561363d57fe5b81600581111561364957fe5b146136bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e636f72726563742070726f706f73616c207374617465000000000000000081525060200191505060405180910390fd5b60006136c6619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561374257600080fd5b505afa158015613756573d6000803e3d6000fd5b505050506040513d602081101561376c57600080fd5b81019080805190602001909291905050509050600061378961a0bd565b73ffffffffffffffffffffffffffffffffffffffff166361d5c570836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561380557600080fd5b505afa158015613819573d6000803e3d6000fd5b505050506040513d602081101561382f57600080fd5b81019080805190602001909291905050509050613867876138598a8c61a1b890919063ffffffff16565b61a1b890919063ffffffff16565b8110156138bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604381526020018061d22e6043913960600191505060405180910390fd5b6138ce848c8c858d8d8d61a240565b60019550505050505b600154811461394e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b6000600360020154905090565b61396d616923565b6139df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f417070726f7665722063616e6e6f74206265203000000000000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613b46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f417070726f76657220756e6368616e676564000000000000000000000000000081525060200191505060405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fa03757d836cb0b61c0fbba2147f5d51d6071ff3dd5bf6963beb55563d64878e160405160405180910390a250565b6000613bd76162d6565b613be0836164c3565b10159050919050565b6000613bfc82613bf7619235565b61a71f565b9050919050565b613c1a60075460095461a1b890919063ffffffff16565b4210614000576000613c36600a5460126000016002015461a767565b90506060601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef6377b024799091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b158015613c9457600080fd5b505af4158015613ca8573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015613cd257600080fd5b8101908080516040519392919084640100000000821115613cf257600080fd5b83820191506020820185811115613d0857600080fd5b8251866020820283011164010000000082111715613d2557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613d5c578082015181840152602081019050613d41565b505050509050016040525050509050600080905060008090505b83811015613fed576000838281518110613d8c57fe5b602002602001015190506000600f60008381526020019081526020016000209050613db68161a780565b15613def57817f88e53c486703527139dfc8d97a1e559d9bd93d3f9d52cda4e06564111e7a264360405160405180910390a25050613fd2565b613e698160010154600d60008460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461a1b890919063ffffffff16565b600d60008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550428160020181905550600060188054905014613f66576000613f01600160188054905061a7a590919063ffffffff16565b905082601760188381548110613f1357fe5b906000526020600020015481548110613f2857fe5b906000526020600020018190555060188181548110613f4357fe5b906000526020600020016000905580601881613f5f919061ca4b565b5050613f93565b60178290806001815401808255809150509060018203906000526020600020016000909192909190915055505b817f3e069fb74dcf5fbc07740b0d40d7f7fc48e9c0ca5dc3d19eb34d2e05d74c5543426040518082815260200191505060405180910390a26001935050505b613fe660018261a1b890919063ffffffff16565b9050613d76565b508015613ffc57426009819055505b5050505b565b600060018060008282540192505081905550600060015490506000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156140d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e6f7468696e6720746f2077697468647261770000000000000000000000000081525060200191505060405180910390fd5b4781111561414c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e636f6e73697374656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506141ba813373ffffffffffffffffffffffffffffffffffffffff1661a7ef90919063ffffffff16565b60019250506001548114614236576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5090565b614242616923565b6142b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6142bc61ca38565b6142c582619bbf565b90506142d081619bdd565b614325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061cd796027913960400191505060405180910390fd5b614351601960000160405180602001604052908160008201548152505082619bf790919063ffffffff16565b156143c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f50617274696369706174696f6e20626173656c696e6520756e6368616e67656481525060200191505060405180910390fd5b806019600001600082015181600001559050507f51131d2820f04a6b6edd20e22a07d5bf847e265a3906e85256fca7d6043417c5826040518082815260200191505060405180910390a15050565b60006011600084815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600c5481565b60116020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16908060010154905083565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061451c57805182526020820191506020810190506020830392506144f9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106145835780518252602082019150602081019050602083039250614560565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146145e3576040519150601f19603f3d011682016040523d82523d6000602084013e6145e8565b606091505b50809350819250505080614647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061cf116038913960400191505060405180910390fd5b61465282600061a929565b92505050919050565b6000806000806001600460016000839350829250819150809050935093509350935090919293565b600060018060008282540192505081905550600060015490506146a4613c03565b6000806146b18686619ee6565b9150915060006146c083619c23565b90508015614865576146d18361a9ca565b614743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f50726f706f73616c206e6f7420617070726f766564000000000000000000000081525060200191505060405180910390fd5b6004600581111561475057fe5b82600581111561475c57fe5b14801561476e575061476d83619cc6565b5b6147c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061d050602e913960400191505060405180910390fd5b827338afc0dc55415ae27b81c24b5a5fbfe433ebfba863c67e7b4b90916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b15801561481457600080fd5b505af4158015614828573d6000803e3d6000fd5b50505050867f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f60405160405180910390a261486483888861a9e5565b5b80945050505060015481146148e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b6000600180600082825401925050819055506000600154905061490a613c03565b6149138561ab04565b156149215760009150614eff565b600061492b619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156149a757600080fd5b505afa1580156149bb573d6000803e3d6000fd5b505050506040513d60208110156149d157600080fd5b810190808051906020019092919050505090506000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050614a37816000016000015461ab04565b506000614a4261a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614abe57600080fd5b505afa158015614ad2573d6000803e3d6000fd5b505050506040513d6020811015614ae857600080fd5b8101908080519060200190929190505050905060008111614b54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061d0ee6022913960400191505060405180910390fd5b601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc5163890918a6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614bae57600080fd5b505af4158015614bc2573d6000803e3d6000fd5b505050506040513d6020811015614bd857600080fd5b8101908080519060200190929190505050614c3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061cf7f6029913960400191505060405180910390fd5b600082600001600001541480614ced5750601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc51638909184600001600001546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614cb057600080fd5b505af4158015614cc4573d6000803e3d6000fd5b505050506040513d6020811015614cda57600080fd5b8101908080519060200190929190505050155b614d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061d203602b913960400191505060405180910390fd5b6000614deb82601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef637577759990918d6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614da257600080fd5b505af4158015614db6573d6000803e3d6000fd5b505050506040513d6020811015614dcc57600080fd5b810190808051906020019092919050505061a1b890919063ffffffff16565b9050601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63239491ba90918b848c8c6040518663ffffffff1660e01b8152600401808681526020018581526020018481526020018381526020018281526020019550505050505060006040518083038186803b158015614e5f57600080fd5b505af4158015614e73573d6000803e3d6000fd5b5050505060405180604001604052808a8152602001838152508360000160008201518160000155602082015181600101559050508373ffffffffffffffffffffffffffffffffffffffff16897fd19965d25ef670a1e322fbf05475924b7b12d81fd6b96ab718b261782efb3d62846040518082815260200191505060405180910390a360019550505050505b6001548114614f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b509392505050565b600080821480614f8f5750600b5482115b15614f9d576000905061500a565b6000600f60008481526020019081526020016000209050614fbd836186ea565b15614fe157614fcb8161a780565b614fd6576001614fd9565b60055b91505061500a565b6000614fec8261abd7565b9050614ff8828261ac8e565b6150025780615005565b60055b925050505b919050565b615017616923565b615089576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61509161ca38565b61509a82619bbf565b90506150a581619bdd565b6150fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ceea6027913960400191505060405180910390fd5b615126601960020160405180602001604052908160008201548152505082619bf790919063ffffffff16565b15615199576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f426173656c696e652075706461746520666163746f7220756e6368616e67656481525060200191505060405180910390fd5b806019600201600082015181600001559050507f8dedb4d995dd500718c7c5f6a077fba6153a7ee063da961d9fcab90ff528ac1f826040518082815260200191505060405180910390a15050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310615260578051825260208201915060208101905060208303925061523d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146152c0576040519150601f19603f3d011682016040523d82523d6000602084013e6152c5565b606091505b50809350819250505080615324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061d01a6036913960400191505060405180910390fd5b61532f826000619c0c565b9250505092915050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146153fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6d73672e73656e646572206e6f7420617070726f76657200000000000000000081525060200191505060405180910390fd5b615406613c03565b6000806154138585619ee6565b9150915061542082619c23565b61542f57600092505050615639565b6154388261a9ca565b156154ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f50726f706f73616c20616c726561647920617070726f7665640000000000000081525060200191505060405180910390fd5b600360058111156154b857fe5b8160058111156154c457fe5b14806154e65750600460058111156154d857fe5b8160058111156154e457fe5b145b615558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f50726f706f73616c206e6f7420696e20636f727265637420737461676500000081525060200191505060405180910390fd5b60018260070160006101000a81548160ff02191690831515021790555061557d61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b1580156155c257600080fd5b505afa1580156155d6573d6000803e3d6000fd5b505050506040513d60208110156155ec57600080fd5b81019080805190602001909291905050508260080181905550847f28ec9e38ba73636ceb2f6c1574136f83bd46284a3c74734b711bf45e12f8d92960405160405180910390a26001925050505b92915050565b6000806000806000806000601060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000898152602001908152602001600020905080600101548160000160009054906101000a900460ff1660038111156156c157fe5b8260020154836003015484600401548560050154965096509650965096509650509295509295509295565b600080601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160000154905060008082141580156157535750615752826186ea565b5b80156157655750615763826186c6565b155b90506000600f600085600201548152602001908152602001600020905060006003600581111561579157fe5b61579a8361abd7565b60058111156157a557fe5b14905082806157b15750805b95505050505050919050565b600d6020528060005260406000206000915090505481565b60006157df613c03565b600c54341015615857576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f546f6f20736d616c6c206465706f73697400000000000000000000000000000081525060200191505060405180910390fd5b61586d6001600b5461a1b890919063ffffffff16565b600b819055506000600f6000600b5481526020019081526020016000209050807338afc0dc55415ae27b81c24b5a5fbfe433ebfba8633053123f90918e8e8e8e8e8e8e8e33346040518c63ffffffff1660e01b8152600401808c8152602001806020018060200180602001806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185810385528f8f82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810384528d8d82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810383528b8b82818152602001925080828437600081840152601f19601f8201169050808301925050508581038252898982818152602001925060200280828437600081840152601f19601f8201169050808301925050509f5050505050505050505050505050505060006040518083038186803b1580156159f257600080fd5b505af4158015615a06573d6000803e3d6000fd5b50505050615a6184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508261ace590919063ffffffff16565b601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63d7a8acc19091600b546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b158015615abd57600080fd5b505af4158015615ad1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16600b547f1bfe527f3548d9258c2512b6689f0acfccdd0557d80a53845db25fc57e93d8fe8360060180549050344260405180848152602001838152602001828152602001935050505060405180910390a3600b549150509a9950505050505050505050565b615b59616923565b615bcb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811415615c42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4475726174696f6e206d757374206265206c6172676572207468616e2030000081525060200191505060405180910390fd5b600360020154811415615cbd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4475726174696f6e20756e6368616e676564000000000000000000000000000081525060200191505060405180910390fd5b806003600201819055507f7819c8059302d1d66abc7fe228ecc02214e0bc5c529956c13717aabefce937d8816040518082815260200191505060405180910390a150565b600080601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816000016000015490506000808214158015615d685750615d67826186ea565b5b8015615d7a5750615d78826186c6565b155b90508015615e51576000615d8c61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615e0857600080fd5b505afa158015615e1c573d6000803e3d6000fd5b505050506040513d6020811015615e3257600080fd5b8101908080519060200190929190505050905080945050505050615f7a565b600080905060008090505b601780549050811015615f7157600060178281548110615e7857fe5b906000526020600020015490506000600f60008381526020019081526020016000209050600060036005811115615eab57fe5b615eb48361abd7565b6005811115615ebf57fe5b14905080615ecf57505050615f56565b6000886003016000868152602001908152602001600020905083816001015414615efc5750505050615f56565b6000615f2f8260050154615f218460040154856003015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b9050615f4e8760008314615f435782615f49565b83600201545b61ad5d565b965050505050505b615f6a60018261a1b890919063ffffffff16565b9050615e5c565b50809450505050505b919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310615fd45780518252602082019150602081019050602083039250615fb1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061603b5780518252602082019150602081019050602083039250616018565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461609b576040519150601f19603f3d011682016040523d82523d6000602084013e6160a0565b606091505b508093508192505050806160ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061d2716023913960400191505060405180910390fd5b61610a82600061a929565b92505050919050565b6060601780548060200260200160405190810160405280929190818152602001828054801561616157602002820191906000526020600020905b81548152602001906001019080831161614d575b5050505050905090565b600080600f60008481526020019081526020016000209050616195816161908361abd7565b61ac8e565b915050919050565b6161a5616923565b616217576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006162e14361939e565b905090565b60075481565b6000616309600f600084815260200190815260200160002061a9ca565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61633e616923565b6163b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600081141561640a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061d07e6026913960400191505060405180910390fd5b600754811415616482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f646571756575654672657175656e637920756e6368616e67656400000000000081525060200191505060405180910390fd5b806007819055507f391e82aae76c653cd640ad1b6028e2ee39ca4f29b30152e3d0a9ddd7e1169c34816040518082815260200191505060405180910390a150565b6000806000905060006164d4616619565b905060006164e0619fc2565b905060008090505b8281101561660d5760006164fb82612ea0565b905060008373ffffffffffffffffffffffffffffffffffffffff166393c5c487836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561657c57600080fd5b505afa158015616590573d6000803e3d6000fd5b505050506040513d60208110156165a657600080fd5b810190808051906020019092919050505090506165c38883614412565b806165d457506165d38882614412565b5b156165f0576165ed60018761a1b890919063ffffffff16565b95505b505061660660018261a1b890919063ffffffff16565b90506164e8565b50829350505050919050565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061668a5780518252602082019150602081019050602083039250616667565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146166ea576040519150601f19603f3d011682016040523d82523d6000602084013e6166ef565b606091505b5080935081925050508061674e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061cfe56035913960400191505060405180910390fd5b616759826000619c0c565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b602083106167b55780518252602082019150602081019050602083039250616792565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061681c57805182526020820191506020810190506020830392506167f9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461687c576040519150601f19603f3d011682016040523d82523d6000602084013e616881565b606091505b508093508192505050806168e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061d1d26031913960400191505060405180910390fd5b6168eb826000619c0c565b92505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661696561ad77565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b616989616923565b6169fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811415616a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f6d696e4465706f736974206d757374206265206c6172676572207468616e203081525060200191505060405180910390fd5b600c54811415616aea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4d696e696d756d206465706f73697420756e6368616e6765640000000000000081525060200191505060405180910390fd5b80600c819055507fc50a7f0bdf88c216b2541b0bdea26f22305460e39ffc672ec1a7501732c5ba81816040518082815260200191505060405180910390a150565b600060018060008282540192505081905550600060015490506000616b4e619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616bca57600080fd5b505afa158015616bde573d6000803e3d6000fd5b505050506040513d6020811015616bf457600080fd5b810190808051906020019092919050505090506000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b60178054905081101561718a576000826003016000838152602001908152602001600020905060178281548110616c8357fe5b90600052602060002001548160010154148015616cd5575060008160030154141580616cb457506000816004015414155b80616cc457506000816005015414155b80616cd457506000816002015414155b5b1561716e57600080616ceb836001015485619ee6565b9150915060036005811115616cfc57fe5b816005811115616d0857fe5b1415617117576000836002015414616f6f576000600380811115616d2857fe5b8460000160009054906101000a900460ff166003811115616d4557fe5b14616d51576000616d57565b83600201545b9050600060026003811115616d6857fe5b8560000160009054906101000a900460ff166003811115616d8557fe5b14616d91576000616d97565b84600201545b9050600060016003811115616da857fe5b8660000160009054906101000a900460ff166003811115616dc557fe5b14616dd1576000616dd7565b85600201545b9050847338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909185858560008060006040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b158015616e5c57600080fd5b505af4158015616e70573d6000803e3d6000fd5b50505050616e7c61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b158015616ec157600080fd5b505afa158015616ed5573d6000803e3d6000fd5b505050506040513d6020811015616eeb57600080fd5b810190808051906020019092919050505085600801819055508873ffffffffffffffffffffffffffffffffffffffff1686600101547f6791653c96b4863b3768c664e9a03e1094ae334ba9d35862627ceeebd1abcc1f85858560405180848152602001838152602001828152602001935050505060405180910390a3505050617116565b817338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909185600301548660040154876005015460008060006040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b158015616ffe57600080fd5b505af4158015617012573d6000803e3d6000fd5b5050505061701e61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b15801561706357600080fd5b505afa158015617077573d6000803e3d6000fd5b505050506040513d602081101561708d57600080fd5b810190808051906020019092919050505082600801819055508573ffffffffffffffffffffffffffffffffffffffff1683600101547f6791653c96b4863b3768c664e9a03e1094ae334ba9d35862627ceeebd1abcc1f85600301548660040154876005015460405180848152602001838152602001828152602001935050505060405180910390a35b5b846003016000858152602001908152602001600020600080820160006101000a81549060ff021916905560018201600090556002820160009055600382016000905560048201600090556005820160009055505050505b5061718360018261a1b890919063ffffffff16565b9050616c50565b50600081600201819055506001935050506001548114617212576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5090565b600061722a617225848461ad7f565b61afd1565b905092915050565b600061723d826186ea565b6172af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f50726f706f73616c206e6f74207175657565640000000000000000000000000081525060200191505060405180910390fd5b601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63757775999091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561730957600080fd5b505af415801561731d573d6000803e3d6000fd5b505050506040513d602081101561733357600080fd5b81019080805190602001909291905050509050919050565b600061735643613be9565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106173cc57805182526020820191506020810190506020830392506173a9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461742c576040519150601f19603f3d011682016040523d82523d6000602084013e617431565b606091505b50809350819250505080617490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061cd4b602e913960400191505060405180910390fd5b61749b826000619c0c565b92505050919050565b806011600082815260200190815260200160002060000160009054906101000a900460ff161561753c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b61754582613bcd565b61759a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061d0c56029913960400191505060405180910390fd5b60006175a461734b565b905080601160008581526020019081526020016000206001015410617614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061d1376026913960400191505060405180910390fd5b80601160008581526020019081526020016000206001018190555080837f6f184ec313435b3307a4fe59e2293381f08419a87214464c875a2a247e8af5e060405160405180910390a3505050565b61766a616923565b6176dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561777f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b6018818154811061781357fe5b906000526020600020016000915090505481565b6000600360010154905090565b6017818154811061784157fe5b906000526020600020016000915090505481565b60006001806000828254019250508190555060006001549050617876613c03565b6000617880619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156178fc57600080fd5b505afa158015617910573d6000803e3d6000fd5b505050506040513d602081101561792657600080fd5b810190808051906020019092919050505090506000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160000154905060008114156179ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4163636f756e7420686173206e6f20686973746f726963616c207570766f746581525060200191505060405180910390fd5b617a088161ab04565b50601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc516389091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015617a6357600080fd5b505af4158015617a77573d6000803e3d6000fd5b505050506040513d6020811015617a8d57600080fd5b810190808051906020019092919050505015617c3157601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63239491ba909183617b708660000160010154601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63757775999091896040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015617b2757600080fd5b505af4158015617b3b573d6000803e3d6000fd5b505050506040513d6020811015617b5157600080fd5b810190808051906020019092919050505061a7a590919063ffffffff16565b8b8b6040518663ffffffff1660e01b8152600401808681526020018581526020018481526020018381526020018281526020019550505050505060006040518083038186803b158015617bc257600080fd5b505af4158015617bd6573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff16817f7dc46237a819c9171a9c037ec98928e563892905c4d23373ca0f3f500f4ed11484600001600101546040518082815260200191505060405180910390a35b6040518060400160405280600081526020016000815250826000016000820151816000015560208201518160010155905050600194505050506001548114617ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b600060149054906101000a900460ff1615617d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550617d8f3361afdf565b617d988c617662565b617da18b613965565b617daa8a6188ff565b617db389616981565b617dbc88613459565b617dc587616336565b617dce86618b0e565b617dd785615b51565b617de08461423a565b617de983613075565b617df28261500f565b617dfb81612c39565b42600981905550505050505050505050505050565b806011600082815260200190815260200160002060000160009054906101000a900460ff1615617ea8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614617f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6d73672e73656e646572206e6f7420617070726f76657200000000000000000081525060200191505060405180910390fd5b60016011600084815260200190815260200160002060000160016101000a81548160ff021916908315150217905550817f36bc158cba244a94dc9b8c08d327e8f7e3c2ab5f1925454c577527466f04851f60405160405180910390a25050565b806011600082815260200190815260200160002060000160009054906101000a900460ff1615618063576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b60016011600084815260200190815260200160002060020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550817ff6d22d0b43a6753880b8f9511b82b86cd0fe349cd580bbe6a25b6dc063ef496f33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25050565b6000601260000160020154905090565b6000898989898989898989604051602001808060200180602001806020018060200186815260200185810385528e8e82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810384528c8c82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810383528a8a82818152602001925080828437600081840152601f19601f8201169050808301925050508581038252888882818152602001925060200280828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506040516020818303038152906040528051906020012090509998505050505050505050565b60006001806000828254019250508190555060006001549050618279613c03565b6000806182868787619ee6565b9150915061829382619c23565b6182a257600093505050618641565b600360058111156182af57fe5b8160058111156182bb57fe5b1461832e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e636f72726563742070726f706f73616c207374617465000000000000000081525060200191505060405180910390fd5b6000600381111561833b57fe5b85600381111561834757fe5b14156183bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f566f74652076616c756520756e7365740000000000000000000000000000000081525060200191505060405180910390fd5b60006183c5619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561844157600080fd5b505afa158015618455573d6000803e3d6000fd5b505050506040513d602081101561846b57600080fd5b81019080805190602001909291905050509050600061848861a0bd565b73ffffffffffffffffffffffffffffffffffffffff166361d5c570836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561850457600080fd5b505afa158015618518573d6000803e3d6000fd5b505050506040513d602081101561852e57600080fd5b8101908080519060200190929190505050905060008114156185b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f566f74657220776569676874207a65726f00000000000000000000000000000081525060200191505060405180910390fd5b618638848a8a856003808111156185cb57fe5b8c60038111156185d757fe5b146185e35760006185e5565b855b600260038111156185f257fe5b8d60038111156185fe57fe5b1461860a57600061860c565b865b6001600381111561861957fe5b8e600381111561862557fe5b14618631576000618633565b875b61a240565b60019550505050505b60015481146186b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b509392505050565b60095481565b60006186e3600f600084815260200190815260200160002061a780565b9050919050565b6000601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc516389091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561874657600080fd5b505af415801561875a573d6000803e3d6000fd5b505050506040513d602081101561877057600080fd5b81019080805190602001909291905050509050919050565b60008060008060606000806187ae600f60008a815260200190815260200160002061b123565b828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156188435780601f1061881857610100808354040283529160200191618843565b820191906000526020600020905b81548152906001019060200180831161882657829003601f168201915b505050505092509650965096509650965096509650919395979092949650565b60008060008061888b601960000160405180602001604052908160008201548152505061afd1565b6188ad601960010160405180602001604052908160008201548152505061afd1565b6188cf601960020160405180602001604052908160008201548152505061afd1565b6188f1601960030160405180602001604052908160008201548152505061afd1565b935093509350935090919293565b618907616923565b618979576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008114156189d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061cda0602c913960400191505060405180910390fd5b600a54811415618a4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e756d626572206f662070726f706f73616c7320756e6368616e67656400000081525060200191505060405180910390fd5b80600a819055507f85399b9b2595eb13c392e1638ca77730156cd8d48d4733df4db068e4aa6b93a6816040518082815260200191505060405180910390a150565b600080618a9761ca77565b601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001604051806040016040529081600082015481526020016001820154815250509050806000015181602001519250925050915091565b618b16616923565b618b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811415618bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4475726174696f6e206d757374206265206c6172676572207468616e2030000081525060200191505060405180910390fd5b600360010154811415618c7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4475726174696f6e20756e6368616e676564000000000000000000000000000081525060200191505060405180910390fd5b806003600101819055507f90290eb9b27055e686a69fb810bada5381e544d07b8270021da2d355a6c96ed6816040518082815260200191505060405180910390a150565b6000898989898989898989604051602001808060200180602001806020018060200186815260200185810385528e8e82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810384528c8c82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810383528a8a82818152602001925080828437600081840152601f19601f8201169050808301925050508581038252888882818152602001925060200280828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506040516020818303038152906040528051906020012090506000806000618dd084612e11565b9250925092508115618e4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b82618ebd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f686f74666978206e6f7420617070726f7665640000000000000000000000000081525060200191505060405180910390fd5b618ec561734b565b8114618f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061cd046026913960400191505060405180910390fd5b61903a6190358e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505033600061b19c565b61b3c5565b60016011600086815260200190815260200160002060000160006101000a81548160ff021916908315150217905550837f708a7934acb657a77a617b1fcd5f6d7d9ad592b72934841bff01acefd10f9b6360405160405180910390a250505050505050505050505050565b6000806060600f60008681526020019081526020016000207338afc0dc55415ae27b81c24b5a5fbfe433ebfba863e6a5192f9091866040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b15801561911557600080fd5b505af4158015619129573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250606081101561915357600080fd5b8101908080519060200190929190805190602001909291908051604051939291908464010000000082111561918757600080fd5b8382019150602082018581111561919d57600080fd5b82518660018202830111640100000000821117156191ba57600080fd5b8083526020830192505050908051906020019080838360005b838110156191ee5780820151818401526020810190506191d3565b50505050905090810190601f16801561921b5780820380516001836020036101000a031916815260200191505b506040525050509250925092509250925092565b600b5481565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b6020831061929b5780518252602082019150602081019050602083039250619278565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146192fb576040519150601f19603f3d011682016040523d82523d6000602084013e619300565b606091505b5080935081925050508061935f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061d15d6025913960400191505060405180910390fd5b61936a826000619c0c565b9250505090565b6000806000619391600f600086815260200190815260200160002061b3d5565b9250925092509193909250565b60006193e260036193d460026193c660026193b88861735b565b61b3ff90919063ffffffff16565b61a1b890919063ffffffff16565b61b48590919063ffffffff16565b9050919050565b600080600087141580156193fe575060008514155b619470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061950a57805182526020820191506020810190506020830392506194e7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461956a576040519150601f19603f3d011682016040523d82523d6000602084013e61956f565b606091505b508092508193505050816195ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061d1106027913960400191505060405180910390fd5b6195d9816000619c0c565b93506195e6816020619c0c565b925083839550955050505050965096945050505050565b619605616923565b619677576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561971a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f44657374696e6174696f6e2063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6969e10de76676d080000081118015619742575061973e61973961b4cf565b61afd1565b8111155b619797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604881526020018061ce426048913960600191505060405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561981f576197cb81619bbf565b600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082015181600001559050506198c7565b61982881619bbf565b600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600082015181600001559050505b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168373ffffffffffffffffffffffffffffffffffffffff167f60c5b4756af49d7b071b00dbf0f87af605cce11896ecd3b760d19f0f9d3fbcef836040518082815260200191505060405180910390a3505050565b619942616923565b6199b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6199bd8161afdf565b50565b6199c861a0bd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614619a68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f6d73672e73656e646572206e6f74206c6f636b6564476f6c640000000000000081525060200191505060405180910390fd5b619a72828261b4f5565b5050565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310619ae75780518252602082019150602081019050602083039250619ac4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114619b47576040519150601f19603f3d011682016040523d82523d6000602084013e619b4c565b606091505b50809350819250505080619bab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061d1a6602c913960400191505060405180910390fd5b619bb682600061a929565b92505050919050565b619bc761ca38565b6040518060200160405280838152509050919050565b6000619bf082619beb61b4cf565b61b8ec565b9050919050565b60008160000151836000015114905092915050565b6000619c18838361a929565b60001c905092915050565b6000808260020154119050919050565b60006017805490508210619c92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061d294602b913960400191505060405180910390fd5b619c9b84619c23565b8015619cbd57508260178381548110619cb057fe5b9060005260206000200154145b90509392505050565b6000619cd061ca38565b619d27619d186019600301604051806020016040529081600082015481525050601960000160405180602001604052908160008201548152505061b90290919063ffffffff16565b8461bd6190919063ffffffff16565b9050600083600601805490501415619d6a57619d4161ca38565b619d4c60008061ad7f565b9050619d61818361be5090919063ffffffff16565b92505050619ee1565b60008090505b8360060180549050811015619eda576000619e42856006018381548110619d9357fe5b90600052602060002090600302016002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015619e385780601f10619e0d57610100808354040283529160200191619e38565b820191906000526020600020905b815481529060010190602001808311619e1b57829003601f168201915b505050505061be65565b9050619e4c61ca38565b619e96866006018481548110619e5e57fe5b906000526020600020906003020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361ad7f565b9050619eab818561b8ec90919063ffffffff16565b15619ebd576000945050505050619ee1565b5050619ed360018261a1b890919063ffffffff16565b9050619d70565b5060019150505b919050565b6000806000600f60008681526020019081526020016000209050619f0b818686619c33565b619f7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f50726f706f73616c206e6f74206465717565756564000000000000000000000081525060200191505060405180910390fd5b6000619f888261abd7565b9050619f94828261ac8e565b15619fb257619fa482878761a9e5565b816005935093505050619fbb565b81819350935050505b9250929050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561a07d57600080fd5b505afa15801561a091573d6000803e3d6000fd5b505050506040513d602081101561a0a757600080fd5b8101908080519060200190929190505050905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561a17857600080fd5b505afa15801561a18c573d6000803e3d6000fd5b505050506040513d602081101561a1a257600080fd5b8101908080519060200190929190505050905090565b60008082840190508381101561a236576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600081600301600088815260200190815260200160002090508781600101541461a34757887338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909160008060008a8a8a6040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561a32a57600080fd5b505af415801561a33e573d6000803e3d6000fd5b5050505061a548565b600081600201541461a4a157887338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909160038081111561a37c57fe5b8460000160009054906101000a900460ff16600381111561a39957fe5b1461a3a557600061a3ab565b83600201545b6002600381111561a3b857fe5b8560000160009054906101000a900460ff16600381111561a3d557fe5b1461a3e157600061a3e7565b84600201545b6001600381111561a3f457fe5b8660000160009054906101000a900460ff16600381111561a41157fe5b1461a41d57600061a423565b85600201545b8a8a8a6040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561a48457600080fd5b505af415801561a498573d6000803e3d6000fd5b5050505061a547565b887338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d90918360030154846004015485600501548a8a8a6040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561a52e57600080fd5b505af415801561a542573d6000803e3d6000fd5b505050505b5b61a55061a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b15801561a59557600080fd5b505afa15801561a5a9573d6000803e3d6000fd5b505050506040513d602081101561a5bf57600080fd5b810190808051906020019092919050505089600801819055506040518060c001604052806000600381111561a5f057fe5b8152602001898152602001600081526020018681526020018581526020018481525082600301600089815260200190815260200160002060008201518160000160006101000a81548160ff0219169083600381111561a64b57fe5b02179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050155905050600f600083600201548152602001908152602001600020600201548960020154111561a6b5578782600201819055505b8573ffffffffffffffffffffffffffffffffffffffff16887f683ebddc94b5b0a7dae3d1b6c168ad05684fcfd831b24ecb5ea9ecdf5524d02887878760405180848152602001838152602001828152602001935050505060405180910390a3505050505050505050565b60008082848161a72b57fe5b049050600083858161a73957fe5b06141561a749578091505061a761565b61a75d60018261a1b890919063ffffffff16565b9150505b92915050565b600081831061a776578161a778565b825b905092915050565b600061a79b600654836002015461a1b890919063ffffffff16565b4210159050919050565b600061a7e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061bfc2565b905092915050565b8047101561a865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461a8c5576040519150601f19603f3d011682016040523d82523d6000602084013e61a8ca565b606091505b505090508061a924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018061ceb0603a913960400191505060405180910390fd5b505050565b600061a93f60208361a1b890919063ffffffff16565b8351101561a9b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b60008160070160009054906101000a900460ff169050919050565b61a9ee8361a9ca565b801561a9ff57506000836008015414155b1561aa0e5761aa0d8361c082565b5b60006017828154811061aa1d57fe5b90600052602060002001819055506018819080600181540180825580915050906001820390600052602060002001600090919290919091505550600f6000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905560028201600090556003820160008082016000905560018201600090556002820160009055505060068201600061aad1919061ca91565b6007820160006101000a81549060ff0219169055600882016000905560098201600061aafd919061cab5565b5050505050565b600061ab0f826186ea565b801561ab20575061ab1f826186c6565b5b1561abcd57601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63eed5f7be9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b15801561ab7f57600080fd5b505af415801561ab93573d6000803e3d6000fd5b50505050817f88e53c486703527139dfc8d97a1e559d9bd93d3f9d52cda4e06564111e7a264360405160405180910390a26001905061abd2565b600090505b919050565b60008061ac0d60036002015461abff600360010154866002015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b905080421015801561ac4957506000836006018054905014158061ac37575061ac358361a9ca565b155b8061ac48575061ac4683619cc6565b155b5b1561ac5857600591505061ac89565b61ac706003600201548261a7a590919063ffffffff16565b905080421061ac8357600491505061ac89565b60039150505b919050565b60006004600581111561ac9d57fe5b82600581111561aca957fe5b118061acdd57506003600581111561acbd57fe5b82600581111561acc957fe5b11801561acdc575061acda83619cc6565b155b5b905092915050565b60008151141561ad40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061cdf26029913960400191505060405180910390fd5b8082600901908051906020019061ad5892919061cafd565b505050565b60008183101561ad6d578161ad6f565b825b905092915050565b600033905090565b61ad8761ca38565b61ad8f61ca38565b61ada26969e10de76676d0800000619bbf565b9050600061ae54600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060405180602001604052908160008201548152505061afd1565b1461af0657600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020604051806020016040529081600082015481525050905061afc7565b600061af67600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160405180602001604052908160008201548152505061afd1565b1461afc657600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160405180602001604052908160008201548152505090505b5b8091505092915050565b600081600001519050919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561b065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061cdcc6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060008060008060008760000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886001015489600201548a600601805490508b6009018c600801548d60070160009054906101000a900460ff168292509650965096509650965096509650919395979092949650565b61b1a461cb7d565b8551875114801561b1b6575083518651145b61b228576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4172726179206c656e677468206d69736d61746368000000000000000000000081525060200191505060405180910390fd5b60008751905061b23661cb7d565b84816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050838160200181815250504281604001818152505060008090508260405190808252806020026020018201604052801561b2c157816020015b61b2ae61cbe0565b81526020019060019003908161b2a65790505b50826080018190525060008090505b8381101561b3b45760405180606001604052808c838151811061b2ef57fe5b602002602001015181526020018b838151811061b30857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16815260200161b353848b858151811061b33b57fe5b60200260200101518d61c2189092919063ffffffff16565b8152508360800151828151811061b36657fe5b602002602001018190525061b39788828151811061b38057fe5b60200260200101518361a1b890919063ffffffff16565b915061b3ad60018261a1b890919063ffffffff16565b905061b2d0565b508193505050509695505050505050565b61b3d2816080015161c2a4565b50565b60008060008360030160000154846003016001015485600301600201549250925092509193909250565b60008083141561b412576000905061b47f565b600082840290508284828161b42357fe5b041461b47a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061d0a46021913960400191505060405180910390fd5b809150505b92915050565b600061b4c783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061c3ad565b905092915050565b61b4d761ca38565b604051806020016040528069d3c21bcecceda1000000815250905090565b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b60178054905081101561b8e65760006017828154811061b55a57fe5b906000526020600020015490506000600f6000838152602001908152602001600020905060006003600581111561b58d57fe5b61b5968361abd7565b600581111561b5a157fe5b1490508061b5b15750505061b8cb565b600085600301600086815260200190815260200160002090508381600101541461b63257856003016000868152602001908152602001600020600080820160006101000a81549060ff02191690556001820160009055600282016000905560038201600090556004820160009055600582016000905550505050505061b8cb565b600061b665826005015461b6578460040154856003015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b90508781111561b8c557600061b684898361a7a590919063ffffffff16565b9050600061b6978285600501548561c473565b9050600061b6aa8386600301548661c473565b9050600061b6bd8487600401548761c473565b9050600061b6e68261b6d8858761a1b890919063ffffffff16565b61a1b890919063ffffffff16565b9050600061b70184896003015461a7a590919063ffffffff16565b9050600061b71c848a6004015461a7a590919063ffffffff16565b9050600061b737878b6005015461a7a590919063ffffffff16565b90508784101561b7fc57600061b756858a61a7a590919063ffffffff16565b9050600061b764828661a767565b905061b779818661a7a590919063ffffffff16565b945061b78e818361a7a590919063ffffffff16565b91506000821461b7cf5761b7a2828561a767565b905061b7b7818561a7a590919063ffffffff16565b935061b7cc818361a7a590919063ffffffff16565b91505b6000821461b7f95761b7e1828461a767565b905061b7f6818461a7a590919063ffffffff16565b92505b50505b8b7338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d90918c600301548d600401548e600501548888886040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561b88957600080fd5b505af415801561b89d573d6000803e3d6000fd5b50505050808a60050181905550828a60030181905550818a6004018190555050505050505050505b50505050505b61b8df60018261a1b890919063ffffffff16565b905061b53e565b50505050565b6000816000015183600001511115905092915050565b61b90a61ca38565b60008360000151148061b921575060008260000151145b1561b93d5760405180602001604052806000815250905061bd5b565b69d3c21bcecceda10000008260000151141561b95b5782905061bd5b565b69d3c21bcecceda10000008360000151141561b9795781905061bd5b565b600069d3c21bcecceda100000061b98f8561c4aa565b600001518161b99a57fe5b049050600061b9a88561c4e1565b600001519050600069d3c21bcecceda100000061b9c48661c4aa565b600001518161b9cf57fe5b049050600061b9dd8661c4e1565b600001519050600082850290506000851461ba71578285828161b9fc57fe5b041461ba70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda1000000820290506000821461bb135769d3c21bcecceda100000082828161ba9e57fe5b041461bb12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461bba4578486828161bb2f57fe5b041461bba3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600084880290506000881461bc32578488828161bbbd57fe5b041461bc31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b61bc3a61c51e565b878161bc4257fe5b04965061bc4d61c51e565b858161bc5557fe5b049450600085880290506000881461bce6578588828161bc7157fe5b041461bce5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b61bcee61ca38565b604051806020016040528087815250905061bd178160405180602001604052808781525061c52b565b905061bd318160405180602001604052808681525061c52b565b905061bd4b8160405180602001604052808581525061c52b565b9050809a50505050505050505050505b92915050565b61bd6961ca38565b600083600301600001549050600081141561bd905761bd88600061c5d4565b91505061be4a565b600084600301600101549050600061bdca866003016002015461bdbc848661a1b890919063ffffffff16565b61a1b890919063ffffffff16565b9050600061bdf561bdf061bde1896008015461c5d4565b8861b90290919063ffffffff16565b61c65e565b90508181111561be275761be2461be15838361a7a590919063ffffffff16565b8461a1b890919063ffffffff16565b92505b61be438461be3e858761a1b890919063ffffffff16565b61c67f565b9450505050505b92915050565b60008160000151836000015111905092915050565b600060188260038151811061be7657fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061bed357fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60088460018151811061bf3057fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061bf8b57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b600083831115829061c06f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561c03457808201518184015260208101905061c019565b50505050905090810190601f16801561c0615780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b61c08a61ca38565b61c0938261c6c1565b905061c09d61ca38565b61c0c960196002016040518060200160405290816000820154815250508361b90290919063ffffffff16565b905061c0d361ca38565b61c13161c109601960020160405180602001604052908160008201548152505061c0fb61b4cf565b61c71d90919063ffffffff16565b601960000160405180602001604052908160008201548152505061b90290919063ffffffff16565b905061c146818361c52b90919063ffffffff16565b60196000016000820151816000015590505061c19d6019600101604051806020016040529081600082015481525050601960000160405180602001604052908160008201548152505061c7c490919063ffffffff16565b1561c1ba5760196001016019600001600082015481600001559050505b7f51131d2820f04a6b6edd20e22a07d5bf847e265a3906e85256fca7d6043417c561c1fd601960000160405180602001604052908160008201548152505061afd1565b6040518082815260200191505060405180910390a150505050565b60608183018451101561c22a57600080fd5b606082156000811461c2475760405191506020820160405261c298565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561c285578051835260208301925060208101905061c268565b50868552601f19601f8301166040525050505b50809150509392505050565b60008090505b815181101561c3a95761c31c82828151811061c2c257fe5b60200260200101516020015183838151811061c2da57fe5b60200260200101516000015184848151811061c2f257fe5b6020026020010151604001515185858151811061c30b57fe5b60200260200101516040015161c7d9565b61c38e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f50726f706f73616c20657865637574696f6e206661696c65640000000000000081525060200191505060405180910390fd5b61c3a260018261a1b890919063ffffffff16565b905061c2aa565b5050565b6000808311829061c459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561c41e57808201518184015260208101905061c403565b50505050905090810190601f16801561c44b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161c46557fe5b049050809150509392505050565b600061c4a161c49c61c485858561c67f565b61c48e8761c5d4565b61b90290919063ffffffff16565b61c65e565b90509392505050565b61c4b261ca38565b604051806020016040528069d3c21bcecceda10000008085600001518161c4d557fe5b04028152509050919050565b61c4e961ca38565b604051806020016040528069d3c21bcecceda10000008085600001518161c50c57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b61c53361ca38565b600082600001518460000151019050836000015181101561c5bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b61c5dc61ca38565b61c5e461c885565b82111561c63c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061cf496036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b600069d3c21bcecceda100000082600001518161c67757fe5b049050919050565b61c68761ca38565b61c68f61ca38565b61c6988461c5d4565b905061c6a261ca38565b61c6ab8461c5d4565b905061c6b7828261c8a4565b9250505092915050565b61c6c961ca38565b600061c705836003016002015461c6f78560030160010154866003016000015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b905061c71581846008015461c67f565b915050919050565b61c72561ca38565b81600001518360000151101561c7a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f737562737472616374696f6e20756e646572666c6f772064657465637465640081525060200191505060405180910390fd5b60405180602001604052808360000151856000015103815250905092915050565b60008160000151836000015110905092915050565b600080600084111561c8615761c7ee8661c9ed565b61c860576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e76616c696420636f6e74726163742061646472657373000000000000000081525060200191505060405180910390fd5b5b6040516020840160008287838a8c6187965a03f19250505080915050949350505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b61c8ac61ca38565b60008260000151141561c927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda1000000828161c95457fe5b041461c9c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808460000151838161c9e057fe5b0481525091505092915050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561ca2f57506000801b8214155b92505050919050565b6040518060200160405280600081525090565b81548183558181111561ca725781836000526020600020918201910161ca71919061cc17565b5b505050565b604051806040016040528060008152602001600081525090565b508054600082556003029060005260206000209081019061cab2919061cc3c565b50565b50805460018160011615610100020316600290046000825580601f1061cadb575061cafa565b601f01602090049060005260206000209081019061caf9919061cc17565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061cb3e57805160ff191683800117855561cb6c565b8280016001018555821561cb6c579182015b8281111561cb6b57825182559160200191906001019061cb50565b5b50905061cb79919061cc17565b5090565b604051806101000160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200161cbbc61cc9a565b81526020016060815260200160001515815260200160008152602001606081525090565b604051806060016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b61cc3991905b8082111561cc3557600081600090555060010161cc1d565b5090565b90565b61cc9791905b8082111561cc93576000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560028201600061cc8a919061ccbb565b5060030161cc42565b5090565b90565b60405180606001604052806000815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f1061cce1575061cd00565b601f01602090049060005260206000209081019061ccff919061cc17565b5b5056fe686f74666978206d75737420626520707265706172656420666f7220746869732065706f63685175657565457870697279206d757374206265206c6172676572207468616e20306572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c6550617274696369706174696f6e20626173656c696e652067726561746572207468616e206f6e654e756d626572206f662070726f706f73616c73206d757374206265206c6172676572207468616e207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734465736372697074696f6e2075726c206d7573742068617665206e6f6e2d7a65726f206c656e677468426173656c696e652071756f72756d20666163746f722067726561746572207468616e206f6e655468726573686f6c642068617320746f2062652067726561746572207468616e206d616a6f7269747920616e64206e6f742067726561746572207468616e20756e616e696d69747950617274696369706174696f6e20626173656c696e6520666c6f6f7220756e6368616e676564416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564426173656c696e652075706461746520666163746f722067726561746572207468616e206f6e656572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e65774669786564282963616e6e6f74207570766f746520612070726f706f73616c206e6f7420696e207468652071756575656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c6550726f706f73616c206e6f7420696e20657865637574696f6e207374616765206f72206e6f742070617373696e67646571756575654672657175656e6379206d757374206265206c6172676572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77686f74666978206e6f742077686974656c69737465642062792032662b312076616c696461746f727363616e6e6f74207570766f746520776974686f7574206c6f636b696e6720676f6c646572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c65686f7466697820616c726561647920707265706172656420666f7220746869732065706f63686572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c6550617274696369706174696f6e20666c6f6f722067726561746572207468616e206f6e656572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c6563616e6e6f74207570766f7465206d6f7265207468616e206f6e65207175657565642070726f706f73616c566f74657220646f65736e2774206861766520656e6f756768206c6f636b65642043656c6f2028666f726d65726c79206b6e6f776e2061732043656c6f20476f6c64296572726f722063616c6c696e67206861736848656164657220707265636f6d70696c6550726f766964656420696e6465782067726561746572207468616e2064657175657565206c656e6774682ea265627a7a72315820f26992a3c6f7f433a05fcbc7b6064c59c4025dafee70c37f843f88e8d2be6c7164736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x6080604052600436106104f75760003560e01c80637910867b1161028c578063b15f0f581161015a578063cea69e74116100cc578063e50e652d11610085578063e50e652d1461281e578063ec6830721461286d578063ed385274146128f5578063f2fde38b14612979578063f3f6da2c146129ca578063fae8db0a14612a25576104f7565b8063cea69e74146124a9578063cf48eb94146124e4578063d704f0c514612673578063da35c6641461276b578063df4da46114612796578063e41db455146127c1576104f7565b8063c134b2fc1161011e578063c134b2fc1461220e578063c73a6d7814612261578063c7f758a8146122b4578063c805956d146123c2578063c8d8d2b514612402578063cd845a761461243d576104f7565b8063b15f0f5814611f70578063b8f7700514611fab578063bab0808914611fd6578063bbb2eab914612179578063c0aee5f4146121e3576104f7565b806397b9eba6116101fe578063aa2feb83116101b7578063aa2feb8314611d39578063ad78c10914611d88578063add004df14611db3578063af108a0e14611e02578063af20311014611e5f578063b0f9984214611f35576104f7565b806397b9eba614611b5657806398f4270214611be45780639a7b3be714611c335780639b2b592f14611c5e5780639cb02dfc14611cad578063a91ee0dc14611ce8576104f7565b80638a883626116102505780638a8836261461195f5780638da5cb5b14611a3b5780638e905ed614611a925780638f32d59b14611abd5780638fcc9cfb14611aec5780639381ab2514611b27576104f7565b80637910867b146118005780637b103999146118535780638018556e146118aa57806381d4728d146118e557806387ee8a0f14611934576104f7565b80633fa5fed0116103c95780635f115a851161033b57806367960e91116102f457806367960e91146115f85780636de8a63b146116d45780636f2ab69314611740578063715018a6146117935780637385e5da146117aa57806377d26a2a146117d5576104f7565b80635f115a85146112175780635f8dd649146112a957806360b4d34d1461131257806365bbdaa0146113775780636643ac58146115585780636654716314611593576104f7565b80635601eaea1161038d5780635601eaea14610fd95780635733397814611036578063582ae53b1461109d5780635c759394146110fa5780635d180adb146111355780635d35a3d9146111ba576104f7565b80633fa5fed014610dba57806341b3d18514610e2d57806345a7849914610e585780634b2c2f4414610ebd57806354255be014610f99576104f7565b806323f0ab651161046d5780633156560e116104265780633156560e14610c46578063344944cf14610c975780633b1eb4bf14610cea5780633bb0ed2b14610d395780633ccfd60b14610d505780633db9dd9a14610d7f576104f7565b806323f0ab65146109165780632762132114610aad578063283aaefb14610b005780632c05235514610b655780632edfd12e14610ba057806330a095d014610c1b576104f7565b8063123633ea116104bf578063123633ea1461072a5780631374b22d146107a5578063141a8dd8146107f8578063152b48341461084f578063158ef93e146108ac5780631c65bc61146108db576104f7565b806301fce27e1461057257806304acaec9146106265780630e0b78ae146106615780630f717e42146106c65780631201a0fb146106ff575b60008036905014610570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f756e6b6e6f776e206d6574686f6400000000000000000000000000000000000081525060200191505060405180910390fd5b005b34801561057e57600080fd5b50610587612a74565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156105ce5780820151818401526020810190506105b3565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156106105780820151818401526020810190506105f5565b5050505090500194505050505060405180910390f35b34801561063257600080fd5b5061065f6004803603602081101561064957600080fd5b8101908080359060200190929190505050612c39565b005b34801561066d57600080fd5b5061069a6004803603602081101561068457600080fd5b8101908080359060200190929190505050612e11565b604051808415151515815260200183151515158152602001828152602001935050505060405180910390f35b3480156106d257600080fd5b506106db612e82565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561070b57600080fd5b50610714612e9a565b6040518082815260200191505060405180910390f35b34801561073657600080fd5b506107636004803603602081101561074d57600080fd5b8101908080359060200190929190505050612ea0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107b157600080fd5b506107de600480360360208110156107c857600080fd5b8101908080359060200190929190505050612ff1565b604051808215151515815260200191505060405180910390f35b34801561080457600080fd5b5061080d613015565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561085b57600080fd5b506108926004803603604081101561087257600080fd5b81019080803590602001909291908035906020019092919050505061303b565b604051808215151515815260200191505060405180910390f35b3480156108b857600080fd5b506108c1613062565b604051808215151515815260200191505060405180910390f35b3480156108e757600080fd5b50610914600480360360208110156108fe57600080fd5b8101908080359060200190929190505050613075565b005b34801561092257600080fd5b50610a936004803603606081101561093957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561097657600080fd5b82018360208201111561098857600080fd5b803590602001918460018302840111640100000000831117156109aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a0d57600080fd5b820183602082011115610a1f57600080fd5b80359060200191846001830284011164010000000083111715610a4157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613230565b604051808215151515815260200191505060405180910390f35b348015610ab957600080fd5b50610ae660048036036020811015610ad057600080fd5b81019080803590602001909291905050506133e9565b604051808215151515815260200191505060405180910390f35b348015610b0c57600080fd5b50610b4f60048036036020811015610b2357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061340d565b6040518082815260200191505060405180910390f35b348015610b7157600080fd5b50610b9e60048036036020811015610b8857600080fd5b8101908080359060200190929190505050613459565b005b348015610bac57600080fd5b50610c01600480360360a0811015610bc357600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506135e6565b604051808215151515815260200191505060405180910390f35b348015610c2757600080fd5b50610c30613958565b6040518082815260200191505060405180910390f35b348015610c5257600080fd5b50610c9560048036036020811015610c6957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613965565b005b348015610ca357600080fd5b50610cd060048036036020811015610cba57600080fd5b8101908080359060200190929190505050613bcd565b604051808215151515815260200191505060405180910390f35b348015610cf657600080fd5b50610d2360048036036020811015610d0d57600080fd5b8101908080359060200190929190505050613be9565b6040518082815260200191505060405180910390f35b348015610d4557600080fd5b50610d4e613c03565b005b348015610d5c57600080fd5b50610d65614002565b604051808215151515815260200191505060405180910390f35b348015610d8b57600080fd5b50610db860048036036020811015610da257600080fd5b810190808035906020019092919050505061423a565b005b348015610dc657600080fd5b50610e1360048036036040811015610ddd57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614412565b604051808215151515815260200191505060405180910390f35b348015610e3957600080fd5b50610e4261447d565b6040518082815260200191505060405180910390f35b348015610e6457600080fd5b50610e9160048036036020811015610e7b57600080fd5b8101908080359060200190929190505050614483565b604051808415151515815260200183151515158152602001828152602001935050505060405180910390f35b348015610ec957600080fd5b50610f8360048036036020811015610ee057600080fd5b8101908080359060200190640100000000811115610efd57600080fd5b820183602082011115610f0f57600080fd5b80359060200191846001830284011164010000000083111715610f3157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506144c7565b6040518082815260200191505060405180910390f35b348015610fa557600080fd5b50610fae61465b565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b348015610fe557600080fd5b5061101c60048036036040811015610ffc57600080fd5b810190808035906020019092919080359060200190929190505050614683565b604051808215151515815260200191505060405180910390f35b34801561104257600080fd5b506110836004803603606081101561105957600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506148e9565b604051808215151515815260200191505060405180910390f35b3480156110a957600080fd5b506110d6600480360360208110156110c057600080fd5b8101908080359060200190929190505050614f7e565b604051808260058111156110e657fe5b60ff16815260200191505060405180910390f35b34801561110657600080fd5b506111336004803603602081101561111d57600080fd5b810190808035906020019092919050505061500f565b005b34801561114157600080fd5b506111786004803603604081101561115857600080fd5b8101908080359060200190929190803590602001909291905050506151e7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156111c657600080fd5b506111fd600480360360408110156111dd57600080fd5b810190808035906020019092919080359060200190929190505050615339565b604051808215151515815260200191505060405180910390f35b34801561122357600080fd5b506112706004803603604081101561123a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061563f565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b3480156112b557600080fd5b506112f8600480360360208110156112cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506156ec565b604051808215151515815260200191505060405180910390f35b34801561131e57600080fd5b506113616004803603602081101561133557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506157bd565b6040518082815260200191505060405180910390f35b611542600480360360a081101561138d57600080fd5b81019080803590602001906401000000008111156113aa57600080fd5b8201836020820111156113bc57600080fd5b803590602001918460208302840111640100000000831117156113de57600080fd5b9091929391929390803590602001906401000000008111156113ff57600080fd5b82018360208201111561141157600080fd5b8035906020019184602083028401116401000000008311171561143357600080fd5b90919293919293908035906020019064010000000081111561145457600080fd5b82018360208201111561146657600080fd5b8035906020019184600183028401116401000000008311171561148857600080fd5b9091929391929390803590602001906401000000008111156114a957600080fd5b8201836020820111156114bb57600080fd5b803590602001918460208302840111640100000000831117156114dd57600080fd5b9091929391929390803590602001906401000000008111156114fe57600080fd5b82018360208201111561151057600080fd5b8035906020019184600183028401116401000000008311171561153257600080fd5b90919293919293905050506157d5565b6040518082815260200191505060405180910390f35b34801561156457600080fd5b506115916004803603602081101561157b57600080fd5b8101908080359060200190929190505050615b51565b005b34801561159f57600080fd5b506115e2600480360360208110156115b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615d01565b6040518082815260200191505060405180910390f35b34801561160457600080fd5b506116be6004803603602081101561161b57600080fd5b810190808035906020019064010000000081111561163857600080fd5b82018360208201111561164a57600080fd5b8035906020019184600183028401116401000000008311171561166c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050615f7f565b6040518082815260200191505060405180910390f35b3480156116e057600080fd5b506116e9616113565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561172c578082015181840152602081019050611711565b505050509050019250505060405180910390f35b34801561174c57600080fd5b506117796004803603602081101561176357600080fd5b810190808035906020019092919050505061616b565b604051808215151515815260200191505060405180910390f35b34801561179f57600080fd5b506117a861619d565b005b3480156117b657600080fd5b506117bf6162d6565b6040518082815260200191505060405180910390f35b3480156117e157600080fd5b506117ea6162e6565b6040518082815260200191505060405180910390f35b34801561180c57600080fd5b506118396004803603602081101561182357600080fd5b81019080803590602001909291905050506162ec565b604051808215151515815260200191505060405180910390f35b34801561185f57600080fd5b50611868616310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156118b657600080fd5b506118e3600480360360208110156118cd57600080fd5b8101908080359060200190929190505050616336565b005b3480156118f157600080fd5b5061191e6004803603602081101561190857600080fd5b81019080803590602001909291905050506164c3565b6040518082815260200191505060405180910390f35b34801561194057600080fd5b50611949616619565b6040518082815260200191505060405180910390f35b34801561196b57600080fd5b50611a256004803603602081101561198257600080fd5b810190808035906020019064010000000081111561199f57600080fd5b8201836020820111156119b157600080fd5b803590602001918460018302840111640100000000831117156119d357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050616760565b6040518082815260200191505060405180910390f35b348015611a4757600080fd5b50611a506168f4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015611a9e57600080fd5b50611aa761691d565b6040518082815260200191505060405180910390f35b348015611ac957600080fd5b50611ad2616923565b604051808215151515815260200191505060405180910390f35b348015611af857600080fd5b50611b2560048036036020811015611b0f57600080fd5b8101908080359060200190929190505050616981565b005b348015611b3357600080fd5b50611b3c616b2b565b604051808215151515815260200191505060405180910390f35b348015611b6257600080fd5b50611bce60048036036040811015611b7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050617216565b6040518082815260200191505060405180910390f35b348015611bf057600080fd5b50611c1d60048036036020811015611c0757600080fd5b8101908080359060200190929190505050617232565b6040518082815260200191505060405180910390f35b348015611c3f57600080fd5b50611c4861734b565b6040518082815260200191505060405180910390f35b348015611c6a57600080fd5b50611c9760048036036020811015611c8157600080fd5b810190808035906020019092919050505061735b565b6040518082815260200191505060405180910390f35b348015611cb957600080fd5b50611ce660048036036020811015611cd057600080fd5b81019080803590602001909291905050506174a4565b005b348015611cf457600080fd5b50611d3760048036036020811015611d0b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050617662565b005b348015611d4557600080fd5b50611d7260048036036020811015611d5c57600080fd5b8101908080359060200190929190505050617806565b6040518082815260200191505060405180910390f35b348015611d9457600080fd5b50611d9d617827565b6040518082815260200191505060405180910390f35b348015611dbf57600080fd5b50611dec60048036036020811015611dd657600080fd5b8101908080359060200190929190505050617834565b6040518082815260200191505060405180910390f35b348015611e0e57600080fd5b50611e4560048036036040811015611e2557600080fd5b810190808035906020019092919080359060200190929190505050617855565b604051808215151515815260200191505060405180910390f35b348015611e6b57600080fd5b50611f336004803603610180811015611e8357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050617ce8565b005b348015611f4157600080fd5b50611f6e60048036036020811015611f5857600080fd5b8101908080359060200190929190505050617e10565b005b348015611f7c57600080fd5b50611fa960048036036020811015611f9357600080fd5b8101908080359060200190929190505050617fcb565b005b348015611fb757600080fd5b50611fc0618137565b6040518082815260200191505060405180910390f35b348015611fe257600080fd5b50612163600480360360a0811015611ff957600080fd5b810190808035906020019064010000000081111561201657600080fd5b82018360208201111561202857600080fd5b8035906020019184602083028401116401000000008311171561204a57600080fd5b90919293919293908035906020019064010000000081111561206b57600080fd5b82018360208201111561207d57600080fd5b8035906020019184602083028401116401000000008311171561209f57600080fd5b9091929391929390803590602001906401000000008111156120c057600080fd5b8201836020820111156120d257600080fd5b803590602001918460018302840111640100000000831117156120f457600080fd5b90919293919293908035906020019064010000000081111561211557600080fd5b82018360208201111561212757600080fd5b8035906020019184602083028401116401000000008311171561214957600080fd5b909192939192939080359060200190929190505050618147565b6040518082815260200191505060405180910390f35b34801561218557600080fd5b506121c96004803603606081101561219c57600080fd5b810190808035906020019092919080359060200190929190803560ff169060200190929190505050618258565b604051808215151515815260200191505060405180910390f35b3480156121ef57600080fd5b506121f86186c0565b6040518082815260200191505060405180910390f35b34801561221a57600080fd5b506122476004803603602081101561223157600080fd5b81019080803590602001909291905050506186c6565b604051808215151515815260200191505060405180910390f35b34801561226d57600080fd5b5061229a6004803603602081101561228457600080fd5b81019080803590602001909291905050506186ea565b604051808215151515815260200191505060405180910390f35b3480156122c057600080fd5b506122ed600480360360208110156122d757600080fd5b8101908080359060200190929190505050618788565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018060200184815260200183151515158152602001828103825285818151815260200191508051906020019080838360005b83811015612381578082015181840152602081019050612366565b50505050905090810190601f1680156123ae5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b3480156123ce57600080fd5b506123d7618863565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34801561240e57600080fd5b5061243b6004803603602081101561242557600080fd5b81019080803590602001909291905050506188ff565b005b34801561244957600080fd5b5061248c6004803603602081101561246057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050618a8c565b604051808381526020018281526020019250505060405180910390f35b3480156124b557600080fd5b506124e2600480360360208110156124cc57600080fd5b8101908080359060200190929190505050618b0e565b005b3480156124f057600080fd5b50612671600480360360a081101561250757600080fd5b810190808035906020019064010000000081111561252457600080fd5b82018360208201111561253657600080fd5b8035906020019184602083028401116401000000008311171561255857600080fd5b90919293919293908035906020019064010000000081111561257957600080fd5b82018360208201111561258b57600080fd5b803590602001918460208302840111640100000000831117156125ad57600080fd5b9091929391929390803590602001906401000000008111156125ce57600080fd5b8201836020820111156125e057600080fd5b8035906020019184600183028401116401000000008311171561260257600080fd5b90919293919293908035906020019064010000000081111561262357600080fd5b82018360208201111561263557600080fd5b8035906020019184602083028401116401000000008311171561265757600080fd5b909192939192939080359060200190929190505050618cbe565b005b34801561267f57600080fd5b506126b66004803603604081101561269657600080fd5b8101908080359060200190929190803590602001909291905050506190a5565b604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561272e578082015181840152602081019050612713565b50505050905090810190601f16801561275b5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561277757600080fd5b5061278061922f565b6040518082815260200191505060405180910390f35b3480156127a257600080fd5b506127ab619235565b6040518082815260200191505060405180910390f35b3480156127cd57600080fd5b506127fa600480360360208110156127e457600080fd5b8101908080359060200190929190505050619371565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561282a57600080fd5b506128576004803603602081101561284157600080fd5b810190808035906020019092919050505061939e565b6040518082815260200191505060405180910390f35b34801561287957600080fd5b506128d8600480360360c081101561289057600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506193e9565b604051808381526020018281526020019250505060405180910390f35b34801561290157600080fd5b506129776004803603606081101561291857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803590602001909291905050506195fd565b005b34801561298557600080fd5b506129c86004803603602081101561299c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061993a565b005b3480156129d657600080fd5b50612a23600480360360408110156129ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506199c0565b005b348015612a3157600080fd5b50612a5e60048036036020811015612a4857600080fd5b8101908080359060200190929190505050619a76565b6040518082815260200191505060405180910390f35b606080601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef6369b317e390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015612ac957600080fd5b505af4158015612add573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506040811015612b0757600080fd5b8101908080516040519392919084640100000000821115612b2757600080fd5b83820191506020820185811115612b3d57600080fd5b8251866020820283011164010000000082111715612b5a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612b91578082015181840152602081019050612b76565b5050505090500160405260200180516040519392919084640100000000821115612bba57600080fd5b83820191506020820185811115612bd057600080fd5b8251866020820283011164010000000082111715612bed57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612c24578082015181840152602081019050612c09565b50505050905001604052505050915091509091565b612c41616923565b612cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b612cbb61ca38565b612cc482619bbf565b9050612ccf81619bdd565b612d24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ce1b6027913960400191505060405180910390fd5b612d50601960030160405180602001604052908160008201548152505082619bf790919063ffffffff16565b15612dc3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f426173656c696e652071756f72756d20666163746f7220756e6368616e67656481525060200191505060405180910390fd5b806019600301600082015181600001559050507fddfdbe55eaaa70fe2b8bc82a9b0734c25cabe7cb6f1457f9644019f0b5ff91fc826040518082815260200191505060405180910390a15050565b60008060006011600085815260200190815260200160002060000160019054906101000a900460ff166011600086815260200190815260200160002060000160009054906101000a900460ff1660116000878152602001908152602001600020600101549250925092509193909250565b60038060000154908060010154908060020154905083565b600a5481565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310612f195780518252602082019150602081019050602083039250612ef6565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612f79576040519150601f19603f3d011682016040523d82523d6000602084013e612f7e565b606091505b50809350819250505080612fdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061cfa8603d913960400191505060405180910390fd5b612fe8826000619c0c565b92505050919050565b600061300e600f6000848152602001908152602001600020619c23565b9050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061305a600f60008581526020019081526020016000208484619c33565b905092915050565b600060149054906101000a900460ff1681565b61307d616923565b6130ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6130f761ca38565b61310082619bbf565b905061310b81619bdd565b613160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061d1826024913960400191505060405180910390fd5b61318c601960010160405180602001604052908160008201548152505082619bf790919063ffffffff16565b156131e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061ce8a6026913960400191505060405180910390fd5b806019600101600082015181600001559050507f122a37b609e0f758b6a23c43506cb567017a4d18b21fa91312fb42b44975a5b5826040518082815260200191505060405180910390a15050565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b602083106132b95780518252602082019150602081019050602083039250613296565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061330a57805182526020820191506020810190506020830392506132e7565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b602083106133735780518252602082019150602081019050602083039250613350565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146133d3576040519150601f19603f3d011682016040523d82523d6000602084013e6133d8565b606091505b505080915050809150509392505050565b6000613406600f6000848152602001908152602001600020619cc6565b9050919050565b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b613461616923565b6134d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600081141561352d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061cd2a6021913960400191505060405180910390fd5b6006548114156135a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f517565756545787069727920756e6368616e676564000000000000000000000081525060200191505060405180910390fd5b806006819055507f4ecbf0bb0701615e2d6f9b0a0996056c959fe359ce76aa7ce06c5f1d57dae4d7816040518082815260200191505060405180910390a150565b60006001806000828254019250508190555060006001549050613607613c03565b6000806136148989619ee6565b9150915061362182619c23565b613630576000935050506138d7565b6003600581111561363d57fe5b81600581111561364957fe5b146136bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e636f72726563742070726f706f73616c207374617465000000000000000081525060200191505060405180910390fd5b60006136c6619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561374257600080fd5b505afa158015613756573d6000803e3d6000fd5b505050506040513d602081101561376c57600080fd5b81019080805190602001909291905050509050600061378961a0bd565b73ffffffffffffffffffffffffffffffffffffffff166361d5c570836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561380557600080fd5b505afa158015613819573d6000803e3d6000fd5b505050506040513d602081101561382f57600080fd5b81019080805190602001909291905050509050613867876138598a8c61a1b890919063ffffffff16565b61a1b890919063ffffffff16565b8110156138bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604381526020018061d22e6043913960600191505060405180910390fd5b6138ce848c8c858d8d8d61a240565b60019550505050505b600154811461394e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5095945050505050565b6000600360020154905090565b61396d616923565b6139df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f417070726f7665722063616e6e6f74206265203000000000000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613b46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f417070726f76657220756e6368616e676564000000000000000000000000000081525060200191505060405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fa03757d836cb0b61c0fbba2147f5d51d6071ff3dd5bf6963beb55563d64878e160405160405180910390a250565b6000613bd76162d6565b613be0836164c3565b10159050919050565b6000613bfc82613bf7619235565b61a71f565b9050919050565b613c1a60075460095461a1b890919063ffffffff16565b4210614000576000613c36600a5460126000016002015461a767565b90506060601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef6377b024799091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b158015613c9457600080fd5b505af4158015613ca8573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015613cd257600080fd5b8101908080516040519392919084640100000000821115613cf257600080fd5b83820191506020820185811115613d0857600080fd5b8251866020820283011164010000000082111715613d2557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613d5c578082015181840152602081019050613d41565b505050509050016040525050509050600080905060008090505b83811015613fed576000838281518110613d8c57fe5b602002602001015190506000600f60008381526020019081526020016000209050613db68161a780565b15613def57817f88e53c486703527139dfc8d97a1e559d9bd93d3f9d52cda4e06564111e7a264360405160405180910390a25050613fd2565b613e698160010154600d60008460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461a1b890919063ffffffff16565b600d60008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550428160020181905550600060188054905014613f66576000613f01600160188054905061a7a590919063ffffffff16565b905082601760188381548110613f1357fe5b906000526020600020015481548110613f2857fe5b906000526020600020018190555060188181548110613f4357fe5b906000526020600020016000905580601881613f5f919061ca4b565b5050613f93565b60178290806001815401808255809150509060018203906000526020600020016000909192909190915055505b817f3e069fb74dcf5fbc07740b0d40d7f7fc48e9c0ca5dc3d19eb34d2e05d74c5543426040518082815260200191505060405180910390a26001935050505b613fe660018261a1b890919063ffffffff16565b9050613d76565b508015613ffc57426009819055505b5050505b565b600060018060008282540192505081905550600060015490506000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156140d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e6f7468696e6720746f2077697468647261770000000000000000000000000081525060200191505060405180910390fd5b4781111561414c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e636f6e73697374656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506141ba813373ffffffffffffffffffffffffffffffffffffffff1661a7ef90919063ffffffff16565b60019250506001548114614236576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5090565b614242616923565b6142b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6142bc61ca38565b6142c582619bbf565b90506142d081619bdd565b614325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061cd796027913960400191505060405180910390fd5b614351601960000160405180602001604052908160008201548152505082619bf790919063ffffffff16565b156143c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f50617274696369706174696f6e20626173656c696e6520756e6368616e67656481525060200191505060405180910390fd5b806019600001600082015181600001559050507f51131d2820f04a6b6edd20e22a07d5bf847e265a3906e85256fca7d6043417c5826040518082815260200191505060405180910390a15050565b60006011600084815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600c5481565b60116020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16908060010154905083565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061451c57805182526020820191506020810190506020830392506144f9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106145835780518252602082019150602081019050602083039250614560565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146145e3576040519150601f19603f3d011682016040523d82523d6000602084013e6145e8565b606091505b50809350819250505080614647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061cf116038913960400191505060405180910390fd5b61465282600061a929565b92505050919050565b6000806000806001600460016000839350829250819150809050935093509350935090919293565b600060018060008282540192505081905550600060015490506146a4613c03565b6000806146b18686619ee6565b9150915060006146c083619c23565b90508015614865576146d18361a9ca565b614743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f50726f706f73616c206e6f7420617070726f766564000000000000000000000081525060200191505060405180910390fd5b6004600581111561475057fe5b82600581111561475c57fe5b14801561476e575061476d83619cc6565b5b6147c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061d050602e913960400191505060405180910390fd5b827338afc0dc55415ae27b81c24b5a5fbfe433ebfba863c67e7b4b90916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b15801561481457600080fd5b505af4158015614828573d6000803e3d6000fd5b50505050867f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f60405160405180910390a261486483888861a9e5565b5b80945050505060015481146148e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b6000600180600082825401925050819055506000600154905061490a613c03565b6149138561ab04565b156149215760009150614eff565b600061492b619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156149a757600080fd5b505afa1580156149bb573d6000803e3d6000fd5b505050506040513d60208110156149d157600080fd5b810190808051906020019092919050505090506000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050614a37816000016000015461ab04565b506000614a4261a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614abe57600080fd5b505afa158015614ad2573d6000803e3d6000fd5b505050506040513d6020811015614ae857600080fd5b8101908080519060200190929190505050905060008111614b54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061d0ee6022913960400191505060405180910390fd5b601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc5163890918a6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614bae57600080fd5b505af4158015614bc2573d6000803e3d6000fd5b505050506040513d6020811015614bd857600080fd5b8101908080519060200190929190505050614c3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061cf7f6029913960400191505060405180910390fd5b600082600001600001541480614ced5750601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc51638909184600001600001546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614cb057600080fd5b505af4158015614cc4573d6000803e3d6000fd5b505050506040513d6020811015614cda57600080fd5b8101908080519060200190929190505050155b614d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061d203602b913960400191505060405180910390fd5b6000614deb82601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef637577759990918d6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614da257600080fd5b505af4158015614db6573d6000803e3d6000fd5b505050506040513d6020811015614dcc57600080fd5b810190808051906020019092919050505061a1b890919063ffffffff16565b9050601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63239491ba90918b848c8c6040518663ffffffff1660e01b8152600401808681526020018581526020018481526020018381526020018281526020019550505050505060006040518083038186803b158015614e5f57600080fd5b505af4158015614e73573d6000803e3d6000fd5b5050505060405180604001604052808a8152602001838152508360000160008201518160000155602082015181600101559050508373ffffffffffffffffffffffffffffffffffffffff16897fd19965d25ef670a1e322fbf05475924b7b12d81fd6b96ab718b261782efb3d62846040518082815260200191505060405180910390a360019550505050505b6001548114614f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b509392505050565b600080821480614f8f5750600b5482115b15614f9d576000905061500a565b6000600f60008481526020019081526020016000209050614fbd836186ea565b15614fe157614fcb8161a780565b614fd6576001614fd9565b60055b91505061500a565b6000614fec8261abd7565b9050614ff8828261ac8e565b6150025780615005565b60055b925050505b919050565b615017616923565b615089576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61509161ca38565b61509a82619bbf565b90506150a581619bdd565b6150fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061ceea6027913960400191505060405180910390fd5b615126601960020160405180602001604052908160008201548152505082619bf790919063ffffffff16565b15615199576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f426173656c696e652075706461746520666163746f7220756e6368616e67656481525060200191505060405180910390fd5b806019600201600082015181600001559050507f8dedb4d995dd500718c7c5f6a077fba6153a7ee063da961d9fcab90ff528ac1f826040518082815260200191505060405180910390a15050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310615260578051825260208201915060208101905060208303925061523d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146152c0576040519150601f19603f3d011682016040523d82523d6000602084013e6152c5565b606091505b50809350819250505080615324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061d01a6036913960400191505060405180910390fd5b61532f826000619c0c565b9250505092915050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146153fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6d73672e73656e646572206e6f7420617070726f76657200000000000000000081525060200191505060405180910390fd5b615406613c03565b6000806154138585619ee6565b9150915061542082619c23565b61542f57600092505050615639565b6154388261a9ca565b156154ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f50726f706f73616c20616c726561647920617070726f7665640000000000000081525060200191505060405180910390fd5b600360058111156154b857fe5b8160058111156154c457fe5b14806154e65750600460058111156154d857fe5b8160058111156154e457fe5b145b615558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f50726f706f73616c206e6f7420696e20636f727265637420737461676500000081525060200191505060405180910390fd5b60018260070160006101000a81548160ff02191690831515021790555061557d61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b1580156155c257600080fd5b505afa1580156155d6573d6000803e3d6000fd5b505050506040513d60208110156155ec57600080fd5b81019080805190602001909291905050508260080181905550847f28ec9e38ba73636ceb2f6c1574136f83bd46284a3c74734b711bf45e12f8d92960405160405180910390a26001925050505b92915050565b6000806000806000806000601060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000898152602001908152602001600020905080600101548160000160009054906101000a900460ff1660038111156156c157fe5b8260020154836003015484600401548560050154965096509650965096509650509295509295509295565b600080601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160000154905060008082141580156157535750615752826186ea565b5b80156157655750615763826186c6565b155b90506000600f600085600201548152602001908152602001600020905060006003600581111561579157fe5b61579a8361abd7565b60058111156157a557fe5b14905082806157b15750805b95505050505050919050565b600d6020528060005260406000206000915090505481565b60006157df613c03565b600c54341015615857576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f546f6f20736d616c6c206465706f73697400000000000000000000000000000081525060200191505060405180910390fd5b61586d6001600b5461a1b890919063ffffffff16565b600b819055506000600f6000600b5481526020019081526020016000209050807338afc0dc55415ae27b81c24b5a5fbfe433ebfba8633053123f90918e8e8e8e8e8e8e8e33346040518c63ffffffff1660e01b8152600401808c8152602001806020018060200180602001806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185810385528f8f82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810384528d8d82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810383528b8b82818152602001925080828437600081840152601f19601f8201169050808301925050508581038252898982818152602001925060200280828437600081840152601f19601f8201169050808301925050509f5050505050505050505050505050505060006040518083038186803b1580156159f257600080fd5b505af4158015615a06573d6000803e3d6000fd5b50505050615a6184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508261ace590919063ffffffff16565b601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63d7a8acc19091600b546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b158015615abd57600080fd5b505af4158015615ad1573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff16600b547f1bfe527f3548d9258c2512b6689f0acfccdd0557d80a53845db25fc57e93d8fe8360060180549050344260405180848152602001838152602001828152602001935050505060405180910390a3600b549150509a9950505050505050505050565b615b59616923565b615bcb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811415615c42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4475726174696f6e206d757374206265206c6172676572207468616e2030000081525060200191505060405180910390fd5b600360020154811415615cbd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4475726174696f6e20756e6368616e676564000000000000000000000000000081525060200191505060405180910390fd5b806003600201819055507f7819c8059302d1d66abc7fe228ecc02214e0bc5c529956c13717aabefce937d8816040518082815260200191505060405180910390a150565b600080601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816000016000015490506000808214158015615d685750615d67826186ea565b5b8015615d7a5750615d78826186c6565b155b90508015615e51576000615d8c61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330ec70f5876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615e0857600080fd5b505afa158015615e1c573d6000803e3d6000fd5b505050506040513d6020811015615e3257600080fd5b8101908080519060200190929190505050905080945050505050615f7a565b600080905060008090505b601780549050811015615f7157600060178281548110615e7857fe5b906000526020600020015490506000600f60008381526020019081526020016000209050600060036005811115615eab57fe5b615eb48361abd7565b6005811115615ebf57fe5b14905080615ecf57505050615f56565b6000886003016000868152602001908152602001600020905083816001015414615efc5750505050615f56565b6000615f2f8260050154615f218460040154856003015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b9050615f4e8760008314615f435782615f49565b83600201545b61ad5d565b965050505050505b615f6a60018261a1b890919063ffffffff16565b9050615e5c565b50809450505050505b919050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310615fd45780518252602082019150602081019050602083039250615fb1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061603b5780518252602082019150602081019050602083039250616018565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461609b576040519150601f19603f3d011682016040523d82523d6000602084013e6160a0565b606091505b508093508192505050806160ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061d2716023913960400191505060405180910390fd5b61610a82600061a929565b92505050919050565b6060601780548060200260200160405190810160405280929190818152602001828054801561616157602002820191906000526020600020905b81548152602001906001019080831161614d575b5050505050905090565b600080600f60008481526020019081526020016000209050616195816161908361abd7565b61ac8e565b915050919050565b6161a5616923565b616217576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006162e14361939e565b905090565b60075481565b6000616309600f600084815260200190815260200160002061a9ca565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61633e616923565b6163b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600081141561640a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061d07e6026913960400191505060405180910390fd5b600754811415616482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f646571756575654672657175656e637920756e6368616e67656400000000000081525060200191505060405180910390fd5b806007819055507f391e82aae76c653cd640ad1b6028e2ee39ca4f29b30152e3d0a9ddd7e1169c34816040518082815260200191505060405180910390a150565b6000806000905060006164d4616619565b905060006164e0619fc2565b905060008090505b8281101561660d5760006164fb82612ea0565b905060008373ffffffffffffffffffffffffffffffffffffffff166393c5c487836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561657c57600080fd5b505afa158015616590573d6000803e3d6000fd5b505050506040513d60208110156165a657600080fd5b810190808051906020019092919050505090506165c38883614412565b806165d457506165d38882614412565b5b156165f0576165ed60018761a1b890919063ffffffff16565b95505b505061660660018261a1b890919063ffffffff16565b90506164e8565b50829350505050919050565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061668a5780518252602082019150602081019050602083039250616667565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146166ea576040519150601f19603f3d011682016040523d82523d6000602084013e6166ef565b606091505b5080935081925050508061674e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061cfe56035913960400191505060405180910390fd5b616759826000619c0c565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b602083106167b55780518252602082019150602081019050602083039250616792565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061681c57805182526020820191506020810190506020830392506167f9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461687c576040519150601f19603f3d011682016040523d82523d6000602084013e616881565b606091505b508093508192505050806168e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061d1d26031913960400191505060405180910390fd5b6168eb826000619c0c565b92505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661696561ad77565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b616989616923565b6169fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811415616a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f6d696e4465706f736974206d757374206265206c6172676572207468616e203081525060200191505060405180910390fd5b600c54811415616aea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4d696e696d756d206465706f73697420756e6368616e6765640000000000000081525060200191505060405180910390fd5b80600c819055507fc50a7f0bdf88c216b2541b0bdea26f22305460e39ffc672ec1a7501732c5ba81816040518082815260200191505060405180910390a150565b600060018060008282540192505081905550600060015490506000616b4e619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015616bca57600080fd5b505afa158015616bde573d6000803e3d6000fd5b505050506040513d6020811015616bf457600080fd5b810190808051906020019092919050505090506000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b60178054905081101561718a576000826003016000838152602001908152602001600020905060178281548110616c8357fe5b90600052602060002001548160010154148015616cd5575060008160030154141580616cb457506000816004015414155b80616cc457506000816005015414155b80616cd457506000816002015414155b5b1561716e57600080616ceb836001015485619ee6565b9150915060036005811115616cfc57fe5b816005811115616d0857fe5b1415617117576000836002015414616f6f576000600380811115616d2857fe5b8460000160009054906101000a900460ff166003811115616d4557fe5b14616d51576000616d57565b83600201545b9050600060026003811115616d6857fe5b8560000160009054906101000a900460ff166003811115616d8557fe5b14616d91576000616d97565b84600201545b9050600060016003811115616da857fe5b8660000160009054906101000a900460ff166003811115616dc557fe5b14616dd1576000616dd7565b85600201545b9050847338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909185858560008060006040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b158015616e5c57600080fd5b505af4158015616e70573d6000803e3d6000fd5b50505050616e7c61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b158015616ec157600080fd5b505afa158015616ed5573d6000803e3d6000fd5b505050506040513d6020811015616eeb57600080fd5b810190808051906020019092919050505085600801819055508873ffffffffffffffffffffffffffffffffffffffff1686600101547f6791653c96b4863b3768c664e9a03e1094ae334ba9d35862627ceeebd1abcc1f85858560405180848152602001838152602001828152602001935050505060405180910390a3505050617116565b817338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909185600301548660040154876005015460008060006040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b158015616ffe57600080fd5b505af4158015617012573d6000803e3d6000fd5b5050505061701e61a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b15801561706357600080fd5b505afa158015617077573d6000803e3d6000fd5b505050506040513d602081101561708d57600080fd5b810190808051906020019092919050505082600801819055508573ffffffffffffffffffffffffffffffffffffffff1683600101547f6791653c96b4863b3768c664e9a03e1094ae334ba9d35862627ceeebd1abcc1f85600301548660040154876005015460405180848152602001838152602001828152602001935050505060405180910390a35b5b846003016000858152602001908152602001600020600080820160006101000a81549060ff021916905560018201600090556002820160009055600382016000905560048201600090556005820160009055505050505b5061718360018261a1b890919063ffffffff16565b9050616c50565b50600081600201819055506001935050506001548114617212576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5090565b600061722a617225848461ad7f565b61afd1565b905092915050565b600061723d826186ea565b6172af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f50726f706f73616c206e6f74207175657565640000000000000000000000000081525060200191505060405180910390fd5b601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63757775999091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561730957600080fd5b505af415801561731d573d6000803e3d6000fd5b505050506040513d602081101561733357600080fd5b81019080805190602001909291905050509050919050565b600061735643613be9565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106173cc57805182526020820191506020810190506020830392506173a9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461742c576040519150601f19603f3d011682016040523d82523d6000602084013e617431565b606091505b50809350819250505080617490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061cd4b602e913960400191505060405180910390fd5b61749b826000619c0c565b92505050919050565b806011600082815260200190815260200160002060000160009054906101000a900460ff161561753c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b61754582613bcd565b61759a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061d0c56029913960400191505060405180910390fd5b60006175a461734b565b905080601160008581526020019081526020016000206001015410617614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061d1376026913960400191505060405180910390fd5b80601160008581526020019081526020016000206001018190555080837f6f184ec313435b3307a4fe59e2293381f08419a87214464c875a2a247e8af5e060405160405180910390a3505050565b61766a616923565b6176dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561777f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b6018818154811061781357fe5b906000526020600020016000915090505481565b6000600360010154905090565b6017818154811061784157fe5b906000526020600020016000915090505481565b60006001806000828254019250508190555060006001549050617876613c03565b6000617880619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156178fc57600080fd5b505afa158015617910573d6000803e3d6000fd5b505050506040513d602081101561792657600080fd5b810190808051906020019092919050505090506000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160000154905060008114156179ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4163636f756e7420686173206e6f20686973746f726963616c207570766f746581525060200191505060405180910390fd5b617a088161ab04565b50601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc516389091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015617a6357600080fd5b505af4158015617a77573d6000803e3d6000fd5b505050506040513d6020811015617a8d57600080fd5b810190808051906020019092919050505015617c3157601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63239491ba909183617b708660000160010154601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63757775999091896040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015617b2757600080fd5b505af4158015617b3b573d6000803e3d6000fd5b505050506040513d6020811015617b5157600080fd5b810190808051906020019092919050505061a7a590919063ffffffff16565b8b8b6040518663ffffffff1660e01b8152600401808681526020018581526020018481526020018381526020018281526020019550505050505060006040518083038186803b158015617bc257600080fd5b505af4158015617bd6573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff16817f7dc46237a819c9171a9c037ec98928e563892905c4d23373ca0f3f500f4ed11484600001600101546040518082815260200191505060405180910390a35b6040518060400160405280600081526020016000815250826000016000820151816000015560208201518160010155905050600194505050506001548114617ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5092915050565b600060149054906101000a900460ff1615617d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550617d8f3361afdf565b617d988c617662565b617da18b613965565b617daa8a6188ff565b617db389616981565b617dbc88613459565b617dc587616336565b617dce86618b0e565b617dd785615b51565b617de08461423a565b617de983613075565b617df28261500f565b617dfb81612c39565b42600981905550505050505050505050505050565b806011600082815260200190815260200160002060000160009054906101000a900460ff1615617ea8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614617f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6d73672e73656e646572206e6f7420617070726f76657200000000000000000081525060200191505060405180910390fd5b60016011600084815260200190815260200160002060000160016101000a81548160ff021916908315150217905550817f36bc158cba244a94dc9b8c08d327e8f7e3c2ab5f1925454c577527466f04851f60405160405180910390a25050565b806011600082815260200190815260200160002060000160009054906101000a900460ff1615618063576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b60016011600084815260200190815260200160002060020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550817ff6d22d0b43a6753880b8f9511b82b86cd0fe349cd580bbe6a25b6dc063ef496f33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25050565b6000601260000160020154905090565b6000898989898989898989604051602001808060200180602001806020018060200186815260200185810385528e8e82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810384528c8c82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810383528a8a82818152602001925080828437600081840152601f19601f8201169050808301925050508581038252888882818152602001925060200280828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506040516020818303038152906040528051906020012090509998505050505050505050565b60006001806000828254019250508190555060006001549050618279613c03565b6000806182868787619ee6565b9150915061829382619c23565b6182a257600093505050618641565b600360058111156182af57fe5b8160058111156182bb57fe5b1461832e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e636f72726563742070726f706f73616c207374617465000000000000000081525060200191505060405180910390fd5b6000600381111561833b57fe5b85600381111561834757fe5b14156183bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f566f74652076616c756520756e7365740000000000000000000000000000000081525060200191505060405180910390fd5b60006183c5619fc2565b73ffffffffffffffffffffffffffffffffffffffff16636642d594336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561844157600080fd5b505afa158015618455573d6000803e3d6000fd5b505050506040513d602081101561846b57600080fd5b81019080805190602001909291905050509050600061848861a0bd565b73ffffffffffffffffffffffffffffffffffffffff166361d5c570836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561850457600080fd5b505afa158015618518573d6000803e3d6000fd5b505050506040513d602081101561852e57600080fd5b8101908080519060200190929190505050905060008114156185b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f566f74657220776569676874207a65726f00000000000000000000000000000081525060200191505060405180910390fd5b618638848a8a856003808111156185cb57fe5b8c60038111156185d757fe5b146185e35760006185e5565b855b600260038111156185f257fe5b8d60038111156185fe57fe5b1461860a57600061860c565b865b6001600381111561861957fe5b8e600381111561862557fe5b14618631576000618633565b875b61a240565b60019550505050505b60015481146186b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b509392505050565b60095481565b60006186e3600f600084815260200190815260200160002061a780565b9050919050565b6000601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63bfc516389091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561874657600080fd5b505af415801561875a573d6000803e3d6000fd5b505050506040513d602081101561877057600080fd5b81019080805190602001909291905050509050919050565b60008060008060606000806187ae600f60008a815260200190815260200160002061b123565b828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156188435780601f1061881857610100808354040283529160200191618843565b820191906000526020600020905b81548152906001019060200180831161882657829003601f168201915b505050505092509650965096509650965096509650919395979092949650565b60008060008061888b601960000160405180602001604052908160008201548152505061afd1565b6188ad601960010160405180602001604052908160008201548152505061afd1565b6188cf601960020160405180602001604052908160008201548152505061afd1565b6188f1601960030160405180602001604052908160008201548152505061afd1565b935093509350935090919293565b618907616923565b618979576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008114156189d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061cda0602c913960400191505060405180910390fd5b600a54811415618a4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e756d626572206f662070726f706f73616c7320756e6368616e67656400000081525060200191505060405180910390fd5b80600a819055507f85399b9b2595eb13c392e1638ca77730156cd8d48d4733df4db068e4aa6b93a6816040518082815260200191505060405180910390a150565b600080618a9761ca77565b601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001604051806040016040529081600082015481526020016001820154815250509050806000015181602001519250925050915091565b618b16616923565b618b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811415618bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4475726174696f6e206d757374206265206c6172676572207468616e2030000081525060200191505060405180910390fd5b600360010154811415618c7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4475726174696f6e20756e6368616e676564000000000000000000000000000081525060200191505060405180910390fd5b806003600101819055507f90290eb9b27055e686a69fb810bada5381e544d07b8270021da2d355a6c96ed6816040518082815260200191505060405180910390a150565b6000898989898989898989604051602001808060200180602001806020018060200186815260200185810385528e8e82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810384528c8c82818152602001925060200280828437600081840152601f19601f82011690508083019250505085810383528a8a82818152602001925080828437600081840152601f19601f8201169050808301925050508581038252888882818152602001925060200280828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506040516020818303038152906040528051906020012090506000806000618dd084612e11565b9250925092508115618e4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f686f7466697820616c726561647920657865637574656400000000000000000081525060200191505060405180910390fd5b82618ebd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f686f74666978206e6f7420617070726f7665640000000000000000000000000081525060200191505060405180910390fd5b618ec561734b565b8114618f1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061cd046026913960400191505060405180910390fd5b61903a6190358e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505033600061b19c565b61b3c5565b60016011600086815260200190815260200160002060000160006101000a81548160ff021916908315150217905550837f708a7934acb657a77a617b1fcd5f6d7d9ad592b72934841bff01acefd10f9b6360405160405180910390a250505050505050505050505050565b6000806060600f60008681526020019081526020016000207338afc0dc55415ae27b81c24b5a5fbfe433ebfba863e6a5192f9091866040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b15801561911557600080fd5b505af4158015619129573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250606081101561915357600080fd5b8101908080519060200190929190805190602001909291908051604051939291908464010000000082111561918757600080fd5b8382019150602082018581111561919d57600080fd5b82518660018202830111640100000000821117156191ba57600080fd5b8083526020830192505050908051906020019080838360005b838110156191ee5780820151818401526020810190506191d3565b50505050905090810190601f16801561921b5780820380516001836020036101000a031916815260200191505b506040525050509250925092509250925092565b600b5481565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b6020831061929b5780518252602082019150602081019050602083039250619278565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146192fb576040519150601f19603f3d011682016040523d82523d6000602084013e619300565b606091505b5080935081925050508061935f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061d15d6025913960400191505060405180910390fd5b61936a826000619c0c565b9250505090565b6000806000619391600f600086815260200190815260200160002061b3d5565b9250925092509193909250565b60006193e260036193d460026193c660026193b88861735b565b61b3ff90919063ffffffff16565b61a1b890919063ffffffff16565b61b48590919063ffffffff16565b9050919050565b600080600087141580156193fe575060008514155b619470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061950a57805182526020820191506020810190506020830392506194e7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461956a576040519150601f19603f3d011682016040523d82523d6000602084013e61956f565b606091505b508092508193505050816195ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061d1106027913960400191505060405180910390fd5b6195d9816000619c0c565b93506195e6816020619c0c565b925083839550955050505050965096945050505050565b619605616923565b619677576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561971a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f44657374696e6174696f6e2063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6969e10de76676d080000081118015619742575061973e61973961b4cf565b61afd1565b8111155b619797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604881526020018061ce426048913960600191505060405180910390fd5b600060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561981f576197cb81619bbf565b600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082015181600001559050506198c7565b61982881619bbf565b600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600082015181600001559050505b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168373ffffffffffffffffffffffffffffffffffffffff167f60c5b4756af49d7b071b00dbf0f87af605cce11896ecd3b760d19f0f9d3fbcef836040518082815260200191505060405180910390a3505050565b619942616923565b6199b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6199bd8161afdf565b50565b6199c861a0bd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614619a68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f6d73672e73656e646572206e6f74206c6f636b6564476f6c640000000000000081525060200191505060405180910390fd5b619a72828261b4f5565b5050565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310619ae75780518252602082019150602081019050602083039250619ac4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114619b47576040519150601f19603f3d011682016040523d82523d6000602084013e619b4c565b606091505b50809350819250505080619bab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061d1a6602c913960400191505060405180910390fd5b619bb682600061a929565b92505050919050565b619bc761ca38565b6040518060200160405280838152509050919050565b6000619bf082619beb61b4cf565b61b8ec565b9050919050565b60008160000151836000015114905092915050565b6000619c18838361a929565b60001c905092915050565b6000808260020154119050919050565b60006017805490508210619c92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061d294602b913960400191505060405180910390fd5b619c9b84619c23565b8015619cbd57508260178381548110619cb057fe5b9060005260206000200154145b90509392505050565b6000619cd061ca38565b619d27619d186019600301604051806020016040529081600082015481525050601960000160405180602001604052908160008201548152505061b90290919063ffffffff16565b8461bd6190919063ffffffff16565b9050600083600601805490501415619d6a57619d4161ca38565b619d4c60008061ad7f565b9050619d61818361be5090919063ffffffff16565b92505050619ee1565b60008090505b8360060180549050811015619eda576000619e42856006018381548110619d9357fe5b90600052602060002090600302016002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015619e385780601f10619e0d57610100808354040283529160200191619e38565b820191906000526020600020905b815481529060010190602001808311619e1b57829003601f168201915b505050505061be65565b9050619e4c61ca38565b619e96866006018481548110619e5e57fe5b906000526020600020906003020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361ad7f565b9050619eab818561b8ec90919063ffffffff16565b15619ebd576000945050505050619ee1565b5050619ed360018261a1b890919063ffffffff16565b9050619d70565b5060019150505b919050565b6000806000600f60008681526020019081526020016000209050619f0b818686619c33565b619f7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f50726f706f73616c206e6f74206465717565756564000000000000000000000081525060200191505060405180910390fd5b6000619f888261abd7565b9050619f94828261ac8e565b15619fb257619fa482878761a9e5565b816005935093505050619fbb565b81819350935050505b9250929050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561a07d57600080fd5b505afa15801561a091573d6000803e3d6000fd5b505050506040513d602081101561a0a757600080fd5b8101908080519060200190929190505050905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4c6f636b6564476f6c6400000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561a17857600080fd5b505afa15801561a18c573d6000803e3d6000fd5b505050506040513d602081101561a1a257600080fd5b8101908080519060200190929190505050905090565b60008082840190508381101561a236576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600081600301600088815260200190815260200160002090508781600101541461a34757887338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909160008060008a8a8a6040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561a32a57600080fd5b505af415801561a33e573d6000803e3d6000fd5b5050505061a548565b600081600201541461a4a157887338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d909160038081111561a37c57fe5b8460000160009054906101000a900460ff16600381111561a39957fe5b1461a3a557600061a3ab565b83600201545b6002600381111561a3b857fe5b8560000160009054906101000a900460ff16600381111561a3d557fe5b1461a3e157600061a3e7565b84600201545b6001600381111561a3f457fe5b8660000160009054906101000a900460ff16600381111561a41157fe5b1461a41d57600061a423565b85600201545b8a8a8a6040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561a48457600080fd5b505af415801561a498573d6000803e3d6000fd5b5050505061a547565b887338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d90918360030154846004015485600501548a8a8a6040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561a52e57600080fd5b505af415801561a542573d6000803e3d6000fd5b505050505b5b61a55061a0bd565b73ffffffffffffffffffffffffffffffffffffffff166330a61d596040518163ffffffff1660e01b815260040160206040518083038186803b15801561a59557600080fd5b505afa15801561a5a9573d6000803e3d6000fd5b505050506040513d602081101561a5bf57600080fd5b810190808051906020019092919050505089600801819055506040518060c001604052806000600381111561a5f057fe5b8152602001898152602001600081526020018681526020018581526020018481525082600301600089815260200190815260200160002060008201518160000160006101000a81548160ff0219169083600381111561a64b57fe5b02179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050155905050600f600083600201548152602001908152602001600020600201548960020154111561a6b5578782600201819055505b8573ffffffffffffffffffffffffffffffffffffffff16887f683ebddc94b5b0a7dae3d1b6c168ad05684fcfd831b24ecb5ea9ecdf5524d02887878760405180848152602001838152602001828152602001935050505060405180910390a3505050505050505050565b60008082848161a72b57fe5b049050600083858161a73957fe5b06141561a749578091505061a761565b61a75d60018261a1b890919063ffffffff16565b9150505b92915050565b600081831061a776578161a778565b825b905092915050565b600061a79b600654836002015461a1b890919063ffffffff16565b4210159050919050565b600061a7e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061bfc2565b905092915050565b8047101561a865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461a8c5576040519150601f19603f3d011682016040523d82523d6000602084013e61a8ca565b606091505b505090508061a924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018061ceb0603a913960400191505060405180910390fd5b505050565b600061a93f60208361a1b890919063ffffffff16565b8351101561a9b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b60008160070160009054906101000a900460ff169050919050565b61a9ee8361a9ca565b801561a9ff57506000836008015414155b1561aa0e5761aa0d8361c082565b5b60006017828154811061aa1d57fe5b90600052602060002001819055506018819080600181540180825580915050906001820390600052602060002001600090919290919091505550600f6000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905560028201600090556003820160008082016000905560018201600090556002820160009055505060068201600061aad1919061ca91565b6007820160006101000a81549060ff0219169055600882016000905560098201600061aafd919061cab5565b5050505050565b600061ab0f826186ea565b801561ab20575061ab1f826186c6565b5b1561abcd57601273411b40a81a07fcd3542ce5b3d7e215178c4ca2ef63eed5f7be9091846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b15801561ab7f57600080fd5b505af415801561ab93573d6000803e3d6000fd5b50505050817f88e53c486703527139dfc8d97a1e559d9bd93d3f9d52cda4e06564111e7a264360405160405180910390a26001905061abd2565b600090505b919050565b60008061ac0d60036002015461abff600360010154866002015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b905080421015801561ac4957506000836006018054905014158061ac37575061ac358361a9ca565b155b8061ac48575061ac4683619cc6565b155b5b1561ac5857600591505061ac89565b61ac706003600201548261a7a590919063ffffffff16565b905080421061ac8357600491505061ac89565b60039150505b919050565b60006004600581111561ac9d57fe5b82600581111561aca957fe5b118061acdd57506003600581111561acbd57fe5b82600581111561acc957fe5b11801561acdc575061acda83619cc6565b155b5b905092915050565b60008151141561ad40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061cdf26029913960400191505060405180910390fd5b8082600901908051906020019061ad5892919061cafd565b505050565b60008183101561ad6d578161ad6f565b825b905092915050565b600033905090565b61ad8761ca38565b61ad8f61ca38565b61ada26969e10de76676d0800000619bbf565b9050600061ae54600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060405180602001604052908160008201548152505061afd1565b1461af0657600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020604051806020016040529081600082015481525050905061afc7565b600061af67600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160405180602001604052908160008201548152505061afd1565b1461afc657600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160405180602001604052908160008201548152505090505b5b8091505092915050565b600081600001519050919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561b065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061cdcc6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060008060008060008760000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886001015489600201548a600601805490508b6009018c600801548d60070160009054906101000a900460ff168292509650965096509650965096509650919395979092949650565b61b1a461cb7d565b8551875114801561b1b6575083518651145b61b228576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4172726179206c656e677468206d69736d61746368000000000000000000000081525060200191505060405180910390fd5b60008751905061b23661cb7d565b84816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050838160200181815250504281604001818152505060008090508260405190808252806020026020018201604052801561b2c157816020015b61b2ae61cbe0565b81526020019060019003908161b2a65790505b50826080018190525060008090505b8381101561b3b45760405180606001604052808c838151811061b2ef57fe5b602002602001015181526020018b838151811061b30857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16815260200161b353848b858151811061b33b57fe5b60200260200101518d61c2189092919063ffffffff16565b8152508360800151828151811061b36657fe5b602002602001018190525061b39788828151811061b38057fe5b60200260200101518361a1b890919063ffffffff16565b915061b3ad60018261a1b890919063ffffffff16565b905061b2d0565b508193505050509695505050505050565b61b3d2816080015161c2a4565b50565b60008060008360030160000154846003016001015485600301600201549250925092509193909250565b60008083141561b412576000905061b47f565b600082840290508284828161b42357fe5b041461b47a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061d0a46021913960400191505060405180910390fd5b809150505b92915050565b600061b4c783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061c3ad565b905092915050565b61b4d761ca38565b604051806020016040528069d3c21bcecceda1000000815250905090565b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008090505b60178054905081101561b8e65760006017828154811061b55a57fe5b906000526020600020015490506000600f6000838152602001908152602001600020905060006003600581111561b58d57fe5b61b5968361abd7565b600581111561b5a157fe5b1490508061b5b15750505061b8cb565b600085600301600086815260200190815260200160002090508381600101541461b63257856003016000868152602001908152602001600020600080820160006101000a81549060ff02191690556001820160009055600282016000905560038201600090556004820160009055600582016000905550505050505061b8cb565b600061b665826005015461b6578460040154856003015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b90508781111561b8c557600061b684898361a7a590919063ffffffff16565b9050600061b6978285600501548561c473565b9050600061b6aa8386600301548661c473565b9050600061b6bd8487600401548761c473565b9050600061b6e68261b6d8858761a1b890919063ffffffff16565b61a1b890919063ffffffff16565b9050600061b70184896003015461a7a590919063ffffffff16565b9050600061b71c848a6004015461a7a590919063ffffffff16565b9050600061b737878b6005015461a7a590919063ffffffff16565b90508784101561b7fc57600061b756858a61a7a590919063ffffffff16565b9050600061b764828661a767565b905061b779818661a7a590919063ffffffff16565b945061b78e818361a7a590919063ffffffff16565b91506000821461b7cf5761b7a2828561a767565b905061b7b7818561a7a590919063ffffffff16565b935061b7cc818361a7a590919063ffffffff16565b91505b6000821461b7f95761b7e1828461a767565b905061b7f6818461a7a590919063ffffffff16565b92505b50505b8b7338afc0dc55415ae27b81c24b5a5fbfe433ebfba863cd150a6d90918c600301548d600401548e600501548888886040518863ffffffff1660e01b81526004018088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038186803b15801561b88957600080fd5b505af415801561b89d573d6000803e3d6000fd5b50505050808a60050181905550828a60030181905550818a6004018190555050505050505050505b50505050505b61b8df60018261a1b890919063ffffffff16565b905061b53e565b50505050565b6000816000015183600001511115905092915050565b61b90a61ca38565b60008360000151148061b921575060008260000151145b1561b93d5760405180602001604052806000815250905061bd5b565b69d3c21bcecceda10000008260000151141561b95b5782905061bd5b565b69d3c21bcecceda10000008360000151141561b9795781905061bd5b565b600069d3c21bcecceda100000061b98f8561c4aa565b600001518161b99a57fe5b049050600061b9a88561c4e1565b600001519050600069d3c21bcecceda100000061b9c48661c4aa565b600001518161b9cf57fe5b049050600061b9dd8661c4e1565b600001519050600082850290506000851461ba71578285828161b9fc57fe5b041461ba70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda1000000820290506000821461bb135769d3c21bcecceda100000082828161ba9e57fe5b041461bb12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461bba4578486828161bb2f57fe5b041461bba3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600084880290506000881461bc32578488828161bbbd57fe5b041461bc31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b61bc3a61c51e565b878161bc4257fe5b04965061bc4d61c51e565b858161bc5557fe5b049450600085880290506000881461bce6578588828161bc7157fe5b041461bce5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b61bcee61ca38565b604051806020016040528087815250905061bd178160405180602001604052808781525061c52b565b905061bd318160405180602001604052808681525061c52b565b905061bd4b8160405180602001604052808581525061c52b565b9050809a50505050505050505050505b92915050565b61bd6961ca38565b600083600301600001549050600081141561bd905761bd88600061c5d4565b91505061be4a565b600084600301600101549050600061bdca866003016002015461bdbc848661a1b890919063ffffffff16565b61a1b890919063ffffffff16565b9050600061bdf561bdf061bde1896008015461c5d4565b8861b90290919063ffffffff16565b61c65e565b90508181111561be275761be2461be15838361a7a590919063ffffffff16565b8461a1b890919063ffffffff16565b92505b61be438461be3e858761a1b890919063ffffffff16565b61c67f565b9450505050505b92915050565b60008160000151836000015111905092915050565b600060188260038151811061be7657fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061bed357fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60088460018151811061bf3057fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061bf8b57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b600083831115829061c06f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561c03457808201518184015260208101905061c019565b50505050905090810190601f16801561c0615780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b61c08a61ca38565b61c0938261c6c1565b905061c09d61ca38565b61c0c960196002016040518060200160405290816000820154815250508361b90290919063ffffffff16565b905061c0d361ca38565b61c13161c109601960020160405180602001604052908160008201548152505061c0fb61b4cf565b61c71d90919063ffffffff16565b601960000160405180602001604052908160008201548152505061b90290919063ffffffff16565b905061c146818361c52b90919063ffffffff16565b60196000016000820151816000015590505061c19d6019600101604051806020016040529081600082015481525050601960000160405180602001604052908160008201548152505061c7c490919063ffffffff16565b1561c1ba5760196001016019600001600082015481600001559050505b7f51131d2820f04a6b6edd20e22a07d5bf847e265a3906e85256fca7d6043417c561c1fd601960000160405180602001604052908160008201548152505061afd1565b6040518082815260200191505060405180910390a150505050565b60608183018451101561c22a57600080fd5b606082156000811461c2475760405191506020820160405261c298565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561c285578051835260208301925060208101905061c268565b50868552601f19601f8301166040525050505b50809150509392505050565b60008090505b815181101561c3a95761c31c82828151811061c2c257fe5b60200260200101516020015183838151811061c2da57fe5b60200260200101516000015184848151811061c2f257fe5b6020026020010151604001515185858151811061c30b57fe5b60200260200101516040015161c7d9565b61c38e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f50726f706f73616c20657865637574696f6e206661696c65640000000000000081525060200191505060405180910390fd5b61c3a260018261a1b890919063ffffffff16565b905061c2aa565b5050565b6000808311829061c459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561c41e57808201518184015260208101905061c403565b50505050905090810190601f16801561c44b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161c46557fe5b049050809150509392505050565b600061c4a161c49c61c485858561c67f565b61c48e8761c5d4565b61b90290919063ffffffff16565b61c65e565b90509392505050565b61c4b261ca38565b604051806020016040528069d3c21bcecceda10000008085600001518161c4d557fe5b04028152509050919050565b61c4e961ca38565b604051806020016040528069d3c21bcecceda10000008085600001518161c50c57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b61c53361ca38565b600082600001518460000151019050836000015181101561c5bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b61c5dc61ca38565b61c5e461c885565b82111561c63c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061cf496036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b600069d3c21bcecceda100000082600001518161c67757fe5b049050919050565b61c68761ca38565b61c68f61ca38565b61c6988461c5d4565b905061c6a261ca38565b61c6ab8461c5d4565b905061c6b7828261c8a4565b9250505092915050565b61c6c961ca38565b600061c705836003016002015461c6f78560030160010154866003016000015461a1b890919063ffffffff16565b61a1b890919063ffffffff16565b905061c71581846008015461c67f565b915050919050565b61c72561ca38565b81600001518360000151101561c7a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f737562737472616374696f6e20756e646572666c6f772064657465637465640081525060200191505060405180910390fd5b60405180602001604052808360000151856000015103815250905092915050565b60008160000151836000015110905092915050565b600080600084111561c8615761c7ee8661c9ed565b61c860576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e76616c696420636f6e74726163742061646472657373000000000000000081525060200191505060405180910390fd5b5b6040516020840160008287838a8c6187965a03f19250505080915050949350505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b61c8ac61ca38565b60008260000151141561c927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda1000000828161c95457fe5b041461c9c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808460000151838161c9e057fe5b0481525091505092915050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561ca2f57506000801b8214155b92505050919050565b6040518060200160405280600081525090565b81548183558181111561ca725781836000526020600020918201910161ca71919061cc17565b5b505050565b604051806040016040528060008152602001600081525090565b508054600082556003029060005260206000209081019061cab2919061cc3c565b50565b50805460018160011615610100020316600290046000825580601f1061cadb575061cafa565b601f01602090049060005260206000209081019061caf9919061cc17565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061cb3e57805160ff191683800117855561cb6c565b8280016001018555821561cb6c579182015b8281111561cb6b57825182559160200191906001019061cb50565b5b50905061cb79919061cc17565b5090565b604051806101000160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200161cbbc61cc9a565b81526020016060815260200160001515815260200160008152602001606081525090565b604051806060016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b61cc3991905b8082111561cc3557600081600090555060010161cc1d565b5090565b90565b61cc9791905b8082111561cc93576000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560028201600061cc8a919061ccbb565b5060030161cc42565b5090565b90565b60405180606001604052806000815260200160008152602001600081525090565b50805460018160011615610100020316600290046000825580601f1061cce1575061cd00565b601f01602090049060005260206000209081019061ccff919061cc17565b5b5056fe686f74666978206d75737420626520707265706172656420666f7220746869732065706f63685175657565457870697279206d757374206265206c6172676572207468616e20306572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c6550617274696369706174696f6e20626173656c696e652067726561746572207468616e206f6e654e756d626572206f662070726f706f73616c73206d757374206265206c6172676572207468616e207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734465736372697074696f6e2075726c206d7573742068617665206e6f6e2d7a65726f206c656e677468426173656c696e652071756f72756d20666163746f722067726561746572207468616e206f6e655468726573686f6c642068617320746f2062652067726561746572207468616e206d616a6f7269747920616e64206e6f742067726561746572207468616e20756e616e696d69747950617274696369706174696f6e20626173656c696e6520666c6f6f7220756e6368616e676564416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564426173656c696e652075706461746520666163746f722067726561746572207468616e206f6e656572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e65774669786564282963616e6e6f74207570766f746520612070726f706f73616c206e6f7420696e207468652071756575656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c6550726f706f73616c206e6f7420696e20657865637574696f6e207374616765206f72206e6f742070617373696e67646571756575654672657175656e6379206d757374206265206c6172676572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77686f74666978206e6f742077686974656c69737465642062792032662b312076616c696461746f727363616e6e6f74207570766f746520776974686f7574206c6f636b696e6720676f6c646572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c65686f7466697820616c726561647920707265706172656420666f7220746869732065706f63686572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c6550617274696369706174696f6e20666c6f6f722067726561746572207468616e206f6e656572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c6563616e6e6f74207570766f7465206d6f7265207468616e206f6e65207175657565642070726f706f73616c566f74657220646f65736e2774206861766520656e6f756768206c6f636b65642043656c6f2028666f726d65726c79206b6e6f776e2061732043656c6f20476f6c64296572726f722063616c6c696e67206861736848656164657220707265636f6d70696c6550726f766964656420696e6465782067726561746572207468616e2064657175657565206c656e6774682ea265627a7a72315820f26992a3c6f7f433a05fcbc7b6064c59c4025dafee70c37f843f88e8d2be6c7164736f6c634300050d0032