Address Details
contract

0x18E6BFDc909063F7445E410a5495264619495bCB

Contract Name
StableToken
Creator
0xf3eb91–a79239 at 0x4c6160–cae187
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
8 Transactions
Transfers
0 Transfers
Gas Used
197,353
Last Balance Update
18635689
This contract has been partially verified via Sourcify. View contract in Sourcify repository
Contract name:
StableToken




Optimization enabled
false
Compiler version
v0.5.13+commit.5b0b510c




EVM Version
istanbul




Verified at
2021-10-19T10:46:31.241176Z

Contract source code

pragma solidity ^0.5.13;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";

import "./interfaces/IStableToken.sol";
import "../common/interfaces/ICeloToken.sol";
import "../common/interfaces/ICeloVersionedContract.sol";
import "../common/CalledByVm.sol";
import "../common/Initializable.sol";
import "../common/FixidityLib.sol";
import "../common/Freezable.sol";
import "../common/UsingRegistry.sol";
import "../common/UsingPrecompiles.sol";

/**
 * @title An ERC20 compliant token with adjustable supply.
 */
// solhint-disable-next-line max-line-length
contract StableToken is
  ICeloVersionedContract,
  Ownable,
  Initializable,
  UsingRegistry,
  UsingPrecompiles,
  Freezable,
  CalledByVm,
  IStableToken,
  IERC20,
  ICeloToken
{
  using FixidityLib for FixidityLib.Fraction;
  using SafeMath for uint256;

  event InflationFactorUpdated(uint256 factor, uint256 lastUpdated);

  event InflationParametersUpdated(uint256 rate, uint256 updatePeriod, uint256 lastUpdated);

  event Transfer(address indexed from, address indexed to, uint256 value);

  event TransferComment(string comment);

  bytes32 constant GRANDA_MENTO_REGISTRY_ID = keccak256(abi.encodePacked("GrandaMento"));

  string internal name_;
  string internal symbol_;
  uint8 internal decimals_;

  // Stored as units. Value can be found using unitsToValue().
  mapping(address => uint256) internal balances;
  uint256 internal totalSupply_;

  // Stored as values. Units can be found using valueToUnits().
  mapping(address => mapping(address => uint256)) internal allowed;

  // STABILITY FEE PARAMETERS

  // The `rate` is how much the `factor` is adjusted by per `updatePeriod`.
  // The `factor` describes units/value of StableToken, and is greater than or equal to 1.
  // The `updatePeriod` governs how often the `factor` is updated.
  // `factorLastUpdated` indicates when the inflation factor was last updated.
  struct InflationState {
    FixidityLib.Fraction rate;
    FixidityLib.Fraction factor;
    uint256 updatePeriod;
    uint256 factorLastUpdated;
  }

  InflationState inflationState;

  // The registry ID of the exchange contract with permission to mint and burn this token.
  // Unique per StableToken instance.
  bytes32 exchangeRegistryId;

  /**
   * @notice Recomputes and updates inflation factor if more than `updatePeriod`
   * has passed since last update.
   */
  modifier updateInflationFactor() {
    FixidityLib.Fraction memory updatedInflationFactor;
    uint256 lastUpdated;

    (updatedInflationFactor, lastUpdated) = getUpdatedInflationFactor();

    if (lastUpdated != inflationState.factorLastUpdated) {
      inflationState.factor = updatedInflationFactor;
      inflationState.factorLastUpdated = lastUpdated;
      emit InflationFactorUpdated(inflationState.factor.unwrap(), inflationState.factorLastUpdated);
    }
    _;
  }

  /**
   * @notice Returns the storage, major, minor, and patch version of the contract.
   * @return The storage, major, minor, and patch version of the contract.
   */
  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) {
    return (1, 2, 0, 1);
  }

  /**
   * @notice Sets initialized == true on implementation contracts
   * @param test Set to true to skip implementation initialization
   */
  constructor(bool test) public Initializable(test) {}

  /**
   * @param _name The name of the stable token (English)
   * @param _symbol A short symbol identifying the token (e.g. "cUSD")
   * @param _decimals Tokens are divisible to this many decimal places.
   * @param registryAddress Address of the Registry contract.
   * @param inflationRate Weekly inflation rate.
   * @param inflationFactorUpdatePeriod How often the inflation factor is updated, in seconds.
   * @param initialBalanceAddresses Array of addresses with an initial balance.
   * @param initialBalanceValues Array of balance values corresponding to initialBalanceAddresses.
   * @param exchangeIdentifier String identifier of exchange in registry (for specific fiat pairs)
   */
  function initialize(
    string calldata _name,
    string calldata _symbol,
    uint8 _decimals,
    address registryAddress,
    uint256 inflationRate,
    uint256 inflationFactorUpdatePeriod,
    address[] calldata initialBalanceAddresses,
    uint256[] calldata initialBalanceValues,
    string calldata exchangeIdentifier
  ) external initializer {
    require(inflationRate != 0, "Must provide a non-zero inflation rate");
    require(inflationFactorUpdatePeriod > 0, "inflationFactorUpdatePeriod must be > 0");

    _transferOwnership(msg.sender);

    totalSupply_ = 0;
    name_ = _name;
    symbol_ = _symbol;
    decimals_ = _decimals;

    inflationState.rate = FixidityLib.wrap(inflationRate);
    inflationState.factor = FixidityLib.fixed1();
    inflationState.updatePeriod = inflationFactorUpdatePeriod;
    // solhint-disable-next-line not-rely-on-time
    inflationState.factorLastUpdated = now;

    require(initialBalanceAddresses.length == initialBalanceValues.length, "Array length mismatch");
    for (uint256 i = 0; i < initialBalanceAddresses.length; i = i.add(1)) {
      _mint(initialBalanceAddresses[i], initialBalanceValues[i]);
    }
    setRegistry(registryAddress);
    exchangeRegistryId = keccak256(abi.encodePacked(exchangeIdentifier));
  }

  /**
   * @notice Updates Inflation Parameters.
   * @param rate New rate.
   * @param updatePeriod How often inflationFactor is updated.
   */
  function setInflationParameters(uint256 rate, uint256 updatePeriod)
    external
    onlyOwner
    updateInflationFactor
  {
    require(rate != 0, "Must provide a non-zero inflation rate.");
    require(updatePeriod > 0, "updatePeriod must be > 0");
    inflationState.rate = FixidityLib.wrap(rate);
    inflationState.updatePeriod = updatePeriod;

    emit InflationParametersUpdated(
      rate,
      updatePeriod,
      // solhint-disable-next-line not-rely-on-time
      now
    );
  }

  /**
   * @notice Increase the allowance of another user.
   * @param spender The address which is being approved to spend StableToken.
   * @param value The increment of the amount of StableToken approved to the spender.
   * @return True if the transaction succeeds.
   */
  function increaseAllowance(address spender, uint256 value)
    external
    updateInflationFactor
    returns (bool)
  {
    require(spender != address(0), "reserved address 0x0 cannot have allowance");
    uint256 oldValue = allowed[msg.sender][spender];
    uint256 newValue = oldValue.add(value);
    allowed[msg.sender][spender] = newValue;
    emit Approval(msg.sender, spender, newValue);
    return true;
  }

  /**
   * @notice Decrease the allowance of another user.
   * @param spender The address which is being approved to spend StableToken.
   * @param value The decrement of the amount of StableToken approved to the spender.
   * @return True if the transaction succeeds.
   */
  function decreaseAllowance(address spender, uint256 value)
    external
    updateInflationFactor
    returns (bool)
  {
    uint256 oldValue = allowed[msg.sender][spender];
    uint256 newValue = oldValue.sub(value);
    allowed[msg.sender][spender] = newValue;
    emit Approval(msg.sender, spender, newValue);
    return true;
  }

  /**
   * @notice Approve a user to transfer StableToken on behalf of another user.
   * @param spender The address which is being approved to spend StableToken.
   * @param value The amount of StableToken approved to the spender.
   * @return True if the transaction succeeds.
   */
  function approve(address spender, uint256 value) external updateInflationFactor returns (bool) {
    require(spender != address(0), "reserved address 0x0 cannot have allowance");
    allowed[msg.sender][spender] = value;
    emit Approval(msg.sender, spender, value);
    return true;
  }

  /**
   * @notice Mints new StableToken and gives it to 'to'.
   * @param to The account for which to mint tokens.
   * @param value The amount of StableToken to mint.
   */
  function mint(address to, uint256 value) external updateInflationFactor returns (bool) {
    require(
      msg.sender == registry.getAddressForOrDie(getExchangeRegistryId()) ||
        msg.sender == registry.getAddressFor(VALIDATORS_REGISTRY_ID) ||
        msg.sender == registry.getAddressFor(GRANDA_MENTO_REGISTRY_ID),
      "Sender not authorized to mint"
    );
    return _mint(to, value);
  }

  /**
   * @notice Mints new StableToken and gives it to 'to'.
   * @param to The account for which to mint tokens.
   * @param value The amount of StableToken to mint.
   */
  function _mint(address to, uint256 value) private returns (bool) {
    require(to != address(0), "0 is a reserved address");
    if (value == 0) {
      return true;
    }

    uint256 units = _valueToUnits(inflationState.factor, value);
    totalSupply_ = totalSupply_.add(units);
    balances[to] = balances[to].add(units);
    emit Transfer(address(0), to, value);
    return true;
  }

  /**
   * @notice Transfer token for a specified address
   * @param to The address to transfer to.
   * @param value The amount to be transferred.
   * @param comment The transfer comment.
   * @return True if the transaction succeeds.
   */
  function transferWithComment(address to, uint256 value, string calldata comment)
    external
    updateInflationFactor
    onlyWhenNotFrozen
    returns (bool)
  {
    bool succeeded = transfer(to, value);
    emit TransferComment(comment);
    return succeeded;
  }

  /**
   * @notice Burns StableToken from the balance of msg.sender.
   * @param value The amount of StableToken to burn.
   */
  function burn(uint256 value) external updateInflationFactor returns (bool) {
    require(
      msg.sender == registry.getAddressForOrDie(getExchangeRegistryId()) ||
        msg.sender == registry.getAddressFor(GRANDA_MENTO_REGISTRY_ID),
      "Sender not authorized to burn"
    );
    uint256 units = _valueToUnits(inflationState.factor, value);
    require(units <= balances[msg.sender], "value exceeded balance of sender");
    totalSupply_ = totalSupply_.sub(units);
    balances[msg.sender] = balances[msg.sender].sub(units);
    emit Transfer(msg.sender, address(0), units);
    return true;
  }

  /**
   * @notice Transfers StableToken from one address to another on behalf of a user.
   * @param from The address to transfer StableToken from.
   * @param to The address to transfer StableToken to.
   * @param value The amount of StableToken to transfer.
   * @return True if the transaction succeeds.
   */
  function transferFrom(address from, address to, uint256 value)
    external
    updateInflationFactor
    onlyWhenNotFrozen
    returns (bool)
  {
    uint256 units = _valueToUnits(inflationState.factor, value);
    require(to != address(0), "transfer attempted to reserved address 0x0");
    require(units <= balances[from], "transfer value exceeded balance of sender");
    require(
      value <= allowed[from][msg.sender],
      "transfer value exceeded sender's allowance for recipient"
    );

    balances[to] = balances[to].add(units);
    balances[from] = balances[from].sub(units);
    allowed[from][msg.sender] = allowed[from][msg.sender].sub(value);
    emit Transfer(from, to, value);
    return true;
  }

  /**
   * @return The name of the stable token.
   */
  function name() external view returns (string memory) {
    return name_;
  }

  /**
   * @return The symbol of the stable token.
   */
  function symbol() external view returns (string memory) {
    return symbol_;
  }

  /**
   * @return The number of decimal places to which StableToken is divisible.
   */
  function decimals() external view returns (uint8) {
    return decimals_;
  }

  /**
   * @notice Gets the amount of owner's StableToken allowed to be spent by spender.
   * @param accountOwner The owner of the StableToken.
   * @param spender The spender of the StableToken.
   * @return The amount of StableToken owner is allowing spender to spend.
   */
  function allowance(address accountOwner, address spender) external view returns (uint256) {
    return allowed[accountOwner][spender];
  }

  /**
   * @notice Gets the balance of the specified address using the presently stored inflation factor.
   * @param accountOwner The address to query the balance of.
   * @return The balance of the specified address.
   */
  function balanceOf(address accountOwner) external view returns (uint256) {
    return unitsToValue(balances[accountOwner]);
  }

  /**
   * @return The total value of StableToken in existence
   * @dev Though totalSupply_ is stored in units, this returns value.
   */
  function totalSupply() external view returns (uint256) {
    return unitsToValue(totalSupply_);
  }

  /**
   * @notice gets inflation parameters.
   * @return rate
   * @return factor
   * @return updatePeriod
   * @return factorLastUpdated
   */
  function getInflationParameters() external view returns (uint256, uint256, uint256, uint256) {
    return (
      inflationState.rate.unwrap(),
      inflationState.factor.unwrap(),
      inflationState.updatePeriod,
      inflationState.factorLastUpdated
    );
  }

  /**
   * @notice Returns the units for a given value given the current inflation factor.
   * @param value The value to convert to units.
   * @return The units corresponding to `value` given the current inflation factor.
   * @dev We don't compute the updated inflationFactor here because
   * we assume any function calling this will have updated the inflation factor.
   */
  function valueToUnits(uint256 value) external view returns (uint256) {
    FixidityLib.Fraction memory updatedInflationFactor;

    (updatedInflationFactor, ) = getUpdatedInflationFactor();
    return _valueToUnits(updatedInflationFactor, value);
  }

  /**
   * @notice Returns the exchange id in the registry of the corresponding fiat pair exchange.
   * @dev When this storage is uninitialized, it falls back to the default EXCHANGE_REGISTRY_ID.
   * exchangeRegistryId was introduced after the initial release of cUSD's StableToken,
   * so exchangeRegistryId will be uninitialized for that contract. If cUSD's StableToken
   * exchangeRegistryId were to be correctly initialized, this function could be deprecated
   * in favor of using exchangeRegistryId directly.
   * @return Registry id for the corresponding exchange.
   */
  function getExchangeRegistryId() public view returns (bytes32) {
    if (exchangeRegistryId == bytes32(0)) {
      return EXCHANGE_REGISTRY_ID;
    } else {
      return exchangeRegistryId;
    }
  }

  /**
   * @notice Returns the value of a given number of units given the current inflation factor.
   * @param units The units to convert to value.
   * @return The value corresponding to `units` given the current inflation factor.
   */
  function unitsToValue(uint256 units) public view returns (uint256) {
    FixidityLib.Fraction memory updatedInflationFactor;

    (updatedInflationFactor, ) = getUpdatedInflationFactor();

    // We're ok using FixidityLib.divide here because updatedInflationFactor is
    // not going to surpass maxFixedDivisor any time soon.
    // Quick upper-bound estimation: if annual inflation were 5% (an order of
    // magnitude more than the initial proposal of 0.5%), in 500 years, the
    // inflation factor would be on the order of 10**10, which is still a safe
    // divisor.
    return FixidityLib.newFixed(units).divide(updatedInflationFactor).fromFixed();
  }

  /**
   * @notice Returns the units for a given value given the current inflation factor.
   * @param inflationFactor The current inflation factor.
   * @param value The value to convert to units.
   * @return The units corresponding to `value` given the current inflation factor.
   * @dev We assume any function calling this will have updated the inflation factor.
   */
  function _valueToUnits(FixidityLib.Fraction memory inflationFactor, uint256 value)
    private
    pure
    returns (uint256)
  {
    return inflationFactor.multiply(FixidityLib.newFixed(value)).fromFixed();
  }

  /**
   * @notice Computes the up-to-date inflation factor.
   * @return Current inflation factor.
   * @return Last time when the returned inflation factor was updated.
   */
  function getUpdatedInflationFactor() private view returns (FixidityLib.Fraction memory, uint256) {
    /* solhint-disable not-rely-on-time */
    if (now < inflationState.factorLastUpdated.add(inflationState.updatePeriod)) {
      return (inflationState.factor, inflationState.factorLastUpdated);
    }

    uint256 numerator;
    uint256 denominator;

    // TODO: handle retroactive updates given decreases to updatePeriod
    uint256 timesToApplyInflation = now.sub(inflationState.factorLastUpdated).div(
      inflationState.updatePeriod
    );

    (numerator, denominator) = fractionMulExp(
      inflationState.factor.unwrap(),
      FixidityLib.fixed1().unwrap(),
      inflationState.rate.unwrap(),
      FixidityLib.fixed1().unwrap(),
      timesToApplyInflation,
      decimals_
    );

    // This should never happen. If something went wrong updating the
    // inflation factor, keep the previous factor
    if (numerator == 0 || denominator == 0) {
      return (inflationState.factor, inflationState.factorLastUpdated);
    }

    FixidityLib.Fraction memory currentInflationFactor = FixidityLib.wrap(numerator).divide(
      FixidityLib.wrap(denominator)
    );
    uint256 lastUpdated = inflationState.factorLastUpdated.add(
      inflationState.updatePeriod.mul(timesToApplyInflation)
    );

    return (currentInflationFactor, lastUpdated);
    /* solhint-enable not-rely-on-time */
  }

  /**
   * @notice Transfers `value` from `msg.sender` to `to`
   * @param to The address to transfer to.
   * @param value The amount to be transferred.
   */
  // solhint-disable-next-line no-simple-event-func-name
  function transfer(address to, uint256 value)
    public
    updateInflationFactor
    onlyWhenNotFrozen
    returns (bool)
  {
    return _transfer(to, value);
  }

  /**
   * @notice Transfers StableToken from one address to another
   * @param to The address to transfer StableToken to.
   * @param value The amount of StableToken to be transferred.
   */
  function _transfer(address to, uint256 value) internal returns (bool) {
    require(to != address(0), "transfer attempted to reserved address 0x0");
    uint256 units = _valueToUnits(inflationState.factor, value);
    require(balances[msg.sender] >= units, "transfer value exceeded balance of sender");
    balances[msg.sender] = balances[msg.sender].sub(units);
    balances[to] = balances[to].add(units);
    emit Transfer(msg.sender, to, value);
    return true;
  }

  /**
   * @notice Reserve balance for making payments for gas in this StableToken currency.
   * @param from The account to reserve balance from
   * @param value The amount of balance to reserve
   * @dev Note that this function is called by the protocol when paying for tx fees in this
   * currency. After the tx is executed, gas is refunded to the sender and credited to the
   * various tx fee recipients via a call to `creditGasFees`. Note too that the events emitted
   * by `creditGasFees` reflect the *net* gas fee payments for the transaction.
   */
  function debitGasFees(address from, uint256 value)
    external
    onlyVm
    onlyWhenNotFrozen
    updateInflationFactor
  {
    uint256 units = _valueToUnits(inflationState.factor, value);
    balances[from] = balances[from].sub(units);
    totalSupply_ = totalSupply_.sub(units);
  }

  /**
   * @notice Alternative function to credit balance after making payments
   * for gas in this StableToken currency.
   * @param from The account to debit balance from
   * @param feeRecipient Coinbase address
   * @param gatewayFeeRecipient Gateway address
   * @param communityFund Community fund address
   * @param tipTxFee Coinbase fee
   * @param baseTxFee Community fund fee
   * @param gatewayFee Gateway fee
   * @dev Note that this function is called by the protocol when paying for tx fees in this
   * currency. Before the tx is executed, gas is debited from the sender via a call to
   * `debitGasFees`. Note too that the events emitted by `creditGasFees` reflect the *net* gas fee
   * payments for the transaction.
   */
  function creditGasFees(
    address from,
    address feeRecipient,
    address gatewayFeeRecipient,
    address communityFund,
    uint256 refund,
    uint256 tipTxFee,
    uint256 gatewayFee,
    uint256 baseTxFee
  ) external onlyVm onlyWhenNotFrozen {
    uint256 units = _valueToUnits(inflationState.factor, refund);
    balances[from] = balances[from].add(units);

    units = units.add(_creditGas(from, communityFund, baseTxFee));
    units = units.add(_creditGas(from, feeRecipient, tipTxFee));
    units = units.add(_creditGas(from, gatewayFeeRecipient, gatewayFee));
    totalSupply_ = totalSupply_.add(units);
  }

  function _creditGas(address from, address to, uint256 value) internal returns (uint256) {
    if (to == address(0)) {
      return 0;
    }
    uint256 units = _valueToUnits(inflationState.factor, value);
    balances[to] = balances[to].add(units);
    emit Transfer(from, to, value);
    return units;
  }

}
        

