Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB 0x79ffee379a81c298824ce4e4a88264b0b13eaa3e.
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
Verify & Publish
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
- Contract name:
- Staking
- Optimization enabled
- false
- Compiler version
- v0.8.17+commit.8df45f5f
- Verified at
- 2023-09-10T22:06:55.897854Z
contracts/lit-node/Staking.sol
//SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.17; import { ERC20Burnable } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { StakingBalances } from "./StakingBalances.sol"; import { ContractResolver } from "../lit-core/ContractResolver.sol"; import "hardhat/console.sol"; contract Staking is Ownable { using EnumerableSet for EnumerableSet.AddressSet; /* ========== STATE VARIABLES ========== */ enum States { Active, NextValidatorSetLocked, ReadyForNextEpoch, Unlocked, Paused } States public state = States.Active; struct Validator { uint32 ip; uint128 ipv6; uint32 port; address nodeAddress; uint256 reward; uint256 senderPubKey; uint256 receiverPubKey; } struct VoteToKickValidatorInNextEpoch { uint256 votes; mapping(address => bool) voted; } struct Epoch { uint256 epochLength; // in seconds uint256 number; // the current epoch number uint256 endTime; // the end timestamp where the next epoch can be kicked off uint256 retries; // incremented upon failure to advance and subsequent unlock uint256 timeout; // timeout in seconds, where the nodes can be unlocked. } Epoch public epoch; struct Config { uint256 tokenRewardPerTokenPerEpoch; uint256 complaintTolerance; // cycles after which to escalate peer complaints to chain uint256 complaintIntervalSecs; // the key type of the node. // 1 = BLS, 2 = ECDSA. Not doing this in an enum so we can add more keytypes in the future without redeploying. uint256[] keyTypes; // don't start the DKG or let nodes leave the validator set // if there are less than this many nodes uint256 minimumValidatorCount; } Config public config; uint256 public totalStaked; EnumerableSet.AddressSet validatorsInCurrentEpoch; EnumerableSet.AddressSet validatorsInNextEpoch; EnumerableSet.AddressSet validatorsKickedFromNextEpoch; ContractResolver public contractResolver; ContractResolver.Env public env; // errors error MustBeInActiveOrUnlockedState(States state); error MustBeInNextValidatorSetLockedOrReadyForNextEpochState(States state); error MustBeInNextValidatorSetLockedState(States state); error MustBeInReadyForNextEpochState(States state); error MustBeInActiveOrUnlockedOrPausedState(States state); error NotEnoughValidatorsInNextEpoch( uint256 validatorCount, uint256 minimumValidatorCount ); error ValidatorIsNotInNextEpoch( address validator, address[] validatorsInNextEpoch ); error NotEnoughValidatorsReadyForNextEpoch( uint256 currentReadyValidatorCount, uint256 nextReadyValidatorCount, uint256 minimumValidatorCountToBeReady ); error CannotStakeZero(); error CannotRejoinUntilNextEpochBecauseKicked(address stakingAddress); error ActiveValidatorsCannotLeave(); error TryingToWithdrawMoreThanStaked( uint256 yourBalance, uint256 requestedWithdrawlAmount ); error CouldNotMapNodeAddressToStakerAddress(address nodeAddress); error MustBeValidatorInNextEpochToKick(address stakerAddress); error CannotVoteTwice(address stakerAddress); error NotEnoughTimeElapsedSinceLastEpoch( uint256 currentTimestamp, uint256 epochEndTime ); error NotEnoughTimeElapsedForTimeoutSinceLastEpoch( uint256 currentTimestamp, uint256 epochEndTime, uint256 timeout ); error CannotWithdrawZero(); error CannotReuseCommsKeys(uint256 senderPubKey, uint256 receiverPubKey); error StakerNotPermitted(address stakerAddress); error SignaledReadyForWrongEpochNumber( uint256 currentEpochNumber, uint256 receivedEpochNumber ); // list of all validators, even ones that are not in the current or next epoch // maps STAKER address to Validator struct mapping(address => Validator) public validators; // stakers join by staking, but nodes need to be able to vote to kick. // to avoid node operators having to run a hotwallet with their staking private key, // the node gets it's own private key that it can use to vote to kick, // or signal that the next epoch is ready. // this mapping lets you go from the nodeAddressto the stakingAddress. mapping(address => address) public nodeAddressToStakerAddress; // after the validator set is locked, nodes vote that they have successfully completed the PSS // operation. Once a threshold of nodes have voted that they are ready, then the epoch can advance mapping(address => bool) public readyForNextEpoch; // nodes can vote to kick another node. If a threshold of nodes vote to kick someone, they // are removed from the next validator set mapping(uint256 => mapping(address => VoteToKickValidatorInNextEpoch)) public votesToKickValidatorsInNextEpoch; // maps kick reason to amount to slash mapping(uint256 => uint256) public kickPenaltyPercentByReason; // maps hash(comms_sender_pubkey,comms_receiver_pubkey) to a boolean to show if // the set of comms keys has been used or not mapping(bytes32 => bool) public usedCommsKeys; /* ========== CONSTRUCTOR ========== */ constructor( address _resolver, uint256[] memory _keyTypes, ContractResolver.Env _env ) { contractResolver = ContractResolver(_resolver); env = _env; // 0.05 tokens per token staked meaning a 5% per epoch inflation rate ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); config = Config({ tokenRewardPerTokenPerEpoch: (10 ** stakingToken.decimals()) / 20, complaintTolerance: 15, complaintIntervalSecs: 60, keyTypes: _keyTypes, minimumValidatorCount: 2 }); uint256 epochLengthSeconds = 1; epoch = Epoch({ epochLength: epochLengthSeconds, number: 1, endTime: block.timestamp + epochLengthSeconds, retries: 0, timeout: 60 }); // set default kick penalty to 1% for reason "1" kickPenaltyPercentByReason[1] = 1; state = States.Paused; } /* ========== VIEWS ========== */ function getKeyTypes() external view returns (uint256[] memory) { return config.keyTypes; } /// get the token address from the resolver function getTokenAddress() public view returns (address) { return contractResolver.getContract( contractResolver.LIT_TOKEN_CONTRACT(), env ); } // get the staking balances address from the resolver function getStakingBalancesAddress() public view returns (address) { return contractResolver.getContract( contractResolver.STAKING_BALANCES_CONTRACT(), env ); } function isActiveValidator(address account) external view returns (bool) { return validatorsInCurrentEpoch.contains(account); } function isActiveValidatorByNodeAddress( address account ) external view returns (bool) { return validatorsInCurrentEpoch.contains( nodeAddressToStakerAddress[account] ); } function getVotingStatusToKickValidator( uint256 epochNumber, address validatorStakerAddress, address voterStakerAddress ) external view returns (uint256, bool) { VoteToKickValidatorInNextEpoch storage votingStatus = votesToKickValidatorsInNextEpoch[ epochNumber ][validatorStakerAddress]; return (votingStatus.votes, votingStatus.voted[voterStakerAddress]); } function getValidatorsInCurrentEpoch() public view returns (address[] memory) { address[] memory values = new address[]( validatorsInCurrentEpoch.length() ); uint256 validatorLength = validatorsInCurrentEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { values[i] = validatorsInCurrentEpoch.at(i); } return values; } function getValidatorsInCurrentEpochLength() external view returns (uint256) { return validatorsInCurrentEpoch.length(); } function getValidatorsInNextEpoch() public view returns (address[] memory) { address[] memory values = new address[](validatorsInNextEpoch.length()); uint256 validatorLength = validatorsInNextEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { values[i] = validatorsInNextEpoch.at(i); } return values; } function getValidatorsStructs( address[] memory addresses ) public view returns (Validator[] memory) { Validator[] memory values = new Validator[](addresses.length); for (uint256 i = 0; i < addresses.length; i++) { values[i] = validators[addresses[i]]; } return values; } function getValidatorsStructsInCurrentEpoch() external view returns (Validator[] memory) { address[] memory addresses = getValidatorsInCurrentEpoch(); return getValidatorsStructs(addresses); } function getValidatorsStructsInNextEpoch() external view returns (Validator[] memory) { address[] memory addresses = getValidatorsInNextEpoch(); return getValidatorsStructs(addresses); } function countOfCurrentValidatorsReadyForNextEpoch() public view returns (uint256) { uint256 total = 0; uint256 validatorLength = validatorsInCurrentEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { if (readyForNextEpoch[validatorsInCurrentEpoch.at(i)]) { total++; } } return total; } function countOfNextValidatorsReadyForNextEpoch() public view returns (uint256) { uint256 total = 0; uint256 validatorLength = validatorsInNextEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { if (readyForNextEpoch[validatorsInNextEpoch.at(i)]) { total++; } } return total; } function isReadyForNextEpoch() public view returns (bool) { // confirm that current validator set is ready if ( countOfCurrentValidatorsReadyForNextEpoch() < currentValidatorCountForConsensus() ) { return false; } // confirm that next validator set is ready if ( countOfNextValidatorsReadyForNextEpoch() < nextValidatorCountForConsensus() ) { return false; } return true; } function shouldKickValidator( address stakerAddress ) public view returns (bool) { VoteToKickValidatorInNextEpoch storage vk = votesToKickValidatorsInNextEpoch[epoch.number][ stakerAddress ]; if (vk.votes >= currentValidatorCountForConsensus()) { // 2/3 of validators must vote return true; } return false; } // currently set to 2/3. this could be changed to be configurable. function currentValidatorCountForConsensus() public view returns (uint256) { if (validatorsInCurrentEpoch.length() == 2) { return 1; } return (validatorsInCurrentEpoch.length() * 2) / 3; } /// require all nodes in the next validator set to vote that they're ready /// any offline nodes will be kicked from the next validator set so that's why this is safe function nextValidatorCountForConsensus() public view returns (uint256) { return validatorsInNextEpoch.length(); } function getKickedValidators() public view returns (address[] memory) { address[] memory values = new address[]( validatorsKickedFromNextEpoch.length() ); uint256 validatorLength = validatorsKickedFromNextEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { values[i] = validatorsKickedFromNextEpoch.at(i); } return values; } /* ========== MUTATIVE FUNCTIONS ========== */ /// Lock in the validators for the next epoch function lockValidatorsForNextEpoch() public { if (block.timestamp < epoch.endTime) { revert NotEnoughTimeElapsedSinceLastEpoch( block.timestamp, epoch.endTime ); } if (!(state == States.Active || state == States.Unlocked)) { revert MustBeInActiveOrUnlockedState(state); } if (validatorsInNextEpoch.length() < config.minimumValidatorCount) { revert NotEnoughValidatorsInNextEpoch( validatorsInNextEpoch.length(), config.minimumValidatorCount ); } state = States.NextValidatorSetLocked; emit StateChanged(state); } /// After proactive secret sharing is complete, the nodes may signal that they are ready for the next epoch. Note that this function is called by the node itself, and so msg.sender is the nodeAddress and not the stakerAddress. function signalReadyForNextEpoch(uint256 epochNumber) public { if (epoch.number != epochNumber) { revert SignaledReadyForWrongEpochNumber(epoch.number, epochNumber); } address stakerAddress = nodeAddressToStakerAddress[msg.sender]; if ( !(state == States.NextValidatorSetLocked || state == States.ReadyForNextEpoch) ) { revert MustBeInNextValidatorSetLockedOrReadyForNextEpochState( state ); } // at the first epoch, validatorsInCurrentEpoch is empty if (epoch.number != 1) { if (!validatorsInNextEpoch.contains(stakerAddress)) { revert ValidatorIsNotInNextEpoch( stakerAddress, getValidatorsInNextEpoch() ); } } readyForNextEpoch[stakerAddress] = true; emit ReadyForNextEpoch(stakerAddress, epoch.number); if (isReadyForNextEpoch()) { state = States.ReadyForNextEpoch; emit StateChanged(state); } } /// If the nodes fail to advance (e.g. because dkg failed), anyone can call to unlock and allow retry function unlockValidatorsForNextEpoch() public { // the deadline to advance is thus epoch.endBlock + epoch.timeout if (block.timestamp < epoch.endTime + epoch.timeout) { revert NotEnoughTimeElapsedForTimeoutSinceLastEpoch( block.timestamp, epoch.endTime, epoch.timeout ); } if (state != States.NextValidatorSetLocked) { revert MustBeInNextValidatorSetLockedState(state); } uint256 validatorLength = validatorsInNextEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { readyForNextEpoch[validatorsInNextEpoch.at(i)] = false; } epoch.retries++; state = States.Unlocked; emit StateChanged(state); } /// Advance to the next Epoch. Rewards validators, adds the joiners, and removes the leavers function advanceEpoch() public { if (block.timestamp < epoch.endTime) { revert NotEnoughTimeElapsedSinceLastEpoch( block.timestamp, epoch.endTime ); } if (state != States.ReadyForNextEpoch) { revert MustBeInReadyForNextEpochState(state); } if (!isReadyForNextEpoch()) { revert NotEnoughValidatorsReadyForNextEpoch( countOfCurrentValidatorsReadyForNextEpoch(), countOfNextValidatorsReadyForNextEpoch(), currentValidatorCountForConsensus() ); } // reward the validators uint256 validatorLength = validatorsInCurrentEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { address validatorAddress = validatorsInCurrentEpoch.at(i); ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); uint256 reward = (config.tokenRewardPerTokenPerEpoch * stakingBalances.balanceOf(validatorAddress)) / 10 ** stakingToken.decimals(); stakingBalances.rewardValidator(reward, validatorAddress); } // set the validators to the new validator set // ideally we could just do this: // validatorsInCurrentEpoch = validatorsInNextEpoch; // but solidity doesn't allow that, so we have to do it manually // clear out validators in current epoch while (validatorsInCurrentEpoch.length() > 0) { validatorsInCurrentEpoch.remove(validatorsInCurrentEpoch.at(0)); } // copy validators from next epoch to current epoch validatorLength = validatorsInNextEpoch.length(); for (uint256 i = 0; i < validatorLength; i++) { validatorsInCurrentEpoch.add(validatorsInNextEpoch.at(i)); // clear out readyForNextEpoch readyForNextEpoch[validatorsInNextEpoch.at(i)] = false; } epoch.number++; epoch.endTime = block.timestamp + epoch.epochLength; state = States.Active; emit StateChanged(state); } /// Stake and request to join the validator set /// @param amount The amount of tokens to stake /// @param ip The IP address of the node /// @param port The port of the node function stakeAndJoin( uint256 amount, uint32 ip, uint128 ipv6, uint32 port, address nodeAddress, uint256 senderPubKey, uint256 receiverPubKey ) public { stake(amount); requestToJoin( ip, ipv6, port, nodeAddress, senderPubKey, receiverPubKey ); } function stake(uint256 amount) public { StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); stakingBalances.stake(amount, msg.sender); } function requestToJoin( uint32 ip, uint128 ipv6, uint32 port, address nodeAddress, uint256 senderPubKey, uint256 receiverPubKey ) public { StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); stakingBalances.checkStakingAmounts(msg.sender); if ( !(state == States.Active || state == States.Unlocked || state == States.Paused) ) { revert MustBeInActiveOrUnlockedOrPausedState(state); } // make sure they haven't been kicked if (validatorsKickedFromNextEpoch.contains(msg.sender)) { revert CannotRejoinUntilNextEpochBecauseKicked(msg.sender); } bytes32 commsKeysHash = keccak256( abi.encodePacked(senderPubKey, receiverPubKey) ); if (usedCommsKeys[commsKeysHash]) { revert CannotReuseCommsKeys(senderPubKey, receiverPubKey); } usedCommsKeys[commsKeysHash] = true; if (stakingBalances.permittedStakersOn()) { if (!stakingBalances.isPermittedStaker(msg.sender)) { revert StakerNotPermitted(msg.sender); } } validators[msg.sender].ip = ip; validators[msg.sender].ipv6 = ipv6; validators[msg.sender].port = port; validators[msg.sender].nodeAddress = nodeAddress; validators[msg.sender].senderPubKey = senderPubKey; validators[msg.sender].receiverPubKey = receiverPubKey; nodeAddressToStakerAddress[nodeAddress] = msg.sender; validatorsInNextEpoch.add(msg.sender); emit RequestToJoin(msg.sender); } /// Withdraw staked tokens. This can only be done by users who are not active in the validator set. /// @param amount The amount of tokens to withdraw function withdraw(uint256 amount) public { StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); stakingBalances.withdraw(amount, msg.sender); } /// Request to leave in the next Epoch function requestToLeave() public { if ( !(state == States.Active || state == States.Unlocked || state == States.Paused) ) { revert MustBeInActiveOrUnlockedOrPausedState(state); } if (validatorsInNextEpoch.length() - 1 < config.minimumValidatorCount) { revert NotEnoughValidatorsInNextEpoch( validatorsInNextEpoch.length(), config.minimumValidatorCount ); } removeValidatorFromNextEpoch(msg.sender); emit RequestToLeave(msg.sender); } /// Transfer any outstanding reward tokens function getReward() public { StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); stakingBalances.getReward(msg.sender); } /// Exit staking and get any outstanding rewards function exit() public { StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); stakingBalances.withdraw( stakingBalances.balanceOf(msg.sender), msg.sender ); stakingBalances.getReward(msg.sender); } /// If more than the threshold of validators vote to kick someone, kick them. /// It's expected that this will be called by the node directly, so msg.sender will be the nodeAddress function kickValidatorInNextEpoch( address validatorStakerAddress, uint256 reason, bytes calldata data ) public { address stakerAddressOfSender = nodeAddressToStakerAddress[msg.sender]; if (stakerAddressOfSender == address(0)) { revert CouldNotMapNodeAddressToStakerAddress(msg.sender); } if (!validatorsInNextEpoch.contains(stakerAddressOfSender)) { revert MustBeValidatorInNextEpochToKick(stakerAddressOfSender); } if ( votesToKickValidatorsInNextEpoch[epoch.number][ validatorStakerAddress ].voted[stakerAddressOfSender] ) { revert CannotVoteTwice(stakerAddressOfSender); } // Vote to kick votesToKickValidatorsInNextEpoch[epoch.number][validatorStakerAddress] .votes++; votesToKickValidatorsInNextEpoch[epoch.number][validatorStakerAddress] .voted[stakerAddressOfSender] = true; if ( validatorsInNextEpoch.contains(validatorStakerAddress) && shouldKickValidator(validatorStakerAddress) ) { // remove them from the validator set removeValidatorFromNextEpoch(validatorStakerAddress); // block them from rejoining the next epoch validatorsKickedFromNextEpoch.add(validatorStakerAddress); // slash the stake uint256 kickPenaltyPercent = kickPenaltyPercentByReason[reason]; StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); uint256 amountToPenalize = (stakingBalances.balanceOf( validatorStakerAddress ) * kickPenaltyPercent) / 100; stakingBalances.penalizeTokens( amountToPenalize, validatorStakerAddress ); // shame them with an event emit ValidatorKickedFromNextEpoch( validatorStakerAddress, amountToPenalize ); } emit VotedToKickValidatorInNextEpoch( stakerAddressOfSender, validatorStakerAddress, reason, data ); } /// Set the IP and port of your node /// @param ip The ip address of your node /// @param port The port of your node function setIpPortNodeAddressAndCommunicationPubKeys( uint32 ip, uint128 ipv6, uint32 port, address nodeAddress, uint256 senderPubKey, uint256 receiverPubKey ) public { validators[msg.sender].ip = ip; validators[msg.sender].ipv6 = ipv6; validators[msg.sender].port = port; validators[msg.sender].nodeAddress = nodeAddress; validators[msg.sender].senderPubKey = senderPubKey; validators[msg.sender].receiverPubKey = receiverPubKey; } function setEpochLength(uint256 newEpochLength) public onlyOwner { epoch.epochLength = newEpochLength; emit EpochLengthSet(newEpochLength); } function setEpochTimeout(uint256 newEpochTimeout) public onlyOwner { epoch.timeout = newEpochTimeout; emit EpochTimeoutSet(newEpochTimeout); } function setEpochEndTime(uint256 newEpochEndTime) public onlyOwner { epoch.endTime = newEpochEndTime; emit EpochEndTimeSet(newEpochEndTime); } function setContractResolver(address newResolverAddress) public onlyOwner { contractResolver = ContractResolver(newResolverAddress); emit ResolverContractAddressSet(newResolverAddress); } function setKickPenaltyPercent( uint256 reason, uint256 newKickPenaltyPercent ) public onlyOwner { kickPenaltyPercentByReason[reason] = newKickPenaltyPercent; emit KickPenaltyPercentSet(reason, newKickPenaltyPercent); } function setEpochState(States newState) public onlyOwner { state = newState; emit StateChanged(newState); } function pauseEpoch() public onlyOwner { state = States.Paused; emit StateChanged(States.Paused); } function adminKickValidatorInNextEpoch( address validatorStakerAddress ) public onlyOwner { // remove from next validator set validatorsInNextEpoch.remove(validatorStakerAddress); // block them from rejoining the next epoch validatorsKickedFromNextEpoch.add(validatorStakerAddress); removeValidatorFromNextEpoch(msg.sender); emit ValidatorKickedFromNextEpoch(validatorStakerAddress, 0); } function adminSlashValidator( address validatorStakerAddress, uint256 amountToPenalize ) public onlyOwner { StakingBalances stakingBalances = StakingBalances( getStakingBalancesAddress() ); stakingBalances.penalizeTokens( amountToPenalize, validatorStakerAddress ); } function removeValidatorFromNextEpoch(address staker) internal { if (validatorsInNextEpoch.contains(staker)) { // remove them validatorsInNextEpoch.remove(staker); } Validator memory validator = validators[staker]; bytes32 commsKeysHash = keccak256( abi.encodePacked(validator.senderPubKey, validator.receiverPubKey) ); usedCommsKeys[commsKeysHash] = false; } function adminRejoinValidator(address staker) public onlyOwner { // remove from kicked list validatorsKickedFromNextEpoch.remove(staker); // add to next validator set validatorsInNextEpoch.add(staker); emit ValidatorRejoinedNextEpoch(staker); } function setConfig( uint256 newTokenRewardPerTokenPerEpoch, uint256 newComplaintTolerance, uint256 newComplaintIntervalSecs, uint256[] memory newKeyTypes, uint256 newMinimumValidatorCount ) public onlyOwner { config.tokenRewardPerTokenPerEpoch = newTokenRewardPerTokenPerEpoch; config.complaintTolerance = newComplaintTolerance; config.complaintIntervalSecs = newComplaintIntervalSecs; config.keyTypes = newKeyTypes; config.minimumValidatorCount = newMinimumValidatorCount; emit ConfigSet( newTokenRewardPerTokenPerEpoch, newComplaintTolerance, newComplaintIntervalSecs, newKeyTypes, newMinimumValidatorCount ); } /* ========== EVENTS ========== */ event RewardsDurationUpdated(uint256 newDuration); event RequestToJoin(address indexed staker); event RequestToLeave(address indexed staker); event Recovered(address token, uint256 amount); event ReadyForNextEpoch(address indexed staker, uint256 epochNumber); event StateChanged(States newState); event VotedToKickValidatorInNextEpoch( address indexed reporter, address indexed validatorStakerAddress, uint256 indexed reason, bytes data ); event ValidatorKickedFromNextEpoch( address indexed staker, uint256 amountBurned ); // onlyOwner events event EpochLengthSet(uint256 newEpochLength); event EpochTimeoutSet(uint256 newEpochTimeout); event EpochEndTimeSet(uint256 newEpochEndTime); event StakingTokenSet(address newStakingTokenAddress); event KickPenaltyPercentSet(uint256 reason, uint256 newKickPenaltyPercent); event ResolverContractAddressSet(address newResolverContractAddress); event ConfigSet( uint256 newTokenRewardPerTokenPerEpoch, uint256 newComplaintTolerance, uint256 newComplaintIntervalSecs, uint256[] newKeyTypes, uint256 newMinimumValidatorCount ); event ValidatorRejoinedNextEpoch(address staker); }
@openzeppelin/contracts/access/AccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
@openzeppelin/contracts/access/IAccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
@openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/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. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * 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. */ abstract 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() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(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 virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
@openzeppelin/contracts/token/ERC20/ERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.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 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. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
@openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
@openzeppelin/contracts/utils/introspection/ERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
@openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
@openzeppelin/contracts/utils/math/Math.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @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. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
@openzeppelin/contracts/utils/math/SignedMath.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
@openzeppelin/contracts/utils/structs/EnumerableSet.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
contracts/lit-core/ContractResolver.sol
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "hardhat/console.sol"; contract ContractResolver is AccessControl { /* ========== TYPE DEFINITIONS ========== */ // the comments following each one of these are the keccak256 hashes of the string values // this is very useful if you have to manually set any of these, so that you // don't have to calculate the hahes yourself. bytes32 public constant ADMIN_ROLE = keccak256("ADMIN"); // 0xdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42 bytes32 public constant RELEASE_REGISTER_CONTRACT = keccak256("RELEASE_REGISTER"); // 0x3a68dbfd8bbb64015c42bc131c388dea7965e28c1004d09b39f59500c3a763ec bytes32 public constant STAKING_CONTRACT = keccak256("STAKING"); // 0x080909c18c958ce5a2d36481697824e477319323d03154ceba3b78f28a61887b bytes32 public constant STAKING_BALANCES_CONTRACT = keccak256("STAKING_BALANCES"); // 0xaa06d108dbd7bf976b16b7bf5adb29d2d0ef2c385ca8b9d833cc802f33942d72 bytes32 public constant MULTI_SENDER_CONTRACT = keccak256("MULTI_SENDER"); // 0xdd5b9b8a5e8e01f2962ed7e983d58fe32e1f66aa88dd7ab30770fa9b77da7243 bytes32 public constant LIT_TOKEN_CONTRACT = keccak256("LIT_TOKEN"); bytes32 public constant PUB_KEY_ROUTER_CONTRACT = keccak256("PUB_KEY_ROUTER"); // 0xb1f79813bc7630a52ae948bc99781397e409d0dd3521953bf7d8d7a2db6147f7 bytes32 public constant PKP_NFT_CONTRACT = keccak256("PKP_NFT"); // 0xb7b4fde9944d3c13e9a78835431c33a5084d90a7f0c73def76d7886315fe87b0 bytes32 public constant RATE_LIMIT_NFT_CONTRACT = keccak256("RATE_LIMIT_NFT"); // 0xb931b2719aeb2a65a5035fa0a190bfdc4c8622ce8cbff7a3d1ab42531fb1a918 bytes32 public constant PKP_HELPER_CONTRACT = keccak256("PKP_HELPER"); // 0x27d764ea2a4a3865434bbf4a391110149644be31448f3479fd15b44388755765 bytes32 public constant PKP_PERMISSIONS_CONTRACT = keccak256("PKP_PERMISSIONS"); // 0x54953c23068b8fc4c0736301b50f10027d6b469327de1fd42841a5072b1bcebe bytes32 public constant PKP_NFT_METADATA_CONTRACT = keccak256("PKP_NFT_METADATA"); // 0xf14f431dadc82e7dbc5e379f71234e5735c9187e4327a7c6ac014d55d1b7727a bytes32 public constant ALLOWLIST_CONTRACT = keccak256("ALLOWLIST"); // 0x74845de37cfabd357633214b47fa91ccd19b05b7c5a08ac22c187f811fb62bca bytes32 public constant DOMAIN_WALLET_ORACLE = keccak256("DOMAIN_WALLET_ORACLE"); bytes32 public constant DOMAIN_WALLET_REGISTRY = keccak256("DOMAIN_WALLET_REGISTRY"); bytes32 public constant HD_KEY_DERIVER_CONTRACT = keccak256("HD_KEY_DERIVER"); enum Env { Dev, Staging, Prod } /* ========== ERRORS ========== */ /// The ADMIN role is required to use this function error AdminRoleRequired(); /* ========== EVENTS ========== */ event AllowedEnvAdded(Env env); event AllowedEnvRemoved(Env env); event SetContract(bytes32 typ, Env env, address addr); /* ========== STATE VARIABLES ========== */ mapping(Env => bool) allowedEnvs; mapping(bytes32 => mapping(Env => address)) public typeAddresses; /* ========== CONSTRUCTOR ========== */ constructor(Env env) { _setupRole(ADMIN_ROLE, msg.sender); _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); allowedEnvs[env] = true; emit AllowedEnvAdded(env); } /* ========== MUTATIVE FUNCTIONS ========== */ /// add an allowed env function addAllowedEnv(Env env) public { // Check roles if (!hasRole(ADMIN_ROLE, msg.sender)) { revert AdminRoleRequired(); } allowedEnvs[env] = true; emit AllowedEnvAdded(env); } /// remove an allowed env function removeAllowedEnv(Env env) public { // Check roles if (!hasRole(ADMIN_ROLE, msg.sender)) { revert AdminRoleRequired(); } delete allowedEnvs[env]; emit AllowedEnvRemoved(env); } /// set the active address for a deployed contract function setContract(bytes32 typ, Env env, address addr) public { // Check roles if (!hasRole(ADMIN_ROLE, msg.sender)) { revert AdminRoleRequired(); } // Ensure the env is available require( allowedEnvs[env] == true, "The provided Env is not valid for this contract" ); // Set the contract address typeAddresses[typ][env] = addr; // Emit events emit SetContract(typ, env, addr); } function setAdmin(address newAdmin) public { if (!hasRole(ADMIN_ROLE, msg.sender)) { revert AdminRoleRequired(); } _grantRole(ADMIN_ROLE, newAdmin); _revokeRole(ADMIN_ROLE, msg.sender); } /* ========== VIEWS ========== */ /// Returns the matching contract address for a given type and env function getContract(bytes32 typ, Env env) public view returns (address) { return (typeAddresses[typ][env]); } }
contracts/lit-node/StakingBalances.sol
//SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.17; import { ERC20Burnable } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { ContractResolver } from "../lit-core/ContractResolver.sol"; import { Staking } from "./Staking.sol"; import "hardhat/console.sol"; contract StakingBalances is Ownable { using EnumerableSet for EnumerableSet.AddressSet; ContractResolver public contractResolver; mapping(address => uint256) public balances; mapping(address => uint256) public rewards; // allowed stakers mapping(address => bool) public permittedStakers; struct VoteToKickValidatorInNextEpoch { uint256 votes; mapping(address => bool) voted; } // maps alias address to real staker address mapping(address => address) public aliases; // maps staker address to alias count mapping(address => uint256) public aliasCounts; uint256 public minimumStake; uint256 public maximumStake; uint256 public totalStaked; ContractResolver.Env public env; bool public permittedStakersOn; uint256 public maxAliasCount; uint256 public penaltyBalance; error CannotStakeZero(); error StakeMustBeGreaterThanMinimumStake( uint256 amountStaked, uint256 minimumStake ); error StakeMustBeLessThanMaximumStake( uint256 amountStaked, uint256 maximumStake ); error TryingToWithdrawMoreThanStaked( uint256 yourBalance, uint256 requestedWithdrawlAmount ); error CannotWithdrawZero(); error OnlyStakingContract(address sender); error StakerNotPermitted(address stakerAddress); error ActiveValidatorsCannotLeave(); error MaxAliasCountReached(uint256 aliasCount); error AliasNotOwnedBySender(address aliasAccount, address stakerAddress); error CannotRemoveAliasOfActiveValidator(address aliasAccount); modifier onlyStakingContract() { if (msg.sender != getStakingAddress()) { revert OnlyStakingContract(msg.sender); } _; } /* ========== CONSTRUCTOR ========== */ constructor(address _resolver, ContractResolver.Env _env) { contractResolver = ContractResolver(_resolver); env = _env; ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); minimumStake = 1 * (10 ** stakingToken.decimals()); maximumStake = minimumStake; maxAliasCount = 1; } /* ========== VIEWS ========== */ /// get the staking address from the resolver function getStakingAddress() public view returns (address) { return contractResolver.getContract( contractResolver.STAKING_CONTRACT(), env ); } /// get the token address from the resolver function getTokenAddress() public view returns (address) { return contractResolver.getContract( contractResolver.LIT_TOKEN_CONTRACT(), env ); } function balanceOf(address account) external view returns (uint256) { // support aliases if (aliases[account] != address(0)) { account = aliases[account]; } return balances[account]; } function rewardOf(address account) external view returns (uint256) { // support aliases if (aliases[account] != address(0)) { account = aliases[account]; } return rewards[account]; } function isPermittedStaker(address staker) public view returns (bool) { // support aliases if (aliases[staker] != address(0)) { staker = aliases[staker]; } return permittedStakers[staker]; } function checkStakingAmounts(address account) public view returns (bool) { // support aliases if (aliases[account] != address(0)) { account = aliases[account]; } uint256 amountStaked = balances[account]; if (amountStaked < minimumStake) { revert StakeMustBeGreaterThanMinimumStake( amountStaked, minimumStake ); } if (amountStaked > maximumStake) { revert StakeMustBeLessThanMaximumStake(amountStaked, maximumStake); } return true; } /* ========== MUTATIVE FUNCTIONS ========== */ /// Stake tokens for a validator function stake(uint256 amount, address account) public onlyStakingContract { if (amount == 0) { revert CannotStakeZero(); } if (permittedStakersOn && !permittedStakers[account]) { revert StakerNotPermitted(account); } ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); stakingToken.transferFrom(account, address(this), amount); balances[account] += amount; totalStaked += amount; emit Staked(account, amount); } /// Withdraw staked tokens. This can only be done by users who are not active in the validator set. /// @param amount The amount of tokens to withdraw function withdraw( uint256 amount, address account ) public onlyStakingContract { if (amount == 0) { revert CannotWithdrawZero(); } Staking staking = Staking(getStakingAddress()); address[] memory validatorsInCurrentEpoch = staking .getValidatorsInCurrentEpoch(); bool isValidatorInCurrentEpoch = false; for (uint256 i = 0; i < validatorsInCurrentEpoch.length; i++) { if (validatorsInCurrentEpoch[i] == account) { isValidatorInCurrentEpoch = true; break; } } if (isValidatorInCurrentEpoch) { revert ActiveValidatorsCannotLeave(); } if (balances[account] < amount) { revert TryingToWithdrawMoreThanStaked(balances[account], amount); } totalStaked = totalStaked - amount; balances[account] = balances[account] - amount; ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); stakingToken.transfer(account, amount); emit Withdrawn(account, amount); } function rewardValidator( uint256 amount, address account ) public onlyStakingContract { // support aliases if (aliases[account] != address(0)) { // only reward if the main staking account is not an active validator, too Staking staking = Staking(getStakingAddress()); if (staking.isActiveValidator(aliases[account])) { emit ValidatorNotRewardedBecauseAlias( aliases[account], account ); return; } account = aliases[account]; } rewards[account] += amount; emit ValidatorRewarded(account, amount); } function penalizeTokens( uint256 amount, address account ) public onlyStakingContract { if (aliases[account] != address(0)) { account = aliases[account]; } balances[account] -= amount; totalStaked -= amount; penaltyBalance += amount; emit ValidatorTokensPenalized(account, amount); } /// Transfer any outstanding reward tokens function getReward(address account) public onlyStakingContract { if (aliases[account] != address(0)) { account = aliases[account]; } uint256 reward = rewards[account]; if (reward > 0) { rewards[account] = 0; ERC20Burnable stakingToken = ERC20Burnable(getStakingAddress()); stakingToken.transfer(account, reward); emit RewardPaid(account, reward); } } /// Add an alias. Must come from staker address. function addAlias(address aliasAccount) public { if (aliasCounts[msg.sender] >= maxAliasCount) { revert MaxAliasCountReached(aliasCounts[msg.sender]); } aliases[aliasAccount] = msg.sender; aliasCounts[msg.sender] += 1; emit AliasAdded(msg.sender, aliasAccount); } /// Remove an alias. Must come from staker address. function removeAlias(address aliasAccount) public { // auth if (aliases[aliasAccount] != msg.sender) { revert AliasNotOwnedBySender(aliasAccount, msg.sender); } // don't let them remove an alias of an active validator Staking staking = Staking(getStakingAddress()); if (staking.isActiveValidator(aliasAccount)) { revert CannotRemoveAliasOfActiveValidator(aliasAccount); } delete aliases[aliasAccount]; aliasCounts[msg.sender] -= 1; emit AliasRemoved(msg.sender, aliasAccount); } // function adminSlashValidator( // address validatorStakerAddress, // uint256 amountToBurn // ) public onlyOwner { // validators[validatorStakerAddress].balance -= amountToBurn; // totalStaked -= amountToBurn; // stakingToken.burn(amountToBurn); // emit ValidatorKickedFromNextEpoch(validatorStakerAddress, amountToBurn); // } function withdrawPenaltyTokens(uint256 balance) public onlyOwner { require(balance <= penaltyBalance, "Not enough penalty balance"); penaltyBalance -= balance; ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); stakingToken.transfer(msg.sender, balance); } function transferPenaltyTokens( uint256 balance, address recipient ) public onlyOwner { require(balance <= penaltyBalance, "Not enough penalty balance"); penaltyBalance -= balance; ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); stakingToken.transfer(recipient, balance); } function restakePenaltyTokens( address staker, uint256 balance ) public onlyOwner { require(balance <= penaltyBalance, "Not enough penalty balance"); totalStaked += balance; penaltyBalance -= balance; balances[staker] += balance; ERC20Burnable stakingToken = ERC20Burnable(getTokenAddress()); stakingToken.transfer(address(this), balance); } /// this is for if someone accidently sends unwrapped tokens function withdraw() public onlyOwner { uint256 withdrawAmount = address(this).balance; (bool sent, ) = payable(msg.sender).call{ value: withdrawAmount }(""); require(sent); } function addPermittedStakers(address[] memory stakers) public onlyOwner { for (uint256 i = 0; i < stakers.length; i++) { addPermittedStaker(stakers[i]); } } function addPermittedStaker(address staker) public onlyOwner { permittedStakers[staker] = true; emit PermittedStakerAdded(staker); } function removePermittedStaker(address staker) public onlyOwner { permittedStakers[staker] = false; emit PermittedStakerRemoved(staker); } function setPermittedStakersOn(bool permitted) public onlyOwner { permittedStakersOn = permitted; emit PermittedStakersOnChanged(permitted); } function setMinimumStake(uint256 newMinimumStake) public onlyOwner { minimumStake = newMinimumStake; emit MinimumStakeSet(newMinimumStake); } function setMaximumStake(uint256 newMaximumStake) public onlyOwner { maximumStake = newMaximumStake; emit MaximumStakeSet(newMaximumStake); } function setContractResolver(address newResolverAddress) public onlyOwner { contractResolver = ContractResolver(newResolverAddress); emit ResolverContractAddressSet(newResolverAddress); } function setMaxAliasCount(uint256 newMaxAliasCount) public onlyOwner { maxAliasCount = newMaxAliasCount; emit MaxAliasCountSet(newMaxAliasCount); } /* ========== EVENTS ========== */ event Staked(address indexed staker, uint256 amount); event Withdrawn(address indexed staker, uint256 amount); event ValidatorRewarded(address indexed staker, uint256 amount); event ValidatorTokensPenalized(address indexed staker, uint256 amount); event RewardPaid(address indexed staker, uint256 reward); event AliasAdded(address indexed staker, address aliasAccount); event AliasRemoved(address indexed staker, address aliasAccount); event ValidatorNotRewardedBecauseAlias( address indexed staker, address aliasAccount ); // onlyOwner events event TokenRewardPerTokenPerEpochSet( uint256 newTokenRewardPerTokenPerEpoch ); event MinimumStakeSet(uint256 newMinimumStake); event MaximumStakeSet(uint256 newMaximumStake); event PermittedStakerAdded(address staker); event PermittedStakerRemoved(address staker); event PermittedStakersOnChanged(bool permittedStakersOn); event ResolverContractAddressSet(address newResolverAddress); event MaxAliasCountSet(uint newMaxAliasCount); }
hardhat/console.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; function _sendLogPayloadImplementation(bytes memory payload) internal view { address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { pop( staticcall( gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0 ) ) } } function _castToPure( function(bytes memory) internal view fnIn ) internal pure returns (function(bytes memory) pure fnOut) { assembly { fnOut := fnIn } } function _sendLogPayload(bytes memory payload) internal pure { _castToPure(_sendLogPayloadImplementation)(payload); } function log() internal pure { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_resolver","internalType":"address"},{"type":"uint256[]","name":"_keyTypes","internalType":"uint256[]"},{"type":"uint8","name":"_env","internalType":"enum ContractResolver.Env"}]},{"type":"error","name":"ActiveValidatorsCannotLeave","inputs":[]},{"type":"error","name":"CannotRejoinUntilNextEpochBecauseKicked","inputs":[{"type":"address","name":"stakingAddress","internalType":"address"}]},{"type":"error","name":"CannotReuseCommsKeys","inputs":[{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]},{"type":"error","name":"CannotStakeZero","inputs":[]},{"type":"error","name":"CannotVoteTwice","inputs":[{"type":"address","name":"stakerAddress","internalType":"address"}]},{"type":"error","name":"CannotWithdrawZero","inputs":[]},{"type":"error","name":"CouldNotMapNodeAddressToStakerAddress","inputs":[{"type":"address","name":"nodeAddress","internalType":"address"}]},{"type":"error","name":"MustBeInActiveOrUnlockedOrPausedState","inputs":[{"type":"uint8","name":"state","internalType":"enum Staking.States"}]},{"type":"error","name":"MustBeInActiveOrUnlockedState","inputs":[{"type":"uint8","name":"state","internalType":"enum Staking.States"}]},{"type":"error","name":"MustBeInNextValidatorSetLockedOrReadyForNextEpochState","inputs":[{"type":"uint8","name":"state","internalType":"enum Staking.States"}]},{"type":"error","name":"MustBeInNextValidatorSetLockedState","inputs":[{"type":"uint8","name":"state","internalType":"enum Staking.States"}]},{"type":"error","name":"MustBeInReadyForNextEpochState","inputs":[{"type":"uint8","name":"state","internalType":"enum Staking.States"}]},{"type":"error","name":"MustBeValidatorInNextEpochToKick","inputs":[{"type":"address","name":"stakerAddress","internalType":"address"}]},{"type":"error","name":"NotEnoughTimeElapsedForTimeoutSinceLastEpoch","inputs":[{"type":"uint256","name":"currentTimestamp","internalType":"uint256"},{"type":"uint256","name":"epochEndTime","internalType":"uint256"},{"type":"uint256","name":"timeout","internalType":"uint256"}]},{"type":"error","name":"NotEnoughTimeElapsedSinceLastEpoch","inputs":[{"type":"uint256","name":"currentTimestamp","internalType":"uint256"},{"type":"uint256","name":"epochEndTime","internalType":"uint256"}]},{"type":"error","name":"NotEnoughValidatorsInNextEpoch","inputs":[{"type":"uint256","name":"validatorCount","internalType":"uint256"},{"type":"uint256","name":"minimumValidatorCount","internalType":"uint256"}]},{"type":"error","name":"NotEnoughValidatorsReadyForNextEpoch","inputs":[{"type":"uint256","name":"currentReadyValidatorCount","internalType":"uint256"},{"type":"uint256","name":"nextReadyValidatorCount","internalType":"uint256"},{"type":"uint256","name":"minimumValidatorCountToBeReady","internalType":"uint256"}]},{"type":"error","name":"SignaledReadyForWrongEpochNumber","inputs":[{"type":"uint256","name":"currentEpochNumber","internalType":"uint256"},{"type":"uint256","name":"receivedEpochNumber","internalType":"uint256"}]},{"type":"error","name":"StakerNotPermitted","inputs":[{"type":"address","name":"stakerAddress","internalType":"address"}]},{"type":"error","name":"TryingToWithdrawMoreThanStaked","inputs":[{"type":"uint256","name":"yourBalance","internalType":"uint256"},{"type":"uint256","name":"requestedWithdrawlAmount","internalType":"uint256"}]},{"type":"error","name":"ValidatorIsNotInNextEpoch","inputs":[{"type":"address","name":"validator","internalType":"address"},{"type":"address[]","name":"validatorsInNextEpoch","internalType":"address[]"}]},{"type":"event","name":"ConfigSet","inputs":[{"type":"uint256","name":"newTokenRewardPerTokenPerEpoch","internalType":"uint256","indexed":false},{"type":"uint256","name":"newComplaintTolerance","internalType":"uint256","indexed":false},{"type":"uint256","name":"newComplaintIntervalSecs","internalType":"uint256","indexed":false},{"type":"uint256[]","name":"newKeyTypes","internalType":"uint256[]","indexed":false},{"type":"uint256","name":"newMinimumValidatorCount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EpochEndTimeSet","inputs":[{"type":"uint256","name":"newEpochEndTime","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EpochLengthSet","inputs":[{"type":"uint256","name":"newEpochLength","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EpochTimeoutSet","inputs":[{"type":"uint256","name":"newEpochTimeout","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"KickPenaltyPercentSet","inputs":[{"type":"uint256","name":"reason","internalType":"uint256","indexed":false},{"type":"uint256","name":"newKickPenaltyPercent","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":"ReadyForNextEpoch","inputs":[{"type":"address","name":"staker","internalType":"address","indexed":true},{"type":"uint256","name":"epochNumber","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Recovered","inputs":[{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RequestToJoin","inputs":[{"type":"address","name":"staker","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RequestToLeave","inputs":[{"type":"address","name":"staker","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ResolverContractAddressSet","inputs":[{"type":"address","name":"newResolverContractAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"RewardsDurationUpdated","inputs":[{"type":"uint256","name":"newDuration","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"StakingTokenSet","inputs":[{"type":"address","name":"newStakingTokenAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"StateChanged","inputs":[{"type":"uint8","name":"newState","internalType":"enum Staking.States","indexed":false}],"anonymous":false},{"type":"event","name":"ValidatorKickedFromNextEpoch","inputs":[{"type":"address","name":"staker","internalType":"address","indexed":true},{"type":"uint256","name":"amountBurned","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ValidatorRejoinedNextEpoch","inputs":[{"type":"address","name":"staker","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"VotedToKickValidatorInNextEpoch","inputs":[{"type":"address","name":"reporter","internalType":"address","indexed":true},{"type":"address","name":"validatorStakerAddress","internalType":"address","indexed":true},{"type":"uint256","name":"reason","internalType":"uint256","indexed":true},{"type":"bytes","name":"data","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"adminKickValidatorInNextEpoch","inputs":[{"type":"address","name":"validatorStakerAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"adminRejoinValidator","inputs":[{"type":"address","name":"staker","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"adminSlashValidator","inputs":[{"type":"address","name":"validatorStakerAddress","internalType":"address"},{"type":"uint256","name":"amountToPenalize","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"advanceEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"tokenRewardPerTokenPerEpoch","internalType":"uint256"},{"type":"uint256","name":"complaintTolerance","internalType":"uint256"},{"type":"uint256","name":"complaintIntervalSecs","internalType":"uint256"},{"type":"uint256","name":"minimumValidatorCount","internalType":"uint256"}],"name":"config","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ContractResolver"}],"name":"contractResolver","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"countOfCurrentValidatorsReadyForNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"countOfNextValidatorsReadyForNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentValidatorCountForConsensus","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"enum ContractResolver.Env"}],"name":"env","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"epochLength","internalType":"uint256"},{"type":"uint256","name":"number","internalType":"uint256"},{"type":"uint256","name":"endTime","internalType":"uint256"},{"type":"uint256","name":"retries","internalType":"uint256"},{"type":"uint256","name":"timeout","internalType":"uint256"}],"name":"epoch","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"exit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getKeyTypes","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getKickedValidators","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"getReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getStakingBalancesAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getTokenAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getValidatorsInCurrentEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getValidatorsInCurrentEpochLength","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getValidatorsInNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct Staking.Validator[]","components":[{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"reward","internalType":"uint256"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]}],"name":"getValidatorsStructs","inputs":[{"type":"address[]","name":"addresses","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct Staking.Validator[]","components":[{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"reward","internalType":"uint256"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]}],"name":"getValidatorsStructsInCurrentEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct Staking.Validator[]","components":[{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"reward","internalType":"uint256"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]}],"name":"getValidatorsStructsInNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"bool","name":"","internalType":"bool"}],"name":"getVotingStatusToKickValidator","inputs":[{"type":"uint256","name":"epochNumber","internalType":"uint256"},{"type":"address","name":"validatorStakerAddress","internalType":"address"},{"type":"address","name":"voterStakerAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isActiveValidator","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isActiveValidatorByNodeAddress","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isReadyForNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"kickPenaltyPercentByReason","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"kickValidatorInNextEpoch","inputs":[{"type":"address","name":"validatorStakerAddress","internalType":"address"},{"type":"uint256","name":"reason","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lockValidatorsForNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextValidatorCountForConsensus","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nodeAddressToStakerAddress","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pauseEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"readyForNextEpoch","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"requestToJoin","inputs":[{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"requestToLeave","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setConfig","inputs":[{"type":"uint256","name":"newTokenRewardPerTokenPerEpoch","internalType":"uint256"},{"type":"uint256","name":"newComplaintTolerance","internalType":"uint256"},{"type":"uint256","name":"newComplaintIntervalSecs","internalType":"uint256"},{"type":"uint256[]","name":"newKeyTypes","internalType":"uint256[]"},{"type":"uint256","name":"newMinimumValidatorCount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setContractResolver","inputs":[{"type":"address","name":"newResolverAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setEpochEndTime","inputs":[{"type":"uint256","name":"newEpochEndTime","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setEpochLength","inputs":[{"type":"uint256","name":"newEpochLength","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setEpochState","inputs":[{"type":"uint8","name":"newState","internalType":"enum Staking.States"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setEpochTimeout","inputs":[{"type":"uint256","name":"newEpochTimeout","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIpPortNodeAddressAndCommunicationPubKeys","inputs":[{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setKickPenaltyPercent","inputs":[{"type":"uint256","name":"reason","internalType":"uint256"},{"type":"uint256","name":"newKickPenaltyPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"shouldKickValidator","inputs":[{"type":"address","name":"stakerAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"signalReadyForNextEpoch","inputs":[{"type":"uint256","name":"epochNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"stake","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"stakeAndJoin","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"enum Staking.States"}],"name":"state","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalStaked","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlockValidatorsForNextEpoch","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"usedCommsKeys","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"ip","internalType":"uint32"},{"type":"uint128","name":"ipv6","internalType":"uint128"},{"type":"uint32","name":"port","internalType":"uint32"},{"type":"address","name":"nodeAddress","internalType":"address"},{"type":"uint256","name":"reward","internalType":"uint256"},{"type":"uint256","name":"senderPubKey","internalType":"uint256"},{"type":"uint256","name":"receiverPubKey","internalType":"uint256"}],"name":"validators","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"votes","internalType":"uint256"}],"name":"votesToKickValidatorsInNextEpoch","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Contract Creation Code
0x608060405260008060146101000a81548160ff021916908360048111156200002c576200002b62000559565b5b02179055503480156200003e57600080fd5b506040516200673a3803806200673a8339818101604052810190620000649190620007d9565b6200008462000078620002d060201b60201c565b620002d860201b60201c565b82601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601260146101000a81548160ff02191690836002811115620000ed57620000ec62000559565b5b02179055506000620001046200039c60201b60201c565b90506040518060a0016040528060148373ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200015f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000185919062000892565b600a62000193919062000a47565b6200019f919062000ac7565b8152602001600f8152602001603c8152602001848152602001600281525060066000820151816000015560208201518160010155604082015181600201556060820151816003019080519060200190620001fb929190620004e8565b50608082015181600401559050506000600190506040518060a0016040528082815260200160018152602001824262000235919062000aff565b815260200160008152602001603c8152506001600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505060016017600060018152602001908152602001600020819055506004600060146101000a81548160ff02191690836004811115620002c057620002bf62000559565b5b0217905550505050505062000c68565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e8dfd16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663df3806936040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200044a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000470919062000b75565b601260149054906101000a900460ff166040518363ffffffff1660e01b81526004016200049f92919062000c09565b602060405180830381865afa158015620004bd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004e3919062000c36565b905090565b82805482825590600052602060002090810192821562000527579160200282015b828111156200052657825182559160200191906001019062000509565b5b5090506200053691906200053a565b5090565b5b80821115620005555760008160009055506001016200053b565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005c9826200059c565b9050919050565b620005db81620005bc565b8114620005e757600080fd5b50565b600081519050620005fb81620005d0565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006518262000606565b810181811067ffffffffffffffff8211171562000673576200067262000617565b5b80604052505050565b60006200068862000588565b905062000696828262000646565b919050565b600067ffffffffffffffff821115620006b957620006b862000617565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b620006e481620006cf565b8114620006f057600080fd5b50565b6000815190506200070481620006d9565b92915050565b6000620007216200071b846200069b565b6200067c565b90508083825260208201905060208402830185811115620007475762000746620006ca565b5b835b818110156200077457806200075f8882620006f3565b84526020840193505060208101905062000749565b5050509392505050565b600082601f83011262000796576200079562000601565b5b8151620007a88482602086016200070a565b91505092915050565b60038110620007bf57600080fd5b50565b600081519050620007d381620007b1565b92915050565b600080600060608486031215620007f557620007f462000592565b5b60006200080586828701620005ea565b935050602084015167ffffffffffffffff81111562000829576200082862000597565b5b62000837868287016200077e565b92505060406200084a86828701620007c2565b9150509250925092565b600060ff82169050919050565b6200086c8162000854565b81146200087857600080fd5b50565b6000815190506200088c8162000861565b92915050565b600060208284031215620008ab57620008aa62000592565b5b6000620008bb848285016200087b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b600185111562000952578086048111156200092a5762000929620008c4565b5b60018516156200093a5780820291505b80810290506200094a85620008f3565b94506200090a565b94509492505050565b6000826200096d576001905062000a40565b816200097d576000905062000a40565b8160018114620009965760028114620009a157620009d7565b600191505062000a40565b60ff841115620009b657620009b5620008c4565b5b8360020a915084821115620009d057620009cf620008c4565b5b5062000a40565b5060208310610133831016604e8410600b841016171562000a115782820a90508381111562000a0b5762000a0a620008c4565b5b62000a40565b62000a20848484600162000900565b9250905081840481111562000a3a5762000a39620008c4565b5b81810290505b9392505050565b600062000a5482620006cf565b915062000a618362000854565b925062000a907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846200095b565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600062000ad482620006cf565b915062000ae183620006cf565b92508262000af45762000af362000a98565b5b828204905092915050565b600062000b0c82620006cf565b915062000b1983620006cf565b925082820190508082111562000b345762000b33620008c4565b5b92915050565b6000819050919050565b62000b4f8162000b3a565b811462000b5b57600080fd5b50565b60008151905062000b6f8162000b44565b92915050565b60006020828403121562000b8e5762000b8d62000592565b5b600062000b9e8482850162000b5e565b91505092915050565b62000bb28162000b3a565b82525050565b6003811062000bcc5762000bcb62000559565b5b50565b600081905062000bdf8262000bb8565b919050565b600062000bf18262000bcf565b9050919050565b62000c038162000be4565b82525050565b600060408201905062000c20600083018562000ba7565b62000c2f602083018462000bf8565b9392505050565b60006020828403121562000c4f5762000c4e62000592565b5b600062000c5f84828501620005ea565b91505092915050565b615ac28062000c786000396000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c806379502c55116101de578063b139603c1161010f578063e8684ed1116100ad578063f2fde38b1161007c578063f2fde38b146109e5578063f95d71b114610a01578063f99b562314610a1d578063fa52c7d814610a395761038e565b8063e8684ed114610981578063e9fad8ee1461099f578063f1887fec146109a9578063f1b877a8146109c75761038e565b8063c19d93fb116100e9578063c19d93fb14610909578063c35d4d0914610927578063d4818fca14610945578063e7c08720146109635761038e565b8063b139603c146108d9578063ba3bd22e146108e3578063c006e00b146108ff5761038e565b80638b80d8331161017c5780639dca0032116101565780639dca003214610865578063a25e49a414610883578063a694fc3a146108b3578063ac2f8afe146108cf5761038e565b80638b80d833146108095780638da5cb5b14610825578063900cf0cf146108435761038e565b8063847e0625116101b8578063847e062514610781578063857b7663146107b1578063865419e9146107cf57806389965883146107eb5761038e565b806379502c55146107265780637aa086e714610747578063817b1cd2146107635761038e565b80634927a143116102c3578063533d463e1161026157806361dee8a31161023057806361dee8a3146106b157806370fe276a146106cf578063715018a6146107005780637392c76b1461070a5761038e565b8063533d463e1461062957806354eea796146106595780635995a4c4146106755780635b677eac146106935761038e565b80635081f66f1161029d5780635081f66f1461058f57806350d17b5e146105bf578063519877eb146105dd5780635305c8cf1461060d5761038e565b80634927a143146105275780634a6e51f5146105575780634f8f0102146105735761038e565b80633528db88116103305780633e6852661161030a5780633e6852661461048d5780633f819713146104bd57806340550a1c146104d957806343cb0a0e146105095761038e565b80633528db881461045d5780633cf80e6c146104795780633d18b912146104835761038e565b806316930f4d1161036c57806316930f4d146103eb5780631fab87c4146103f5578063252959a5146104115780632e1a7d4d146104415761038e565b80630297d4db1461039357806309c7c7d0146103b157806310fe9ae8146103cd575b600080fd5b61039b610a6f565b6040516103a89190614389565b60405180910390f35b6103cb60048036038101906103c691906143e4565b610a80565b005b6103d5610add565b6040516103e29190614465565b60405180910390f35b6103f3610c21565b005b61040f600480360381019061040a9190614480565b610e0d565b005b61042b600480360381019061042691906144e3565b610e59565b604051610438919061452b565b60405180910390f35b61045b60048036038101906104569190614480565b610e79565b005b610477600480360381019061047291906145f6565b610ef5565b005b6104816115ec565b005b61048b611aad565b005b6104a760048036038101906104a29190614480565b611b27565b6040516104b49190614389565b60405180910390f35b6104d760048036038101906104d291906146a8565b611b3f565b005b6104f360048036038101906104ee91906146d5565b611bab565b604051610500919061452b565b60405180910390f35b610511611bc8565b60405161051e9190614389565b60405180910390f35b610541600480360381019061053c9190614702565b611c0c565b60405161054e9190614389565b60405180910390f35b610571600480360381019061056c9190614480565b611c37565b005b61058d600480360381019061058891906145f6565b611c83565b005b6105a960048036038101906105a491906146d5565b611ed5565b6040516105b69190614465565b60405180910390f35b6105c7611f08565b6040516105d491906147a1565b60405180910390f35b6105f760048036038101906105f291906146d5565b611f2e565b604051610604919061452b565b60405180910390f35b61062760048036038101906106229190614915565b611f4e565b005b610643600480360381019061063e9190614a6f565b611fde565b6040516106509190614c31565b60405180910390f35b610673600480360381019061066e9190614480565b6121ee565b005b61067d61223a565b60405161068a9190614d02565b60405180910390f35b61069b612328565b6040516106a89190614465565b60405180910390f35b6106b961246c565b6040516106c69190614c31565b60405180910390f35b6106e960048036038101906106e49190614d24565b612489565b6040516106f7929190614d77565b60405180910390f35b610708612541565b005b610724600480360381019061071f91906146d5565b612555565b005b61072e6125c1565b60405161073e9493929190614da0565b60405180910390f35b610761600480360381019061075c91906146d5565b6125df565b005b61076b61266c565b6040516107789190614389565b60405180910390f35b61079b600480360381019061079691906146d5565b612672565b6040516107a8919061452b565b60405180910390f35b6107b96126f2565b6040516107c69190614d02565b60405180910390f35b6107e960048036038101906107e49190614e40565b6127e0565b005b6107f3612d37565b6040516108009190614389565b60405180910390f35b610823600480360381019061081e9190614eb4565b612de7565b005b61082d612e6d565b60405161083a9190614465565b60405180910390f35b61084b612e96565b60405161085c959493929190614ef4565b60405180910390f35b61086d612eba565b60405161087a9190614fbe565b60405180910390f35b61089d600480360381019061089891906146d5565b612ecd565b6040516108aa919061452b565b60405180910390f35b6108cd60048036038101906108c89190614480565b612f49565b005b6108d7612fc6565b005b6108e1613185565b005b6108fd60048036038101906108f89190614fd9565b6131f2565b005b610907613212565b005b610911613428565b60405161091e91906150c3565b60405180910390f35b61092f61343b565b60405161093c9190614d02565b60405180910390f35b61094d613529565b60405161095a9190614389565b60405180910390f35b61096b61353a565b6040516109789190614c31565b60405180910390f35b610989613557565b6040516109969190614389565b60405180910390f35b6109a7613607565b005b6109b1613766565b6040516109be919061452b565b60405180910390f35b6109cf6137ae565b6040516109dc919061518d565b60405180910390f35b6109ff60048036038101906109fa91906146d5565b613809565b005b610a1b6004803603810190610a1691906146d5565b61388c565b005b610a376004803603810190610a329190614480565b61390f565b005b610a536004803603810190610a4e91906146d5565b613c1e565b604051610a6697969594939291906151cd565b60405180910390f35b6000610a7b600e613cbc565b905090565b610a88613cd1565b8060176000848152602001908152602001600020819055507fd96aa9b717408dfdef39925f998646946efba8139acb451b120585a33de7f1e68282604051610ad192919061523c565b60405180910390a15050565b6000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e8dfd16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663df3806936040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bae919061527a565b601260149054906101000a900460ff166040518363ffffffff1660e01b8152600401610bdb9291906152b6565b602060405180830381865afa158015610bf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1c91906152f4565b905090565b600160020154421015610c7257426001600201546040517ff44bc0a7000000000000000000000000000000000000000000000000000000008152600401610c6992919061523c565b60405180910390fd5b60006004811115610c8657610c85614f47565b5b600060149054906101000a900460ff166004811115610ca857610ca7614f47565b5b1480610ce7575060036004811115610cc357610cc2614f47565b5b600060149054906101000a900460ff166004811115610ce557610ce4614f47565b5b145b610d3757600060149054906101000a900460ff166040517f9ef5b6f5000000000000000000000000000000000000000000000000000000008152600401610d2e91906150c3565b60405180910390fd5b600660040154610d47600e613cbc565b1015610d9a57610d57600e613cbc565b6006600401546040517f8a0defa4000000000000000000000000000000000000000000000000000000008152600401610d9192919061523c565b60405180910390fd5b6001600060146101000a81548160ff02191690836004811115610dc057610dbf614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff16604051610e0391906150c3565b60405180910390a1565b610e15613cd1565b806001600401819055507f887fed3a9270ffbbf863d640a07413b6f58cf97afaa9d7267693e962a76bd81081604051610e4e9190614389565b60405180910390a150565b60186020528060005260406000206000915054906101000a900460ff1681565b6000610e83612328565b90508073ffffffffffffffffffffffffffffffffffffffff1662f714ce83336040518363ffffffff1660e01b8152600401610ebf929190615321565b600060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050505050565b6000610eff612328565b90508073ffffffffffffffffffffffffffffffffffffffff166349919966336040518263ffffffff1660e01b8152600401610f3a9190614465565b602060405180830381865afa158015610f57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7b9190615376565b5060006004811115610f9057610f8f614f47565b5b600060149054906101000a900460ff166004811115610fb257610fb1614f47565b5b1480610ff1575060036004811115610fcd57610fcc614f47565b5b600060149054906101000a900460ff166004811115610fef57610fee614f47565b5b145b8061102e575060048081111561100a57611009614f47565b5b600060149054906101000a900460ff16600481111561102c5761102b614f47565b5b145b61107e57600060149054906101000a900460ff166040517fc1f8741d00000000000000000000000000000000000000000000000000000000815260040161107591906150c3565b60405180910390fd5b611092336010613d4f90919063ffffffff16565b156110d457336040517f7c6d6c6b0000000000000000000000000000000000000000000000000000000081526004016110cb9190614465565b60405180910390fd5b600083836040516020016110e99291906153c4565b6040516020818303038152906040528051906020012090506018600082815260200190815260200160002060009054906101000a900460ff16156111665783836040517f1179010e00000000000000000000000000000000000000000000000000000000815260040161115d92919061523c565b60405180910390fd5b60016018600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166327a199d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112019190615376565b156112c2578173ffffffffffffffffffffffffffffffffffffffff1663d3dbad7d336040518263ffffffff1660e01b815260040161123f9190614465565b602060405180830381865afa15801561125c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112809190615376565b6112c157336040517f924a59100000000000000000000000000000000000000000000000000000000081526004016112b89190614465565b60405180910390fd5b5b87601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff16021790555086601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160046101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555085601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a81548163ffffffff021916908363ffffffff16021790555084601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555082601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004018190555033601460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061159e33600e613d7f90919063ffffffff16565b503373ffffffffffffffffffffffffffffffffffffffff167f1dc186bd4daaf3fc4b9f8c689228a0be60dd2952dc502829514ae0d6955c0f5160405160405180910390a25050505050505050565b60016002015442101561163d57426001600201546040517ff44bc0a700000000000000000000000000000000000000000000000000000000815260040161163492919061523c565b60405180910390fd5b6002600481111561165157611650614f47565b5b600060149054906101000a900460ff16600481111561167357611672614f47565b5b146116c457600060149054906101000a900460ff166040517f17ce3ae10000000000000000000000000000000000000000000000000000000081526004016116bb91906150c3565b60405180910390fd5b6116cc613766565b611726576116d8613557565b6116e0612d37565b6116e8611bc8565b6040517f26d6b3de00000000000000000000000000000000000000000000000000000000815260040161171d939291906153f0565b60405180910390fd5b6000611732600c613cbc565b905060005b8181101561190657600061175582600c613daf90919063ffffffff16565b90506000611761610add565b9050600061176d612328565b905060008273ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190615460565b600a6117ec91906155ef565b8273ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b81526004016118259190614465565b602060405180830381865afa158015611842573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611866919061564f565b600660000154611876919061567c565b61188091906156ed565b90508173ffffffffffffffffffffffffffffffffffffffff166302fa04c982866040518363ffffffff1660e01b81526004016118bd929190615321565b600060405180830381600087803b1580156118d757600080fd5b505af11580156118eb573d6000803e3d6000fd5b505050505050505080806118fe9061571e565b915050611737565b505b6000611914600c613cbc565b1115611948576119426119326000600c613daf90919063ffffffff16565b600c613dc990919063ffffffff16565b50611908565b611952600e613cbc565b905060005b81811015611a055761198661197682600e613daf90919063ffffffff16565b600c613d7f90919063ffffffff16565b506000601560006119a184600e613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806119fd9061571e565b915050611957565b50600180016000815480929190611a1b9061571e565b919050555060016000015442611a319190615766565b60016002018190555060008060146101000a81548160ff02191690836004811115611a5f57611a5e614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff16604051611aa291906150c3565b60405180910390a150565b6000611ab7612328565b90508073ffffffffffffffffffffffffffffffffffffffff1663c00007b0336040518263ffffffff1660e01b8152600401611af29190614465565b600060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b5050505050565b60176020528060005260406000206000915090505481565b611b47613cd1565b80600060146101000a81548160ff02191690836004811115611b6c57611b6b614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb681604051611ba091906150c3565b60405180910390a150565b6000611bc182600c613d4f90919063ffffffff16565b9050919050565b60006002611bd6600c613cbc565b03611be45760019050611c09565b60036002611bf2600c613cbc565b611bfc919061567c565b611c0691906156ed565b90505b90565b6016602052816000526040600020602052806000526040600020600091509150508060000154905081565b611c3f613cd1565b806001600201819055507feb49fe6118b628c010445c30724ceaf4efd8d87f330911c36493b401b5c296d081604051611c789190614389565b60405180910390a150565b85601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff16021790555084601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160046101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555083601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a81548163ffffffff021916908363ffffffff16021790555082601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555080601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040181905550505050505050565b60146020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60156020528060005260406000206000915054906101000a900460ff1681565b611f56613cd1565b8460066000018190555083600660010181905550826006600201819055508160066003019080519060200190611f8d929190614295565b50806006600401819055507f16f896f15b01cc0c19146aac8f21b75e76e4f196a9e368ca3d1b7cf5251a12588585858585604051611fcf95949392919061579a565b60405180910390a15050505050565b60606000825167ffffffffffffffff811115611ffd57611ffc6147d2565b5b60405190808252806020026020018201604052801561203657816020015b6120236142e2565b81526020019060019003908161201b5790505b50905060005b83518110156121e4576013600085838151811061205c5761205b6157f4565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820154815250508282815181106121c6576121c56157f4565b5b602002602001018190525080806121dc9061571e565b91505061203c565b5080915050919050565b6121f6613cd1565b806001600001819055507f5f15d41eab42cb3f8a5c9e8cd44043648cb85a815522c5f4ae5a32597a8447a08160405161222f9190614389565b60405180910390a150565b606060006122486010613cbc565b67ffffffffffffffff811115612261576122606147d2565b5b60405190808252806020026020018201604052801561228f5781602001602082028036833780820191505090505b509050600061229e6010613cbc565b905060005b8181101561231f576122bf816010613daf90919063ffffffff16565b8382815181106122d2576122d16157f4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806123179061571e565b9150506122a3565b50819250505090565b6000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e8dfd16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638c1536df6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f9919061527a565b601260149054906101000a900460ff166040518363ffffffff1660e01b81526004016124269291906152b6565b602060405180830381865afa158015612443573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246791906152f4565b905090565b6060600061247861343b565b905061248381611fde565b91505090565b60008060006016600087815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600001548160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169250925050935093915050565b612549613cd1565b6125536000613df9565b565b61255d613cd1565b612571816010613dc990919063ffffffff16565b5061258681600e613d7f90919063ffffffff16565b507fa5b14a5b2a3bffe27eff4f0dd1c65b1c966d2ec463c04f29a82c3e228ba7a071816040516125b69190614465565b60405180910390a150565b60068060000154908060010154908060020154908060040154905084565b6125e7613cd1565b6125fb81600e613dc990919063ffffffff16565b50612610816010613d7f90919063ffffffff16565b5061261a33613ebd565b8073ffffffffffffffffffffffffffffffffffffffff167ff020e162c28460a603e71f641a2e83634580ace02b9e28b844b2257949860e976000604051612661919061585e565b60405180910390a250565b600b5481565b600080601660006001800154815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506126d3611bc8565b8160000154106126e75760019150506126ed565b60009150505b919050565b60606000612700600c613cbc565b67ffffffffffffffff811115612719576127186147d2565b5b6040519080825280602002602001820160405280156127475781602001602082028036833780820191505090505b5090506000612756600c613cbc565b905060005b818110156127d75761277781600c613daf90919063ffffffff16565b83828151811061278a576127896157f4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806127cf9061571e565b91505061275b565b50819250505090565b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036128b557336040517f64ffeb3d0000000000000000000000000000000000000000000000000000000081526004016128ac9190614465565b60405180910390fd5b6128c981600e613d4f90919063ffffffff16565b61290a57806040517f5f5430820000000000000000000000000000000000000000000000000000000081526004016129019190614465565b60405180910390fd5b601660006001800154815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156129ee57806040517f384ce38a0000000000000000000000000000000000000000000000000000000081526004016129e59190614465565b60405180910390fd5b601660006001800154815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000815480929190612a569061571e565b91905055506001601660006001800154815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612b1c85600e613d4f90919063ffffffff16565b8015612b2d5750612b2c85612672565b5b15612cc857612b3b85613ebd565b612b4f856010613d7f90919063ffffffff16565b506000601760008681526020019081526020016000205490506000612b72612328565b905060006064838373ffffffffffffffffffffffffffffffffffffffff166370a082318b6040518263ffffffff1660e01b8152600401612bb29190614465565b602060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061564f565b612bfd919061567c565b612c0791906156ed565b90508173ffffffffffffffffffffffffffffffffffffffff16630a0e3dea828a6040518363ffffffff1660e01b8152600401612c44929190615321565b600060405180830381600087803b158015612c5e57600080fd5b505af1158015612c72573d6000803e3d6000fd5b505050508773ffffffffffffffffffffffffffffffffffffffff167ff020e162c28460a603e71f641a2e83634580ace02b9e28b844b2257949860e9782604051612cbc9190614389565b60405180910390a25050505b838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167febdee48ed32f3feff81eed274b9e084b367ac42fe1cb710dcbd43f1d537d99fa8686604051612d289291906158c6565b60405180910390a45050505050565b600080600090506000612d4a600e613cbc565b905060005b81811015612dde5760156000612d6f83600e613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615612dcb578280612dc79061571e565b9350505b8080612dd69061571e565b915050612d4f565b50819250505090565b612def613cd1565b6000612df9612328565b90508073ffffffffffffffffffffffffffffffffffffffff16630a0e3dea83856040518363ffffffff1660e01b8152600401612e36929190615321565b600060405180830381600087803b158015612e5057600080fd5b505af1158015612e64573d6000803e3d6000fd5b50505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60018060000154908060010154908060020154908060030154908060040154905085565b601260149054906101000a900460ff1681565b6000612f42601460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600c613d4f90919063ffffffff16565b9050919050565b6000612f53612328565b90508073ffffffffffffffffffffffffffffffffffffffff16637acb775783336040518363ffffffff1660e01b8152600401612f90929190615321565b600060405180830381600087803b158015612faa57600080fd5b505af1158015612fbe573d6000803e3d6000fd5b505050505050565b60006004811115612fda57612fd9614f47565b5b600060149054906101000a900460ff166004811115612ffc57612ffb614f47565b5b148061303b57506003600481111561301757613016614f47565b5b600060149054906101000a900460ff16600481111561303957613038614f47565b5b145b80613078575060048081111561305457613053614f47565b5b600060149054906101000a900460ff16600481111561307657613075614f47565b5b145b6130c857600060149054906101000a900460ff166040517fc1f8741d0000000000000000000000000000000000000000000000000000000081526004016130bf91906150c3565b60405180910390fd5b60066004015460016130da600e613cbc565b6130e491906158ea565b1015613137576130f4600e613cbc565b6006600401546040517f8a0defa400000000000000000000000000000000000000000000000000000000815260040161312e92919061523c565b60405180910390fd5b61314033613ebd565b3373ffffffffffffffffffffffffffffffffffffffff167fff61c8020d05b8c2e31cdbb3d3f8cbcbdc57fcafa00229d9858b7cfd3b039c8a60405160405180910390a2565b61318d613cd1565b6004600060146101000a81548160ff021916908360048111156131b3576131b2614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb660046040516131e891906150c3565b60405180910390a1565b6131fb87612f49565b613209868686868686610ef5565b50505050505050565b6001600401546001600201546132289190615766565b42101561327a57426001600201546001600401546040517f9312e856000000000000000000000000000000000000000000000000000000008152600401613271939291906153f0565b60405180910390fd5b6001600481111561328e5761328d614f47565b5b600060149054906101000a900460ff1660048111156132b0576132af614f47565b5b1461330157600060149054906101000a900460ff166040517f7203d9de0000000000000000000000000000000000000000000000000000000081526004016132f891906150c3565b60405180910390fd5b600061330d600e613cbc565b905060005b818110156133985760006015600061333484600e613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806133909061571e565b915050613312565b50600160030160008154809291906133af9061571e565b91905055506003600060146101000a81548160ff021916908360048111156133da576133d9614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff1660405161341d91906150c3565b60405180910390a150565b600060149054906101000a900460ff1681565b60606000613449600e613cbc565b67ffffffffffffffff811115613462576134616147d2565b5b6040519080825280602002602001820160405280156134905781602001602082028036833780820191505090505b509050600061349f600e613cbc565b905060005b81811015613520576134c081600e613daf90919063ffffffff16565b8382815181106134d3576134d26157f4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806135189061571e565b9150506134a4565b50819250505090565b6000613535600c613cbc565b905090565b606060006135466126f2565b905061355181611fde565b91505090565b60008060009050600061356a600c613cbc565b905060005b818110156135fe576015600061358f83600c613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156135eb5782806135e79061571e565b9350505b80806135f69061571e565b91505061356f565b50819250505090565b6000613611612328565b90508073ffffffffffffffffffffffffffffffffffffffff1662f714ce8273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016136679190614465565b602060405180830381865afa158015613684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136a8919061564f565b336040518363ffffffff1660e01b81526004016136c6929190615321565b600060405180830381600087803b1580156136e057600080fd5b505af11580156136f4573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663c00007b0336040518263ffffffff1660e01b81526004016137319190614465565b600060405180830381600087803b15801561374b57600080fd5b505af115801561375f573d6000803e3d6000fd5b5050505050565b6000613770611bc8565b613778613557565b101561378757600090506137ab565b61378f610a6f565b613797612d37565b10156137a657600090506137ab565b600190505b90565b606060066003018054806020026020016040519081016040528092919081815260200182805480156137ff57602002820191906000526020600020905b8154815260200190600101908083116137eb575b5050505050905090565b613811613cd1565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613880576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613877906159a1565b60405180910390fd5b61388981613df9565b50565b613894613cd1565b80601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2b5fe80d5061b20e017f0cde52b331309601bfcab0cb14cfcf6a4096410a6075816040516139049190614465565b60405180910390a150565b8060018001541461395d576001800154816040517f068cde2a00000000000000000000000000000000000000000000000000000000815260040161395492919061523c565b60405180910390fd5b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160048111156139d5576139d4614f47565b5b600060149054906101000a900460ff1660048111156139f7576139f6614f47565b5b1480613a36575060026004811115613a1257613a11614f47565b5b600060149054906101000a900460ff166004811115613a3457613a33614f47565b5b145b613a8657600060149054906101000a900460ff166040517fe1b4c12e000000000000000000000000000000000000000000000000000000008152600401613a7d91906150c3565b60405180910390fd5b6001806001015414613af157613aa681600e613d4f90919063ffffffff16565b613af05780613ab361343b565b6040517fa3113c0e000000000000000000000000000000000000000000000000000000008152600401613ae79291906159c1565b60405180910390fd5b5b6001601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f0c101bf9bc977a511cf4ef91f5b9cbac30a0a3af0768cfd5c9634e73120d7c8b6001800154604051613b939190614389565b60405180910390a2613ba3613766565b15613c1a576002600060146101000a81548160ff02191690836004811115613bce57613bcd614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff16604051613c1191906150c3565b60405180910390a15b5050565b60136020528060005260406000206000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046fffffffffffffffffffffffffffffffff16908060000160149054906101000a900463ffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905087565b6000613cca826000016140aa565b9050919050565b613cd96140bb565b73ffffffffffffffffffffffffffffffffffffffff16613cf7612e6d565b73ffffffffffffffffffffffffffffffffffffffff1614613d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d4490615a3d565b60405180910390fd5b565b6000613d77836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6140c3565b905092915050565b6000613da7836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6140e6565b905092915050565b6000613dbe8360000183614156565b60001c905092915050565b6000613df1836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614181565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b613ed181600e613d4f90919063ffffffff16565b15613eec57613eea81600e613dc990919063ffffffff16565b505b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815260200160038201548152602001600482015481525050905060008160a001518260c001516040516020016140619291906153c4565b60405160208183030381529060405280519060200120905060006018600083815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b600081600001805490509050919050565b600033905090565b600080836001016000848152602001908152602001600020541415905092915050565b60006140f283836140c3565b61414b578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050614150565b600090505b92915050565b600082600001828154811061416e5761416d6157f4565b5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020549050600081146142895760006001826141b391906158ea565b90506000600186600001805490506141cb91906158ea565b905081811461423a5760008660000182815481106141ec576141eb6157f4565b5b90600052602060002001549050808760000184815481106142105761420f6157f4565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061424e5761424d615a5d565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061428f565b60009150505b92915050565b8280548282559060005260206000209081019282156142d1579160200282015b828111156142d05782518255916020019190600101906142b5565b5b5090506142de9190614353565b5090565b6040518060e00160405280600063ffffffff16815260200160006fffffffffffffffffffffffffffffffff168152602001600063ffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081525090565b5b8082111561436c576000816000905550600101614354565b5090565b6000819050919050565b61438381614370565b82525050565b600060208201905061439e600083018461437a565b92915050565b6000604051905090565b600080fd5b600080fd5b6143c181614370565b81146143cc57600080fd5b50565b6000813590506143de816143b8565b92915050565b600080604083850312156143fb576143fa6143ae565b5b6000614409858286016143cf565b925050602061441a858286016143cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061444f82614424565b9050919050565b61445f81614444565b82525050565b600060208201905061447a6000830184614456565b92915050565b600060208284031215614496576144956143ae565b5b60006144a4848285016143cf565b91505092915050565b6000819050919050565b6144c0816144ad565b81146144cb57600080fd5b50565b6000813590506144dd816144b7565b92915050565b6000602082840312156144f9576144f86143ae565b5b6000614507848285016144ce565b91505092915050565b60008115159050919050565b61452581614510565b82525050565b6000602082019050614540600083018461451c565b92915050565b600063ffffffff82169050919050565b61455f81614546565b811461456a57600080fd5b50565b60008135905061457c81614556565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6145a781614582565b81146145b257600080fd5b50565b6000813590506145c48161459e565b92915050565b6145d381614444565b81146145de57600080fd5b50565b6000813590506145f0816145ca565b92915050565b60008060008060008060c08789031215614613576146126143ae565b5b600061462189828a0161456d565b965050602061463289828a016145b5565b955050604061464389828a0161456d565b945050606061465489828a016145e1565b935050608061466589828a016143cf565b92505060a061467689828a016143cf565b9150509295509295509295565b6005811061469057600080fd5b50565b6000813590506146a281614683565b92915050565b6000602082840312156146be576146bd6143ae565b5b60006146cc84828501614693565b91505092915050565b6000602082840312156146eb576146ea6143ae565b5b60006146f9848285016145e1565b91505092915050565b60008060408385031215614719576147186143ae565b5b6000614727858286016143cf565b9250506020614738858286016145e1565b9150509250929050565b6000819050919050565b600061476761476261475d84614424565b614742565b614424565b9050919050565b60006147798261474c565b9050919050565b600061478b8261476e565b9050919050565b61479b81614780565b82525050565b60006020820190506147b66000830184614792565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61480a826147c1565b810181811067ffffffffffffffff82111715614829576148286147d2565b5b80604052505050565b600061483c6143a4565b90506148488282614801565b919050565b600067ffffffffffffffff821115614868576148676147d2565b5b602082029050602081019050919050565b600080fd5b600061489161488c8461484d565b614832565b905080838252602082019050602084028301858111156148b4576148b3614879565b5b835b818110156148dd57806148c988826143cf565b8452602084019350506020810190506148b6565b5050509392505050565b600082601f8301126148fc576148fb6147bc565b5b813561490c84826020860161487e565b91505092915050565b600080600080600060a08688031215614931576149306143ae565b5b600061493f888289016143cf565b9550506020614950888289016143cf565b9450506040614961888289016143cf565b935050606086013567ffffffffffffffff811115614982576149816143b3565b5b61498e888289016148e7565b925050608061499f888289016143cf565b9150509295509295909350565b600067ffffffffffffffff8211156149c7576149c66147d2565b5b602082029050602081019050919050565b60006149eb6149e6846149ac565b614832565b90508083825260208201905060208402830185811115614a0e57614a0d614879565b5b835b81811015614a375780614a2388826145e1565b845260208401935050602081019050614a10565b5050509392505050565b600082601f830112614a5657614a556147bc565b5b8135614a668482602086016149d8565b91505092915050565b600060208284031215614a8557614a846143ae565b5b600082013567ffffffffffffffff811115614aa357614aa26143b3565b5b614aaf84828501614a41565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b614aed81614546565b82525050565b614afc81614582565b82525050565b614b0b81614444565b82525050565b614b1a81614370565b82525050565b60e082016000820151614b366000850182614ae4565b506020820151614b496020850182614af3565b506040820151614b5c6040850182614ae4565b506060820151614b6f6060850182614b02565b506080820151614b826080850182614b11565b5060a0820151614b9560a0850182614b11565b5060c0820151614ba860c0850182614b11565b50505050565b6000614bba8383614b20565b60e08301905092915050565b6000602082019050919050565b6000614bde82614ab8565b614be88185614ac3565b9350614bf383614ad4565b8060005b83811015614c24578151614c0b8882614bae565b9750614c1683614bc6565b925050600181019050614bf7565b5085935050505092915050565b60006020820190508181036000830152614c4b8184614bd3565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000614c8b8383614b02565b60208301905092915050565b6000602082019050919050565b6000614caf82614c53565b614cb98185614c5e565b9350614cc483614c6f565b8060005b83811015614cf5578151614cdc8882614c7f565b9750614ce783614c97565b925050600181019050614cc8565b5085935050505092915050565b60006020820190508181036000830152614d1c8184614ca4565b905092915050565b600080600060608486031215614d3d57614d3c6143ae565b5b6000614d4b868287016143cf565b9350506020614d5c868287016145e1565b9250506040614d6d868287016145e1565b9150509250925092565b6000604082019050614d8c600083018561437a565b614d99602083018461451c565b9392505050565b6000608082019050614db5600083018761437a565b614dc2602083018661437a565b614dcf604083018561437a565b614ddc606083018461437a565b95945050505050565b600080fd5b60008083601f840112614e0057614dff6147bc565b5b8235905067ffffffffffffffff811115614e1d57614e1c614de5565b5b602083019150836001820283011115614e3957614e38614879565b5b9250929050565b60008060008060608587031215614e5a57614e596143ae565b5b6000614e68878288016145e1565b9450506020614e79878288016143cf565b935050604085013567ffffffffffffffff811115614e9a57614e996143b3565b5b614ea687828801614dea565b925092505092959194509250565b60008060408385031215614ecb57614eca6143ae565b5b6000614ed9858286016145e1565b9250506020614eea858286016143cf565b9150509250929050565b600060a082019050614f09600083018861437a565b614f16602083018761437a565b614f23604083018661437a565b614f30606083018561437a565b614f3d608083018461437a565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110614f8757614f86614f47565b5b50565b6000819050614f9882614f76565b919050565b6000614fa882614f8a565b9050919050565b614fb881614f9d565b82525050565b6000602082019050614fd36000830184614faf565b92915050565b600080600080600080600060e0888a031215614ff857614ff76143ae565b5b60006150068a828b016143cf565b97505060206150178a828b0161456d565b96505060406150288a828b016145b5565b95505060606150398a828b0161456d565b945050608061504a8a828b016145e1565b93505060a061505b8a828b016143cf565b92505060c061506c8a828b016143cf565b91505092959891949750929550565b6005811061508c5761508b614f47565b5b50565b600081905061509d8261507b565b919050565b60006150ad8261508f565b9050919050565b6150bd816150a2565b82525050565b60006020820190506150d860008301846150b4565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60006151168383614b11565b60208301905092915050565b6000602082019050919050565b600061513a826150de565b61514481856150e9565b935061514f836150fa565b8060005b83811015615180578151615167888261510a565b975061517283615122565b925050600181019050615153565b5085935050505092915050565b600060208201905081810360008301526151a7818461512f565b905092915050565b6151b881614546565b82525050565b6151c781614582565b82525050565b600060e0820190506151e2600083018a6151af565b6151ef60208301896151be565b6151fc60408301886151af565b6152096060830187614456565b615216608083018661437a565b61522360a083018561437a565b61523060c083018461437a565b98975050505050505050565b6000604082019050615251600083018561437a565b61525e602083018461437a565b9392505050565b600081519050615274816144b7565b92915050565b6000602082840312156152905761528f6143ae565b5b600061529e84828501615265565b91505092915050565b6152b0816144ad565b82525050565b60006040820190506152cb60008301856152a7565b6152d86020830184614faf565b9392505050565b6000815190506152ee816145ca565b92915050565b60006020828403121561530a576153096143ae565b5b6000615318848285016152df565b91505092915050565b6000604082019050615336600083018561437a565b6153436020830184614456565b9392505050565b61535381614510565b811461535e57600080fd5b50565b6000815190506153708161534a565b92915050565b60006020828403121561538c5761538b6143ae565b5b600061539a84828501615361565b91505092915050565b6000819050919050565b6153be6153b982614370565b6153a3565b82525050565b60006153d082856153ad565b6020820191506153e082846153ad565b6020820191508190509392505050565b6000606082019050615405600083018661437a565b615412602083018561437a565b61541f604083018461437a565b949350505050565b600060ff82169050919050565b61543d81615427565b811461544857600080fd5b50565b60008151905061545a81615434565b92915050565b600060208284031215615476576154756143ae565b5b60006154848482850161544b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115615513578086048111156154ef576154ee61548d565b5b60018516156154fe5780820291505b808102905061550c856154bc565b94506154d3565b94509492505050565b60008261552c57600190506155e8565b8161553a57600090506155e8565b8160018114615550576002811461555a57615589565b60019150506155e8565b60ff84111561556c5761556b61548d565b5b8360020a9150848211156155835761558261548d565b5b506155e8565b5060208310610133831016604e8410600b84101617156155be5782820a9050838111156155b9576155b861548d565b5b6155e8565b6155cb84848460016154c9565b925090508184048111156155e2576155e161548d565b5b81810290505b9392505050565b60006155fa82614370565b915061560583615427565b92506156327fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461551c565b905092915050565b600081519050615649816143b8565b92915050565b600060208284031215615665576156646143ae565b5b60006156738482850161563a565b91505092915050565b600061568782614370565b915061569283614370565b92508282026156a081614370565b915082820484148315176156b7576156b661548d565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006156f882614370565b915061570383614370565b925082615713576157126156be565b5b828204905092915050565b600061572982614370565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361575b5761575a61548d565b5b600182019050919050565b600061577182614370565b915061577c83614370565b92508282019050808211156157945761579361548d565b5b92915050565b600060a0820190506157af600083018861437a565b6157bc602083018761437a565b6157c9604083018661437a565b81810360608301526157db818561512f565b90506157ea608083018461437a565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b600061584861584361583e84615823565b614742565b614370565b9050919050565b6158588161582d565b82525050565b6000602082019050615873600083018461584f565b92915050565b600082825260208201905092915050565b82818337600083830152505050565b60006158a58385615879565b93506158b283858461588a565b6158bb836147c1565b840190509392505050565b600060208201905081810360008301526158e1818486615899565b90509392505050565b60006158f582614370565b915061590083614370565b92508282039050818111156159185761591761548d565b5b92915050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061598b60268361591e565b91506159968261592f565b604082019050919050565b600060208201905081810360008301526159ba8161597e565b9050919050565b60006040820190506159d66000830185614456565b81810360208301526159e88184614ca4565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000615a2760208361591e565b9150615a32826159f1565b602082019050919050565b60006020820190508181036000830152615a5681615a1a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea264697066735822122011b579f68fc0850abd5d573be7c0c96f54db9b288923cd401161a726cd30037e64736f6c634300081100330000000000000000000000000bca885cf322d0e478dc48fb84b4f522144db9d700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061038e5760003560e01c806379502c55116101de578063b139603c1161010f578063e8684ed1116100ad578063f2fde38b1161007c578063f2fde38b146109e5578063f95d71b114610a01578063f99b562314610a1d578063fa52c7d814610a395761038e565b8063e8684ed114610981578063e9fad8ee1461099f578063f1887fec146109a9578063f1b877a8146109c75761038e565b8063c19d93fb116100e9578063c19d93fb14610909578063c35d4d0914610927578063d4818fca14610945578063e7c08720146109635761038e565b8063b139603c146108d9578063ba3bd22e146108e3578063c006e00b146108ff5761038e565b80638b80d8331161017c5780639dca0032116101565780639dca003214610865578063a25e49a414610883578063a694fc3a146108b3578063ac2f8afe146108cf5761038e565b80638b80d833146108095780638da5cb5b14610825578063900cf0cf146108435761038e565b8063847e0625116101b8578063847e062514610781578063857b7663146107b1578063865419e9146107cf57806389965883146107eb5761038e565b806379502c55146107265780637aa086e714610747578063817b1cd2146107635761038e565b80634927a143116102c3578063533d463e1161026157806361dee8a31161023057806361dee8a3146106b157806370fe276a146106cf578063715018a6146107005780637392c76b1461070a5761038e565b8063533d463e1461062957806354eea796146106595780635995a4c4146106755780635b677eac146106935761038e565b80635081f66f1161029d5780635081f66f1461058f57806350d17b5e146105bf578063519877eb146105dd5780635305c8cf1461060d5761038e565b80634927a143146105275780634a6e51f5146105575780634f8f0102146105735761038e565b80633528db88116103305780633e6852661161030a5780633e6852661461048d5780633f819713146104bd57806340550a1c146104d957806343cb0a0e146105095761038e565b80633528db881461045d5780633cf80e6c146104795780633d18b912146104835761038e565b806316930f4d1161036c57806316930f4d146103eb5780631fab87c4146103f5578063252959a5146104115780632e1a7d4d146104415761038e565b80630297d4db1461039357806309c7c7d0146103b157806310fe9ae8146103cd575b600080fd5b61039b610a6f565b6040516103a89190614389565b60405180910390f35b6103cb60048036038101906103c691906143e4565b610a80565b005b6103d5610add565b6040516103e29190614465565b60405180910390f35b6103f3610c21565b005b61040f600480360381019061040a9190614480565b610e0d565b005b61042b600480360381019061042691906144e3565b610e59565b604051610438919061452b565b60405180910390f35b61045b60048036038101906104569190614480565b610e79565b005b610477600480360381019061047291906145f6565b610ef5565b005b6104816115ec565b005b61048b611aad565b005b6104a760048036038101906104a29190614480565b611b27565b6040516104b49190614389565b60405180910390f35b6104d760048036038101906104d291906146a8565b611b3f565b005b6104f360048036038101906104ee91906146d5565b611bab565b604051610500919061452b565b60405180910390f35b610511611bc8565b60405161051e9190614389565b60405180910390f35b610541600480360381019061053c9190614702565b611c0c565b60405161054e9190614389565b60405180910390f35b610571600480360381019061056c9190614480565b611c37565b005b61058d600480360381019061058891906145f6565b611c83565b005b6105a960048036038101906105a491906146d5565b611ed5565b6040516105b69190614465565b60405180910390f35b6105c7611f08565b6040516105d491906147a1565b60405180910390f35b6105f760048036038101906105f291906146d5565b611f2e565b604051610604919061452b565b60405180910390f35b61062760048036038101906106229190614915565b611f4e565b005b610643600480360381019061063e9190614a6f565b611fde565b6040516106509190614c31565b60405180910390f35b610673600480360381019061066e9190614480565b6121ee565b005b61067d61223a565b60405161068a9190614d02565b60405180910390f35b61069b612328565b6040516106a89190614465565b60405180910390f35b6106b961246c565b6040516106c69190614c31565b60405180910390f35b6106e960048036038101906106e49190614d24565b612489565b6040516106f7929190614d77565b60405180910390f35b610708612541565b005b610724600480360381019061071f91906146d5565b612555565b005b61072e6125c1565b60405161073e9493929190614da0565b60405180910390f35b610761600480360381019061075c91906146d5565b6125df565b005b61076b61266c565b6040516107789190614389565b60405180910390f35b61079b600480360381019061079691906146d5565b612672565b6040516107a8919061452b565b60405180910390f35b6107b96126f2565b6040516107c69190614d02565b60405180910390f35b6107e960048036038101906107e49190614e40565b6127e0565b005b6107f3612d37565b6040516108009190614389565b60405180910390f35b610823600480360381019061081e9190614eb4565b612de7565b005b61082d612e6d565b60405161083a9190614465565b60405180910390f35b61084b612e96565b60405161085c959493929190614ef4565b60405180910390f35b61086d612eba565b60405161087a9190614fbe565b60405180910390f35b61089d600480360381019061089891906146d5565b612ecd565b6040516108aa919061452b565b60405180910390f35b6108cd60048036038101906108c89190614480565b612f49565b005b6108d7612fc6565b005b6108e1613185565b005b6108fd60048036038101906108f89190614fd9565b6131f2565b005b610907613212565b005b610911613428565b60405161091e91906150c3565b60405180910390f35b61092f61343b565b60405161093c9190614d02565b60405180910390f35b61094d613529565b60405161095a9190614389565b60405180910390f35b61096b61353a565b6040516109789190614c31565b60405180910390f35b610989613557565b6040516109969190614389565b60405180910390f35b6109a7613607565b005b6109b1613766565b6040516109be919061452b565b60405180910390f35b6109cf6137ae565b6040516109dc919061518d565b60405180910390f35b6109ff60048036038101906109fa91906146d5565b613809565b005b610a1b6004803603810190610a1691906146d5565b61388c565b005b610a376004803603810190610a329190614480565b61390f565b005b610a536004803603810190610a4e91906146d5565b613c1e565b604051610a6697969594939291906151cd565b60405180910390f35b6000610a7b600e613cbc565b905090565b610a88613cd1565b8060176000848152602001908152602001600020819055507fd96aa9b717408dfdef39925f998646946efba8139acb451b120585a33de7f1e68282604051610ad192919061523c565b60405180910390a15050565b6000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e8dfd16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663df3806936040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bae919061527a565b601260149054906101000a900460ff166040518363ffffffff1660e01b8152600401610bdb9291906152b6565b602060405180830381865afa158015610bf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1c91906152f4565b905090565b600160020154421015610c7257426001600201546040517ff44bc0a7000000000000000000000000000000000000000000000000000000008152600401610c6992919061523c565b60405180910390fd5b60006004811115610c8657610c85614f47565b5b600060149054906101000a900460ff166004811115610ca857610ca7614f47565b5b1480610ce7575060036004811115610cc357610cc2614f47565b5b600060149054906101000a900460ff166004811115610ce557610ce4614f47565b5b145b610d3757600060149054906101000a900460ff166040517f9ef5b6f5000000000000000000000000000000000000000000000000000000008152600401610d2e91906150c3565b60405180910390fd5b600660040154610d47600e613cbc565b1015610d9a57610d57600e613cbc565b6006600401546040517f8a0defa4000000000000000000000000000000000000000000000000000000008152600401610d9192919061523c565b60405180910390fd5b6001600060146101000a81548160ff02191690836004811115610dc057610dbf614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff16604051610e0391906150c3565b60405180910390a1565b610e15613cd1565b806001600401819055507f887fed3a9270ffbbf863d640a07413b6f58cf97afaa9d7267693e962a76bd81081604051610e4e9190614389565b60405180910390a150565b60186020528060005260406000206000915054906101000a900460ff1681565b6000610e83612328565b90508073ffffffffffffffffffffffffffffffffffffffff1662f714ce83336040518363ffffffff1660e01b8152600401610ebf929190615321565b600060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050505050565b6000610eff612328565b90508073ffffffffffffffffffffffffffffffffffffffff166349919966336040518263ffffffff1660e01b8152600401610f3a9190614465565b602060405180830381865afa158015610f57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7b9190615376565b5060006004811115610f9057610f8f614f47565b5b600060149054906101000a900460ff166004811115610fb257610fb1614f47565b5b1480610ff1575060036004811115610fcd57610fcc614f47565b5b600060149054906101000a900460ff166004811115610fef57610fee614f47565b5b145b8061102e575060048081111561100a57611009614f47565b5b600060149054906101000a900460ff16600481111561102c5761102b614f47565b5b145b61107e57600060149054906101000a900460ff166040517fc1f8741d00000000000000000000000000000000000000000000000000000000815260040161107591906150c3565b60405180910390fd5b611092336010613d4f90919063ffffffff16565b156110d457336040517f7c6d6c6b0000000000000000000000000000000000000000000000000000000081526004016110cb9190614465565b60405180910390fd5b600083836040516020016110e99291906153c4565b6040516020818303038152906040528051906020012090506018600082815260200190815260200160002060009054906101000a900460ff16156111665783836040517f1179010e00000000000000000000000000000000000000000000000000000000815260040161115d92919061523c565b60405180910390fd5b60016018600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166327a199d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112019190615376565b156112c2578173ffffffffffffffffffffffffffffffffffffffff1663d3dbad7d336040518263ffffffff1660e01b815260040161123f9190614465565b602060405180830381865afa15801561125c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112809190615376565b6112c157336040517f924a59100000000000000000000000000000000000000000000000000000000081526004016112b89190614465565b60405180910390fd5b5b87601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff16021790555086601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160046101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555085601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a81548163ffffffff021916908363ffffffff16021790555084601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555082601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004018190555033601460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061159e33600e613d7f90919063ffffffff16565b503373ffffffffffffffffffffffffffffffffffffffff167f1dc186bd4daaf3fc4b9f8c689228a0be60dd2952dc502829514ae0d6955c0f5160405160405180910390a25050505050505050565b60016002015442101561163d57426001600201546040517ff44bc0a700000000000000000000000000000000000000000000000000000000815260040161163492919061523c565b60405180910390fd5b6002600481111561165157611650614f47565b5b600060149054906101000a900460ff16600481111561167357611672614f47565b5b146116c457600060149054906101000a900460ff166040517f17ce3ae10000000000000000000000000000000000000000000000000000000081526004016116bb91906150c3565b60405180910390fd5b6116cc613766565b611726576116d8613557565b6116e0612d37565b6116e8611bc8565b6040517f26d6b3de00000000000000000000000000000000000000000000000000000000815260040161171d939291906153f0565b60405180910390fd5b6000611732600c613cbc565b905060005b8181101561190657600061175582600c613daf90919063ffffffff16565b90506000611761610add565b9050600061176d612328565b905060008273ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190615460565b600a6117ec91906155ef565b8273ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b81526004016118259190614465565b602060405180830381865afa158015611842573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611866919061564f565b600660000154611876919061567c565b61188091906156ed565b90508173ffffffffffffffffffffffffffffffffffffffff166302fa04c982866040518363ffffffff1660e01b81526004016118bd929190615321565b600060405180830381600087803b1580156118d757600080fd5b505af11580156118eb573d6000803e3d6000fd5b505050505050505080806118fe9061571e565b915050611737565b505b6000611914600c613cbc565b1115611948576119426119326000600c613daf90919063ffffffff16565b600c613dc990919063ffffffff16565b50611908565b611952600e613cbc565b905060005b81811015611a055761198661197682600e613daf90919063ffffffff16565b600c613d7f90919063ffffffff16565b506000601560006119a184600e613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806119fd9061571e565b915050611957565b50600180016000815480929190611a1b9061571e565b919050555060016000015442611a319190615766565b60016002018190555060008060146101000a81548160ff02191690836004811115611a5f57611a5e614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff16604051611aa291906150c3565b60405180910390a150565b6000611ab7612328565b90508073ffffffffffffffffffffffffffffffffffffffff1663c00007b0336040518263ffffffff1660e01b8152600401611af29190614465565b600060405180830381600087803b158015611b0c57600080fd5b505af1158015611b20573d6000803e3d6000fd5b5050505050565b60176020528060005260406000206000915090505481565b611b47613cd1565b80600060146101000a81548160ff02191690836004811115611b6c57611b6b614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb681604051611ba091906150c3565b60405180910390a150565b6000611bc182600c613d4f90919063ffffffff16565b9050919050565b60006002611bd6600c613cbc565b03611be45760019050611c09565b60036002611bf2600c613cbc565b611bfc919061567c565b611c0691906156ed565b90505b90565b6016602052816000526040600020602052806000526040600020600091509150508060000154905081565b611c3f613cd1565b806001600201819055507feb49fe6118b628c010445c30724ceaf4efd8d87f330911c36493b401b5c296d081604051611c789190614389565b60405180910390a150565b85601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548163ffffffff021916908363ffffffff16021790555084601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160046101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555083601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a81548163ffffffff021916908363ffffffff16021790555082601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555080601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040181905550505050505050565b60146020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60156020528060005260406000206000915054906101000a900460ff1681565b611f56613cd1565b8460066000018190555083600660010181905550826006600201819055508160066003019080519060200190611f8d929190614295565b50806006600401819055507f16f896f15b01cc0c19146aac8f21b75e76e4f196a9e368ca3d1b7cf5251a12588585858585604051611fcf95949392919061579a565b60405180910390a15050505050565b60606000825167ffffffffffffffff811115611ffd57611ffc6147d2565b5b60405190808252806020026020018201604052801561203657816020015b6120236142e2565b81526020019060019003908161201b5790505b50905060005b83518110156121e4576013600085838151811061205c5761205b6157f4565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820154815250508282815181106121c6576121c56157f4565b5b602002602001018190525080806121dc9061571e565b91505061203c565b5080915050919050565b6121f6613cd1565b806001600001819055507f5f15d41eab42cb3f8a5c9e8cd44043648cb85a815522c5f4ae5a32597a8447a08160405161222f9190614389565b60405180910390a150565b606060006122486010613cbc565b67ffffffffffffffff811115612261576122606147d2565b5b60405190808252806020026020018201604052801561228f5781602001602082028036833780820191505090505b509050600061229e6010613cbc565b905060005b8181101561231f576122bf816010613daf90919063ffffffff16565b8382815181106122d2576122d16157f4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806123179061571e565b9150506122a3565b50819250505090565b6000601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e8dfd16601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638c1536df6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f9919061527a565b601260149054906101000a900460ff166040518363ffffffff1660e01b81526004016124269291906152b6565b602060405180830381865afa158015612443573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246791906152f4565b905090565b6060600061247861343b565b905061248381611fde565b91505090565b60008060006016600087815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600001548160010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169250925050935093915050565b612549613cd1565b6125536000613df9565b565b61255d613cd1565b612571816010613dc990919063ffffffff16565b5061258681600e613d7f90919063ffffffff16565b507fa5b14a5b2a3bffe27eff4f0dd1c65b1c966d2ec463c04f29a82c3e228ba7a071816040516125b69190614465565b60405180910390a150565b60068060000154908060010154908060020154908060040154905084565b6125e7613cd1565b6125fb81600e613dc990919063ffffffff16565b50612610816010613d7f90919063ffffffff16565b5061261a33613ebd565b8073ffffffffffffffffffffffffffffffffffffffff167ff020e162c28460a603e71f641a2e83634580ace02b9e28b844b2257949860e976000604051612661919061585e565b60405180910390a250565b600b5481565b600080601660006001800154815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506126d3611bc8565b8160000154106126e75760019150506126ed565b60009150505b919050565b60606000612700600c613cbc565b67ffffffffffffffff811115612719576127186147d2565b5b6040519080825280602002602001820160405280156127475781602001602082028036833780820191505090505b5090506000612756600c613cbc565b905060005b818110156127d75761277781600c613daf90919063ffffffff16565b83828151811061278a576127896157f4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806127cf9061571e565b91505061275b565b50819250505090565b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036128b557336040517f64ffeb3d0000000000000000000000000000000000000000000000000000000081526004016128ac9190614465565b60405180910390fd5b6128c981600e613d4f90919063ffffffff16565b61290a57806040517f5f5430820000000000000000000000000000000000000000000000000000000081526004016129019190614465565b60405180910390fd5b601660006001800154815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156129ee57806040517f384ce38a0000000000000000000000000000000000000000000000000000000081526004016129e59190614465565b60405180910390fd5b601660006001800154815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000815480929190612a569061571e565b91905055506001601660006001800154815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612b1c85600e613d4f90919063ffffffff16565b8015612b2d5750612b2c85612672565b5b15612cc857612b3b85613ebd565b612b4f856010613d7f90919063ffffffff16565b506000601760008681526020019081526020016000205490506000612b72612328565b905060006064838373ffffffffffffffffffffffffffffffffffffffff166370a082318b6040518263ffffffff1660e01b8152600401612bb29190614465565b602060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061564f565b612bfd919061567c565b612c0791906156ed565b90508173ffffffffffffffffffffffffffffffffffffffff16630a0e3dea828a6040518363ffffffff1660e01b8152600401612c44929190615321565b600060405180830381600087803b158015612c5e57600080fd5b505af1158015612c72573d6000803e3d6000fd5b505050508773ffffffffffffffffffffffffffffffffffffffff167ff020e162c28460a603e71f641a2e83634580ace02b9e28b844b2257949860e9782604051612cbc9190614389565b60405180910390a25050505b838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167febdee48ed32f3feff81eed274b9e084b367ac42fe1cb710dcbd43f1d537d99fa8686604051612d289291906158c6565b60405180910390a45050505050565b600080600090506000612d4a600e613cbc565b905060005b81811015612dde5760156000612d6f83600e613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615612dcb578280612dc79061571e565b9350505b8080612dd69061571e565b915050612d4f565b50819250505090565b612def613cd1565b6000612df9612328565b90508073ffffffffffffffffffffffffffffffffffffffff16630a0e3dea83856040518363ffffffff1660e01b8152600401612e36929190615321565b600060405180830381600087803b158015612e5057600080fd5b505af1158015612e64573d6000803e3d6000fd5b50505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60018060000154908060010154908060020154908060030154908060040154905085565b601260149054906101000a900460ff1681565b6000612f42601460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600c613d4f90919063ffffffff16565b9050919050565b6000612f53612328565b90508073ffffffffffffffffffffffffffffffffffffffff16637acb775783336040518363ffffffff1660e01b8152600401612f90929190615321565b600060405180830381600087803b158015612faa57600080fd5b505af1158015612fbe573d6000803e3d6000fd5b505050505050565b60006004811115612fda57612fd9614f47565b5b600060149054906101000a900460ff166004811115612ffc57612ffb614f47565b5b148061303b57506003600481111561301757613016614f47565b5b600060149054906101000a900460ff16600481111561303957613038614f47565b5b145b80613078575060048081111561305457613053614f47565b5b600060149054906101000a900460ff16600481111561307657613075614f47565b5b145b6130c857600060149054906101000a900460ff166040517fc1f8741d0000000000000000000000000000000000000000000000000000000081526004016130bf91906150c3565b60405180910390fd5b60066004015460016130da600e613cbc565b6130e491906158ea565b1015613137576130f4600e613cbc565b6006600401546040517f8a0defa400000000000000000000000000000000000000000000000000000000815260040161312e92919061523c565b60405180910390fd5b61314033613ebd565b3373ffffffffffffffffffffffffffffffffffffffff167fff61c8020d05b8c2e31cdbb3d3f8cbcbdc57fcafa00229d9858b7cfd3b039c8a60405160405180910390a2565b61318d613cd1565b6004600060146101000a81548160ff021916908360048111156131b3576131b2614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb660046040516131e891906150c3565b60405180910390a1565b6131fb87612f49565b613209868686868686610ef5565b50505050505050565b6001600401546001600201546132289190615766565b42101561327a57426001600201546001600401546040517f9312e856000000000000000000000000000000000000000000000000000000008152600401613271939291906153f0565b60405180910390fd5b6001600481111561328e5761328d614f47565b5b600060149054906101000a900460ff1660048111156132b0576132af614f47565b5b1461330157600060149054906101000a900460ff166040517f7203d9de0000000000000000000000000000000000000000000000000000000081526004016132f891906150c3565b60405180910390fd5b600061330d600e613cbc565b905060005b818110156133985760006015600061333484600e613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806133909061571e565b915050613312565b50600160030160008154809291906133af9061571e565b91905055506003600060146101000a81548160ff021916908360048111156133da576133d9614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff1660405161341d91906150c3565b60405180910390a150565b600060149054906101000a900460ff1681565b60606000613449600e613cbc565b67ffffffffffffffff811115613462576134616147d2565b5b6040519080825280602002602001820160405280156134905781602001602082028036833780820191505090505b509050600061349f600e613cbc565b905060005b81811015613520576134c081600e613daf90919063ffffffff16565b8382815181106134d3576134d26157f4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806135189061571e565b9150506134a4565b50819250505090565b6000613535600c613cbc565b905090565b606060006135466126f2565b905061355181611fde565b91505090565b60008060009050600061356a600c613cbc565b905060005b818110156135fe576015600061358f83600c613daf90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156135eb5782806135e79061571e565b9350505b80806135f69061571e565b91505061356f565b50819250505090565b6000613611612328565b90508073ffffffffffffffffffffffffffffffffffffffff1662f714ce8273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016136679190614465565b602060405180830381865afa158015613684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136a8919061564f565b336040518363ffffffff1660e01b81526004016136c6929190615321565b600060405180830381600087803b1580156136e057600080fd5b505af11580156136f4573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff1663c00007b0336040518263ffffffff1660e01b81526004016137319190614465565b600060405180830381600087803b15801561374b57600080fd5b505af115801561375f573d6000803e3d6000fd5b5050505050565b6000613770611bc8565b613778613557565b101561378757600090506137ab565b61378f610a6f565b613797612d37565b10156137a657600090506137ab565b600190505b90565b606060066003018054806020026020016040519081016040528092919081815260200182805480156137ff57602002820191906000526020600020905b8154815260200190600101908083116137eb575b5050505050905090565b613811613cd1565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613880576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613877906159a1565b60405180910390fd5b61388981613df9565b50565b613894613cd1565b80601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2b5fe80d5061b20e017f0cde52b331309601bfcab0cb14cfcf6a4096410a6075816040516139049190614465565b60405180910390a150565b8060018001541461395d576001800154816040517f068cde2a00000000000000000000000000000000000000000000000000000000815260040161395492919061523c565b60405180910390fd5b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160048111156139d5576139d4614f47565b5b600060149054906101000a900460ff1660048111156139f7576139f6614f47565b5b1480613a36575060026004811115613a1257613a11614f47565b5b600060149054906101000a900460ff166004811115613a3457613a33614f47565b5b145b613a8657600060149054906101000a900460ff166040517fe1b4c12e000000000000000000000000000000000000000000000000000000008152600401613a7d91906150c3565b60405180910390fd5b6001806001015414613af157613aa681600e613d4f90919063ffffffff16565b613af05780613ab361343b565b6040517fa3113c0e000000000000000000000000000000000000000000000000000000008152600401613ae79291906159c1565b60405180910390fd5b5b6001601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f0c101bf9bc977a511cf4ef91f5b9cbac30a0a3af0768cfd5c9634e73120d7c8b6001800154604051613b939190614389565b60405180910390a2613ba3613766565b15613c1a576002600060146101000a81548160ff02191690836004811115613bce57613bcd614f47565b5b02179055507f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb6600060149054906101000a900460ff16604051613c1191906150c3565b60405180910390a15b5050565b60136020528060005260406000206000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046fffffffffffffffffffffffffffffffff16908060000160149054906101000a900463ffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905087565b6000613cca826000016140aa565b9050919050565b613cd96140bb565b73ffffffffffffffffffffffffffffffffffffffff16613cf7612e6d565b73ffffffffffffffffffffffffffffffffffffffff1614613d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d4490615a3d565b60405180910390fd5b565b6000613d77836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6140c3565b905092915050565b6000613da7836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6140e6565b905092915050565b6000613dbe8360000183614156565b60001c905092915050565b6000613df1836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614181565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b613ed181600e613d4f90919063ffffffff16565b15613eec57613eea81600e613dc990919063ffffffff16565b505b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815260200160038201548152602001600482015481525050905060008160a001518260c001516040516020016140619291906153c4565b60405160208183030381529060405280519060200120905060006018600083815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b600081600001805490509050919050565b600033905090565b600080836001016000848152602001908152602001600020541415905092915050565b60006140f283836140c3565b61414b578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050614150565b600090505b92915050565b600082600001828154811061416e5761416d6157f4565b5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020549050600081146142895760006001826141b391906158ea565b90506000600186600001805490506141cb91906158ea565b905081811461423a5760008660000182815481106141ec576141eb6157f4565b5b90600052602060002001549050808760000184815481106142105761420f6157f4565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061424e5761424d615a5d565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061428f565b60009150505b92915050565b8280548282559060005260206000209081019282156142d1579160200282015b828111156142d05782518255916020019190600101906142b5565b5b5090506142de9190614353565b5090565b6040518060e00160405280600063ffffffff16815260200160006fffffffffffffffffffffffffffffffff168152602001600063ffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081525090565b5b8082111561436c576000816000905550600101614354565b5090565b6000819050919050565b61438381614370565b82525050565b600060208201905061439e600083018461437a565b92915050565b6000604051905090565b600080fd5b600080fd5b6143c181614370565b81146143cc57600080fd5b50565b6000813590506143de816143b8565b92915050565b600080604083850312156143fb576143fa6143ae565b5b6000614409858286016143cf565b925050602061441a858286016143cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061444f82614424565b9050919050565b61445f81614444565b82525050565b600060208201905061447a6000830184614456565b92915050565b600060208284031215614496576144956143ae565b5b60006144a4848285016143cf565b91505092915050565b6000819050919050565b6144c0816144ad565b81146144cb57600080fd5b50565b6000813590506144dd816144b7565b92915050565b6000602082840312156144f9576144f86143ae565b5b6000614507848285016144ce565b91505092915050565b60008115159050919050565b61452581614510565b82525050565b6000602082019050614540600083018461451c565b92915050565b600063ffffffff82169050919050565b61455f81614546565b811461456a57600080fd5b50565b60008135905061457c81614556565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6145a781614582565b81146145b257600080fd5b50565b6000813590506145c48161459e565b92915050565b6145d381614444565b81146145de57600080fd5b50565b6000813590506145f0816145ca565b92915050565b60008060008060008060c08789031215614613576146126143ae565b5b600061462189828a0161456d565b965050602061463289828a016145b5565b955050604061464389828a0161456d565b945050606061465489828a016145e1565b935050608061466589828a016143cf565b92505060a061467689828a016143cf565b9150509295509295509295565b6005811061469057600080fd5b50565b6000813590506146a281614683565b92915050565b6000602082840312156146be576146bd6143ae565b5b60006146cc84828501614693565b91505092915050565b6000602082840312156146eb576146ea6143ae565b5b60006146f9848285016145e1565b91505092915050565b60008060408385031215614719576147186143ae565b5b6000614727858286016143cf565b9250506020614738858286016145e1565b9150509250929050565b6000819050919050565b600061476761476261475d84614424565b614742565b614424565b9050919050565b60006147798261474c565b9050919050565b600061478b8261476e565b9050919050565b61479b81614780565b82525050565b60006020820190506147b66000830184614792565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61480a826147c1565b810181811067ffffffffffffffff82111715614829576148286147d2565b5b80604052505050565b600061483c6143a4565b90506148488282614801565b919050565b600067ffffffffffffffff821115614868576148676147d2565b5b602082029050602081019050919050565b600080fd5b600061489161488c8461484d565b614832565b905080838252602082019050602084028301858111156148b4576148b3614879565b5b835b818110156148dd57806148c988826143cf565b8452602084019350506020810190506148b6565b5050509392505050565b600082601f8301126148fc576148fb6147bc565b5b813561490c84826020860161487e565b91505092915050565b600080600080600060a08688031215614931576149306143ae565b5b600061493f888289016143cf565b9550506020614950888289016143cf565b9450506040614961888289016143cf565b935050606086013567ffffffffffffffff811115614982576149816143b3565b5b61498e888289016148e7565b925050608061499f888289016143cf565b9150509295509295909350565b600067ffffffffffffffff8211156149c7576149c66147d2565b5b602082029050602081019050919050565b60006149eb6149e6846149ac565b614832565b90508083825260208201905060208402830185811115614a0e57614a0d614879565b5b835b81811015614a375780614a2388826145e1565b845260208401935050602081019050614a10565b5050509392505050565b600082601f830112614a5657614a556147bc565b5b8135614a668482602086016149d8565b91505092915050565b600060208284031215614a8557614a846143ae565b5b600082013567ffffffffffffffff811115614aa357614aa26143b3565b5b614aaf84828501614a41565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b614aed81614546565b82525050565b614afc81614582565b82525050565b614b0b81614444565b82525050565b614b1a81614370565b82525050565b60e082016000820151614b366000850182614ae4565b506020820151614b496020850182614af3565b506040820151614b5c6040850182614ae4565b506060820151614b6f6060850182614b02565b506080820151614b826080850182614b11565b5060a0820151614b9560a0850182614b11565b5060c0820151614ba860c0850182614b11565b50505050565b6000614bba8383614b20565b60e08301905092915050565b6000602082019050919050565b6000614bde82614ab8565b614be88185614ac3565b9350614bf383614ad4565b8060005b83811015614c24578151614c0b8882614bae565b9750614c1683614bc6565b925050600181019050614bf7565b5085935050505092915050565b60006020820190508181036000830152614c4b8184614bd3565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000614c8b8383614b02565b60208301905092915050565b6000602082019050919050565b6000614caf82614c53565b614cb98185614c5e565b9350614cc483614c6f565b8060005b83811015614cf5578151614cdc8882614c7f565b9750614ce783614c97565b925050600181019050614cc8565b5085935050505092915050565b60006020820190508181036000830152614d1c8184614ca4565b905092915050565b600080600060608486031215614d3d57614d3c6143ae565b5b6000614d4b868287016143cf565b9350506020614d5c868287016145e1565b9250506040614d6d868287016145e1565b9150509250925092565b6000604082019050614d8c600083018561437a565b614d99602083018461451c565b9392505050565b6000608082019050614db5600083018761437a565b614dc2602083018661437a565b614dcf604083018561437a565b614ddc606083018461437a565b95945050505050565b600080fd5b60008083601f840112614e0057614dff6147bc565b5b8235905067ffffffffffffffff811115614e1d57614e1c614de5565b5b602083019150836001820283011115614e3957614e38614879565b5b9250929050565b60008060008060608587031215614e5a57614e596143ae565b5b6000614e68878288016145e1565b9450506020614e79878288016143cf565b935050604085013567ffffffffffffffff811115614e9a57614e996143b3565b5b614ea687828801614dea565b925092505092959194509250565b60008060408385031215614ecb57614eca6143ae565b5b6000614ed9858286016145e1565b9250506020614eea858286016143cf565b9150509250929050565b600060a082019050614f09600083018861437a565b614f16602083018761437a565b614f23604083018661437a565b614f30606083018561437a565b614f3d608083018461437a565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110614f8757614f86614f47565b5b50565b6000819050614f9882614f76565b919050565b6000614fa882614f8a565b9050919050565b614fb881614f9d565b82525050565b6000602082019050614fd36000830184614faf565b92915050565b600080600080600080600060e0888a031215614ff857614ff76143ae565b5b60006150068a828b016143cf565b97505060206150178a828b0161456d565b96505060406150288a828b016145b5565b95505060606150398a828b0161456d565b945050608061504a8a828b016145e1565b93505060a061505b8a828b016143cf565b92505060c061506c8a828b016143cf565b91505092959891949750929550565b6005811061508c5761508b614f47565b5b50565b600081905061509d8261507b565b919050565b60006150ad8261508f565b9050919050565b6150bd816150a2565b82525050565b60006020820190506150d860008301846150b4565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60006151168383614b11565b60208301905092915050565b6000602082019050919050565b600061513a826150de565b61514481856150e9565b935061514f836150fa565b8060005b83811015615180578151615167888261510a565b975061517283615122565b925050600181019050615153565b5085935050505092915050565b600060208201905081810360008301526151a7818461512f565b905092915050565b6151b881614546565b82525050565b6151c781614582565b82525050565b600060e0820190506151e2600083018a6151af565b6151ef60208301896151be565b6151fc60408301886151af565b6152096060830187614456565b615216608083018661437a565b61522360a083018561437a565b61523060c083018461437a565b98975050505050505050565b6000604082019050615251600083018561437a565b61525e602083018461437a565b9392505050565b600081519050615274816144b7565b92915050565b6000602082840312156152905761528f6143ae565b5b600061529e84828501615265565b91505092915050565b6152b0816144ad565b82525050565b60006040820190506152cb60008301856152a7565b6152d86020830184614faf565b9392505050565b6000815190506152ee816145ca565b92915050565b60006020828403121561530a576153096143ae565b5b6000615318848285016152df565b91505092915050565b6000604082019050615336600083018561437a565b6153436020830184614456565b9392505050565b61535381614510565b811461535e57600080fd5b50565b6000815190506153708161534a565b92915050565b60006020828403121561538c5761538b6143ae565b5b600061539a84828501615361565b91505092915050565b6000819050919050565b6153be6153b982614370565b6153a3565b82525050565b60006153d082856153ad565b6020820191506153e082846153ad565b6020820191508190509392505050565b6000606082019050615405600083018661437a565b615412602083018561437a565b61541f604083018461437a565b949350505050565b600060ff82169050919050565b61543d81615427565b811461544857600080fd5b50565b60008151905061545a81615434565b92915050565b600060208284031215615476576154756143ae565b5b60006154848482850161544b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115615513578086048111156154ef576154ee61548d565b5b60018516156154fe5780820291505b808102905061550c856154bc565b94506154d3565b94509492505050565b60008261552c57600190506155e8565b8161553a57600090506155e8565b8160018114615550576002811461555a57615589565b60019150506155e8565b60ff84111561556c5761556b61548d565b5b8360020a9150848211156155835761558261548d565b5b506155e8565b5060208310610133831016604e8410600b84101617156155be5782820a9050838111156155b9576155b861548d565b5b6155e8565b6155cb84848460016154c9565b925090508184048111156155e2576155e161548d565b5b81810290505b9392505050565b60006155fa82614370565b915061560583615427565b92506156327fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461551c565b905092915050565b600081519050615649816143b8565b92915050565b600060208284031215615665576156646143ae565b5b60006156738482850161563a565b91505092915050565b600061568782614370565b915061569283614370565b92508282026156a081614370565b915082820484148315176156b7576156b661548d565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006156f882614370565b915061570383614370565b925082615713576157126156be565b5b828204905092915050565b600061572982614370565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361575b5761575a61548d565b5b600182019050919050565b600061577182614370565b915061577c83614370565b92508282019050808211156157945761579361548d565b5b92915050565b600060a0820190506157af600083018861437a565b6157bc602083018761437a565b6157c9604083018661437a565b81810360608301526157db818561512f565b90506157ea608083018461437a565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b600061584861584361583e84615823565b614742565b614370565b9050919050565b6158588161582d565b82525050565b6000602082019050615873600083018461584f565b92915050565b600082825260208201905092915050565b82818337600083830152505050565b60006158a58385615879565b93506158b283858461588a565b6158bb836147c1565b840190509392505050565b600060208201905081810360008301526158e1818486615899565b90509392505050565b60006158f582614370565b915061590083614370565b92508282039050818111156159185761591761548d565b5b92915050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061598b60268361591e565b91506159968261592f565b604082019050919050565b600060208201905081810360008301526159ba8161597e565b9050919050565b60006040820190506159d66000830185614456565b81810360208301526159e88184614ca4565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000615a2760208361591e565b9150615a32826159f1565b602082019050919050565b60006020820190508181036000830152615a5681615a1a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea264697066735822122011b579f68fc0850abd5d573be7c0c96f54db9b288923cd401161a726cd30037e64736f6c63430008110033