Source Code
Latest 25 from a total of 5,335 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw Tokens ... | 408553118 | 48 days ago | IN | 0.0005 ETH | 0.00000085 | ||||
| Withdraw Tokens ... | 407811511 | 50 days ago | IN | 0.0005 ETH | 0.00000068 | ||||
| Move To Next Spa... | 406090311 | 55 days ago | IN | 0 ETH | 0.000065 | ||||
| Move To Next Spa... | 405902531 | 55 days ago | IN | 0 ETH | 0.00001069 | ||||
| Move To Next Spa... | 405156814 | 57 days ago | IN | 0 ETH | 0.00000212 | ||||
| Move To Next Spa... | 402941009 | 64 days ago | IN | 0 ETH | 0.00000212 | ||||
| Unstake | 401169965 | 69 days ago | IN | 0.0005 ETH | 0.00000174 | ||||
| Move To Next Spa... | 382798047 | 122 days ago | IN | 0 ETH | 0.00000211 | ||||
| Move To Next Spa... | 381407600 | 126 days ago | IN | 0 ETH | 0.00000213 | ||||
| Move To Next Spa... | 381241790 | 127 days ago | IN | 0 ETH | 0.00000211 | ||||
| Move To Next Spa... | 381188289 | 127 days ago | IN | 0 ETH | 0.00000214 | ||||
| Withdraw Tokens ... | 381130269 | 127 days ago | IN | 0.0005 ETH | 0.00000069 | ||||
| Move To Next Spa... | 380916897 | 127 days ago | IN | 0 ETH | 0.00000216 | ||||
| Move To Next Spa... | 380116126 | 130 days ago | IN | 0 ETH | 0.00000202 | ||||
| Unstake | 379669107 | 131 days ago | IN | 0.0005 ETH | 0.00000202 | ||||
| Move To Next Spa... | 379176885 | 133 days ago | IN | 0 ETH | 0.00000213 | ||||
| Move To Next Spa... | 378596220 | 134 days ago | IN | 0 ETH | 0.00000213 | ||||
| Move To Next Spa... | 377671340 | 137 days ago | IN | 0 ETH | 0.00000211 | ||||
| Move To Next Spa... | 376647803 | 140 days ago | IN | 0 ETH | 0.00000211 | ||||
| Move To Next Spa... | 375197608 | 144 days ago | IN | 0 ETH | 0.00000211 | ||||
| Move To Next Spa... | 373599008 | 149 days ago | IN | 0 ETH | 0.00000267 | ||||
| Move To Next Spa... | 371761410 | 154 days ago | IN | 0 ETH | 0.00000211 | ||||
| Unstake | 370822923 | 157 days ago | IN | 0.0005 ETH | 0.00000178 | ||||
| Withdraw Tokens ... | 370445846 | 158 days ago | IN | 0.0005 ETH | 0.00000411 | ||||
| Withdraw Tokens ... | 367276970 | 167 days ago | IN | 0.0005 ETH | 0.00000185 |
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 345883675 | 229 days ago | 0.375 ETH |
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xee0745C7...a3f85Af1c The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
SpartaStaking
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
import {IStakedSparta} from "../tokens/interfaces/IStakedSparta.sol";
import {ISpartaStaking} from "./interfaces/ISpartaStaking.sol";
import {ToInitialize} from "../ToInitialize.sol";
import {WithFees} from "../WithFees.sol";
import {ZeroAddressGuard} from "../ZeroAddressGuard.sol";
import {ZeroAmountGuard} from "../ZeroAmountGuard.sol";
import {IAccessControl, IAccessControlHolder} from "../IAccessControlHolder.sol";
import {IContractsRepostiory} from "../IContractsRepostiory.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract SpartaStaking is
ISpartaStaking,
ToInitialize,
Ownable,
WithFees,
ZeroAddressGuard,
ZeroAmountGuard
{
using SafeERC20 for IERC20;
uint256 constant UNLOCK_TIMESTAMP_MINIMUM_DIFF = 30 days;
uint256 constant MINIML_UNSTAKING_PERIOD = 10 days;
bytes32 constant SPARTA_STAKING_CONTRACT_ID = keccak256("SPARTA_STAKING");
IERC20 public immutable sparta;
IStakedSparta public immutable stakedSparta;
IContractsRepostiory public immutable contractsRepository;
uint256 public totalSupply;
uint256 public rewardPerTokenStored;
uint256 public rewardRate;
uint256 public start;
uint256 public updatedAt;
uint256 public duration;
uint256 public override unlockTokensTimestamp;
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public rewards;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public userTokensToClaimCounter;
mapping(address => mapping(uint256 => TokensToClaim))
public userTokensToClaim;
modifier isOngoing() {
if (block.timestamp < start) {
revert BeforeStakingStart();
}
if (finishAt() < block.timestamp) {
revert AfterStakingFinish();
}
_;
}
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
updatedAt = lastTimeRewardApplicable();
if (account != address(0)) {
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
modifier canUstake(uint256 amount, uint256 duration_) {
if (amount == 0) {
revert ZeroAmount();
}
if (amount > balanceOf[msg.sender]) {
revert CannotUnstake();
}
if (duration_ < MINIML_UNSTAKING_PERIOD) {
revert MinimalUnstakingPeriod();
}
_;
}
constructor(
IERC20 sparta_,
IStakedSparta stakedSparta_,
IAccessControl acl_,
IContractsRepostiory contractRepository_,
address treasury_,
uint256 fees_
) Ownable() WithFees(acl_, treasury_, fees_) {
sparta = sparta_;
stakedSparta = stakedSparta_;
contractsRepository = contractRepository_;
}
function stake(uint256 _amount) external {
stakeAs(msg.sender, _amount);
}
function initialize(
uint256 amount_,
uint256 start_,
uint256 duration_,
uint256 unlockTokensTimestamp_
)
external
notInitialized
onlyOwner
notZeroAmount(amount_)
notZeroAmount(duration_)
{
if (sparta.balanceOf(address(this)) < amount_) {
revert RewardBalanceTooSmall();
}
if (block.timestamp > start_) {
revert StartNotValid();
}
if (
start_ + duration_ + UNLOCK_TIMESTAMP_MINIMUM_DIFF >
unlockTokensTimestamp_
) {
revert NotValidUnlockTimestamp();
}
duration = duration_;
start = start_;
rewardRate = amount_ / duration_;
updatedAt = block.timestamp;
unlockTokensTimestamp = unlockTokensTimestamp_;
initialized = true;
emit Initialized(start_, duration_, amount_, unlockTokensTimestamp_);
}
function withdrawTokensToClaimFromRounds(
uint256[] calldata rounds
) external {
uint256 roundsLength = rounds.length;
for (uint roundIndex = 0; roundIndex < roundsLength; ) {
withdrawTokensToClaim(rounds[roundIndex]);
unchecked {
++roundIndex;
}
}
}
function unlockTokens(
address to,
uint256 amount
)
external
isInitialized
notZeroAddress(to)
notZeroAmount(amount)
onlyOwner
{
if (block.timestamp < unlockTokensTimestamp) {
revert ToEarlyToWithdrawReward();
}
sparta.safeTransfer(to, amount);
}
function moveToNextSpartaStaking()
external
updateReward(msg.sender)
isInitialized
{
ISpartaStaking current = currentImplementation();
uint256 balance = balanceOf[msg.sender];
if (balance == 0) {
revert ZeroAmount();
}
balanceOf[msg.sender] = 0;
stakedSparta.burnFrom(msg.sender, balance);
totalSupply -= balance;
sparta.forceApprove(address(current), balance);
current.stakeAs(msg.sender, balance);
emit MovedToNextImplementation(msg.sender, balance, 0);
}
function moveToNextSpartaStakingWithReward()
external
isInitialized
updateReward(msg.sender)
{
ISpartaStaking current = currentImplementation();
uint256 balance = balanceOf[msg.sender];
uint256 reward = rewards[msg.sender];
uint256 total = balance + reward;
stakedSparta.burnFrom(msg.sender, balance);
if (total == 0) {
revert ZeroAmount();
}
balanceOf[msg.sender] = 0;
rewards[msg.sender] = 0;
totalSupply -= balance;
sparta.forceApprove(address(current), total);
current.stakeAs(msg.sender, total);
emit MovedToNextImplementation(msg.sender, balance, reward);
}
function toEnd() external view returns (uint256) {
return block.timestamp >= finishAt() ? 0 : finishAt() - block.timestamp;
}
function totalLocked(address wallet) external view returns (uint256) {
return totalPendingToClaim(wallet) + earned(wallet) + balanceOf[wallet];
}
function getUserAllocations(
address _wallet
) external view returns (TokensToClaim[] memory) {
uint256 counter = userTokensToClaimCounter[_wallet];
TokensToClaim[] memory toClaims = new TokensToClaim[](counter);
for (uint256 i = 0; i < counter; ) {
toClaims[i] = userTokensToClaim[_wallet][i];
unchecked {
++i;
}
}
return toClaims;
}
function unstake(
uint256 amount,
uint256 after_
)
public
payable
onlyWithFees
isInitialized
canUstake(amount, after_)
updateReward(msg.sender)
{
uint256 round = userTokensToClaimCounter[msg.sender];
uint256 tokensToWidthdraw = calculateWithFee(amount, after_);
uint256 releaseTime = after_ + block.timestamp;
uint256 spartaFees = amount - tokensToWidthdraw;
userTokensToClaim[msg.sender][round] = TokensToClaim(
false,
releaseTime,
tokensToWidthdraw
);
++userTokensToClaimCounter[msg.sender];
balanceOf[msg.sender] -= amount;
totalSupply -= amount;
if (spartaFees > 0) {
sparta.transfer(treasury, spartaFees);
}
stakedSparta.burnFrom(msg.sender, amount);
emit Unstaked(msg.sender, amount, tokensToWidthdraw, releaseTime);
}
function stakeAs(
address wallet,
uint256 amount
)
public
isInitialized
isOngoing
notZeroAddress(wallet)
updateReward(wallet)
{
sparta.safeTransferFrom(msg.sender, address(this), amount);
balanceOf[wallet] += amount;
totalSupply += amount;
stakedSparta.mintTo(wallet, amount);
emit Staked(wallet, amount);
}
function getReward()
public
payable
isInitialized
onlyWithFees
updateReward(msg.sender)
{
uint256 reward = rewards[msg.sender];
if (reward == 0) {
revert ZeroAmount();
}
sparta.safeTransfer(msg.sender, reward);
rewards[msg.sender] = 0;
emit RewardTaken(msg.sender, reward);
}
function withdrawTokensToClaim(uint256 round) public payable onlyWithFees {
TokensToClaim storage tokensToClaim = userTokensToClaim[msg.sender][
round
];
if (tokensToClaim.release == 0) {
revert RoundDoesNotExist();
}
if (block.timestamp < tokensToClaim.release) {
revert BeforeReleaseTime();
}
if (tokensToClaim.taken) {
revert TokensAlreadyClaimed();
}
sparta.safeTransfer(msg.sender, tokensToClaim.value);
tokensToClaim.taken = true;
emit TokensClaimed(msg.sender, tokensToClaim.value, round);
}
function finishAt() public view override returns (uint256) {
return start + duration;
}
function rewardPerToken() public view returns (uint) {
if (totalSupply == 0 || block.timestamp < start) {
return rewardPerTokenStored;
}
return
rewardPerTokenStored +
(rewardRate * (lastTimeRewardApplicable() - updatedAt) * 1e18) /
totalSupply;
}
function lastTimeRewardApplicable() public view returns (uint) {
return _min(finishAt(), block.timestamp);
}
function earned(address _account) public view returns (uint256) {
return
((balanceOf[_account] *
(rewardPerToken() - userRewardPerTokenPaid[_account])) / 1e18) +
rewards[_account];
}
function totalPendingToClaim(address wallet) public view returns (uint256) {
uint256 toClaim = 0;
uint256 rounds = userTokensToClaimCounter[wallet];
for (uint256 roundIndex = 0; roundIndex < rounds; ) {
TokensToClaim memory tokensToClaim = userTokensToClaim[wallet][
roundIndex
];
if (!tokensToClaim.taken) {
toClaim += tokensToClaim.value;
}
unchecked {
++roundIndex;
}
}
return toClaim;
}
function currentImplementation() public view returns (ISpartaStaking) {
address spartaStakingAddress = contractsRepository.getContract(
SPARTA_STAKING_CONTRACT_ID
);
if (spartaStakingAddress == address(this)) {
revert CurrentImplementation();
}
return SpartaStaking(spartaStakingAddress);
}
function calculateWithFee(
uint256 input,
uint256 _duration
) public pure returns (uint256) {
uint256 saturatedDuration = _duration > 110 days ? 110 days : _duration;
uint256 feesNominator = ((110 days - saturatedDuration) * 500) / 1 days;
uint256 feesOnAmount = (input * feesNominator) / 100000;
return input - feesOnAmount;
}
function _min(uint x, uint y) private pure returns (uint) {
return x <= y ? x : y;
}
}// 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;
}// 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);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
* 0 before setting it to a non-zero value.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// 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;
}
}//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
/**
* @title IAccessControlHolder
* @notice Interface created to store reference to the access control.
*/
interface IAccessControlHolder {
/**
* @notice Function returns reference to IAccessControl.
* @return IAccessControl reference to access control.
*/
function acl() external view returns (IAccessControl);
}// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
interface IContractsRepostiory {
error ContractDoesNotExist();
error OnlyRepositoryOnwer();
function getContract(bytes32 contractId) external view returns (address);
function tryGetContract(bytes32 contractId) external view returns (address);
function setContract(bytes32 contractId, address contractAddress) external;
}//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
/**
* @title IWithFees.
* @notice This interface describes the functions for managing fees in a contract.
*/
interface IWithFees {
error OnlyFeesManagerAccess();
error OnlyWithFees();
error ETHTransferFailed();
/**
* @notice Function returns the treasury address where fees are collected.
* @return The address of the treasury .
*/
function treasury() external view returns (address);
/**
* @notice Function returns the value of the fees.
* @return uint256 Amount of fees to pay.
*/
function fees() external view returns (uint256);
/**
* @notice Function transfers the collected fees to the treasury address.
*/
function transfer() external;
}//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
interface ISpartaStaking {
error RewardBalanceTooSmall();
error BeforeStakingStart();
error AfterStakingFinish();
error TokensAlreadyClaimed();
error RoundDoesNotExist();
error BeforeReleaseTime();
error NotValidUnlockTimestamp();
error ToEarlyToWithdrawReward();
error StartNotValid();
error MinimalUnstakingPeriod();
error CannotUnstake();
error CurrentImplementation();
struct TokensToClaim {
bool taken;
uint256 release;
uint256 value;
}
event Staked(address indexed wallet, uint256 value);
event Unstaked(
address indexed wallet,
uint256 tokensAmount,
uint256 tokensToClaim,
uint256 duration
);
event TokensClaimed(
address indexed wallet,
uint256 indexed roundId,
uint256 tokensToClaimid
);
event RewardTaken(address indexed wallet, uint256 amount);
event Initialized(
uint256 start,
uint256 duration,
uint256 reward,
uint256 unlockTokensTimestamp
);
event MovedToNextImplementation(
address indexed by,
uint256 balance,
uint256 reward
);
function finishAt() external view returns (uint256);
function stake(uint256 amount) external;
function stakeAs(address wallet, uint256 amount) external;
function unlockTokens(address to, uint256 amount) external;
function unlockTokensTimestamp() external view returns (uint256);
}//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
contract ToInitialize {
error AlreadyInitialized();
error NotInitialized();
bool internal initialized;
modifier isInitialized() {
_isInitialized();
_;
}
function _isInitialized() internal view {
if (!initialized) {
revert NotInitialized();
}
}
modifier notInitialized() {
if (initialized) {
revert AlreadyInitialized();
}
_;
}
}//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IStakedSparta is IERC20 {
function mintTo(address to, uint256 amount) external;
function burnFrom(address wallet, uint256 amount) external;
}// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
import {IAccessControlHolder, IAccessControl} from "./IAccessControlHolder.sol";
import {IWithFees} from "./IWithFees.sol";
/**
* @title WithFees
* @notice This contract is responsible for managing, calculating and transferring fees.
*/
contract WithFees is IAccessControlHolder, IWithFees {
address public immutable override treasury;
uint256 public immutable override fees;
IAccessControl public immutable override acl;
bytes32 public constant FEES_MANAGER = keccak256("FEES_MANAGER");
/**
* @notice Modifier to allow only function calls that are accompanied by the required fee.
* @dev Function reverts with OnlyWithFees error, if the value is smaller than expected.
*/
modifier onlyWithFees() {
if (fees != msg.value) {
revert OnlyWithFees();
}
_;
}
/**
* @notice Modifier to allow only accounts with FEES_MANAGER role.
* @dev Reverts with OnlyFeesManagerAccess error, if the sender does not have the role.
*/
modifier onlyFeesManagerAccess() {
if (!acl.hasRole(FEES_MANAGER, msg.sender)) {
revert OnlyFeesManagerAccess();
}
_;
}
constructor(IAccessControl acl_, address treasury_, uint256 value_) {
acl = acl_;
treasury = treasury_;
fees = value_;
}
/**
* @notice Transfers the balance of the contract to the treasury.
* @dev Only accessible by an account with the FEES_MANAGER role.
*/
function transfer() external onlyFeesManagerAccess {
(bool sent, ) = treasury.call{value: address(this).balance}("");
if (!sent) {
revert ETHTransferFailed();
}
}
}// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
/**
* @title ZeroAddressGuard.
* @notice This contract is responsible for ensuring that a given address is not a zero address.
*/
contract ZeroAddressGuard {
error ZeroAddress();
/**
* @notice Modifier to make a function callable only when the provided address is non-zero.
* @dev If the address is a zero address, the function reverts with ZeroAddress error.
* @param _addr Address to be checked..
*/
modifier notZeroAddress(address _addr) {
_ensureIsNotZeroAddress(_addr);
_;
}
/// @notice Checks if a given address is a zero address and reverts if it is.
/// @param _addr Address to be checked.
/// @dev If the address is a zero address, the function reverts with ZeroAddress error.
/**
* @notice Checks if a given address is a zero address and reverts if it is.
* @dev .
* @param _addr .
*/
function _ensureIsNotZeroAddress(address _addr) internal pure {
if (_addr == address(0)) {
revert ZeroAddress();
}
}
}// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.18;
/**
* @title ZeroAmountGuard
* @notice This contract provides a modifier to guard against zero values in a transaction.
*/
contract ZeroAmountGuard {
error ZeroAmount();
/**
* @notice Modifier ensures the amount provided is not zero.
* param _amount The amount to check.
* @dev If the amount is zero, the function reverts with a ZeroAmount error.
*/
modifier notZeroAmount(uint256 _amount) {
_ensureIsNotZero(_amount);
_;
}
/**
* @notice Function verifies that the given amount is not zero.
* @param _amount The amount to check.
*/
function _ensureIsNotZero(uint256 _amount) internal pure {
if (_amount == 0) {
revert ZeroAmount();
}
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"sparta_","type":"address"},{"internalType":"contract IStakedSparta","name":"stakedSparta_","type":"address"},{"internalType":"contract IAccessControl","name":"acl_","type":"address"},{"internalType":"contract IContractsRepostiory","name":"contractRepository_","type":"address"},{"internalType":"address","name":"treasury_","type":"address"},{"internalType":"uint256","name":"fees_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AfterStakingFinish","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"BeforeReleaseTime","type":"error"},{"inputs":[],"name":"BeforeStakingStart","type":"error"},{"inputs":[],"name":"CannotUnstake","type":"error"},{"inputs":[],"name":"CurrentImplementation","type":"error"},{"inputs":[],"name":"ETHTransferFailed","type":"error"},{"inputs":[],"name":"MinimalUnstakingPeriod","type":"error"},{"inputs":[],"name":"NotInitialized","type":"error"},{"inputs":[],"name":"NotValidUnlockTimestamp","type":"error"},{"inputs":[],"name":"OnlyFeesManagerAccess","type":"error"},{"inputs":[],"name":"OnlyWithFees","type":"error"},{"inputs":[],"name":"RewardBalanceTooSmall","type":"error"},{"inputs":[],"name":"RoundDoesNotExist","type":"error"},{"inputs":[],"name":"StartNotValid","type":"error"},{"inputs":[],"name":"ToEarlyToWithdrawReward","type":"error"},{"inputs":[],"name":"TokensAlreadyClaimed","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unlockTokensTimestamp","type":"uint256"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"MovedToNextImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardTaken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensToClaimid","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensToClaim","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"FEES_MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acl","outputs":[{"internalType":"contract IAccessControl","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"input","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"calculateWithFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractsRepository","outputs":[{"internalType":"contract IContractsRepostiory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentImplementation","outputs":[{"internalType":"contract ISpartaStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finishAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"getUserAllocations","outputs":[{"components":[{"internalType":"bool","name":"taken","type":"bool"},{"internalType":"uint256","name":"release","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct ISpartaStaking.TokensToClaim[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"start_","type":"uint256"},{"internalType":"uint256","name":"duration_","type":"uint256"},{"internalType":"uint256","name":"unlockTokensTimestamp_","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"moveToNextSpartaStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"moveToNextSpartaStakingWithReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sparta","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeAs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedSparta","outputs":[{"internalType":"contract IStakedSparta","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"totalLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"totalPendingToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unlockTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTokensTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"after_","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"updatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userTokensToClaim","outputs":[{"internalType":"bool","name":"taken","type":"bool"},{"internalType":"uint256","name":"release","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userTokensToClaimCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"round","type":"uint256"}],"name":"withdrawTokensToClaim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"rounds","type":"uint256[]"}],"name":"withdrawTokensToClaimFromRounds","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x6101406040523480156200001257600080fd5b50604051620048fe380380620048fe8339818101604052810190620000389190620003fe565b8382826200005b6200004f6200017860201b60201c565b6200018060201b60201c565b8273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508060a081815250505050508573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff16815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff16815250508273ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff16815250505050505050506200049a565b600033905090565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000277826200024a565b9050919050565b60006200028b826200026a565b9050919050565b6200029d816200027e565b8114620002a957600080fd5b50565b600081519050620002bd8162000292565b92915050565b6000620002d0826200026a565b9050919050565b620002e281620002c3565b8114620002ee57600080fd5b50565b6000815190506200030281620002d7565b92915050565b600062000315826200026a565b9050919050565b620003278162000308565b81146200033357600080fd5b50565b60008151905062000347816200031c565b92915050565b60006200035a826200026a565b9050919050565b6200036c816200034d565b81146200037857600080fd5b50565b6000815190506200038c8162000361565b92915050565b6200039d816200026a565b8114620003a957600080fd5b50565b600081519050620003bd8162000392565b92915050565b6000819050919050565b620003d881620003c3565b8114620003e457600080fd5b50565b600081519050620003f881620003cd565b92915050565b60008060008060008060c087890312156200041e576200041d62000245565b5b60006200042e89828a01620002ac565b96505060206200044189828a01620002f1565b95505060406200045489828a0162000336565b94505060606200046789828a016200037b565b93505060806200047a89828a01620003ac565b92505060a06200048d89828a01620003e7565b9150509295509295509295565b60805160a05160c05160e051610100516101205161438f6200056f600039600081816119b00152612a990152600081816111e5015281816112c601528181611f82015281816123bc01526128e2015260008181610c3301528181610ed90152818161112f0152818161134c0152818161198c01528181611a5d01528181611ec20152818161252b015261298d0152600081816117930152612c30015260008181610ab901528181610d1a015281816119d40152611aaa015260008181611538015281816118870152611efe015261438f6000f3fe60806040526004361061025b5760003560e01c80638b87634711610144578063c23e789d116100b6578063d442593f1161007a578063d442593f146108b6578063d8bd5c29146108cd578063d8fb9337146108f8578063de28735914610935578063df136d6514610960578063f2fde38b1461098b5761025b565b8063c23e789d146107df578063c3aff2cd146107f6578063c8ce398614610821578063cd3daf9d1461084c578063cd9bf0e4146108775761025b565b80639d564d9a116101085780639d564d9a146106e05780639e2c8a5b14610709578063a518488e14610725578063a694fc3a14610762578063b5ef3d2b1461078b578063be9a6555146107b45761025b565b80638b876347146105f75780638da5cb5b146106345780638e1d6d681461065f57806398214cf21461068a5780639af1d35a146106b55761025b565b806364a3ce20116101dd5780637519ab50116101a15780637519ab50146104e55780637a7e3c75146105105780637b0a47ee1461054d5780637e511df91461057857806380faa57d146105b55780638a4068dd146105e05761025b565b806364a3ce20146103fe57806367d3b4881461043b5780636b1b8eb21461046657806370a0823114610491578063715018a6146104ce5761025b565b80633d18b912116102245780633d18b9121461034c57806341f5fde01461035657806355f64cc01461037f57806360a2da44146103aa57806361d027b3146103d35761025b565b80628cc262146102605780630640310f1461029d5780630700037d146102b95780630fb5a6b4146102f657806318160ddd14610321575b600080fd5b34801561026c57600080fd5b506102876004803603810190610282919061352d565b6109b4565b6040516102949190613573565b60405180910390f35b6102b760048036038101906102b291906135ba565b610ab6565b005b3480156102c557600080fd5b506102e060048036038101906102db919061352d565b610ceb565b6040516102ed9190613573565b60405180910390f35b34801561030257600080fd5b5061030b610d03565b6040516103189190613573565b60405180910390f35b34801561032d57600080fd5b50610336610d09565b6040516103439190613573565b60405180910390f35b610354610d0f565b005b34801561036257600080fd5b5061037d600480360381019061037891906135e7565b610fb4565b005b34801561038b57600080fd5b506103946112c4565b6040516103a19190613686565b60405180910390f35b3480156103b657600080fd5b506103d160048036038101906103cc91906136a1565b6112e8565b005b3480156103df57600080fd5b506103e8611536565b6040516103f59190613717565b60405180910390f35b34801561040a57600080fd5b506104256004803603810190610420919061352d565b61155a565b6040516104329190613573565b60405180910390f35b34801561044757600080fd5b50610450611572565b60405161045d9190613573565b60405180910390f35b34801561047257600080fd5b5061047b611589565b604051610488919061374b565b60405180910390f35b34801561049d57600080fd5b506104b860048036038101906104b3919061352d565b6115ad565b6040516104c59190613573565b60405180910390f35b3480156104da57600080fd5b506104e36115c5565b005b3480156104f157600080fd5b506104fa6115d9565b6040516105079190613573565b60405180910390f35b34801561051c57600080fd5b5061053760048036038101906105329190613766565b6115df565b6040516105449190613573565b60405180910390f35b34801561055957600080fd5b5061056261165c565b60405161056f9190613573565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a919061352d565b611662565b6040516105ac9190613573565b60405180910390f35b3480156105c157600080fd5b506105ca611779565b6040516105d79190613573565b60405180910390f35b3480156105ec57600080fd5b506105f5611791565b005b34801561060357600080fd5b5061061e6004803603810190610619919061352d565b611949565b60405161062b9190613573565b60405180910390f35b34801561064057600080fd5b50610649611961565b6040516106569190613717565b60405180910390f35b34801561066b57600080fd5b5061067461198a565b60405161068191906137c7565b60405180910390f35b34801561069657600080fd5b5061069f6119ae565b6040516106ac9190613803565b60405180910390f35b3480156106c157600080fd5b506106ca6119d2565b6040516106d79190613573565b60405180910390f35b3480156106ec57600080fd5b50610707600480360381019061070291906135e7565b6119f6565b005b610723600480360381019061071e9190613766565b611aa7565b005b34801561073157600080fd5b5061074c6004803603810190610747919061352d565b61206a565b6040516107599190613939565b60405180910390f35b34801561076e57600080fd5b50610789600480360381019061078491906135ba565b6121d1565b005b34801561079757600080fd5b506107b260048036038101906107ad91906139c0565b6121de565b005b3480156107c057600080fd5b506107c9612224565b6040516107d69190613573565b60405180910390f35b3480156107eb57600080fd5b506107f461222a565b005b34801561080257600080fd5b5061080b612633565b6040516108189190613573565b60405180910390f35b34801561082d57600080fd5b50610836612664565b6040516108439190613573565b60405180910390f35b34801561085857600080fd5b5061086161266a565b60405161086e9190613573565b60405180910390f35b34801561088357600080fd5b5061089e600480360381019061089991906135e7565b6126e1565b6040516108ad93929190613a1c565b60405180910390f35b3480156108c257600080fd5b506108cb612725565b005b3480156108d957600080fd5b506108e2612a94565b6040516108ef9190613a74565b60405180910390f35b34801561090457600080fd5b5061091f600480360381019061091a919061352d565b612bbf565b60405161092c9190613573565b60405180910390f35b34801561094157600080fd5b5061094a612c2e565b6040516109579190613ab0565b60405180910390f35b34801561096c57600080fd5b50610975612c52565b6040516109829190613573565b60405180910390f35b34801561099757600080fd5b506109b260048036038101906109ad919061352d565b612c58565b005b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054670de0b6b3a7640000600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a4761266a565b610a519190613afa565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a9b9190613b2e565b610aa59190613b9f565b610aaf9190613bd0565b9050919050565b347f000000000000000000000000000000000000000000000000000000000000000014610b0f576040517f4e0c7b5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002090506000816001015403610ba1576040517f266f368500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060010154421015610bdf576040517ff32d0d1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160009054906101000a900460ff1615610c28576040517fa4f8192900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c773382600201547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612cdb9092919063ffffffff16565b60018160000160006101000a81548160ff02191690831515021790555080600201543373ffffffffffffffffffffffffffffffffffffffff167f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b84604051610cdf9190613573565b60405180910390a35050565b60096020528060005260406000206000915090505481565b60065481565b60015481565b610d17612d61565b347f000000000000000000000000000000000000000000000000000000000000000014610d70576040517f4e0c7b5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33610d7961266a565b600281905550610d87611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e5457610dca816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008103610ed2576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f1d33827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612cdb9092919063ffffffff16565b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167f11232b62083a698039ef038dbb12def09340c4ac3b4c838e46d3e7c89ebbb9ba82604051610fa89190613573565b60405180910390a25050565b610fbc612d61565b600454421015610ff8576040517f587f220300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b42611001611572565b1015611039576040517fa6a2809800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8161104381612da7565b8261104c61266a565b60028190555061105a611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111275761109d816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6111743330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612e10909392919063ffffffff16565b82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111c39190613bd0565b9250508190555082600160008282546111dc9190613bd0565b925050819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663449a52f885856040518363ffffffff1660e01b815260040161123e929190613c04565b600060405180830381600087803b15801561125857600080fd5b505af115801561126c573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d846040516112b69190613573565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008054906101000a900460ff161561132d576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611335612e99565b8361133f81612f17565b8261134981612f17565b857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113a39190613717565b602060405180830381865afa1580156113c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e49190613c42565b101561141c576040517f7182cb8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84421115611456576040517f97f428ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8262278d0085876114679190613bd0565b6114719190613bd0565b11156114a9576040517fa6d069af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836006819055508460048190555083866114c39190613b9f565b600381905550426005819055508260078190555060016000806101000a81548160ff0219169083151502179055507f21adc90360bc280b314eb6502b95564cc7180b3d7cdb300b03a8a2f41de14f3e858588866040516115269493929190613c6f565b60405180910390a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600b6020528060005260406000206000915090505481565b60006006546004546115849190613bd0565b905090565b7fad51469fd38cb9e4028f769761e769052a9f1f331b57ad921ac8a45c7903db2881565b60086020528060005260406000206000915090505481565b6115cd612e99565b6115d76000612f54565b565b60055481565b6000806291050083116115f257826115f7565b629105005b90506000620151806101f483629105006116119190613afa565b61161b9190613b2e565b6116259190613b9f565b90506000620186a082876116399190613b2e565b6116439190613b9f565b905080866116519190613afa565b935050505092915050565b60035481565b600080600090506000600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060005b8181101561176e576000600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff1615151515815260200160018201548152602001600282015481525050905080600001516117625780604001518461175f9190613bd0565b93505b816001019150506116b0565b508192505050919050565b600061178c611786611572565b42613019565b905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166391d148547fad51469fd38cb9e4028f769761e769052a9f1f331b57ad921ac8a45c7903db28336040518363ffffffff1660e01b815260040161180c929190613cb4565b602060405180830381865afa158015611829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184d9190613d09565b611883576040517fcd4a831000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16476040516118c990613d67565b60006040518083038185875af1925050503d8060008114611906576040519150601f19603f3d011682016040523d82523d6000602084013e61190b565b606091505b5050905080611946576040517fb12d13eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600a6020528060005260406000206000915090505481565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6119fe612d61565b81611a0881612da7565b81611a1281612f17565b611a1a612e99565b600754421015611a56576040517f0b370af000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611aa184847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612cdb9092919063ffffffff16565b50505050565b347f000000000000000000000000000000000000000000000000000000000000000014611b00576040517f4e0c7b5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b08612d61565b818160008203611b44576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115611bbd576040517f715cd5ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620d2f00811015611bfa576040517fbb6bd38c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33611c0361266a565b600281905550611c11611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611cde57611c54816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000611d2e87876115df565b905060004287611d3e9190613bd0565b905060008289611d4e9190613afa565b9050604051806060016040528060001515815260200183815260200184815250600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020155905050600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154611e4190613d7c565b9190508190555088600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e979190613afa565b925050819055508860016000828254611eb09190613afa565b925050819055506000811115611f80577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b8152600401611f3b929190613c04565b6020604051808303816000875af1158015611f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7e9190613d09565b505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc6790338b6040518363ffffffff1660e01b8152600401611fdb929190613c04565b600060405180830381600087803b158015611ff557600080fd5b505af1158015612009573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f204fccf0d92ed8d48f204adb39b2e81e92bad0dedb93f5716ca9478cfb57de008a858560405161205793929190613dc4565b60405180910390a2505050505050505050565b60606000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008167ffffffffffffffff8111156120cc576120cb613dfb565b5b60405190808252806020026020018201604052801561210557816020015b6120f26134a2565b8152602001906001900390816120ea5790505b50905060005b828110156121c657600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008281526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820154815250508282815181106121b0576121af613e2a565b5b602002602001018190525080600101905061210b565b508092505050919050565b6121db3382610fb4565b50565b600082829050905060005b8181101561221e5761221384848381811061220757612206613e2a565b5b90506020020135610ab6565b8060010190506121e9565b50505050565b60045481565b612232612d61565b3361223b61266a565b600281905550612249611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146123165761228c816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000612320612a94565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081836123b89190613bd0565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc679033856040518363ffffffff1660e01b8152600401612415929190613c04565b600060405180830381600087803b15801561242f57600080fd5b505af1158015612443573d6000803e3d6000fd5b5050505060008103612481576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550826001600082825461251d9190613afa565b9250508190555061256f84827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166130339092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166341f5fde033836040518363ffffffff1660e01b81526004016125aa929190613c04565b600060405180830381600087803b1580156125c457600080fd5b505af11580156125d8573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f1ec8ce28964c9884744171196c59e3b38137a5b0b3dd5cf39e43dd9ae72e02d98484604051612624929190613e59565b60405180910390a25050505050565b600061263d611572565b42101561265c574261264d611572565b6126579190613afa565b61265f565b60005b905090565b60075481565b600080600154148061267d575060045442105b1561268c5760025490506126de565b600154670de0b6b3a76400006005546126a3611779565b6126ad9190613afa565b6003546126ba9190613b2e565b6126c49190613b2e565b6126ce9190613b9f565b6002546126db9190613bd0565b90505b90565b600c602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900460ff16908060010154908060020154905083565b3361272e61266a565b60028190555061273c611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128095761277f816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b612811612d61565b600061281b612a94565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000810361289b576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379cc679033836040518363ffffffff1660e01b815260040161293b929190613c04565b600060405180830381600087803b15801561295557600080fd5b505af1158015612969573d6000803e3d6000fd5b50505050806001600082825461297f9190613afa565b925050819055506129d182827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166130339092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff166341f5fde033836040518363ffffffff1660e01b8152600401612a0c929190613c04565b600060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f1ec8ce28964c9884744171196c59e3b38137a5b0b3dd5cf39e43dd9ae72e02d9826000604051612a87929190613ebd565b60405180910390a2505050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e16c7d987fcff0b2aa5e7c4b7504f82fe5b653487ab6687811069599e66a892f7e698c613d6040518263ffffffff1660e01b8152600401612b10919061374b565b602060405180830381865afa158015612b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b519190613efb565b90503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612bb8576040517f87c0f0d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8091505090565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c0a836109b4565b612c1384611662565b612c1d9190613bd0565b612c279190613bd0565b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025481565b612c60612e99565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612ccf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cc690613fab565b60405180910390fd5b612cd881612f54565b50565b612d5c8363a9059cbb60e01b8484604051602401612cfa929190613c04565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613150565b505050565b60008054906101000a900460ff16612da5576040517f87138d5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612e0d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b612e93846323b872dd60e01b858585604051602401612e3193929190613fcb565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613150565b50505050565b612ea1613218565b73ffffffffffffffffffffffffffffffffffffffff16612ebf611961565b73ffffffffffffffffffffffffffffffffffffffff1614612f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f0c9061404e565b60405180910390fd5b565b60008103612f51576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081831115613029578161302b565b825b905092915050565b600063095ea7b360e01b8383604051602401613050929190613c04565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506130b98482613220565b61314a5761313f8463095ea7b360e01b8560006040516024016130dd9291906140ac565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613150565b6131498482613150565b5b50505050565b60006131b2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166132d59092919063ffffffff16565b90506000815114806131d45750808060200190518101906131d39190613d09565b5b613213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320a90614147565b60405180910390fd5b505050565b600033905090565b60008060008473ffffffffffffffffffffffffffffffffffffffff168460405161324a91906141cd565b6000604051808303816000865af19150503d8060008114613287576040519150601f19603f3d011682016040523d82523d6000602084013e61328c565b606091505b50915091508180156132ba57506000815114806132b95750808060200190518101906132b89190613d09565b5b5b80156132cb57506132ca856132ed565b5b9250505092915050565b60606132e48484600085613310565b90509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606082471015613355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161334c90614256565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161337e91906141cd565b60006040518083038185875af1925050503d80600081146133bb576040519150601f19603f3d011682016040523d82523d6000602084013e6133c0565b606091505b50915091506133d1878383876133dd565b92505050949350505050565b6060831561343f576000835103613437576133f7856132ed565b613436576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161342d906142c2565b60405180910390fd5b5b82905061344a565b6134498383613452565b5b949350505050565b6000825111156134655781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134999190614337565b60405180910390fd5b604051806060016040528060001515815260200160008152602001600081525090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006134fa826134cf565b9050919050565b61350a816134ef565b811461351557600080fd5b50565b60008135905061352781613501565b92915050565b600060208284031215613543576135426134c5565b5b600061355184828501613518565b91505092915050565b6000819050919050565b61356d8161355a565b82525050565b60006020820190506135886000830184613564565b92915050565b6135978161355a565b81146135a257600080fd5b50565b6000813590506135b48161358e565b92915050565b6000602082840312156135d0576135cf6134c5565b5b60006135de848285016135a5565b91505092915050565b600080604083850312156135fe576135fd6134c5565b5b600061360c85828601613518565b925050602061361d858286016135a5565b9150509250929050565b6000819050919050565b600061364c613647613642846134cf565b613627565b6134cf565b9050919050565b600061365e82613631565b9050919050565b600061367082613653565b9050919050565b61368081613665565b82525050565b600060208201905061369b6000830184613677565b92915050565b600080600080608085870312156136bb576136ba6134c5565b5b60006136c9878288016135a5565b94505060206136da878288016135a5565b93505060406136eb878288016135a5565b92505060606136fc878288016135a5565b91505092959194509250565b613711816134ef565b82525050565b600060208201905061372c6000830184613708565b92915050565b6000819050919050565b61374581613732565b82525050565b6000602082019050613760600083018461373c565b92915050565b6000806040838503121561377d5761377c6134c5565b5b600061378b858286016135a5565b925050602061379c858286016135a5565b9150509250929050565b60006137b182613653565b9050919050565b6137c1816137a6565b82525050565b60006020820190506137dc60008301846137b8565b92915050565b60006137ed82613653565b9050919050565b6137fd816137e2565b82525050565b600060208201905061381860008301846137f4565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b61385f8161384a565b82525050565b61386e8161355a565b82525050565b60608201600082015161388a6000850182613856565b50602082015161389d6020850182613865565b5060408201516138b06040850182613865565b50505050565b60006138c28383613874565b60608301905092915050565b6000602082019050919050565b60006138e68261381e565b6138f08185613829565b93506138fb8361383a565b8060005b8381101561392c57815161391388826138b6565b975061391e836138ce565b9250506001810190506138ff565b5085935050505092915050565b6000602082019050818103600083015261395381846138db565b905092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126139805761397f61395b565b5b8235905067ffffffffffffffff81111561399d5761399c613960565b5b6020830191508360208202830111156139b9576139b8613965565b5b9250929050565b600080602083850312156139d7576139d66134c5565b5b600083013567ffffffffffffffff8111156139f5576139f46134ca565b5b613a018582860161396a565b92509250509250929050565b613a168161384a565b82525050565b6000606082019050613a316000830186613a0d565b613a3e6020830185613564565b613a4b6040830184613564565b949350505050565b6000613a5e82613653565b9050919050565b613a6e81613a53565b82525050565b6000602082019050613a896000830184613a65565b92915050565b6000613a9a82613653565b9050919050565b613aaa81613a8f565b82525050565b6000602082019050613ac56000830184613aa1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b058261355a565b9150613b108361355a565b9250828203905081811115613b2857613b27613acb565b5b92915050565b6000613b398261355a565b9150613b448361355a565b9250828202613b528161355a565b91508282048414831517613b6957613b68613acb565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613baa8261355a565b9150613bb58361355a565b925082613bc557613bc4613b70565b5b828204905092915050565b6000613bdb8261355a565b9150613be68361355a565b9250828201905080821115613bfe57613bfd613acb565b5b92915050565b6000604082019050613c196000830185613708565b613c266020830184613564565b9392505050565b600081519050613c3c8161358e565b92915050565b600060208284031215613c5857613c576134c5565b5b6000613c6684828501613c2d565b91505092915050565b6000608082019050613c846000830187613564565b613c916020830186613564565b613c9e6040830185613564565b613cab6060830184613564565b95945050505050565b6000604082019050613cc9600083018561373c565b613cd66020830184613708565b9392505050565b613ce68161384a565b8114613cf157600080fd5b50565b600081519050613d0381613cdd565b92915050565b600060208284031215613d1f57613d1e6134c5565b5b6000613d2d84828501613cf4565b91505092915050565b600081905092915050565b50565b6000613d51600083613d36565b9150613d5c82613d41565b600082019050919050565b6000613d7282613d44565b9150819050919050565b6000613d878261355a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613db957613db8613acb565b5b600182019050919050565b6000606082019050613dd96000830186613564565b613de66020830185613564565b613df36040830184613564565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050613e6e6000830185613564565b613e7b6020830184613564565b9392505050565b6000819050919050565b6000613ea7613ea2613e9d84613e82565b613627565b61355a565b9050919050565b613eb781613e8c565b82525050565b6000604082019050613ed26000830185613564565b613edf6020830184613eae565b9392505050565b600081519050613ef581613501565b92915050565b600060208284031215613f1157613f106134c5565b5b6000613f1f84828501613ee6565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613f95602683613f28565b9150613fa082613f39565b604082019050919050565b60006020820190508181036000830152613fc481613f88565b9050919050565b6000606082019050613fe06000830186613708565b613fed6020830185613708565b613ffa6040830184613564565b949350505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614038602083613f28565b915061404382614002565b602082019050919050565b600060208201905081810360008301526140678161402b565b9050919050565b600060ff82169050919050565b600061409661409161408c84613e82565b613627565b61406e565b9050919050565b6140a68161407b565b82525050565b60006040820190506140c16000830185613708565b6140ce602083018461409d565b9392505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000614131602a83613f28565b915061413c826140d5565b604082019050919050565b6000602082019050818103600083015261416081614124565b9050919050565b600081519050919050565b60005b83811015614190578082015181840152602081019050614175565b60008484015250505050565b60006141a782614167565b6141b18185613d36565b93506141c1818560208601614172565b80840191505092915050565b60006141d9828461419c565b915081905092915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000614240602683613f28565b915061424b826141e4565b604082019050919050565b6000602082019050818103600083015261426f81614233565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006142ac601d83613f28565b91506142b782614276565b602082019050919050565b600060208201905081810360008301526142db8161429f565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b6000614309826142e2565b6143138185613f28565b9350614323818560208601614172565b61432c816142ed565b840191505092915050565b6000602082019050818103600083015261435181846142fe565b90509291505056fea264697066735822122081522a55f09a44cf907a0a7d7390f01b9c604d6300a4842933dc37d23a05f2ab64736f6c6343000812003300000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a8000000000000000000000000deab92d6a3618f6d830c925d7ae8f1c87eecf01f00000000000000000000000001b3646adb846061411da058757b944049075b22000000000000000000000000586d1842e9f6a268bb4d72c91f1dc2a822363aed000000000000000000000000e6210cceb30f0a8e4c74f94fb3caccb1162654720000000000000000000000000000000000000000000000000001c6bf52634000
Deployed Bytecode
0x60806040526004361061025b5760003560e01c80638b87634711610144578063c23e789d116100b6578063d442593f1161007a578063d442593f146108b6578063d8bd5c29146108cd578063d8fb9337146108f8578063de28735914610935578063df136d6514610960578063f2fde38b1461098b5761025b565b8063c23e789d146107df578063c3aff2cd146107f6578063c8ce398614610821578063cd3daf9d1461084c578063cd9bf0e4146108775761025b565b80639d564d9a116101085780639d564d9a146106e05780639e2c8a5b14610709578063a518488e14610725578063a694fc3a14610762578063b5ef3d2b1461078b578063be9a6555146107b45761025b565b80638b876347146105f75780638da5cb5b146106345780638e1d6d681461065f57806398214cf21461068a5780639af1d35a146106b55761025b565b806364a3ce20116101dd5780637519ab50116101a15780637519ab50146104e55780637a7e3c75146105105780637b0a47ee1461054d5780637e511df91461057857806380faa57d146105b55780638a4068dd146105e05761025b565b806364a3ce20146103fe57806367d3b4881461043b5780636b1b8eb21461046657806370a0823114610491578063715018a6146104ce5761025b565b80633d18b912116102245780633d18b9121461034c57806341f5fde01461035657806355f64cc01461037f57806360a2da44146103aa57806361d027b3146103d35761025b565b80628cc262146102605780630640310f1461029d5780630700037d146102b95780630fb5a6b4146102f657806318160ddd14610321575b600080fd5b34801561026c57600080fd5b506102876004803603810190610282919061352d565b6109b4565b6040516102949190613573565b60405180910390f35b6102b760048036038101906102b291906135ba565b610ab6565b005b3480156102c557600080fd5b506102e060048036038101906102db919061352d565b610ceb565b6040516102ed9190613573565b60405180910390f35b34801561030257600080fd5b5061030b610d03565b6040516103189190613573565b60405180910390f35b34801561032d57600080fd5b50610336610d09565b6040516103439190613573565b60405180910390f35b610354610d0f565b005b34801561036257600080fd5b5061037d600480360381019061037891906135e7565b610fb4565b005b34801561038b57600080fd5b506103946112c4565b6040516103a19190613686565b60405180910390f35b3480156103b657600080fd5b506103d160048036038101906103cc91906136a1565b6112e8565b005b3480156103df57600080fd5b506103e8611536565b6040516103f59190613717565b60405180910390f35b34801561040a57600080fd5b506104256004803603810190610420919061352d565b61155a565b6040516104329190613573565b60405180910390f35b34801561044757600080fd5b50610450611572565b60405161045d9190613573565b60405180910390f35b34801561047257600080fd5b5061047b611589565b604051610488919061374b565b60405180910390f35b34801561049d57600080fd5b506104b860048036038101906104b3919061352d565b6115ad565b6040516104c59190613573565b60405180910390f35b3480156104da57600080fd5b506104e36115c5565b005b3480156104f157600080fd5b506104fa6115d9565b6040516105079190613573565b60405180910390f35b34801561051c57600080fd5b5061053760048036038101906105329190613766565b6115df565b6040516105449190613573565b60405180910390f35b34801561055957600080fd5b5061056261165c565b60405161056f9190613573565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a919061352d565b611662565b6040516105ac9190613573565b60405180910390f35b3480156105c157600080fd5b506105ca611779565b6040516105d79190613573565b60405180910390f35b3480156105ec57600080fd5b506105f5611791565b005b34801561060357600080fd5b5061061e6004803603810190610619919061352d565b611949565b60405161062b9190613573565b60405180910390f35b34801561064057600080fd5b50610649611961565b6040516106569190613717565b60405180910390f35b34801561066b57600080fd5b5061067461198a565b60405161068191906137c7565b60405180910390f35b34801561069657600080fd5b5061069f6119ae565b6040516106ac9190613803565b60405180910390f35b3480156106c157600080fd5b506106ca6119d2565b6040516106d79190613573565b60405180910390f35b3480156106ec57600080fd5b50610707600480360381019061070291906135e7565b6119f6565b005b610723600480360381019061071e9190613766565b611aa7565b005b34801561073157600080fd5b5061074c6004803603810190610747919061352d565b61206a565b6040516107599190613939565b60405180910390f35b34801561076e57600080fd5b50610789600480360381019061078491906135ba565b6121d1565b005b34801561079757600080fd5b506107b260048036038101906107ad91906139c0565b6121de565b005b3480156107c057600080fd5b506107c9612224565b6040516107d69190613573565b60405180910390f35b3480156107eb57600080fd5b506107f461222a565b005b34801561080257600080fd5b5061080b612633565b6040516108189190613573565b60405180910390f35b34801561082d57600080fd5b50610836612664565b6040516108439190613573565b60405180910390f35b34801561085857600080fd5b5061086161266a565b60405161086e9190613573565b60405180910390f35b34801561088357600080fd5b5061089e600480360381019061089991906135e7565b6126e1565b6040516108ad93929190613a1c565b60405180910390f35b3480156108c257600080fd5b506108cb612725565b005b3480156108d957600080fd5b506108e2612a94565b6040516108ef9190613a74565b60405180910390f35b34801561090457600080fd5b5061091f600480360381019061091a919061352d565b612bbf565b60405161092c9190613573565b60405180910390f35b34801561094157600080fd5b5061094a612c2e565b6040516109579190613ab0565b60405180910390f35b34801561096c57600080fd5b50610975612c52565b6040516109829190613573565b60405180910390f35b34801561099757600080fd5b506109b260048036038101906109ad919061352d565b612c58565b005b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054670de0b6b3a7640000600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a4761266a565b610a519190613afa565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a9b9190613b2e565b610aa59190613b9f565b610aaf9190613bd0565b9050919050565b347f0000000000000000000000000000000000000000000000000001c6bf5263400014610b0f576040517f4e0c7b5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002090506000816001015403610ba1576040517f266f368500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060010154421015610bdf576040517ff32d0d1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160009054906101000a900460ff1615610c28576040517fa4f8192900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c773382600201547f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff16612cdb9092919063ffffffff16565b60018160000160006101000a81548160ff02191690831515021790555080600201543373ffffffffffffffffffffffffffffffffffffffff167f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b84604051610cdf9190613573565b60405180910390a35050565b60096020528060005260406000206000915090505481565b60065481565b60015481565b610d17612d61565b347f0000000000000000000000000000000000000000000000000001c6bf5263400014610d70576040517f4e0c7b5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33610d7961266a565b600281905550610d87611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e5457610dca816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008103610ed2576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f1d33827f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff16612cdb9092919063ffffffff16565b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167f11232b62083a698039ef038dbb12def09340c4ac3b4c838e46d3e7c89ebbb9ba82604051610fa89190613573565b60405180910390a25050565b610fbc612d61565b600454421015610ff8576040517f587f220300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b42611001611572565b1015611039576040517fa6a2809800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8161104381612da7565b8261104c61266a565b60028190555061105a611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111275761109d816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6111743330857f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff16612e10909392919063ffffffff16565b82600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111c39190613bd0565b9250508190555082600160008282546111dc9190613bd0565b925050819055507f000000000000000000000000deab92d6a3618f6d830c925d7ae8f1c87eecf01f73ffffffffffffffffffffffffffffffffffffffff1663449a52f885856040518363ffffffff1660e01b815260040161123e929190613c04565b600060405180830381600087803b15801561125857600080fd5b505af115801561126c573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d846040516112b69190613573565b60405180910390a250505050565b7f000000000000000000000000deab92d6a3618f6d830c925d7ae8f1c87eecf01f81565b60008054906101000a900460ff161561132d576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611335612e99565b8361133f81612f17565b8261134981612f17565b857f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113a39190613717565b602060405180830381865afa1580156113c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e49190613c42565b101561141c576040517f7182cb8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84421115611456576040517f97f428ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8262278d0085876114679190613bd0565b6114719190613bd0565b11156114a9576040517fa6d069af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836006819055508460048190555083866114c39190613b9f565b600381905550426005819055508260078190555060016000806101000a81548160ff0219169083151502179055507f21adc90360bc280b314eb6502b95564cc7180b3d7cdb300b03a8a2f41de14f3e858588866040516115269493929190613c6f565b60405180910390a1505050505050565b7f000000000000000000000000e6210cceb30f0a8e4c74f94fb3caccb11626547281565b600b6020528060005260406000206000915090505481565b60006006546004546115849190613bd0565b905090565b7fad51469fd38cb9e4028f769761e769052a9f1f331b57ad921ac8a45c7903db2881565b60086020528060005260406000206000915090505481565b6115cd612e99565b6115d76000612f54565b565b60055481565b6000806291050083116115f257826115f7565b629105005b90506000620151806101f483629105006116119190613afa565b61161b9190613b2e565b6116259190613b9f565b90506000620186a082876116399190613b2e565b6116439190613b9f565b905080866116519190613afa565b935050505092915050565b60035481565b600080600090506000600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060005b8181101561176e576000600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff1615151515815260200160018201548152602001600282015481525050905080600001516117625780604001518461175f9190613bd0565b93505b816001019150506116b0565b508192505050919050565b600061178c611786611572565b42613019565b905090565b7f00000000000000000000000001b3646adb846061411da058757b944049075b2273ffffffffffffffffffffffffffffffffffffffff166391d148547fad51469fd38cb9e4028f769761e769052a9f1f331b57ad921ac8a45c7903db28336040518363ffffffff1660e01b815260040161180c929190613cb4565b602060405180830381865afa158015611829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184d9190613d09565b611883576040517fcd4a831000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f000000000000000000000000e6210cceb30f0a8e4c74f94fb3caccb11626547273ffffffffffffffffffffffffffffffffffffffff16476040516118c990613d67565b60006040518083038185875af1925050503d8060008114611906576040519150601f19603f3d011682016040523d82523d6000602084013e61190b565b606091505b5050905080611946576040517fb12d13eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600a6020528060005260406000206000915090505481565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a881565b7f000000000000000000000000586d1842e9f6a268bb4d72c91f1dc2a822363aed81565b7f0000000000000000000000000000000000000000000000000001c6bf5263400081565b6119fe612d61565b81611a0881612da7565b81611a1281612f17565b611a1a612e99565b600754421015611a56576040517f0b370af000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611aa184847f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff16612cdb9092919063ffffffff16565b50505050565b347f0000000000000000000000000000000000000000000000000001c6bf5263400014611b00576040517f4e0c7b5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b08612d61565b818160008203611b44576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115611bbd576040517f715cd5ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620d2f00811015611bfa576040517fbb6bd38c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33611c0361266a565b600281905550611c11611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611cde57611c54816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000611d2e87876115df565b905060004287611d3e9190613bd0565b905060008289611d4e9190613afa565b9050604051806060016040528060001515815260200183815260200184815250600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020155905050600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154611e4190613d7c565b9190508190555088600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e979190613afa565b925050819055508860016000828254611eb09190613afa565b925050819055506000811115611f80577f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f000000000000000000000000e6210cceb30f0a8e4c74f94fb3caccb116265472836040518363ffffffff1660e01b8152600401611f3b929190613c04565b6020604051808303816000875af1158015611f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7e9190613d09565b505b7f000000000000000000000000deab92d6a3618f6d830c925d7ae8f1c87eecf01f73ffffffffffffffffffffffffffffffffffffffff166379cc6790338b6040518363ffffffff1660e01b8152600401611fdb929190613c04565b600060405180830381600087803b158015611ff557600080fd5b505af1158015612009573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f204fccf0d92ed8d48f204adb39b2e81e92bad0dedb93f5716ca9478cfb57de008a858560405161205793929190613dc4565b60405180910390a2505050505050505050565b60606000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008167ffffffffffffffff8111156120cc576120cb613dfb565b5b60405190808252806020026020018201604052801561210557816020015b6120f26134a2565b8152602001906001900390816120ea5790505b50905060005b828110156121c657600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008281526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820154815250508282815181106121b0576121af613e2a565b5b602002602001018190525080600101905061210b565b508092505050919050565b6121db3382610fb4565b50565b600082829050905060005b8181101561221e5761221384848381811061220757612206613e2a565b5b90506020020135610ab6565b8060010190506121e9565b50505050565b60045481565b612232612d61565b3361223b61266a565b600281905550612249611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146123165761228c816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000612320612a94565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081836123b89190613bd0565b90507f000000000000000000000000deab92d6a3618f6d830c925d7ae8f1c87eecf01f73ffffffffffffffffffffffffffffffffffffffff166379cc679033856040518363ffffffff1660e01b8152600401612415929190613c04565b600060405180830381600087803b15801561242f57600080fd5b505af1158015612443573d6000803e3d6000fd5b5050505060008103612481576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550826001600082825461251d9190613afa565b9250508190555061256f84827f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff166130339092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166341f5fde033836040518363ffffffff1660e01b81526004016125aa929190613c04565b600060405180830381600087803b1580156125c457600080fd5b505af11580156125d8573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f1ec8ce28964c9884744171196c59e3b38137a5b0b3dd5cf39e43dd9ae72e02d98484604051612624929190613e59565b60405180910390a25050505050565b600061263d611572565b42101561265c574261264d611572565b6126579190613afa565b61265f565b60005b905090565b60075481565b600080600154148061267d575060045442105b1561268c5760025490506126de565b600154670de0b6b3a76400006005546126a3611779565b6126ad9190613afa565b6003546126ba9190613b2e565b6126c49190613b2e565b6126ce9190613b9f565b6002546126db9190613bd0565b90505b90565b600c602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900460ff16908060010154908060020154905083565b3361272e61266a565b60028190555061273c611779565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128095761277f816109b4565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600254600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b612811612d61565b600061281b612a94565b90506000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000810361289b576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f000000000000000000000000deab92d6a3618f6d830c925d7ae8f1c87eecf01f73ffffffffffffffffffffffffffffffffffffffff166379cc679033836040518363ffffffff1660e01b815260040161293b929190613c04565b600060405180830381600087803b15801561295557600080fd5b505af1158015612969573d6000803e3d6000fd5b50505050806001600082825461297f9190613afa565b925050819055506129d182827f00000000000000000000000011f98c7e42a367dab4f200d2fdc460fb445ce9a873ffffffffffffffffffffffffffffffffffffffff166130339092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff166341f5fde033836040518363ffffffff1660e01b8152600401612a0c929190613c04565b600060405180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f1ec8ce28964c9884744171196c59e3b38137a5b0b3dd5cf39e43dd9ae72e02d9826000604051612a87929190613ebd565b60405180910390a2505050565b6000807f000000000000000000000000586d1842e9f6a268bb4d72c91f1dc2a822363aed73ffffffffffffffffffffffffffffffffffffffff1663e16c7d987fcff0b2aa5e7c4b7504f82fe5b653487ab6687811069599e66a892f7e698c613d6040518263ffffffff1660e01b8152600401612b10919061374b565b602060405180830381865afa158015612b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b519190613efb565b90503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612bb8576040517f87c0f0d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8091505090565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c0a836109b4565b612c1384611662565b612c1d9190613bd0565b612c279190613bd0565b9050919050565b7f00000000000000000000000001b3646adb846061411da058757b944049075b2281565b60025481565b612c60612e99565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612ccf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cc690613fab565b60405180910390fd5b612cd881612f54565b50565b612d5c8363a9059cbb60e01b8484604051602401612cfa929190613c04565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613150565b505050565b60008054906101000a900460ff16612da5576040517f87138d5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612e0d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b612e93846323b872dd60e01b858585604051602401612e3193929190613fcb565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613150565b50505050565b612ea1613218565b73ffffffffffffffffffffffffffffffffffffffff16612ebf611961565b73ffffffffffffffffffffffffffffffffffffffff1614612f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f0c9061404e565b60405180910390fd5b565b60008103612f51576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081831115613029578161302b565b825b905092915050565b600063095ea7b360e01b8383604051602401613050929190613c04565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506130b98482613220565b61314a5761313f8463095ea7b360e01b8560006040516024016130dd9291906140ac565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613150565b6131498482613150565b5b50505050565b60006131b2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166132d59092919063ffffffff16565b90506000815114806131d45750808060200190518101906131d39190613d09565b5b613213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320a90614147565b60405180910390fd5b505050565b600033905090565b60008060008473ffffffffffffffffffffffffffffffffffffffff168460405161324a91906141cd565b6000604051808303816000865af19150503d8060008114613287576040519150601f19603f3d011682016040523d82523d6000602084013e61328c565b606091505b50915091508180156132ba57506000815114806132b95750808060200190518101906132b89190613d09565b5b5b80156132cb57506132ca856132ed565b5b9250505092915050565b60606132e48484600085613310565b90509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606082471015613355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161334c90614256565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161337e91906141cd565b60006040518083038185875af1925050503d80600081146133bb576040519150601f19603f3d011682016040523d82523d6000602084013e6133c0565b606091505b50915091506133d1878383876133dd565b92505050949350505050565b6060831561343f576000835103613437576133f7856132ed565b613436576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161342d906142c2565b60405180910390fd5b5b82905061344a565b6134498383613452565b5b949350505050565b6000825111156134655781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134999190614337565b60405180910390fd5b604051806060016040528060001515815260200160008152602001600081525090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006134fa826134cf565b9050919050565b61350a816134ef565b811461351557600080fd5b50565b60008135905061352781613501565b92915050565b600060208284031215613543576135426134c5565b5b600061355184828501613518565b91505092915050565b6000819050919050565b61356d8161355a565b82525050565b60006020820190506135886000830184613564565b92915050565b6135978161355a565b81146135a257600080fd5b50565b6000813590506135b48161358e565b92915050565b6000602082840312156135d0576135cf6134c5565b5b60006135de848285016135a5565b91505092915050565b600080604083850312156135fe576135fd6134c5565b5b600061360c85828601613518565b925050602061361d858286016135a5565b9150509250929050565b6000819050919050565b600061364c613647613642846134cf565b613627565b6134cf565b9050919050565b600061365e82613631565b9050919050565b600061367082613653565b9050919050565b61368081613665565b82525050565b600060208201905061369b6000830184613677565b92915050565b600080600080608085870312156136bb576136ba6134c5565b5b60006136c9878288016135a5565b94505060206136da878288016135a5565b93505060406136eb878288016135a5565b92505060606136fc878288016135a5565b91505092959194509250565b613711816134ef565b82525050565b600060208201905061372c6000830184613708565b92915050565b6000819050919050565b61374581613732565b82525050565b6000602082019050613760600083018461373c565b92915050565b6000806040838503121561377d5761377c6134c5565b5b600061378b858286016135a5565b925050602061379c858286016135a5565b9150509250929050565b60006137b182613653565b9050919050565b6137c1816137a6565b82525050565b60006020820190506137dc60008301846137b8565b92915050565b60006137ed82613653565b9050919050565b6137fd816137e2565b82525050565b600060208201905061381860008301846137f4565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b61385f8161384a565b82525050565b61386e8161355a565b82525050565b60608201600082015161388a6000850182613856565b50602082015161389d6020850182613865565b5060408201516138b06040850182613865565b50505050565b60006138c28383613874565b60608301905092915050565b6000602082019050919050565b60006138e68261381e565b6138f08185613829565b93506138fb8361383a565b8060005b8381101561392c57815161391388826138b6565b975061391e836138ce565b9250506001810190506138ff565b5085935050505092915050565b6000602082019050818103600083015261395381846138db565b905092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126139805761397f61395b565b5b8235905067ffffffffffffffff81111561399d5761399c613960565b5b6020830191508360208202830111156139b9576139b8613965565b5b9250929050565b600080602083850312156139d7576139d66134c5565b5b600083013567ffffffffffffffff8111156139f5576139f46134ca565b5b613a018582860161396a565b92509250509250929050565b613a168161384a565b82525050565b6000606082019050613a316000830186613a0d565b613a3e6020830185613564565b613a4b6040830184613564565b949350505050565b6000613a5e82613653565b9050919050565b613a6e81613a53565b82525050565b6000602082019050613a896000830184613a65565b92915050565b6000613a9a82613653565b9050919050565b613aaa81613a8f565b82525050565b6000602082019050613ac56000830184613aa1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b058261355a565b9150613b108361355a565b9250828203905081811115613b2857613b27613acb565b5b92915050565b6000613b398261355a565b9150613b448361355a565b9250828202613b528161355a565b91508282048414831517613b6957613b68613acb565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613baa8261355a565b9150613bb58361355a565b925082613bc557613bc4613b70565b5b828204905092915050565b6000613bdb8261355a565b9150613be68361355a565b9250828201905080821115613bfe57613bfd613acb565b5b92915050565b6000604082019050613c196000830185613708565b613c266020830184613564565b9392505050565b600081519050613c3c8161358e565b92915050565b600060208284031215613c5857613c576134c5565b5b6000613c6684828501613c2d565b91505092915050565b6000608082019050613c846000830187613564565b613c916020830186613564565b613c9e6040830185613564565b613cab6060830184613564565b95945050505050565b6000604082019050613cc9600083018561373c565b613cd66020830184613708565b9392505050565b613ce68161384a565b8114613cf157600080fd5b50565b600081519050613d0381613cdd565b92915050565b600060208284031215613d1f57613d1e6134c5565b5b6000613d2d84828501613cf4565b91505092915050565b600081905092915050565b50565b6000613d51600083613d36565b9150613d5c82613d41565b600082019050919050565b6000613d7282613d44565b9150819050919050565b6000613d878261355a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613db957613db8613acb565b5b600182019050919050565b6000606082019050613dd96000830186613564565b613de66020830185613564565b613df36040830184613564565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050613e6e6000830185613564565b613e7b6020830184613564565b9392505050565b6000819050919050565b6000613ea7613ea2613e9d84613e82565b613627565b61355a565b9050919050565b613eb781613e8c565b82525050565b6000604082019050613ed26000830185613564565b613edf6020830184613eae565b9392505050565b600081519050613ef581613501565b92915050565b600060208284031215613f1157613f106134c5565b5b6000613f1f84828501613ee6565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613f95602683613f28565b9150613fa082613f39565b604082019050919050565b60006020820190508181036000830152613fc481613f88565b9050919050565b6000606082019050613fe06000830186613708565b613fed6020830185613708565b613ffa6040830184613564565b949350505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614038602083613f28565b915061404382614002565b602082019050919050565b600060208201905081810360008301526140678161402b565b9050919050565b600060ff82169050919050565b600061409661409161408c84613e82565b613627565b61406e565b9050919050565b6140a68161407b565b82525050565b60006040820190506140c16000830185613708565b6140ce602083018461409d565b9392505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000614131602a83613f28565b915061413c826140d5565b604082019050919050565b6000602082019050818103600083015261416081614124565b9050919050565b600081519050919050565b60005b83811015614190578082015181840152602081019050614175565b60008484015250505050565b60006141a782614167565b6141b18185613d36565b93506141c1818560208601614172565b80840191505092915050565b60006141d9828461419c565b915081905092915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000614240602683613f28565b915061424b826141e4565b604082019050919050565b6000602082019050818103600083015261426f81614233565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006142ac601d83613f28565b91506142b782614276565b602082019050919050565b600060208201905081810360008301526142db8161429f565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b6000614309826142e2565b6143138185613f28565b9350614323818560208601614172565b61432c816142ed565b840191505092915050565b6000602082019050818103600083015261435181846142fe565b90509291505056fea264697066735822122081522a55f09a44cf907a0a7d7390f01b9c604d6300a4842933dc37d23a05f2ab64736f6c63430008120033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.