CalledByVm.sol

pragma solidity ^0.5.13;

contract CalledByVm {
  modifier onlyVm() {
    require(msg.sender == address(0), "Only VM can call");
    _;
  }
}
          

FixidityLib.sol

pragma solidity ^0.5.13;

/**
 * @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());
  }
}
          

Freezable.sol

pragma solidity ^0.5.13;

import "./UsingRegistry.sol";

contract Freezable is UsingRegistry {
  // onlyWhenNotFrozen functions can only be called when `frozen` is false, otherwise they will
  // revert.
  modifier onlyWhenNotFrozen() {
    require(!getFreezer().isFrozen(address(this)), "can't call when contract is frozen");
    _;
  }
}
          

Initializable.sol

pragma solidity ^0.5.13;

contract Initializable {
  bool public initialized;

  constructor(bool testingDeployment) public {
    if (!testingDeployment) {
      initialized = true;
    }
  }

  modifier initializer() {
    require(!initialized, "contract already initialized");
    initialized = true;
    _;
  }
}
          

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/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);
  }

}
          

UsingRegistry.sol

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 "../stability/interfaces/IExchange.sol";
import "../stability/interfaces/IReserve.sol";
import "../stability/interfaces/ISortedOracles.sol";
import "../stability/interfaces/IStableToken.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));
  }
}
          

IAccounts.sol

pragma solidity ^0.5.13;

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);
}
          

ICeloToken.sol

pragma solidity ^0.5.13;

/**
 * @title This interface describes the non- ERC20 shared interface for all Celo Tokens, and
 * in the absence of interface inheritance is intended as a companion to IERC20.sol.
 */
