Address Details
contract
0x6B51e3BD4E1E8Df315766F93499B42978B110CEa
- Contract Name
- LockedGold
- Creator
- 0xe1207b–0408ee at 0xb5e4ce–e6bace
- 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
- 0 Transactions
- Transfers
- 0 Transfers
- Gas Used
- Fetching gas used...
- Last Balance Update
- 13809694
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- LockedGold
- Optimization enabled
- false
- Compiler version
- v0.5.13+commit.5b0b510c
- EVM Version
- istanbul
- Verified at
- 2022-03-23T21:43:26.659255Z
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/LockedGold.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/math/Math.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/Address.sol"; import "./interfaces/ILockedGold.sol"; import "../common/Initializable.sol"; import "../common/Signatures.sol"; import "../common/UsingRegistry.sol"; import "../common/interfaces/ICeloVersionedContract.sol"; import "../common/libraries/ReentrancyGuard.sol"; contract LockedGold is ILockedGold, ICeloVersionedContract, ReentrancyGuard, Initializable, UsingRegistry { using SafeMath for uint256; using Address for address payable; // prettier-ignore struct PendingWithdrawal { // The value of the pending withdrawal. uint256 value; // The timestamp at which the pending withdrawal becomes available. uint256 timestamp; } // NOTE: This contract does not store an account's locked gold that is being used in electing // validators. struct Balances { // The amount of locked gold that this account has that is not currently participating in // validator elections. uint256 nonvoting; // Gold that has been unlocked and will become available for withdrawal. PendingWithdrawal[] pendingWithdrawals; } mapping(address => Balances) internal balances; // Iterable map to store whitelisted identifiers. // Necessary to allow iterating over whitelisted IDs to check ID's address at runtime. mapping(bytes32 => bool) internal slashingMap; bytes32[] public slashingWhitelist; modifier onlySlasher { require( registry.isOneOf(slashingWhitelist, msg.sender), "Caller is not a whitelisted slasher." ); _; } function isSlasher(address slasher) external view returns (bool) { return (registry.isOneOf(slashingWhitelist, slasher)); } uint256 public totalNonvoting; uint256 public unlockingPeriod; event UnlockingPeriodSet(uint256 period); event GoldLocked(address indexed account, uint256 value); event GoldUnlocked(address indexed account, uint256 value, uint256 available); event GoldRelocked(address indexed account, uint256 value); event GoldWithdrawn(address indexed account, uint256 value); event SlasherWhitelistAdded(string indexed slasherIdentifier); event SlasherWhitelistRemoved(string indexed slasherIdentifier); event AccountSlashed( address indexed slashed, uint256 penalty, address indexed reporter, uint256 reward ); /** * @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, 1, 1, 2); } /** * @notice Sets initialized == true on implementation contracts * @param test Set to true to skip implementation initialization */ constructor(bool test) public Initializable(test) {} /** * @notice Used in place of the constructor to allow the contract to be upgradable via proxy. * @param registryAddress The address of the registry core smart contract. * @param _unlockingPeriod The unlocking period in seconds. */ function initialize(address registryAddress, uint256 _unlockingPeriod) external initializer { _transferOwnership(msg.sender); setRegistry(registryAddress); setUnlockingPeriod(_unlockingPeriod); } /** * @notice Sets the duration in seconds users must wait before withdrawing gold after unlocking. * @param value The unlocking period in seconds. */ function setUnlockingPeriod(uint256 value) public onlyOwner { require(value != unlockingPeriod, "Unlocking period not changed"); unlockingPeriod = value; emit UnlockingPeriodSet(value); } /** * @notice Locks gold to be used for voting. */ function lock() external payable nonReentrant { require(getAccounts().isAccount(msg.sender), "not account"); _incrementNonvotingAccountBalance(msg.sender, msg.value); emit GoldLocked(msg.sender, msg.value); } /** * @notice Increments the non-voting balance for an account. * @param account The account whose non-voting balance should be incremented. * @param value The amount by which to increment. * @dev Can only be called by the registered Election smart contract. */ function incrementNonvotingAccountBalance(address account, uint256 value) external onlyRegisteredContract(ELECTION_REGISTRY_ID) { _incrementNonvotingAccountBalance(account, value); } /** * @notice Decrements the non-voting balance for an account. * @param account The account whose non-voting balance should be decremented. * @param value The amount by which to decrement. * @dev Can only be called by the registered "Election" smart contract. */ function decrementNonvotingAccountBalance(address account, uint256 value) external onlyRegisteredContract(ELECTION_REGISTRY_ID) { _decrementNonvotingAccountBalance(account, value); } /** * @notice Increments the non-voting balance for an account. * @param account The account whose non-voting balance should be incremented. * @param value The amount by which to increment. */ function _incrementNonvotingAccountBalance(address account, uint256 value) private { balances[account].nonvoting = balances[account].nonvoting.add(value); totalNonvoting = totalNonvoting.add(value); } /** * @notice Decrements the non-voting balance for an account. * @param account The account whose non-voting balance should be decremented. * @param value The amount by which to decrement. */ function _decrementNonvotingAccountBalance(address account, uint256 value) private { balances[account].nonvoting = balances[account].nonvoting.sub(value); totalNonvoting = totalNonvoting.sub(value); } /** * @notice Unlocks gold that becomes withdrawable after the unlocking period. * @param value The amount of gold to unlock. */ function unlock(uint256 value) external nonReentrant { require(getAccounts().isAccount(msg.sender), "Unknown account"); Balances storage account = balances[msg.sender]; // Prevent unlocking gold when voting on governance proposals so that the gold cannot be // used to vote more than once. require(!getGovernance().isVoting(msg.sender), "Account locked"); uint256 balanceRequirement = getValidators().getAccountLockedGoldRequirement(msg.sender); require( balanceRequirement == 0 || balanceRequirement <= getAccountTotalLockedGold(msg.sender).sub(value), "Trying to unlock too much gold" ); _decrementNonvotingAccountBalance(msg.sender, value); uint256 available = now.add(unlockingPeriod); // CERTORA: the slot containing the length could be MAX_UINT account.pendingWithdrawals.push(PendingWithdrawal(value, available)); emit GoldUnlocked(msg.sender, value, available); } /** * @notice Relocks gold that has been unlocked but not withdrawn. * @param index The index of the pending withdrawal to relock from. * @param value The value to relock from the specified pending withdrawal. */ function relock(uint256 index, uint256 value) external nonReentrant { require(getAccounts().isAccount(msg.sender), "Unknown account"); Balances storage account = balances[msg.sender]; require(index < account.pendingWithdrawals.length, "Bad pending withdrawal index"); PendingWithdrawal storage pendingWithdrawal = account.pendingWithdrawals[index]; require(value <= pendingWithdrawal.value, "Requested value larger than pending value"); if (value == pendingWithdrawal.value) { deletePendingWithdrawal(account.pendingWithdrawals, index); } else { pendingWithdrawal.value = pendingWithdrawal.value.sub(value); } _incrementNonvotingAccountBalance(msg.sender, value); emit GoldRelocked(msg.sender, value); } /** * @notice Withdraws gold that has been unlocked after the unlocking period has passed. * @param index The index of the pending withdrawal to withdraw. */ function withdraw(uint256 index) external nonReentrant { require(getAccounts().isAccount(msg.sender), "Unknown account"); Balances storage account = balances[msg.sender]; require(index < account.pendingWithdrawals.length, "Bad pending withdrawal index"); PendingWithdrawal storage pendingWithdrawal = account.pendingWithdrawals[index]; require(now >= pendingWithdrawal.timestamp, "Pending withdrawal not available"); uint256 value = pendingWithdrawal.value; deletePendingWithdrawal(account.pendingWithdrawals, index); require(value <= address(this).balance, "Inconsistent balance"); msg.sender.sendValue(value); emit GoldWithdrawn(msg.sender, value); } /** * @notice Returns the total amount of locked gold in the system. Note that this does not include * gold that has been unlocked but not yet withdrawn. * @return The total amount of locked gold in the system. */ function getTotalLockedGold() external view returns (uint256) { return totalNonvoting.add(getElection().getTotalVotes()); } /** * @notice Returns the total amount of locked gold not being used to vote in elections. * @return The total amount of locked gold not being used to vote in elections. */ function getNonvotingLockedGold() external view returns (uint256) { return totalNonvoting; } /** * @notice Returns the total amount of locked gold for an account. * @param account The account. * @return The total amount of locked gold for an account. */ function getAccountTotalLockedGold(address account) public view returns (uint256) { uint256 total = balances[account].nonvoting; return total.add(getElection().getTotalVotesByAccount(account)); } /** * @notice Returns the total amount of non-voting locked gold for an account. * @param account The account. * @return The total amount of non-voting locked gold for an account. */ function getAccountNonvotingLockedGold(address account) external view returns (uint256) { return balances[account].nonvoting; } /** * @notice Returns the pending withdrawals from unlocked gold for an account. * @param account The address of the account. * @return The value and timestamp for each pending withdrawal. */ function getPendingWithdrawals(address account) external view returns (uint256[] memory, uint256[] memory) { require(getAccounts().isAccount(account), "Unknown account"); uint256 length = balances[account].pendingWithdrawals.length; uint256[] memory values = new uint256[](length); uint256[] memory timestamps = new uint256[](length); for (uint256 i = 0; i < length; i = i.add(1)) { PendingWithdrawal memory pendingWithdrawal = (balances[account].pendingWithdrawals[i]); values[i] = pendingWithdrawal.value; timestamps[i] = pendingWithdrawal.timestamp; } return (values, timestamps); } /** * @notice Returns the total amount to withdraw from unlocked gold for an account. * @param account The address of the account. * @return Total amount to withdraw. */ function getTotalPendingWithdrawals(address account) external view returns (uint256) { uint256 pendingWithdrawalSum = 0; PendingWithdrawal[] memory withdrawals = balances[account].pendingWithdrawals; for (uint256 i = 0; i < withdrawals.length; i = i.add(1)) { pendingWithdrawalSum = pendingWithdrawalSum.add(withdrawals[i].value); } return pendingWithdrawalSum; } function getSlashingWhitelist() external view returns (bytes32[] memory) { return slashingWhitelist; } /** * @notice Deletes a pending withdrawal. * @param list The list of pending withdrawals from which to delete. * @param index The index of the pending withdrawal to delete. */ function deletePendingWithdrawal(PendingWithdrawal[] storage list, uint256 index) private { uint256 lastIndex = list.length.sub(1); list[index] = list[lastIndex]; list.length = lastIndex; } /** * @notice Adds `slasher` to whitelist of approved slashing addresses. * @param slasherIdentifier Identifier to whitelist. */ function addSlasher(string calldata slasherIdentifier) external onlyOwner { bytes32 keyBytes = keccak256(abi.encodePacked(slasherIdentifier)); require(registry.getAddressFor(keyBytes) != address(0), "Identifier is not registered"); require(!slashingMap[keyBytes], "Cannot add slasher ID twice."); slashingWhitelist.push(keyBytes); slashingMap[keyBytes] = true; emit SlasherWhitelistAdded(slasherIdentifier); } /** * @notice Removes `slasher` from whitelist of approved slashing addresses. * @param slasherIdentifier Identifier to remove from whitelist. * @param index Index of the provided identifier in slashingWhiteList array. */ function removeSlasher(string calldata slasherIdentifier, uint256 index) external onlyOwner { bytes32 keyBytes = keccak256(abi.encodePacked(slasherIdentifier)); require(slashingMap[keyBytes], "Cannot remove slasher ID not yet added."); require(index < slashingWhitelist.length, "Provided index exceeds whitelist bounds."); require(slashingWhitelist[index] == keyBytes, "Index doesn't match identifier"); slashingWhitelist[index] = slashingWhitelist[slashingWhitelist.length - 1]; slashingWhitelist.pop(); slashingMap[keyBytes] = false; emit SlasherWhitelistRemoved(slasherIdentifier); } /** * @notice Slashes `account` by reducing its nonvoting locked gold by `penalty`. * If there is not enough nonvoting locked gold to slash, calls into * `Election.slashVotes` to slash the remaining gold. If `account` does not have * `penalty` worth of locked gold, slashes `account`'s total locked gold. * Also sends `reward` gold to the reporter, and penalty-reward to the Community Fund. * @param account Address of account being slashed. * @param penalty Amount to slash account. * @param reporter Address of account reporting the slasher. * @param reward Reward to give reporter. * @param lessers The groups receiving fewer votes than i'th group, or 0 if the i'th group has * the fewest votes of any validator group. * @param greaters The groups receiving more votes than the i'th group, or 0 if the i'th group * has the most votes of any validator group. * @param indices The indices of the i'th group in `account`'s voting list. * @dev Fails if `reward` is greater than `account`'s total locked gold. */ function slash( address account, uint256 penalty, address reporter, uint256 reward, address[] calldata lessers, address[] calldata greaters, uint256[] calldata indices ) external onlySlasher { uint256 maxSlash = Math.min(penalty, getAccountTotalLockedGold(account)); require(maxSlash >= reward, "reward cannot exceed penalty."); // `reporter` receives the reward in locked CELO, so it must be given to an account // There is no reward for slashing via the GovernanceSlasher, and `reporter` // is set to 0x0. if (reporter != address(0)) { reporter = getAccounts().signerToAccount(reporter); } // Local scoping is required to avoid Solc "stack too deep" error from too many locals. { uint256 nonvotingBalance = balances[account].nonvoting; uint256 difference = 0; // If not enough nonvoting, revoke the difference if (nonvotingBalance < maxSlash) { difference = maxSlash.sub(nonvotingBalance); require( getElection().forceDecrementVotes(account, difference, lessers, greaters, indices) == difference, "Cannot revoke enough voting gold." ); } // forceDecrementVotes does not increment nonvoting account balance, so we can't double count _decrementNonvotingAccountBalance(account, maxSlash.sub(difference)); _incrementNonvotingAccountBalance(reporter, reward); } address communityFund = registry.getAddressForOrDie(GOVERNANCE_REGISTRY_ID); address payable communityFundPayable = address(uint160(communityFund)); require(maxSlash.sub(reward) <= address(this).balance, "Inconsistent balance"); communityFundPayable.sendValue(maxSlash.sub(reward)); emit AccountSlashed(account, maxSlash, reporter, reward); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/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; _; } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/Signatures.sol
pragma solidity ^0.5.13; import "openzeppelin-solidity/contracts/cryptography/ECDSA.sol"; library Signatures { /** * @notice Given a signed address, returns the signer of the address. * @param message The address that was signed. * @param v The recovery id of the incoming ECDSA signature. * @param r Output value r of the ECDSA signature. * @param s Output value s of the ECDSA signature. */ function getSignerOfAddress(address message, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { bytes32 hash = keccak256(abi.encodePacked(message)); return getSignerOfMessageHash(hash, v, r, s); } /** * @notice Given a message hash, returns the signer of the address. * @param messageHash The hash of a message. * @param v The recovery id of the incoming ECDSA signature. * @param r Output value r of the ECDSA signature. * @param s Output value s of the ECDSA signature. */ function getSignerOfMessageHash(bytes32 messageHash, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { bytes memory signature = new bytes(65); // Concatenate (r, s, v) into signature. assembly { mstore(add(signature, 32), r) mstore(add(signature, 64), s) mstore8(add(signature, 96), v) } bytes32 prefixedHash = ECDSA.toEthSignedMessageHash(messageHash); return ECDSA.recover(prefixedHash, signature); } /** * @notice Given a domain separator and a structHash, construct the typed data hash * @param eip712DomainSeparator Context specific domain separator * @param structHash hash of the typed data struct * @return The EIP712 typed data hash */ function toEthSignedTypedDataHash(bytes32 eip712DomainSeparator, bytes32 structHash) public pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", eip712DomainSeparator, structHash)); } /** * @notice Given a domain separator and a structHash and a signature return the signer * @param eip712DomainSeparator Context specific domain separator * @param structHash hash of the typed data struct * @param v The recovery id of the incoming ECDSA signature. * @param r Output value r of the ECDSA signature. * @param s Output value s of the ECDSA signature. */ function getSignerOfTypedDataHash( bytes32 eip712DomainSeparator, bytes32 structHash, uint8 v, bytes32 r, bytes32 s ) public pure returns (address) { bytes memory signature = new bytes(65); // Concatenate (r, s, v) into signature. assembly { mstore(add(signature, 32), r) mstore(add(signature, 64), s) mstore8(add(signature, 96), v) } bytes32 prefixedHash = toEthSignedTypedDataHash(eip712DomainSeparator, structHash); return ECDSA.recover(prefixedHash, signature); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/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)); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/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); function setPaymentDelegation(address, uint256) external; function getPaymentDelegation(address) external view returns (address, uint256); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/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); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IFeeCurrencyWhitelist.sol
pragma solidity ^0.5.13; interface IFeeCurrencyWhitelist { function addToken(address) external; function getWhitelist() external view returns (address[] memory); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/IFreezer.sol
pragma solidity ^0.5.13; interface IFreezer { function isFrozen(address) external view returns (bool); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/interfaces/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); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/common/libraries/ReentrancyGuard.sol
pragma solidity ^0.5.13; /** * @title Helps contracts guard against reentrancy attacks. * @author Remco Bloemen <remco@2π.com>, Eenae <alexey@mixbytes.io> * @dev If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; constructor() internal { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "reentrant call"); } }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/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; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/IGovernance.sol
pragma solidity ^0.5.13; interface IGovernance { function isVoting(address) external view returns (bool); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/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); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/governance/interfaces/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; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/interfaces/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; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/identity/interfaces/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); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IExchange.sol
pragma solidity ^0.5.13; interface IExchange { function buy(uint256, uint256, bool) external returns (uint256); function sell(uint256, uint256, bool) external returns (uint256); function exchange(uint256, uint256, bool) external returns (uint256); function setUpdateFrequency(uint256) external; function getBuyTokenAmount(uint256, bool) external view returns (uint256); function getSellTokenAmount(uint256, bool) external view returns (uint256); function getBuyAndSellBuckets(bool) external view returns (uint256, uint256); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IReserve.sol
pragma solidity ^0.5.13; interface IReserve { function setTobinTaxStalenessThreshold(uint256) external; function addToken(address) external returns (bool); function removeToken(address, uint256) external returns (bool); function transferGold(address payable, uint256) external returns (bool); function transferExchangeGold(address payable, uint256) external returns (bool); function getReserveGoldBalance() external view returns (uint256); function getUnfrozenReserveGoldBalance() external view returns (uint256); function getOrComputeTobinTax() external returns (uint256, uint256); function getTokens() external view returns (address[] memory); function getReserveRatio() external view returns (uint256); function addExchangeSpender(address) external; function removeExchangeSpender(address, uint256) external; function addSpender(address) external; function removeSpender(address) external; }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/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); }
/home/eruiz/Projects/celo/celo-monorepo/packages/protocol/contracts/stability/interfaces/IStableToken.sol
pragma solidity ^0.5.13; /** * @title This interface describes the functions specific to Celo Stable Tokens, and in the * absence of interface inheritance is intended as a companion to IERC20.sol and ICeloToken.sol. */ interface IStableToken { function mint(address, uint256) external returns (bool); function burn(uint256) external returns (bool); function setInflationParameters(uint256, uint256) external; function valueToUnits(uint256) external view returns (uint256); function unitsToValue(uint256) external view returns (uint256); function getInflationParameters() external view returns (uint256, uint256, uint256, uint256); // NOTE: duplicated with IERC20.sol, remove once interface inheritance is supported. function balanceOf(address) external view returns (uint256); }
/openzeppelin-solidity/contracts/GSN/Context.sol
pragma solidity ^0.5.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
/openzeppelin-solidity/contracts/cryptography/ECDSA.sol
pragma solidity ^0.5.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * NOTE: This call _does not revert_ if the signature is invalid, or * if the signer is otherwise unable to be retrieved. In those scenarios, * the zero address is returned. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return address(0); } if (v != 27 && v != 28) { return address(0); } // If the signature is valid (and not malleable), return the signer address return ecrecover(hash, v, r, s); } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } }
/openzeppelin-solidity/contracts/math/Math.sol
pragma solidity ^0.5.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
/openzeppelin-solidity/contracts/math/SafeMath.sol
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
/openzeppelin-solidity/contracts/ownership/Ownable.sol
pragma solidity ^0.5.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
/openzeppelin-solidity/contracts/utils/Address.sol
pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bool","name":"test","internalType":"bool"}]},{"type":"event","name":"AccountSlashed","inputs":[{"type":"address","name":"slashed","internalType":"address","indexed":true},{"type":"uint256","name":"penalty","internalType":"uint256","indexed":false},{"type":"address","name":"reporter","internalType":"address","indexed":true},{"type":"uint256","name":"reward","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GoldLocked","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GoldRelocked","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GoldUnlocked","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"available","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GoldWithdrawn","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"value","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":"SlasherWhitelistAdded","inputs":[{"type":"string","name":"slasherIdentifier","internalType":"string","indexed":true}],"anonymous":false},{"type":"event","name":"SlasherWhitelistRemoved","inputs":[{"type":"string","name":"slasherIdentifier","internalType":"string","indexed":true}],"anonymous":false},{"type":"event","name":"UnlockingPeriodSet","inputs":[{"type":"uint256","name":"period","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"addSlasher","inputs":[{"type":"string","name":"slasherIdentifier","internalType":"string"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"decrementNonvotingAccountBalance","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAccountNonvotingLockedGold","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAccountTotalLockedGold","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNonvotingLockedGold","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getPendingWithdrawals","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32[]","name":"","internalType":"bytes32[]"}],"name":"getSlashingWhitelist","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalLockedGold","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalPendingWithdrawals","inputs":[{"type":"address","name":"account","internalType":"address"}],"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":"nonpayable","payable":false,"outputs":[],"name":"incrementNonvotingAccountBalance","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"initialize","inputs":[{"type":"address","name":"registryAddress","internalType":"address"},{"type":"uint256","name":"_unlockingPeriod","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"initialized","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isSlasher","inputs":[{"type":"address","name":"slasher","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"lock","inputs":[],"constant":false},{"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":"relock","inputs":[{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"removeSlasher","inputs":[{"type":"string","name":"slasherIdentifier","internalType":"string"},{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceOwnership","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setRegistry","inputs":[{"type":"address","name":"registryAddress","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setUnlockingPeriod","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"slash","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"penalty","internalType":"uint256"},{"type":"address","name":"reporter","internalType":"address"},{"type":"uint256","name":"reward","internalType":"uint256"},{"type":"address[]","name":"lessers","internalType":"address[]"},{"type":"address[]","name":"greaters","internalType":"address[]"},{"type":"uint256[]","name":"indices","internalType":"uint256[]"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"slashingWhitelist","inputs":[{"type":"uint256","name":"","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalNonvoting","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"unlock","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"unlockingPeriod","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"constant":false}]
Contract Creation Code
0x60806040523480156200001157600080fd5b50604051620047b2380380620047b2833981810160405260208110156200003757600080fd5b810190808051906020019092919050505080600160008190555080620000725760018060006101000a81548160ff0219169083151502179055505b506000620000856200012a60201b60201c565b9050806001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505062000132565b600033905090565b61467080620001426000396000f3fe6080604052600436106101cd5760003560e01c80636adcc938116100f7578063a91ee0dc11610095578063cd6dc68711610064578063cd6dc68714610acb578063f2fde38b14610b26578063f340c0d014610b77578063f83d08ba14610c65576101cd565b8063a91ee0dc146109a5578063b2fb30cb146109f6578063b6e1e49d14610a3b578063c1867f6d14610aa0576101cd565b80637b103999116100d15780637b1039991461089d578063807876b7146108f45780638da5cb5b1461091f5780638f32d59b14610976576101cd565b80636adcc938146107dc5780636edf77a51461082b578063715018a614610886576101cd565b806330ec70f51161016f57806357601c5d1161013e57806357601c5d146106775780636198e339146106e0578063648911981461071b57806366f0633b146107a1576101cd565b806330ec70f5146103e957806331993fc91461044e5780633f199b40146105d257806354255be014610637576101cd565b80631fe2dfda116101ab5780631fe2dfda146102c857806320637d8e146103585780632e1a7d4d1461038357806330a61d59146103be576101cd565b806308764ee2146101d2578063158ef93e1461023e57806318a4ff8c1461026d575b600080fd5b3480156101de57600080fd5b506101e7610c6f565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561022a57808201518184015260208101905061020f565b505050509050019250505060405180910390f35b34801561024a57600080fd5b50610253610cc7565b604051808215151515815260200191505060405180910390f35b34801561027957600080fd5b506102c66004803603604081101561029057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cda565b005b3480156102d457600080fd5b50610356600480360360408110156102eb57600080fd5b810190808035906020019064010000000081111561030857600080fd5b82018360208201111561031a57600080fd5b8035906020019184600183028401116401000000008311171561033c57600080fd5b909192939192939080359060200190929190505050610e7e565b005b34801561036457600080fd5b5061036d611164565b6040518082815260200191505060405180910390f35b34801561038f57600080fd5b506103bc600480360360208110156103a657600080fd5b810190808035906020019092919050505061116a565b005b3480156103ca57600080fd5b506103d361158c565b6040518082815260200191505060405180910390f35b3480156103f557600080fd5b506104386004803603602081101561040c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061162f565b6040518082815260200191505060405180910390f35b34801561045a57600080fd5b506105d0600480360360e081101561047157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156104e257600080fd5b8201836020820111156104f457600080fd5b8035906020019184602083028401116401000000008311171561051657600080fd5b90919293919293908035906020019064010000000081111561053757600080fd5b82018360208201111561054957600080fd5b8035906020019184602083028401116401000000008311171561056b57600080fd5b90919293919293908035906020019064010000000081111561058c57600080fd5b82018360208201111561059e57600080fd5b803590602001918460208302840111640100000000831117156105c057600080fd5b9091929391929390505050611750565b005b3480156105de57600080fd5b50610621600480360360208110156105f557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611edb565b6040518082815260200191505060405180910390f35b34801561064357600080fd5b5061064c611f27565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34801561068357600080fd5b506106c66004803603602081101561069a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f4e565b604051808215151515815260200191505060405180910390f35b3480156106ec57600080fd5b506107196004803603602081101561070357600080fd5b8101908080359060200190929190505050612078565b005b34801561072757600080fd5b5061079f6004803603602081101561073e57600080fd5b810190808035906020019064010000000081111561075b57600080fd5b82018360208201111561076d57600080fd5b8035906020019184600183028401116401000000008311171561078f57600080fd5b90919293919293905050506125e4565b005b3480156107ad57600080fd5b506107da600480360360208110156107c457600080fd5b810190808035906020019092919050505061291e565b005b3480156107e857600080fd5b50610815600480360360208110156107ff57600080fd5b8101908080359060200190929190505050612a51565b6040518082815260200191505060405180910390f35b34801561083757600080fd5b506108846004803603604081101561084e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a72565b005b34801561089257600080fd5b5061089b612c16565b005b3480156108a957600080fd5b506108b2612d4f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561090057600080fd5b50610909612d75565b6040518082815260200191505060405180910390f35b34801561092b57600080fd5b50610934612d7f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561098257600080fd5b5061098b612da8565b604051808215151515815260200191505060405180910390f35b3480156109b157600080fd5b506109f4600480360360208110156109c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e06565b005b348015610a0257600080fd5b50610a3960048036036040811015610a1957600080fd5b810190808035906020019092919080359060200190929190505050612faa565b005b348015610a4757600080fd5b50610a8a60048036036020811015610a5e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613342565b6040518082815260200191505060405180910390f35b348015610aac57600080fd5b50610ab561345a565b6040518082815260200191505060405180910390f35b348015610ad757600080fd5b50610b2460048036036040811015610aee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613460565b005b348015610b3257600080fd5b50610b7560048036036020811015610b4957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061351c565b005b348015610b8357600080fd5b50610bc660048036036020811015610b9a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135a2565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610c0d578082015181840152602081019050610bf2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610c4f578082015181840152602081019050610c34565b5050505090500194505050505060405180910390f35b610c6d61387f565b005b60606005805480602002602001604051908101604052809291908181526020018280548015610cbd57602002820191906000526020600020905b815481526020019060010190808311610ca9575b5050505050905090565b600160009054906101000a900460ff1681565b60405160200180807f456c656374696f6e0000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610dab57600080fd5b505afa158015610dbf573d6000803e3d6000fd5b505050506040513d6020811015610dd557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b610e798383613a98565b505050565b610e86612da8565b610ef8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600083836040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090506004600082815260200190815260200160002060009054906101000a900460ff16610fa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806145f46027913960400191505060405180910390fd5b6005805490508210610fff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806145cc6028913960400191505060405180910390fd5b806005838154811061100d57fe5b90600052602060002001541461108b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f496e64657820646f65736e2774206d61746368206964656e746966696572000081525060200191505060405180910390fd5b6005600160058054905003815481106110a057fe5b9060005260206000200154600583815481106110b857fe5b906000526020600020018190555060058054806110d157fe5b6001900381819060005260206000200160009055905560006004600083815260200190815260200160002060006101000a81548160ff021916908315150217905550838360405180838380828437808301925050509250505060405180910390207faee8df56d95b5766042c2ff4dcb39a120f0a09dd21bb9c143f86a314eff4b71460405160405180910390a250505050565b60075481565b60016000808282540192505081905550600080549050611188613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120457600080fd5b505afa158015611218573d6000803e3d6000fd5b505050506040513d602081101561122e57600080fd5b81019080805190602001909291905050506112b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600101805490508310611370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261642070656e64696e67207769746864726177616c20696e6465780000000081525060200191505060405180910390fd5b600081600101848154811061138157fe5b90600052602060002090600202019050806001015442101561140b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f50656e64696e67207769746864726177616c206e6f7420617661696c61626c6581525060200191505060405180910390fd5b6000816000015490506114218360010186613c4d565b47811115611497576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e636f6e73697374656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b6114c0813373ffffffffffffffffffffffffffffffffffffffff16613cc790919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f292d39ba701489b7f640c83806d3eeabe0a32c9f0a61b49e95612ebad42211cd826040518082815260200191505060405180910390a25050506000548114611588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5050565b600061162a611599613e01565b73ffffffffffffffffffffffffffffffffffffffff16639a0e7d666040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b8101908080519060200190929190505050600654613efc90919063ffffffff16565b905090565b600080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050611748611682613e01565b73ffffffffffffffffffffffffffffffffffffffff16636c781a2c856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156116fe57600080fd5b505afa158015611712573d6000803e3d6000fd5b505050506040513d602081101561172857600080fd5b810190808051906020019092919050505082613efc90919063ffffffff16565b915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317c508186005336040518363ffffffff1660e01b815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818154815260200191508054801561181757602002820191906000526020600020905b815481526020019060010190808311611803575b5050935050505060206040518083038186803b15801561183657600080fd5b505afa15801561184a573d6000803e3d6000fd5b505050506040513d602081101561186057600080fd5b81019080805190602001909291905050506118c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061451f6024913960400191505060405180910390fd5b60006118da8a6118d58d61162f565b613f84565b905087811015611952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f7265776172642063616e6e6f74206578636565642070656e616c74792e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a485761198e613b52565b73ffffffffffffffffffffffffffffffffffffffff166393c5c4878a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a0a57600080fd5b505afa158015611a1e573d6000803e3d6000fd5b505050506040513d6020811015611a3457600080fd5b810190808051906020019092919050505098505b6000600360008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050600080905082821015611c7757611aaf8284613f9d90919063ffffffff16565b905080611aba613e01565b73ffffffffffffffffffffffffffffffffffffffff16638ef01def8f848d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188815260200180602001806020018060200184810384528a8a82818152602001925060200280828437600081840152601f19601f8201169050808301925050508481038352888882818152602001925060200280828437600081840152601f19601f8201169050808301925050508481038252868682818152602001925060200280828437600081840152601f19601f8201169050808301925050509b505050505050505050505050602060405180830381600087803b158015611be557600080fd5b505af1158015611bf9573d6000803e3d6000fd5b505050506040513d6020811015611c0f57600080fd5b810190808051906020019092919050505014611c76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061461b6021913960400191505060405180910390fd5b5b611c938d611c8e8386613f9d90919063ffffffff16565b613a98565b611c9d8b8b613fe7565b50506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f476f7665726e616e636500000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d6020811015611d8457600080fd5b81019080805190602001909291905050509050600081905047611db08b85613f9d90919063ffffffff16565b1115611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e636f6e73697374656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b611e5f611e3a8b85613f9d90919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff16613cc790919063ffffffff16565b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff167f7abcb995a115c34a67528d58d5fc5ce02c22cb835ce1685046163f7d366d7111858d604051808381526020018281526020019250505060405180910390a350505050505050505050505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b60008060008060018060016002839350829250819150809050935093509350935090919293565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317c508186005846040518363ffffffff1660e01b815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818154815260200191508054801561201757602002820191906000526020600020905b815481526020019060010190808311612003575b5050935050505060206040518083038186803b15801561203657600080fd5b505afa15801561204a573d6000803e3d6000fd5b505050506040513d602081101561206057600080fd5b81019080805190602001909291905050509050919050565b60016000808282540192505081905550600080549050612096613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561211257600080fd5b505afa158015612126573d6000803e3d6000fd5b505050506040513d602081101561213c57600080fd5b81019080805190602001909291905050506121bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061220a6140a1565b73ffffffffffffffffffffffffffffffffffffffff16635f8dd649336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561228657600080fd5b505afa15801561229a573d6000803e3d6000fd5b505050506040513d60208110156122b057600080fd5b810190808051906020019092919050505015612334576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4163636f756e74206c6f636b656400000000000000000000000000000000000081525060200191505060405180910390fd5b600061233e61419c565b73ffffffffffffffffffffffffffffffffffffffff1663dcff4cf6336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156123ba57600080fd5b505afa1580156123ce573d6000803e3d6000fd5b505050506040513d60208110156123e457600080fd5b810190808051906020019092919050505090506000811480612420575061241c8461240e3361162f565b613f9d90919063ffffffff16565b8111155b612492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f547279696e6720746f20756e6c6f636b20746f6f206d75636820676f6c64000081525060200191505060405180910390fd5b61249c3385613a98565b60006124b360075442613efc90919063ffffffff16565b9050826001016040518060400160405280878152602001838152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050503373ffffffffffffffffffffffffffffffffffffffff167fb1a3aef2a332070da206ad1868a5e327f5aa5144e00e9a7b40717c153158a5888683604051808381526020018281526020019250505060405180910390a250505060005481146125e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5050565b6125ec612da8565b61265e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008282604051602001808383808284378083019250505092505050604051602081830303815290604052805190602001209050600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd927233836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561271d57600080fd5b505afa158015612731573d6000803e3d6000fd5b505050506040513d602081101561274757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614156127e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4964656e746966696572206973206e6f7420726567697374657265640000000081525060200191505060405180910390fd5b6004600082815260200190815260200160002060009054906101000a900460ff1615612876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f43616e6e6f742061646420736c61736865722049442074776963652e0000000081525060200191505060405180910390fd5b600581908060018154018082558091505090600182039060005260206000200160009091929091909150555060016004600083815260200190815260200160002060006101000a81548160ff021916908315150217905550828260405180838380828437808301925050509250505060405180910390207f92a16cb9e1846d175c3007fc61953d186452c9ea1aa34183eb4b7f88cd3f07bb60405160405180910390a2505050565b612926612da8565b612998576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600754811415612a10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f556e6c6f636b696e6720706572696f64206e6f74206368616e6765640000000081525060200191505060405180910390fd5b806007819055507fd9274a7c98edc7c66931fc71872764091e7023fe3867358f8504d4c21b161fc5816040518082815260200191505060405180910390a150565b60058181548110612a5e57fe5b906000526020600020016000915090505481565b60405160200180807f456c656374696f6e0000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612b4357600080fd5b505afa158015612b57573d6000803e3d6000fd5b505050506040513d6020811015612b6d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612c07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b612c118383613fe7565b505050565b612c1e612da8565b612c90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360006001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600654905090565b60006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612dea614297565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b612e0e612da8565b612e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612f23576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b60016000808282540192505081905550600080549050612fc8613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561304457600080fd5b505afa158015613058573d6000803e3d6000fd5b505050506040513d602081101561306e57600080fd5b81019080805190602001909291905050506130f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001018054905084106131b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261642070656e64696e67207769746864726177616c20696e6465780000000081525060200191505060405180910390fd5b60008160010185815481106131c157fe5b90600052602060002090600202019050806000015484111561322e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806145a36029913960400191505060405180910390fd5b806000015484141561324c576132478260010186613c4d565b61326c565b613263848260000154613f9d90919063ffffffff16565b81600001819055505b6132763385613fe7565b3373ffffffffffffffffffffffffffffffffffffffff167fa823fc38a01c2f76d7057a79bb5c317710f26f7dbdea78634598d5519d0f7cb0856040518082815260200191505060405180910390a25050600054811461333d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b600080600090506060600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020016000905b828210156133f3578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906133ad565b50505050905060008090505b815181101561344f5761343282828151811061341757fe5b60200260200101516000015184613efc90919063ffffffff16565b9250613448600182613efc90919063ffffffff16565b90506133ff565b508192505050919050565b60065481565b600160009054906101000a900460ff16156134e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b60018060006101000a81548160ff0219169083151502179055506135063361429f565b61350f82612e06565b6135188161291e565b5050565b613524612da8565b613596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61359f8161429f565b50565b6060806135ad613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561362957600080fd5b505afa15801561363d573d6000803e3d6000fd5b505050506040513d602081101561365357600080fd5b81019080805190602001909291905050506136d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090506060816040519080825280602002602001820160405280156137515781602001602082028038833980820191505090505b5090506060826040519080825280602002602001820160405280156137855781602001602082028038833980820191505090505b50905060008090505b838110156138705761379e6144a3565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010182815481106137eb57fe5b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250509050806000015184838151811061382b57fe5b602002602001018181525050806020015183838151811061384857fe5b60200260200101818152505050613869600182613efc90919063ffffffff16565b905061378e565b50818194509450505050915091565b6001600080828254019250508190555060008054905061389d613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561391957600080fd5b505afa15801561392d573d6000803e3d6000fd5b505050506040513d602081101561394357600080fd5b81019080805190602001909291905050506139c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f6e6f74206163636f756e7400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6139d03334613fe7565b3373ffffffffffffffffffffffffffffffffffffffff167f0f0f2fc5b4c987a49e1663ce2c2d65de12f3b701ff02b4d09461421e63e609e7346040518082815260200191505060405180910390a26000548114613a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50565b613aed81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154613f9d90919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550613b4881600654613f9d90919063ffffffff16565b6006819055505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613c0d57600080fd5b505afa158015613c21573d6000803e3d6000fd5b505050506040513d6020811015613c3757600080fd5b8101908080519060200190929190505050905090565b6000613c6760018480549050613f9d90919063ffffffff16565b9050828181548110613c7557fe5b9060005260206000209060020201838381548110613c8f57fe5b90600052602060002090600202016000820154816000015560018201548160010155905050808381613cc191906144bd565b50505050565b80471015613d3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613d9d576040519150601f19603f3d011682016040523d82523d6000602084013e613da2565b606091505b5050905080613dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180614569603a913960400191505060405180910390fd5b505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f456c656374696f6e0000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613ebc57600080fd5b505afa158015613ed0573d6000803e3d6000fd5b505050506040513d6020811015613ee657600080fd5b8101908080519060200190929190505050905090565b600080828401905083811015613f7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000818310613f935781613f95565b825b905092915050565b6000613fdf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506143e3565b905092915050565b61403c81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154613efc90919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555061409781600654613efc90919063ffffffff16565b6006819055505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f476f7665726e616e636500000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561415c57600080fd5b505afa158015614170573d6000803e3d6000fd5b505050506040513d602081101561418657600080fd5b8101908080519060200190929190505050905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561425757600080fd5b505afa15801561426b573d6000803e3d6000fd5b505050506040513d602081101561428157600080fd5b8101908080519060200190929190505050905090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614325576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806145436026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000838311158290614490576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561445557808201518184015260208101905061443a565b50505050905090810190601f1680156144825780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b604051806040016040528060008152602001600081525090565b8154818355818111156144ea576002028160020283600052602060002091820191016144e991906144ef565b5b505050565b61451b91905b80821115614517576000808201600090556001820160009055506002016144f5565b5090565b9056fe43616c6c6572206973206e6f7420612077686974656c697374656420736c61736865722e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d617920686176652072657665727465645265717565737465642076616c7565206c6172676572207468616e2070656e64696e672076616c756550726f766964656420696e64657820657863656564732077686974656c69737420626f756e64732e43616e6e6f742072656d6f766520736c6173686572204944206e6f74207965742061646465642e43616e6e6f74207265766f6b6520656e6f75676820766f74696e6720676f6c642ea265627a7a723158204235c9728cc51b0ece0832673bb2577a7000fb0eff184258fe9298582ec91b2464736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x6080604052600436106101cd5760003560e01c80636adcc938116100f7578063a91ee0dc11610095578063cd6dc68711610064578063cd6dc68714610acb578063f2fde38b14610b26578063f340c0d014610b77578063f83d08ba14610c65576101cd565b8063a91ee0dc146109a5578063b2fb30cb146109f6578063b6e1e49d14610a3b578063c1867f6d14610aa0576101cd565b80637b103999116100d15780637b1039991461089d578063807876b7146108f45780638da5cb5b1461091f5780638f32d59b14610976576101cd565b80636adcc938146107dc5780636edf77a51461082b578063715018a614610886576101cd565b806330ec70f51161016f57806357601c5d1161013e57806357601c5d146106775780636198e339146106e0578063648911981461071b57806366f0633b146107a1576101cd565b806330ec70f5146103e957806331993fc91461044e5780633f199b40146105d257806354255be014610637576101cd565b80631fe2dfda116101ab5780631fe2dfda146102c857806320637d8e146103585780632e1a7d4d1461038357806330a61d59146103be576101cd565b806308764ee2146101d2578063158ef93e1461023e57806318a4ff8c1461026d575b600080fd5b3480156101de57600080fd5b506101e7610c6f565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561022a57808201518184015260208101905061020f565b505050509050019250505060405180910390f35b34801561024a57600080fd5b50610253610cc7565b604051808215151515815260200191505060405180910390f35b34801561027957600080fd5b506102c66004803603604081101561029057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cda565b005b3480156102d457600080fd5b50610356600480360360408110156102eb57600080fd5b810190808035906020019064010000000081111561030857600080fd5b82018360208201111561031a57600080fd5b8035906020019184600183028401116401000000008311171561033c57600080fd5b909192939192939080359060200190929190505050610e7e565b005b34801561036457600080fd5b5061036d611164565b6040518082815260200191505060405180910390f35b34801561038f57600080fd5b506103bc600480360360208110156103a657600080fd5b810190808035906020019092919050505061116a565b005b3480156103ca57600080fd5b506103d361158c565b6040518082815260200191505060405180910390f35b3480156103f557600080fd5b506104386004803603602081101561040c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061162f565b6040518082815260200191505060405180910390f35b34801561045a57600080fd5b506105d0600480360360e081101561047157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156104e257600080fd5b8201836020820111156104f457600080fd5b8035906020019184602083028401116401000000008311171561051657600080fd5b90919293919293908035906020019064010000000081111561053757600080fd5b82018360208201111561054957600080fd5b8035906020019184602083028401116401000000008311171561056b57600080fd5b90919293919293908035906020019064010000000081111561058c57600080fd5b82018360208201111561059e57600080fd5b803590602001918460208302840111640100000000831117156105c057600080fd5b9091929391929390505050611750565b005b3480156105de57600080fd5b50610621600480360360208110156105f557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611edb565b6040518082815260200191505060405180910390f35b34801561064357600080fd5b5061064c611f27565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34801561068357600080fd5b506106c66004803603602081101561069a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f4e565b604051808215151515815260200191505060405180910390f35b3480156106ec57600080fd5b506107196004803603602081101561070357600080fd5b8101908080359060200190929190505050612078565b005b34801561072757600080fd5b5061079f6004803603602081101561073e57600080fd5b810190808035906020019064010000000081111561075b57600080fd5b82018360208201111561076d57600080fd5b8035906020019184600183028401116401000000008311171561078f57600080fd5b90919293919293905050506125e4565b005b3480156107ad57600080fd5b506107da600480360360208110156107c457600080fd5b810190808035906020019092919050505061291e565b005b3480156107e857600080fd5b50610815600480360360208110156107ff57600080fd5b8101908080359060200190929190505050612a51565b6040518082815260200191505060405180910390f35b34801561083757600080fd5b506108846004803603604081101561084e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a72565b005b34801561089257600080fd5b5061089b612c16565b005b3480156108a957600080fd5b506108b2612d4f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561090057600080fd5b50610909612d75565b6040518082815260200191505060405180910390f35b34801561092b57600080fd5b50610934612d7f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561098257600080fd5b5061098b612da8565b604051808215151515815260200191505060405180910390f35b3480156109b157600080fd5b506109f4600480360360208110156109c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e06565b005b348015610a0257600080fd5b50610a3960048036036040811015610a1957600080fd5b810190808035906020019092919080359060200190929190505050612faa565b005b348015610a4757600080fd5b50610a8a60048036036020811015610a5e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613342565b6040518082815260200191505060405180910390f35b348015610aac57600080fd5b50610ab561345a565b6040518082815260200191505060405180910390f35b348015610ad757600080fd5b50610b2460048036036040811015610aee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613460565b005b348015610b3257600080fd5b50610b7560048036036020811015610b4957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061351c565b005b348015610b8357600080fd5b50610bc660048036036020811015610b9a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135a2565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610c0d578082015181840152602081019050610bf2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610c4f578082015181840152602081019050610c34565b5050505090500194505050505060405180910390f35b610c6d61387f565b005b60606005805480602002602001604051908101604052809291908181526020018280548015610cbd57602002820191906000526020600020905b815481526020019060010190808311610ca9575b5050505050905090565b600160009054906101000a900460ff1681565b60405160200180807f456c656374696f6e0000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610dab57600080fd5b505afa158015610dbf573d6000803e3d6000fd5b505050506040513d6020811015610dd557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b610e798383613a98565b505050565b610e86612da8565b610ef8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600083836040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090506004600082815260200190815260200160002060009054906101000a900460ff16610fa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806145f46027913960400191505060405180910390fd5b6005805490508210610fff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806145cc6028913960400191505060405180910390fd5b806005838154811061100d57fe5b90600052602060002001541461108b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f496e64657820646f65736e2774206d61746368206964656e746966696572000081525060200191505060405180910390fd5b6005600160058054905003815481106110a057fe5b9060005260206000200154600583815481106110b857fe5b906000526020600020018190555060058054806110d157fe5b6001900381819060005260206000200160009055905560006004600083815260200190815260200160002060006101000a81548160ff021916908315150217905550838360405180838380828437808301925050509250505060405180910390207faee8df56d95b5766042c2ff4dcb39a120f0a09dd21bb9c143f86a314eff4b71460405160405180910390a250505050565b60075481565b60016000808282540192505081905550600080549050611188613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120457600080fd5b505afa158015611218573d6000803e3d6000fd5b505050506040513d602081101561122e57600080fd5b81019080805190602001909291905050506112b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600101805490508310611370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261642070656e64696e67207769746864726177616c20696e6465780000000081525060200191505060405180910390fd5b600081600101848154811061138157fe5b90600052602060002090600202019050806001015442101561140b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f50656e64696e67207769746864726177616c206e6f7420617661696c61626c6581525060200191505060405180910390fd5b6000816000015490506114218360010186613c4d565b47811115611497576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e636f6e73697374656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b6114c0813373ffffffffffffffffffffffffffffffffffffffff16613cc790919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f292d39ba701489b7f640c83806d3eeabe0a32c9f0a61b49e95612ebad42211cd826040518082815260200191505060405180910390a25050506000548114611588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5050565b600061162a611599613e01565b73ffffffffffffffffffffffffffffffffffffffff16639a0e7d666040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b8101908080519060200190929190505050600654613efc90919063ffffffff16565b905090565b600080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050611748611682613e01565b73ffffffffffffffffffffffffffffffffffffffff16636c781a2c856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156116fe57600080fd5b505afa158015611712573d6000803e3d6000fd5b505050506040513d602081101561172857600080fd5b810190808051906020019092919050505082613efc90919063ffffffff16565b915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317c508186005336040518363ffffffff1660e01b815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818154815260200191508054801561181757602002820191906000526020600020905b815481526020019060010190808311611803575b5050935050505060206040518083038186803b15801561183657600080fd5b505afa15801561184a573d6000803e3d6000fd5b505050506040513d602081101561186057600080fd5b81019080805190602001909291905050506118c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061451f6024913960400191505060405180910390fd5b60006118da8a6118d58d61162f565b613f84565b905087811015611952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f7265776172642063616e6e6f74206578636565642070656e616c74792e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a485761198e613b52565b73ffffffffffffffffffffffffffffffffffffffff166393c5c4878a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a0a57600080fd5b505afa158015611a1e573d6000803e3d6000fd5b505050506040513d6020811015611a3457600080fd5b810190808051906020019092919050505098505b6000600360008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050600080905082821015611c7757611aaf8284613f9d90919063ffffffff16565b905080611aba613e01565b73ffffffffffffffffffffffffffffffffffffffff16638ef01def8f848d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188815260200180602001806020018060200184810384528a8a82818152602001925060200280828437600081840152601f19601f8201169050808301925050508481038352888882818152602001925060200280828437600081840152601f19601f8201169050808301925050508481038252868682818152602001925060200280828437600081840152601f19601f8201169050808301925050509b505050505050505050505050602060405180830381600087803b158015611be557600080fd5b505af1158015611bf9573d6000803e3d6000fd5b505050506040513d6020811015611c0f57600080fd5b810190808051906020019092919050505014611c76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061461b6021913960400191505060405180910390fd5b5b611c938d611c8e8386613f9d90919063ffffffff16565b613a98565b611c9d8b8b613fe7565b50506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f476f7665726e616e636500000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d6020811015611d8457600080fd5b81019080805190602001909291905050509050600081905047611db08b85613f9d90919063ffffffff16565b1115611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e636f6e73697374656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b611e5f611e3a8b85613f9d90919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff16613cc790919063ffffffff16565b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff167f7abcb995a115c34a67528d58d5fc5ce02c22cb835ce1685046163f7d366d7111858d604051808381526020018281526020019250505060405180910390a350505050505050505050505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b60008060008060018060016002839350829250819150809050935093509350935090919293565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317c508186005846040518363ffffffff1660e01b815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818154815260200191508054801561201757602002820191906000526020600020905b815481526020019060010190808311612003575b5050935050505060206040518083038186803b15801561203657600080fd5b505afa15801561204a573d6000803e3d6000fd5b505050506040513d602081101561206057600080fd5b81019080805190602001909291905050509050919050565b60016000808282540192505081905550600080549050612096613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561211257600080fd5b505afa158015612126573d6000803e3d6000fd5b505050506040513d602081101561213c57600080fd5b81019080805190602001909291905050506121bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061220a6140a1565b73ffffffffffffffffffffffffffffffffffffffff16635f8dd649336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561228657600080fd5b505afa15801561229a573d6000803e3d6000fd5b505050506040513d60208110156122b057600080fd5b810190808051906020019092919050505015612334576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4163636f756e74206c6f636b656400000000000000000000000000000000000081525060200191505060405180910390fd5b600061233e61419c565b73ffffffffffffffffffffffffffffffffffffffff1663dcff4cf6336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156123ba57600080fd5b505afa1580156123ce573d6000803e3d6000fd5b505050506040513d60208110156123e457600080fd5b810190808051906020019092919050505090506000811480612420575061241c8461240e3361162f565b613f9d90919063ffffffff16565b8111155b612492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f547279696e6720746f20756e6c6f636b20746f6f206d75636820676f6c64000081525060200191505060405180910390fd5b61249c3385613a98565b60006124b360075442613efc90919063ffffffff16565b9050826001016040518060400160405280878152602001838152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050503373ffffffffffffffffffffffffffffffffffffffff167fb1a3aef2a332070da206ad1868a5e327f5aa5144e00e9a7b40717c153158a5888683604051808381526020018281526020019250505060405180910390a250505060005481146125e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b5050565b6125ec612da8565b61265e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008282604051602001808383808284378083019250505092505050604051602081830303815290604052805190602001209050600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd927233836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561271d57600080fd5b505afa158015612731573d6000803e3d6000fd5b505050506040513d602081101561274757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614156127e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4964656e746966696572206973206e6f7420726567697374657265640000000081525060200191505060405180910390fd5b6004600082815260200190815260200160002060009054906101000a900460ff1615612876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f43616e6e6f742061646420736c61736865722049442074776963652e0000000081525060200191505060405180910390fd5b600581908060018154018082558091505090600182039060005260206000200160009091929091909150555060016004600083815260200190815260200160002060006101000a81548160ff021916908315150217905550828260405180838380828437808301925050509250505060405180910390207f92a16cb9e1846d175c3007fc61953d186452c9ea1aa34183eb4b7f88cd3f07bb60405160405180910390a2505050565b612926612da8565b612998576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600754811415612a10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f556e6c6f636b696e6720706572696f64206e6f74206368616e6765640000000081525060200191505060405180910390fd5b806007819055507fd9274a7c98edc7c66931fc71872764091e7023fe3867358f8504d4c21b161fc5816040518082815260200191505060405180910390a150565b60058181548110612a5e57fe5b906000526020600020016000915090505481565b60405160200180807f456c656374696f6e0000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001203373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612b4357600080fd5b505afa158015612b57573d6000803e3d6000fd5b505050506040513d6020811015612b6d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612c07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79207265676973746572656420636f6e7472616374000000000000000081525060200191505060405180910390fd5b612c118383613fe7565b505050565b612c1e612da8565b612c90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360006001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600654905090565b60006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612dea614297565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b612e0e612da8565b612e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612f23576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f7420726567697374657220746865206e756c6c206164647265737381525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b60405160405180910390a250565b60016000808282540192505081905550600080549050612fc8613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561304457600080fd5b505afa158015613058573d6000803e3d6000fd5b505050506040513d602081101561306e57600080fd5b81019080805190602001909291905050506130f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001018054905084106131b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261642070656e64696e67207769746864726177616c20696e6465780000000081525060200191505060405180910390fd5b60008160010185815481106131c157fe5b90600052602060002090600202019050806000015484111561322e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806145a36029913960400191505060405180910390fd5b806000015484141561324c576132478260010186613c4d565b61326c565b613263848260000154613f9d90919063ffffffff16565b81600001819055505b6132763385613fe7565b3373ffffffffffffffffffffffffffffffffffffffff167fa823fc38a01c2f76d7057a79bb5c317710f26f7dbdea78634598d5519d0f7cb0856040518082815260200191505060405180910390a25050600054811461333d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b600080600090506060600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020016000905b828210156133f3578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906133ad565b50505050905060008090505b815181101561344f5761343282828151811061341757fe5b60200260200101516000015184613efc90919063ffffffff16565b9250613448600182613efc90919063ffffffff16565b90506133ff565b508192505050919050565b60065481565b600160009054906101000a900460ff16156134e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b60018060006101000a81548160ff0219169083151502179055506135063361429f565b61350f82612e06565b6135188161291e565b5050565b613524612da8565b613596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61359f8161429f565b50565b6060806135ad613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561362957600080fd5b505afa15801561363d573d6000803e3d6000fd5b505050506040513d602081101561365357600080fd5b81019080805190602001909291905050506136d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f556e6b6e6f776e206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905090506060816040519080825280602002602001820160405280156137515781602001602082028038833980820191505090505b5090506060826040519080825280602002602001820160405280156137855781602001602082028038833980820191505090505b50905060008090505b838110156138705761379e6144a3565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010182815481106137eb57fe5b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250509050806000015184838151811061382b57fe5b602002602001018181525050806020015183838151811061384857fe5b60200260200101818152505050613869600182613efc90919063ffffffff16565b905061378e565b50818194509450505050915091565b6001600080828254019250508190555060008054905061389d613b52565b73ffffffffffffffffffffffffffffffffffffffff166325ca4c9c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561391957600080fd5b505afa15801561392d573d6000803e3d6000fd5b505050506040513d602081101561394357600080fd5b81019080805190602001909291905050506139c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f6e6f74206163636f756e7400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6139d03334613fe7565b3373ffffffffffffffffffffffffffffffffffffffff167f0f0f2fc5b4c987a49e1663ce2c2d65de12f3b701ff02b4d09461421e63e609e7346040518082815260200191505060405180910390a26000548114613a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f7265656e7472616e742063616c6c00000000000000000000000000000000000081525060200191505060405180910390fd5b50565b613aed81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154613f9d90919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550613b4881600654613f9d90919063ffffffff16565b6006819055505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f4163636f756e74730000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613c0d57600080fd5b505afa158015613c21573d6000803e3d6000fd5b505050506040513d6020811015613c3757600080fd5b8101908080519060200190929190505050905090565b6000613c6760018480549050613f9d90919063ffffffff16565b9050828181548110613c7557fe5b9060005260206000209060020201838381548110613c8f57fe5b90600052602060002090600202016000820154816000015560018201548160010155905050808381613cc191906144bd565b50505050565b80471015613d3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613d9d576040519150601f19603f3d011682016040523d82523d6000602084013e613da2565b606091505b5050905080613dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180614569603a913960400191505060405180910390fd5b505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f456c656374696f6e0000000000000000000000000000000000000000000000008152506008019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613ebc57600080fd5b505afa158015613ed0573d6000803e3d6000fd5b505050506040513d6020811015613ee657600080fd5b8101908080519060200190929190505050905090565b600080828401905083811015613f7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000818310613f935781613f95565b825b905092915050565b6000613fdf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506143e3565b905092915050565b61403c81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154613efc90919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555061409781600654613efc90919063ffffffff16565b6006819055505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f476f7665726e616e636500000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561415c57600080fd5b505afa158015614170573d6000803e3d6000fd5b505050506040513d602081101561418657600080fd5b8101908080519060200190929190505050905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed60405160200180807f56616c696461746f727300000000000000000000000000000000000000000000815250600a019050604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561425757600080fd5b505afa15801561426b573d6000803e3d6000fd5b505050506040513d602081101561428157600080fd5b8101908080519060200190929190505050905090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614325576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806145436026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000838311158290614490576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561445557808201518184015260208101905061443a565b50505050905090810190601f1680156144825780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b604051806040016040528060008152602001600081525090565b8154818355818111156144ea576002028160020283600052602060002091820191016144e991906144ef565b5b505050565b61451b91905b80821115614517576000808201600090556001820160009055506002016144f5565b5090565b9056fe43616c6c6572206973206e6f7420612077686974656c697374656420736c61736865722e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d617920686176652072657665727465645265717565737465642076616c7565206c6172676572207468616e2070656e64696e672076616c756550726f766964656420696e64657820657863656564732077686974656c69737420626f756e64732e43616e6e6f742072656d6f766520736c6173686572204944206e6f74207965742061646465642e43616e6e6f74207265766f6b6520656e6f75676820766f74696e6720676f6c642ea265627a7a723158204235c9728cc51b0ece0832673bb2577a7000fb0eff184258fe9298582ec91b2464736f6c634300050d0032