interface ICeloToken {
  function transferWithComment(address, uint256, string calldata) external returns (bool);
  function name() external view returns (string memory);
  function symbol() external view returns (string memory);
  function decimals() external view returns (uint8);
}
          

ICeloVersionedContract.sol

pragma solidity ^0.5.13;

interface ICeloVersionedContract {
  /**
   * @notice Returns the storage, major, minor, and patch version of the contract.
   * @return The storage, major, minor, and patch version of the contract.
   */
  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256);
}
          

IFeeCurrencyWhitelist.sol

pragma solidity ^0.5.13;

interface IFeeCurrencyWhitelist {
  function addToken(address) external;
  function getWhitelist() external view returns (address[] memory);
}
          

IFreezer.sol

pragma solidity ^0.5.13;

interface IFreezer {
  function isFrozen(address) external view returns (bool);
}
          

IRegistry.sol

pragma solidity ^0.5.13;

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);
}
          

IElection.sol

pragma solidity ^0.5.13;

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 forceDecrementVotes(
    address,
    uint256,
    address[] calldata,
    address[] calldata,
    uint256[] calldata
  ) external returns (uint256);

  // 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);

  // 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;
}
          

IGovernance.sol

pragma solidity ^0.5.13;

interface IGovernance {
  function isVoting(address) external view returns (bool);
}
          

ILockedGold.sol

pragma solidity ^0.5.13;

interface ILockedGold {
  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 getTotalPendingWithdrawals(address) external view returns (uint256);
  function lock() external payable;
  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);
}
          

IValidators.sol

pragma solidity ^0.5.13;

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;

}
          

IAttestations.sol

pragma solidity ^0.5.13;

interface IAttestations {
  function request(bytes32, uint256, address) external;
  function selectIssuers(bytes32) external;
  function complete(bytes32, uint8, bytes32, bytes32) external;
  function revoke(bytes32, uint256) external;
  function withdraw(address) external;
  function approveTransfer(bytes32, uint256, address, address, bool) 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;
}
          

IRandom.sol

pragma solidity ^0.5.13;

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);
}
          

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);
}
          

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;
}
          

ISortedOracles.sol

pragma solidity ^0.5.13;

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);
}
          

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);
}
          

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;
    }
}
          

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;
    }
}
          

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;
    }
}
          

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);
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bool","name":"test","internalType":"bool"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"InflationFactorUpdated","inputs":[{"type":"uint256","name":"factor","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastUpdated","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"InflationParametersUpdated","inputs":[{"type":"uint256","name":"rate","internalType":"uint256","indexed":false},{"type":"uint256","name":"updatePeriod","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastUpdated","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":"RegistrySet","inputs":[{"type":"address","name":"registryAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TransferComment","inputs":[{"type":"string","name":"comment","internalType":"string","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"accountOwner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"accountOwner","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"burn","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"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":"nonpayable","payable":false,"outputs":[],"name":"creditGasFees","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"feeRecipient","internalType":"address"},{"type":"address","name":"gatewayFeeRecipient","internalType":"address"},{"type":"address","name":"communityFund","internalType":"address"},{"type":"uint256","name":"refund","internalType":"uint256"},{"type":"uint256","name":"tipTxFee","internalType":"uint256"},{"type":"uint256","name":"gatewayFee","internalType":"uint256"},{"type":"uint256","name":"baseTxFee","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"debitGasFees","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"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":"getBlockNumberFromHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"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":"bytes32","name":"","internalType":"bytes32"}],"name":"getExchangeRegistryId","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"}],"name":"getInflationParameters","inputs":[],"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":"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":"bytes32","name":"","internalType":"bytes32"}],"name":"hashHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"initialize","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_symbol","internalType":"string"},{"type":"uint8","name":"_decimals","internalType":"uint8"},{"type":"address","name":"registryAddress","internalType":"address"},{"type":"uint256","name":"inflationRate","internalType":"uint256"},{"type":"uint256","name":"inflationFactorUpdatePeriod","internalType":"uint256"},{"type":"address[]","name":"initialBalanceAddresses","internalType":"address[]"},{"type":"uint256[]","name":"initialBalanceValues","internalType":"uint256[]"},{"type":"string","name":"exchangeIdentifier","internalType":"string"}],"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":"isOwner","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":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"mint","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","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":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract IRegistry"}],"name":"registry","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceOwnership","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setInflationParameters","inputs":[{"type":"uint256","name":"rate","internalType":"uint256"},{"type":"uint256","name":"updatePeriod","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":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"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":"transferWithComment","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"string","name":"comment","internalType":"string"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"unitsToValue","inputs":[{"type":"uint256","name":"units","internalType":"uint256"}],"constant":true},{"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":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"valueToUnits","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}],"constant":true}]
              

Contract Creation Code

Verify & Publish
0x60806040523480156200001157600080fd5b50604051620070be380380620070be833981810160405260208110156200003757600080fd5b81019080805190602001909291905050508060006200005b6200012360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350806200011b576001600060146101000a81548160ff0219169083151502179055505b50506200012b565b600033905090565b616f83806200013b6000396000f3fe608060405234801561001057600080fd5b506004361061027f5760003560e01c806370a082311161015c578063a457c2d7116100ce578063df4da46111610087578063df4da461146112b1578063e1d6aceb146112cf578063e50e652d1461138a578063ec683072146113cc578063f2fde38b14611447578063fae8db0a1461148b5761027f565b8063a457c2d7146110b4578063a67f87471461111a578063a9059cbb1461114d578063a91ee0dc146111b3578063af31f587146111f7578063dd62ed3e146112395761027f565b80638a883626116101205780638a88362614610e965780638da5cb5b14610f655780638f32d59b14610faf57806395d89b4114610fd15780639a7b3be7146110545780639b2b592f146110725761027f565b806370a0823114610dae578063715018a614610e065780637385e5da14610e105780637b10399914610e2e57806387ee8a0f14610e785761027f565b806339509351116101f55780634b2c2f44116101b95780634b2c2f4414610a4a57806354255be014610b1957806358cf967214610b4c5780635d180adb14610b9a57806367960e9114610c125780636a30b25314610ce15761027f565b806339509351146108d85780633b1eb4bf1461093e57806340a12f641461098057806340c10f191461099e57806342966c6814610a045761027f565b806318160ddd1161024757806318160ddd1461043f5780631e4f0e031461045d578063222836ad1461066c57806323b872dd146106a457806323f0ab651461072a578063313ce567146108b45761027f565b806306fdde0314610284578063095ea7b314610307578063123633ea1461036d57806312c6c099146103db578063158ef93e1461041d575b600080fd5b61028c6114cd565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102cc5780820151818401526020810190506102b1565b50505050905090810190601f1680156102f95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103536004803603604081101561031d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061156f565b604051808215151515815260200191505060405180910390f35b6103996004803603602081101561038357600080fd5b8101908080359060200190929190505050611792565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610407600480360360208110156103f157600080fd5b81019080803590602001909291905050506118e3565b6040518082815260200191505060405180910390f35b61042561190c565b604051808215151515815260200191505060405180910390f35b61044761191f565b6040518082815260200191505060405180910390f35b61066a600480360361012081101561047457600080fd5b810190808035906020019064010000000081111561049157600080fd5b8201836020820111156104a357600080fd5b803590602001918460018302840111640100000000831117156104c557600080fd5b9091929391929390803590602001906401000000008111156104e657600080fd5b8201836020820111156104f857600080fd5b8035906020019184600183028401116401000000008311171561051a57600080fd5b9091929391929390803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561057c57600080fd5b82018360208201111561058e57600080fd5b803590602001918460208302840111640100000000831117156105b057600080fd5b9091929391929390803590602001906401000000008111156105d157600080fd5b8201836020820111156105e357600080fd5b8035906020019184602083028401116401000000008311171561060557600080fd5b90919293919293908035906020019064010000000081111561062657600080fd5b82018360208201111561063857600080fd5b8035906020019184600183028401116401000000008311171561065a57600080fd5b9091929391929390505050611931565b005b6106a26004803603604081101561068257600080fd5b810190808035906020019092919080359060200190929190505050611c57565b005b610710600480360360608110156106ba57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ebc565b604051808215151515815260200191505060405180910390f35b61089a6004803603606081101561074057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561077d57600080fd5b82018360208201111561078f57600080fd5b803590602001918460018302840111640100000000831117156107b157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561081457600080fd5b82018360208201111561082657600080fd5b8035906020019184600183028401116401000000008311171561084857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612542565b604051808215151515815260200191505060405180910390f35b6108bc6126fb565b604051808260ff1660ff16815260200191505060405180910390f35b610924600480360360408110156108ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612712565b604051808215151515815260200191505060405180910390f35b61096a6004803603602081101561095457600080fd5b81019080803590602001909291905050506129cf565b6040518082815260200191505060405180910390f35b6109886129e9565b6040518082815260200191505060405180910390f35b6109ea600480360360408110156109b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a4f565b604051808215151515815260200191505060405180910390f35b610a3060048036036020811015610a1a57600080fd5b8101908080359060200190929190505050612eb5565b604051808215151515815260200191505060405180910390f35b610b0360048036036020811015610a6057600080fd5b8101908080359060200190640100000000811115610a7d57600080fd5b820183602082011115610a8f57600080fd5b80359060200191846001830284011164010000000083111715610ab157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506133dc565b6040518082815260200191505060405180910390f35b610b21613570565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610b9860048036036040811015610b6257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613598565b005b610bd060048036036040811015610bb057600080fd5b8101908080359060200190929190803590602001909291905050506138d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ccb60048036036020811015610c2857600080fd5b8101908080359060200190640100000000811115610c4557600080fd5b820183602082011115610c5757600080fd5b80359060200191846001830284011164010000000083111715610c7957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613a28565b6040518082815260200191505060405180910390f35b610dac6004803603610100811015610cf857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050613bbc565b005b610df060048036036020811015610dc457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613eb2565b6040518082815260200191505060405180910390f35b610e0e613f03565b005b610e1861403c565b6040518082815260200191505060405180910390f35b610e3661404c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e80614072565b6040518082815260200191505060405180910390f35b610f4f60048036036020811015610eac57600080fd5b8101908080359060200190640100000000811115610ec957600080fd5b820183602082011115610edb57600080fd5b80359060200191846001830284011164010000000083111715610efd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506141b9565b6040518082815260200191505060405180910390f35b610f6d61434d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610fb7614376565b604051808215151515815260200191505060405180910390f35b610fd96143d4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611019578082015181840152602081019050610ffe565b50505050905090810190601f1680156110465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61105c614476565b6040518082815260200191505060405180910390f35b61109e6004803603602081101561108857600080fd5b8101908080359060200190929190505050614486565b6040518082815260200191505060405180910390f35b611100600480360360408110156110ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506145cf565b604051808215151515815260200191505060405180910390f35b611122614806565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b6111996004803603604081101561116357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061486a565b604051808215151515815260200191505060405180910390f35b6111f5600480360360208110156111c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614a3e565b005b6112236004803603602081101561120d57600080fd5b8101908080359060200190929190505050614be2565b6040518082815260200191505060405180910390f35b61129b6004803603604081101561124f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614c24565b6040518082815260200191505060405180910390f35b6112b9614cab565b6040518082815260200191505060405180910390f35b611370600480360360608110156112e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561132c57600080fd5b82018360208201111561133e57600080fd5b8035906020019184600183028401116401000000008311171561136057600080fd5b9091929391929390505050614de7565b604051808215151515815260200191505060405180910390f35b6113b6600480360360208110156113a057600080fd5b8101908080359060200190929190505050615026565b6040518082815260200191505060405180910390f35b61142a600480360360c08110156113e257600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050615071565b604051808381526020018281526020019250505060405180910390f35b6114896004803603602081101561145d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615285565b005b6114b7600480360360208110156114a157600080fd5b810190808035906020019092919050505061530b565b6040518082815260200191505060405180910390f35b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115655780601f1061153a57610100808354040283529160200191611565565b820191906000526020600020905b81548152906001019060200180831161154857829003601f168201915b5050505050905090565b6000611579616af4565b6000611583615454565b8092508193505050600860030154811461161a5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a976115f7600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156116a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616dad602a913960400191505060405180910390fd5b83600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925866040518082815260200191505060405180910390a360019250505092915050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061180b57805182526020820191506020810190506020830392506117e8565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461186b576040519150601f19603f3d011682016040523d82523d6000602084013e611870565b606091505b508093508192505050806118cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180616d05603d913960400191505060405180910390fd5b6118da82600061562d565b92505050919050565b60006118ed616af4565b6118f5615454565b50809150506119048184615644565b915050919050565b600060149054906101000a900460ff1681565b600061192c600654614be2565b905090565b600060149054906101000a900460ff16156119b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055506000881415611a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180616c286026913960400191505060405180910390fd5b60008711611a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616bdb6027913960400191505060405180910390fd5b611a8b33615671565b60006006819055508d8d60029190611aa4929190616b07565b508b8b60039190611ab6929190616b07565b5089600460006101000a81548160ff021916908360ff160217905550611adb886157b5565b600860000160008201518160000155905050611af56157d3565b6008600101600082015181600001559050508660086002018190555042600860030181905550838390508686905014611b96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4172726179206c656e677468206d69736d61746368000000000000000000000081525060200191505060405180910390fd5b60008090505b86869050811015611c0757611beb878783818110611bb657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16868684818110611bdf57fe5b905060200201356157f9565b50611c006001826159f890919063ffffffff16565b9050611b9c565b50611c1189614a3e565b818160405160200180838380828437808301925050509250505060405160208183030381529060405280519060200120600c819055505050505050505050505050505050565b611c5f614376565b611cd1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611cd9616af4565b6000611ce3615454565b80925081935050506008600301548114611d7a5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97611d57600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b6000841415611dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616c4e6027913960400191505060405180910390fd5b60008311611e4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f757064617465506572696f64206d757374206265203e2030000000000000000081525060200191505060405180910390fd5b611e53846157b5565b600860000160008201518160000155905050826008600201819055507fa0035d6667ffb7d387c86c7228141c4a877e8ed831b267ac928a2f5b651c155d84844260405180848152602001838152602001828152602001935050505060405180910390a150505050565b6000611ec6616af4565b6000611ed0615454565b80925081935050506008600301548114611f675781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97611f44600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b611f6f615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611feb57600080fd5b505afa158015611fff573d6000803e3d6000fd5b505050506040513d602081101561201557600080fd5b81019080805190602001909291905050501561207c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b60006120a1600860010160405180602001604052908160008201548152505086615644565b9050600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415612129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616f02602a913960400191505060405180910390fd5b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111156121c1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180616df86029913960400191505060405180910390fd5b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054851115612296576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180616e216038913960400191505060405180910390fd5b6122e881600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061237d81600560008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061244f85600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040518082815260200191505060405180910390a3600193505050509392505050565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b602083106125cb57805182526020820191506020810190506020830392506125a8565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061261c57805182526020820191506020810190506020830392506125f9565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b602083106126855780518252602082019150602081019050602083039250612662565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146126e5576040519150601f19603f3d011682016040523d82523d6000602084013e6126ea565b606091505b505080915050809150509392505050565b6000600460009054906101000a900460ff16905090565b600061271c616af4565b6000612726615454565b809250819350505060086003015481146127bd5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a9761279a600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616dad602a913960400191505060405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006128d986836159f890919063ffffffff16565b905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3600194505050505092915050565b60006129e2826129dd614cab565b615bc5565b9050919050565b60008060001b600c541415612a465760405160200180807f45786368616e67650000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001209050612a4c565b600c5490505b90565b6000612a59616af4565b6000612a63615454565b80925081935050506008600301548114612afa5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97612ad7600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed612b406129e9565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612b7457600080fd5b505afa158015612b88573d6000803e3d6000fd5b505050506040513d6020811015612b9e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612d065750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd92723360405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612c9c57600080fd5b505afa158015612cb0573d6000803e3d6000fd5b505050506040513d6020811015612cc657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612e2f5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd92723360405160200180807f4772616e64614d656e746f000000000000000000000000000000000000000000815250600b019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612dc557600080fd5b505afa158015612dd9573d6000803e3d6000fd5b505050506040513d6020811015612def57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656e646572206e6f7420617574686f72697a656420746f206d696e7400000081525060200191505060405180910390fd5b612eab85856157f9565b9250505092915050565b6000612ebf616af4565b6000612ec9615454565b80925081935050506008600301548114612f605781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97612f3d600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed612fa66129e9565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612fda57600080fd5b505afa158015612fee573d6000803e3d6000fd5b505050506040513d602081101561300457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061316c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd92723360405160200180807f4772616e64614d656e746f000000000000000000000000000000000000000000815250600b019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561310257600080fd5b505afa158015613116573d6000803e3d6000fd5b505050506040513d602081101561312c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6131de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656e646572206e6f7420617574686f72697a656420746f206275726e00000081525060200191505060405180910390fd5b6000613203600860010160405180602001604052908160008201548152505086615644565b9050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111156132ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f76616c75652065786365656465642062616c616e6365206f662073656e64657281525060200191505060405180910390fd5b6132cf81600654615b7b90919063ffffffff16565b60068190555061332781600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a360019350505050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310613431578051825260208201915060208101905060208303925061340e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106134985780518252602082019150602081019050602083039250613475565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146134f8576040519150601f19603f3d011682016040523d82523d6000602084013e6134fd565b606091505b5080935081925050508061355c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180616c756038913960400191505060405180910390fd5b613567826000615c0d565b92505050919050565b6000806000806001600260006001839350829250819150809050935093509350935090919293565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461363a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b613642615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156136be57600080fd5b505afa1580156136d2573d6000803e3d6000fd5b505050506040513d60208110156136e857600080fd5b81019080805190602001909291905050501561374f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b613757616af4565b6000613761615454565b809250819350505060086003015481146137f85781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a976137d5600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600061381d600860010160405180602001604052908160008201548152505085615644565b905061387181600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506138c981600654615b7b90919063ffffffff16565b6006819055505050505050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061394f578051825260208201915060208101905060208303925061392c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146139af576040519150601f19603f3d011682016040523d82523d6000602084013e6139b4565b606091505b50809350819250505080613a13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180616d776036913960400191505060405180910390fd5b613a1e82600061562d565b9250505092915050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310613a7d5780518252602082019150602081019050602083039250613a5a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613ae45780518252602082019150602081019050602083039250613ac1565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613b44576040519150601f19603f3d011682016040523d82523d6000602084013e613b49565b606091505b50809350819250505080613ba8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180616f2c6023913960400191505060405180910390fd5b613bb3826000615c0d565b92505050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613c5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b613c66615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613ce257600080fd5b505afa158015613cf6573d6000803e3d6000fd5b505050506040513d6020811015613d0c57600080fd5b810190808051906020019092919050505015613d73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b6000613d98600860010160405180602001604052908160008201548152505086615644565b9050613dec81600560008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613e4c613e3d8a8885615cae565b826159f890919063ffffffff16565b9050613e6b613e5c8a8a87615cae565b826159f890919063ffffffff16565b9050613e8a613e7b8a8986615cae565b826159f890919063ffffffff16565b9050613ea1816006546159f890919063ffffffff16565b600681905550505050505050505050565b6000613efc600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054614be2565b9050919050565b613f0b614376565b613f7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600061404743615026565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106140e357805182526020820191506020810190506020830392506140c0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614143576040519150601f19603f3d011682016040523d82523d6000602084013e614148565b606091505b508093508192505050806141a7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180616d426035913960400191505060405180910390fd5b6141b282600061562d565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061420e57805182526020820191506020810190506020830392506141eb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106142755780518252602082019150602081019050602083039250614252565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146142d5576040519150601f19603f3d011682016040523d82523d6000602084013e6142da565b606091505b50809350819250505080614339576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180616ed16031913960400191505060405180910390fd5b61434482600061562d565b92505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166143b8615e1a565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561446c5780601f106144415761010080835404028352916020019161446c565b820191906000526020600020905b81548152906001019060200180831161444f57829003601f168201915b5050505050905090565b6000614481436129cf565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106144f757805182526020820191506020810190506020830392506144d4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614557576040519150601f19603f3d011682016040523d82523d6000602084013e61455c565b606091505b508093508192505050806145bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180616bad602e913960400191505060405180910390fd5b6145c682600061562d565b92505050919050565b60006145d9616af4565b60006145e3615454565b8092508193505050600860030154811461467a5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97614657600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006147108683615b7b90919063ffffffff16565b905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3600194505050505092915050565b60008060008061482e600860000160405180602001604052908160008201548152505061561f565b614850600860010160405180602001604052908160008201548152505061561f565b600860020154600860030154935093509350935090919293565b6000614874616af4565b600061487e615454565b809250819350505060086003015481146149155781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a976148f2600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b61491d615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561499957600080fd5b505afa1580156149ad573d6000803e3d6000fd5b505050506040513d60208110156149c357600080fd5b810190808051906020019092919050505015614a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b614a348585615e22565b9250505092915050565b614a46614376565b614ab8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614b5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b6000614bec616af4565b614bf4615454565b5080915050614c1c614c1782614c0986616102565b61618c90919063ffffffff16565b6162d5565b915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b60208310614d115780518252602082019150602081019050602083039250614cee565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614d71576040519150601f19603f3d011682016040523d82523d6000602084013e614d76565b606091505b50809350819250505080614dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180616e806025913960400191505060405180910390fd5b614de082600061562d565b9250505090565b6000614df1616af4565b6000614dfb615454565b80925081935050506008600301548114614e925781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97614e6f600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b614e9a615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614f1657600080fd5b505afa158015614f2a573d6000803e3d6000fd5b505050506040513d6020811015614f4057600080fd5b810190808051906020019092919050505015614fa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b6000614fb3888861486a565b90507fe5d4e30fb8364e57bc4d662a07d0cf36f4c34552004c4c3624620a2c1d1c03dc868660405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a1809350505050949350505050565b600061506a600361505c600261504e600261504088614486565b6162f690919063ffffffff16565b6159f890919063ffffffff16565b61637c90919063ffffffff16565b9050919050565b60008060008714158015615086575060008514155b6150f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b60208310615192578051825260208201915060208101905060208303925061516f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146151f2576040519150601f19603f3d011682016040523d82523d6000602084013e6151f7565b606091505b50809250819350505081615256576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616e596027913960400191505060405180910390fd5b61526181600061562d565b935061526e81602061562d565b925083839550955050505050965096945050505050565b61528d614376565b6152ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61530881615671565b50565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061537c5780518252602082019150602081019050602083039250615359565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146153dc576040519150601f19603f3d011682016040523d82523d6000602084013e6153e1565b606091505b50809350819250505080615440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180616ea5602c913960400191505060405180910390fd5b61544b826000615c0d565b92505050919050565b61545c616af4565b600061547b6008600201546008600301546159f890919063ffffffff16565b4210156154ae5760086001016008600301548160405180602001604052908160008201548152505091509150915061561b565b60008060006154e26008600201546154d460086003015442615b7b90919063ffffffff16565b61637c90919063ffffffff16565b9050615564615509600860010160405180602001604052908160008201548152505061561f565b6155196155146157d3565b61561f565b61553b600860000160405180602001604052908160008201548152505061561f565b61554b6155466157d3565b61561f565b85600460009054906101000a900460ff1660ff16615071565b8093508194505050600083148061557b5750600082145b156155af5760086001016008600301548160405180602001604052908160008201548152505091509450945050505061561b565b6155b7616af4565b6155da6155c3846157b5565b6155cc866157b5565b61618c90919063ffffffff16565b9050600061560d6155f9846008600201546162f690919063ffffffff16565b6008600301546159f890919063ffffffff16565b905081819650965050505050505b9091565b600081600001519050919050565b60006156398383615c0d565b60001c905092915050565b600061566961566461565584616102565b856163c690919063ffffffff16565b6162d5565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156156f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180616c026026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6157bd616af4565b6040518060200160405280838152509050919050565b6157db616af4565b604051806020016040528069d3c21bcecceda1000000815250905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561589d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f302069732061207265736572766564206164647265737300000000000000000081525060200191505060405180910390fd5b60008214156158af57600190506159f2565b60006158d4600860010160405180602001604052908160008201548152505084615644565b90506158eb816006546159f890919063ffffffff16565b60068190555061594381600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150505b92915050565b600080828401905083811015615a76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f467265657a6572000000000000000000000000000000000000000000000000008152506007019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015615b3b57600080fd5b505afa158015615b4f573d6000803e3d6000fd5b505050506040513d6020811015615b6557600080fd5b8101908080519060200190929190505050905090565b6000615bbd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250616825565b905092915050565b600080828481615bd157fe5b0490506000838581615bdf57fe5b061415615bef5780915050615c07565b615c036001826159f890919063ffffffff16565b9150505b92915050565b6000615c236020836159f890919063ffffffff16565b83511015615c99576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415615ced5760009050615e13565b6000615d12600860010160405180602001604052908160008201548152505084615644565b9050615d6681600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3809150505b9392505050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415615ea9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616f02602a913960400191505060405180910390fd5b6000615ece600860010160405180602001604052908160008201548152505084615644565b905080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015615f68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180616df86029913960400191505060405180910390fd5b615fba81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061604f81600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b61610a616af4565b6161126168e5565b82111561616a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180616ccf6036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b616194616af4565b60008260000151141561620f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda1000000828161623c57fe5b04146162b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b6040518060200160405280846000015183816162c857fe5b0481525091505092915050565b600069d3c21bcecceda10000008260000151816162ee57fe5b049050919050565b6000808314156163095760009050616376565b600082840290508284828161631a57fe5b0414616371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180616dd76021913960400191505060405180910390fd5b809150505b92915050565b60006163be83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250616904565b905092915050565b6163ce616af4565b6000836000015114806163e5575060008260000151145b156164015760405180602001604052806000815250905061681f565b69d3c21bcecceda10000008260000151141561641f5782905061681f565b69d3c21bcecceda10000008360000151141561643d5781905061681f565b600069d3c21bcecceda1000000616453856169ca565b600001518161645e57fe5b049050600061646c85616a01565b600001519050600069d3c21bcecceda1000000616488866169ca565b600001518161649357fe5b04905060006164a186616a01565b600001519050600082850290506000851461653557828582816164c057fe5b0414616534576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda100000082029050600082146165d75769d3c21bcecceda100000082828161656257fe5b04146165d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461666857848682816165f357fe5b0414616667576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b60008488029050600088146166f6578488828161668157fe5b04146166f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6166fe616a3e565b878161670657fe5b049650616711616a3e565b858161671957fe5b04945060008588029050600088146167aa578588828161673557fe5b04146167a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6167b2616af4565b60405180602001604052808781525090506167db81604051806020016040528087815250616a4b565b90506167f581604051806020016040528086815250616a4b565b905061680f81604051806020016040528085815250616a4b565b9050809a50505050505050505050505b92915050565b60008383111582906168d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561689757808201518184015260208101905061687c565b50505050905090810190601f1680156168c45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b600080831182906169b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561697557808201518184015260208101905061695a565b50505050905090810190601f1680156169a25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816169bc57fe5b049050809150509392505050565b6169d2616af4565b604051806020016040528069d3c21bcecceda1000000808560000151816169f557fe5b04028152509050919050565b616a09616af4565b604051806020016040528069d3c21bcecceda100000080856000015181616a2c57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b616a53616af4565b6000826000015184600001510190508360000151811015616adc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10616b4857803560ff1916838001178555616b76565b82800160010185558215616b76579182015b82811115616b75578235825591602001919060010190616b5a565b5b509050616b839190616b87565b5090565b616ba991905b80821115616ba5576000816000905550600101616b8d565b5090565b9056fe6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c65696e666c6174696f6e466163746f72557064617465506572696f64206d757374206265203e20304f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734d7573742070726f766964652061206e6f6e2d7a65726f20696e666c6174696f6e20726174654d7573742070726f766964652061206e6f6e2d7a65726f20696e666c6174696f6e20726174652e6572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e27742063616c6c207768656e20636f6e74726163742069732066726f7a656e63616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e6577466978656428296572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c6572657365727665642061646472657373203078302063616e6e6f74206861766520616c6c6f77616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777472616e736665722076616c75652065786365656465642062616c616e6365206f662073656e6465727472616e736665722076616c75652065786365656465642073656e646572277320616c6c6f77616e636520666f7220726563697069656e746572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c656572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c657472616e7366657220617474656d7074656420746f2072657365727665642061646472657373203078306572726f722063616c6c696e67206861736848656164657220707265636f6d70696c65a265627a7a723158203069986c8e97ca0e312b1f5df70827dd98b4383dc6d938cc4175910fa702f17264736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061027f5760003560e01c806370a082311161015c578063a457c2d7116100ce578063df4da46111610087578063df4da461146112b1578063e1d6aceb146112cf578063e50e652d1461138a578063ec683072146113cc578063f2fde38b14611447578063fae8db0a1461148b5761027f565b8063a457c2d7146110b4578063a67f87471461111a578063a9059cbb1461114d578063a91ee0dc146111b3578063af31f587146111f7578063dd62ed3e146112395761027f565b80638a883626116101205780638a88362614610e965780638da5cb5b14610f655780638f32d59b14610faf57806395d89b4114610fd15780639a7b3be7146110545780639b2b592f146110725761027f565b806370a0823114610dae578063715018a614610e065780637385e5da14610e105780637b10399914610e2e57806387ee8a0f14610e785761027f565b806339509351116101f55780634b2c2f44116101b95780634b2c2f4414610a4a57806354255be014610b1957806358cf967214610b4c5780635d180adb14610b9a57806367960e9114610c125780636a30b25314610ce15761027f565b806339509351146108d85780633b1eb4bf1461093e57806340a12f641461098057806340c10f191461099e57806342966c6814610a045761027f565b806318160ddd1161024757806318160ddd1461043f5780631e4f0e031461045d578063222836ad1461066c57806323b872dd146106a457806323f0ab651461072a578063313ce567146108b45761027f565b806306fdde0314610284578063095ea7b314610307578063123633ea1461036d57806312c6c099146103db578063158ef93e1461041d575b600080fd5b61028c6114cd565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102cc5780820151818401526020810190506102b1565b50505050905090810190601f1680156102f95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103536004803603604081101561031d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061156f565b604051808215151515815260200191505060405180910390f35b6103996004803603602081101561038357600080fd5b8101908080359060200190929190505050611792565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610407600480360360208110156103f157600080fd5b81019080803590602001909291905050506118e3565b6040518082815260200191505060405180910390f35b61042561190c565b604051808215151515815260200191505060405180910390f35b61044761191f565b6040518082815260200191505060405180910390f35b61066a600480360361012081101561047457600080fd5b810190808035906020019064010000000081111561049157600080fd5b8201836020820111156104a357600080fd5b803590602001918460018302840111640100000000831117156104c557600080fd5b9091929391929390803590602001906401000000008111156104e657600080fd5b8201836020820111156104f857600080fd5b8035906020019184600183028401116401000000008311171561051a57600080fd5b9091929391929390803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561057c57600080fd5b82018360208201111561058e57600080fd5b803590602001918460208302840111640100000000831117156105b057600080fd5b9091929391929390803590602001906401000000008111156105d157600080fd5b8201836020820111156105e357600080fd5b8035906020019184602083028401116401000000008311171561060557600080fd5b90919293919293908035906020019064010000000081111561062657600080fd5b82018360208201111561063857600080fd5b8035906020019184600183028401116401000000008311171561065a57600080fd5b9091929391929390505050611931565b005b6106a26004803603604081101561068257600080fd5b810190808035906020019092919080359060200190929190505050611c57565b005b610710600480360360608110156106ba57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ebc565b604051808215151515815260200191505060405180910390f35b61089a6004803603606081101561074057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561077d57600080fd5b82018360208201111561078f57600080fd5b803590602001918460018302840111640100000000831117156107b157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561081457600080fd5b82018360208201111561082657600080fd5b8035906020019184600183028401116401000000008311171561084857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612542565b604051808215151515815260200191505060405180910390f35b6108bc6126fb565b604051808260ff1660ff16815260200191505060405180910390f35b610924600480360360408110156108ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612712565b604051808215151515815260200191505060405180910390f35b61096a6004803603602081101561095457600080fd5b81019080803590602001909291905050506129cf565b6040518082815260200191505060405180910390f35b6109886129e9565b6040518082815260200191505060405180910390f35b6109ea600480360360408110156109b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a4f565b604051808215151515815260200191505060405180910390f35b610a3060048036036020811015610a1a57600080fd5b8101908080359060200190929190505050612eb5565b604051808215151515815260200191505060405180910390f35b610b0360048036036020811015610a6057600080fd5b8101908080359060200190640100000000811115610a7d57600080fd5b820183602082011115610a8f57600080fd5b80359060200191846001830284011164010000000083111715610ab157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506133dc565b6040518082815260200191505060405180910390f35b610b21613570565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610b9860048036036040811015610b6257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613598565b005b610bd060048036036040811015610bb057600080fd5b8101908080359060200190929190803590602001909291905050506138d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ccb60048036036020811015610c2857600080fd5b8101908080359060200190640100000000811115610c4557600080fd5b820183602082011115610c5757600080fd5b80359060200191846001830284011164010000000083111715610c7957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613a28565b6040518082815260200191505060405180910390f35b610dac6004803603610100811015610cf857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050613bbc565b005b610df060048036036020811015610dc457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613eb2565b6040518082815260200191505060405180910390f35b610e0e613f03565b005b610e1861403c565b6040518082815260200191505060405180910390f35b610e3661404c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e80614072565b6040518082815260200191505060405180910390f35b610f4f60048036036020811015610eac57600080fd5b8101908080359060200190640100000000811115610ec957600080fd5b820183602082011115610edb57600080fd5b80359060200191846001830284011164010000000083111715610efd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506141b9565b6040518082815260200191505060405180910390f35b610f6d61434d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610fb7614376565b604051808215151515815260200191505060405180910390f35b610fd96143d4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611019578082015181840152602081019050610ffe565b50505050905090810190601f1680156110465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61105c614476565b6040518082815260200191505060405180910390f35b61109e6004803603602081101561108857600080fd5b8101908080359060200190929190505050614486565b6040518082815260200191505060405180910390f35b611100600480360360408110156110ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506145cf565b604051808215151515815260200191505060405180910390f35b611122614806565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b6111996004803603604081101561116357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061486a565b604051808215151515815260200191505060405180910390f35b6111f5600480360360208110156111c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614a3e565b005b6112236004803603602081101561120d57600080fd5b8101908080359060200190929190505050614be2565b6040518082815260200191505060405180910390f35b61129b6004803603604081101561124f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614c24565b6040518082815260200191505060405180910390f35b6112b9614cab565b6040518082815260200191505060405180910390f35b611370600480360360608110156112e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561132c57600080fd5b82018360208201111561133e57600080fd5b8035906020019184600183028401116401000000008311171561136057600080fd5b9091929391929390505050614de7565b604051808215151515815260200191505060405180910390f35b6113b6600480360360208110156113a057600080fd5b8101908080359060200190929190505050615026565b6040518082815260200191505060405180910390f35b61142a600480360360c08110156113e257600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050615071565b604051808381526020018281526020019250505060405180910390f35b6114896004803603602081101561145d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050615285565b005b6114b7600480360360208110156114a157600080fd5b810190808035906020019092919050505061530b565b6040518082815260200191505060405180910390f35b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115655780601f1061153a57610100808354040283529160200191611565565b820191906000526020600020905b81548152906001019060200180831161154857829003601f168201915b5050505050905090565b6000611579616af4565b6000611583615454565b8092508193505050600860030154811461161a5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a976115f7600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156116a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616dad602a913960400191505060405180910390fd5b83600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925866040518082815260200191505060405180910390a360019250505092915050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16844360405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061180b57805182526020820191506020810190506020830392506117e8565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461186b576040519150601f19603f3d011682016040523d82523d6000602084013e611870565b606091505b508093508192505050806118cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180616d05603d913960400191505060405180910390fd5b6118da82600061562d565b92505050919050565b60006118ed616af4565b6118f5615454565b50809150506119048184615644565b915050919050565b600060149054906101000a900460ff1681565b600061192c600654614be2565b905090565b600060149054906101000a900460ff16156119b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055506000881415611a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180616c286026913960400191505060405180910390fd5b60008711611a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616bdb6027913960400191505060405180910390fd5b611a8b33615671565b60006006819055508d8d60029190611aa4929190616b07565b508b8b60039190611ab6929190616b07565b5089600460006101000a81548160ff021916908360ff160217905550611adb886157b5565b600860000160008201518160000155905050611af56157d3565b6008600101600082015181600001559050508660086002018190555042600860030181905550838390508686905014611b96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4172726179206c656e677468206d69736d61746368000000000000000000000081525060200191505060405180910390fd5b60008090505b86869050811015611c0757611beb878783818110611bb657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16868684818110611bdf57fe5b905060200201356157f9565b50611c006001826159f890919063ffffffff16565b9050611b9c565b50611c1189614a3e565b818160405160200180838380828437808301925050509250505060405160208183030381529060405280519060200120600c819055505050505050505050505050505050565b611c5f614376565b611cd1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611cd9616af4565b6000611ce3615454565b80925081935050506008600301548114611d7a5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97611d57600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b6000841415611dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616c4e6027913960400191505060405180910390fd5b60008311611e4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f757064617465506572696f64206d757374206265203e2030000000000000000081525060200191505060405180910390fd5b611e53846157b5565b600860000160008201518160000155905050826008600201819055507fa0035d6667ffb7d387c86c7228141c4a877e8ed831b267ac928a2f5b651c155d84844260405180848152602001838152602001828152602001935050505060405180910390a150505050565b6000611ec6616af4565b6000611ed0615454565b80925081935050506008600301548114611f675781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97611f44600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b611f6f615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611feb57600080fd5b505afa158015611fff573d6000803e3d6000fd5b505050506040513d602081101561201557600080fd5b81019080805190602001909291905050501561207c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b60006120a1600860010160405180602001604052908160008201548152505086615644565b9050600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415612129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616f02602a913960400191505060405180910390fd5b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111156121c1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180616df86029913960400191505060405180910390fd5b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054851115612296576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180616e216038913960400191505060405180910390fd5b6122e881600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061237d81600560008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061244f85600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040518082815260200191505060405180910390a3600193505050509392505050565b60008060fb73ffffffffffffffffffffffffffffffffffffffff16858585604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140183805190602001908083835b602083106125cb57805182526020820191506020810190506020830392506125a8565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061261c57805182526020820191506020810190506020830392506125f9565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040526040518082805190602001908083835b602083106126855780518252602082019150602081019050602083039250612662565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146126e5576040519150601f19603f3d011682016040523d82523d6000602084013e6126ea565b606091505b505080915050809150509392505050565b6000600460009054906101000a900460ff16905090565b600061271c616af4565b6000612726615454565b809250819350505060086003015481146127bd5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a9761279a600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616dad602a913960400191505060405180910390fd5b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006128d986836159f890919063ffffffff16565b905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3600194505050505092915050565b60006129e2826129dd614cab565b615bc5565b9050919050565b60008060001b600c541415612a465760405160200180807f45786368616e67650000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001209050612a4c565b600c5490505b90565b6000612a59616af4565b6000612a63615454565b80925081935050506008600301548114612afa5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97612ad7600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed612b406129e9565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612b7457600080fd5b505afa158015612b88573d6000803e3d6000fd5b505050506040513d6020811015612b9e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612d065750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd92723360405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612c9c57600080fd5b505afa158015612cb0573d6000803e3d6000fd5b505050506040513d6020811015612cc657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612e2f5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd92723360405160200180807f4772616e64614d656e746f000000000000000000000000000000000000000000815250600b019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612dc557600080fd5b505afa158015612dd9573d6000803e3d6000fd5b505050506040513d6020811015612def57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656e646572206e6f7420617574686f72697a656420746f206d696e7400000081525060200191505060405180910390fd5b612eab85856157f9565b9250505092915050565b6000612ebf616af4565b6000612ec9615454565b80925081935050506008600301548114612f605781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97612f3d600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed612fa66129e9565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612fda57600080fd5b505afa158015612fee573d6000803e3d6000fd5b505050506040513d602081101561300457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061316c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd92723360405160200180807f4772616e64614d656e746f000000000000000000000000000000000000000000815250600b019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561310257600080fd5b505afa158015613116573d6000803e3d6000fd5b505050506040513d602081101561312c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6131de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656e646572206e6f7420617574686f72697a656420746f206275726e00000081525060200191505060405180910390fd5b6000613203600860010160405180602001604052908160008201548152505086615644565b9050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111156132ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f76616c75652065786365656465642062616c616e6365206f662073656e64657281525060200191505060405180910390fd5b6132cf81600654615b7b90919063ffffffff16565b60068190555061332781600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a360019350505050919050565b60006060600060f473ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310613431578051825260208201915060208101905060208303925061340e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106134985780518252602082019150602081019050602083039250613475565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146134f8576040519150601f19603f3d011682016040523d82523d6000602084013e6134fd565b606091505b5080935081925050508061355c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180616c756038913960400191505060405180910390fd5b613567826000615c0d565b92505050919050565b6000806000806001600260006001839350829250819150809050935093509350935090919293565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461363a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b613642615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156136be57600080fd5b505afa1580156136d2573d6000803e3d6000fd5b505050506040513d60208110156136e857600080fd5b81019080805190602001909291905050501561374f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b613757616af4565b6000613761615454565b809250819350505060086003015481146137f85781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a976137d5600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b600061381d600860010160405180602001604052908160008201548152505085615644565b905061387181600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506138c981600654615b7b90919063ffffffff16565b6006819055505050505050565b60006060600060fa73ffffffffffffffffffffffffffffffffffffffff16858560405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061394f578051825260208201915060208101905060208303925061392c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146139af576040519150601f19603f3d011682016040523d82523d6000602084013e6139b4565b606091505b50809350819250505080613a13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180616d776036913960400191505060405180910390fd5b613a1e82600061562d565b9250505092915050565b60006060600060f673ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b60208310613a7d5780518252602082019150602081019050602083039250613a5a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310613ae45780518252602082019150602081019050602083039250613ac1565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613b44576040519150601f19603f3d011682016040523d82523d6000602084013e613b49565b606091505b50809350819250505080613ba8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180616f2c6023913960400191505060405180910390fd5b613bb3826000615c0d565b92505050919050565b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613c5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c7920564d2063616e2063616c6c0000000000000000000000000000000081525060200191505060405180910390fd5b613c66615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613ce257600080fd5b505afa158015613cf6573d6000803e3d6000fd5b505050506040513d6020811015613d0c57600080fd5b810190808051906020019092919050505015613d73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b6000613d98600860010160405180602001604052908160008201548152505086615644565b9050613dec81600560008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613e4c613e3d8a8885615cae565b826159f890919063ffffffff16565b9050613e6b613e5c8a8a87615cae565b826159f890919063ffffffff16565b9050613e8a613e7b8a8986615cae565b826159f890919063ffffffff16565b9050613ea1816006546159f890919063ffffffff16565b600681905550505050505050505050565b6000613efc600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054614be2565b9050919050565b613f0b614376565b613f7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600061404743615026565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1643604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106140e357805182526020820191506020810190506020830392506140c0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614143576040519150601f19603f3d011682016040523d82523d6000602084013e614148565b606091505b508093508192505050806141a7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180616d426035913960400191505060405180910390fd5b6141b282600061562d565b9250505090565b60006060600060f773ffffffffffffffffffffffffffffffffffffffff16846040516020018082805190602001908083835b6020831061420e57805182526020820191506020810190506020830392506141eb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083106142755780518252602082019150602081019050602083039250614252565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146142d5576040519150601f19603f3d011682016040523d82523d6000602084013e6142da565b606091505b50809350819250505080614339576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180616ed16031913960400191505060405180910390fd5b61434482600061562d565b92505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166143b8615e1a565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561446c5780601f106144415761010080835404028352916020019161446c565b820191906000526020600020905b81548152906001019060200180831161444f57829003601f168201915b5050505050905090565b6000614481436129cf565b905090565b60006060600060f973ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106144f757805182526020820191506020810190506020830392506144d4565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614557576040519150601f19603f3d011682016040523d82523d6000602084013e61455c565b606091505b508093508192505050806145bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180616bad602e913960400191505060405180910390fd5b6145c682600061562d565b92505050919050565b60006145d9616af4565b60006145e3615454565b8092508193505050600860030154811461467a5781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97614657600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b6000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006147108683615b7b90919063ffffffff16565b905080600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3600194505050505092915050565b60008060008061482e600860000160405180602001604052908160008201548152505061561f565b614850600860010160405180602001604052908160008201548152505061561f565b600860020154600860030154935093509350935090919293565b6000614874616af4565b600061487e615454565b809250819350505060086003015481146149155781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a976148f2600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b61491d615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561499957600080fd5b505afa1580156149ad573d6000803e3d6000fd5b505050506040513d60208110156149c357600080fd5b810190808051906020019092919050505015614a2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b614a348585615e22565b9250505092915050565b614a46614376565b614ab8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614b5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b6000614bec616af4565b614bf4615454565b5080915050614c1c614c1782614c0986616102565b61618c90919063ffffffff16565b6162d5565b915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006060600060f873ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040518082805190602001908083835b60208310614d115780518252602082019150602081019050602083039250614cee565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114614d71576040519150601f19603f3d011682016040523d82523d6000602084013e614d76565b606091505b50809350819250505080614dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180616e806025913960400191505060405180910390fd5b614de082600061562d565b9250505090565b6000614df1616af4565b6000614dfb615454565b80925081935050506008600301548114614e925781600860010160008201518160000155905050806008600301819055507f08f3ed03ec9e579d1f6ab2f9e0d3dc661704696deabe37a6b6df7014f1b30a97614e6f600860010160405180602001604052908160008201548152505061561f565b600860030154604051808381526020018281526020019250505060405180910390a15b614e9a615a80565b73ffffffffffffffffffffffffffffffffffffffff1663e5839836306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614f1657600080fd5b505afa158015614f2a573d6000803e3d6000fd5b505050506040513d6020811015614f4057600080fd5b810190808051906020019092919050505015614fa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616cad6022913960400191505060405180910390fd5b6000614fb3888861486a565b90507fe5d4e30fb8364e57bc4d662a07d0cf36f4c34552004c4c3624620a2c1d1c03dc868660405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a1809350505050949350505050565b600061506a600361505c600261504e600261504088614486565b6162f690919063ffffffff16565b6159f890919063ffffffff16565b61637c90919063ffffffff16565b9050919050565b60008060008714158015615086575060008514155b6150f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f612064656e6f6d696e61746f72206973207a65726f000000000000000000000081525060200191505060405180910390fd5b6000806000606060fc73ffffffffffffffffffffffffffffffffffffffff168c8c8c8c8c8c6040516020018087815260200186815260200185815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040526040518082805190602001908083835b60208310615192578051825260208201915060208101905060208303925061516f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146151f2576040519150601f19603f3d011682016040523d82523d6000602084013e6151f7565b606091505b50809250819350505081615256576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616e596027913960400191505060405180910390fd5b61526181600061562d565b935061526e81602061562d565b925083839550955050505050965096945050505050565b61528d614376565b6152ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61530881615671565b50565b60006060600060f573ffffffffffffffffffffffffffffffffffffffff1684604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061537c5780518252602082019150602081019050602083039250615359565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146153dc576040519150601f19603f3d011682016040523d82523d6000602084013e6153e1565b606091505b50809350819250505080615440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180616ea5602c913960400191505060405180910390fd5b61544b826000615c0d565b92505050919050565b61545c616af4565b600061547b6008600201546008600301546159f890919063ffffffff16565b4210156154ae5760086001016008600301548160405180602001604052908160008201548152505091509150915061561b565b60008060006154e26008600201546154d460086003015442615b7b90919063ffffffff16565b61637c90919063ffffffff16565b9050615564615509600860010160405180602001604052908160008201548152505061561f565b6155196155146157d3565b61561f565b61553b600860000160405180602001604052908160008201548152505061561f565b61554b6155466157d3565b61561f565b85600460009054906101000a900460ff1660ff16615071565b8093508194505050600083148061557b5750600082145b156155af5760086001016008600301548160405180602001604052908160008201548152505091509450945050505061561b565b6155b7616af4565b6155da6155c3846157b5565b6155cc866157b5565b61618c90919063ffffffff16565b9050600061560d6155f9846008600201546162f690919063ffffffff16565b6008600301546159f890919063ffffffff16565b905081819650965050505050505b9091565b600081600001519050919050565b60006156398383615c0d565b60001c905092915050565b600061566961566461565584616102565b856163c690919063ffffffff16565b6162d5565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156156f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180616c026026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6157bd616af4565b6040518060200160405280838152509050919050565b6157db616af4565b604051806020016040528069d3c21bcecceda1000000815250905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561589d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f302069732061207265736572766564206164647265737300000000000000000081525060200191505060405180910390fd5b60008214156158af57600190506159f2565b60006158d4600860010160405180602001604052908160008201548152505084615644565b90506158eb816006546159f890919063ffffffff16565b60068190555061594381600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150505b92915050565b600080828401905083811015615a76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f467265657a6572000000000000000000000000000000000000000000000000008152506007019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015615b3b57600080fd5b505afa158015615b4f573d6000803e3d6000fd5b505050506040513d6020811015615b6557600080fd5b8101908080519060200190929190505050905090565b6000615bbd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250616825565b905092915050565b600080828481615bd157fe5b0490506000838581615bdf57fe5b061415615bef5780915050615c07565b615c036001826159f890919063ffffffff16565b9150505b92915050565b6000615c236020836159f890919063ffffffff16565b83511015615c99576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f736c6963696e67206f7574206f662072616e676500000000000000000000000081525060200191505060405180910390fd5b60006020830184015190508091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415615ced5760009050615e13565b6000615d12600860010160405180602001604052908160008201548152505084615644565b9050615d6681600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3809150505b9392505050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415615ea9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616f02602a913960400191505060405180910390fd5b6000615ece600860010160405180602001604052908160008201548152505084615644565b905080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015615f68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180616df86029913960400191505060405180910390fd5b615fba81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054615b7b90919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061604f81600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546159f890919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b61610a616af4565b6161126168e5565b82111561616a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180616ccf6036913960400191505060405180910390fd5b604051806020016040528069d3c21bcecceda100000084028152509050919050565b616194616af4565b60008260000151141561620f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f63616e277420646976696465206279203000000000000000000000000000000081525060200191505060405180910390fd5b600069d3c21bcecceda10000008460000151029050836000015169d3c21bcecceda1000000828161623c57fe5b04146162b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6f766572666c6f7720617420646976696465000000000000000000000000000081525060200191505060405180910390fd5b6040518060200160405280846000015183816162c857fe5b0481525091505092915050565b600069d3c21bcecceda10000008260000151816162ee57fe5b049050919050565b6000808314156163095760009050616376565b600082840290508284828161631a57fe5b0414616371576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180616dd76021913960400191505060405180910390fd5b809150505b92915050565b60006163be83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250616904565b905092915050565b6163ce616af4565b6000836000015114806163e5575060008260000151145b156164015760405180602001604052806000815250905061681f565b69d3c21bcecceda10000008260000151141561641f5782905061681f565b69d3c21bcecceda10000008360000151141561643d5781905061681f565b600069d3c21bcecceda1000000616453856169ca565b600001518161645e57fe5b049050600061646c85616a01565b600001519050600069d3c21bcecceda1000000616488866169ca565b600001518161649357fe5b04905060006164a186616a01565b600001519050600082850290506000851461653557828582816164c057fe5b0414616534576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b600069d3c21bcecceda100000082029050600082146165d75769d3c21bcecceda100000082828161656257fe5b04146165d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6f766572666c6f772078317931202a206669786564312064657465637465640081525060200191505060405180910390fd5b5b809150600084860290506000861461666857848682816165f357fe5b0414616667576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279312064657465637465640000000000000000000081525060200191505060405180910390fd5b5b60008488029050600088146166f6578488828161668157fe5b04146166f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783179322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6166fe616a3e565b878161670657fe5b049650616711616a3e565b858161671957fe5b04945060008588029050600088146167aa578588828161673557fe5b04146167a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6f766572666c6f7720783279322064657465637465640000000000000000000081525060200191505060405180910390fd5b5b6167b2616af4565b60405180602001604052808781525090506167db81604051806020016040528087815250616a4b565b90506167f581604051806020016040528086815250616a4b565b905061680f81604051806020016040528085815250616a4b565b9050809a50505050505050505050505b92915050565b60008383111582906168d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561689757808201518184015260208101905061687c565b50505050905090810190601f1680156168c45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60007601357c299a88ea76a58924d52ce4f26a85af186c2b9e74905090565b600080831182906169b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561697557808201518184015260208101905061695a565b50505050905090810190601f1680156169a25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816169bc57fe5b049050809150509392505050565b6169d2616af4565b604051806020016040528069d3c21bcecceda1000000808560000151816169f557fe5b04028152509050919050565b616a09616af4565b604051806020016040528069d3c21bcecceda100000080856000015181616a2c57fe5b04028460000151038152509050919050565b600064e8d4a51000905090565b616a53616af4565b6000826000015184600001510190508360000151811015616adc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616464206f766572666c6f77206465746563746564000000000000000000000081525060200191505060405180910390fd5b60405180602001604052808281525091505092915050565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10616b4857803560ff1916838001178555616b76565b82800160010185558215616b76579182015b82811115616b75578235825591602001919060010190616b5a565b5b509050616b839190616b87565b5090565b616ba991905b80821115616ba5576000816000905550600101616b8d565b5090565b9056fe6572726f722063616c6c696e67206e756d62657256616c696461746f7273496e53657420707265636f6d70696c65696e666c6174696f6e466163746f72557064617465506572696f64206d757374206265203e20304f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734d7573742070726f766964652061206e6f6e2d7a65726f20696e666c6174696f6e20726174654d7573742070726f766964652061206e6f6e2d7a65726f20696e666c6174696f6e20726174652e6572726f722063616c6c696e672067657456657269666965645365616c4269746d617046726f6d48656164657220707265636f6d70696c6563616e27742063616c6c207768656e20636f6e74726163742069732066726f7a656e63616e277420637265617465206669786964697479206e756d626572206c6172676572207468616e206d61784e6577466978656428296572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e67206e756d62657256616c696461746f7273496e43757272656e7453657420707265636f6d70696c656572726f722063616c6c696e672076616c696461746f725369676e65724164647265737346726f6d53657420707265636f6d70696c6572657365727665642061646472657373203078302063616e6e6f74206861766520616c6c6f77616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777472616e736665722076616c75652065786365656465642062616c616e6365206f662073656e6465727472616e736665722076616c75652065786365656465642073656e646572277320616c6c6f77616e636520666f7220726563697069656e746572726f722063616c6c696e67206672616374696f6e4d756c45787020707265636f6d70696c656572726f722063616c6c696e672067657445706f636853697a6520707265636f6d70696c656572726f722063616c6c696e6720676574506172656e745365616c4269746d617020707265636f6d70696c656572726f722063616c6c696e6720676574426c6f636b4e756d62657246726f6d48656164657220707265636f6d70696c657472616e7366657220617474656d7074656420746f2072657365727665642061646472657373203078306572726f722063616c6c696e67206861736848656164657220707265636f6d70696c65a265627a7a723158203069986c8e97ca0e312b1f5df70827dd98b4383dc6d938cc4175910fa702f17264736f6c634300050d0032