More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 185 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Migrate Stake | 20581316 | 175 days ago | IN | 0 ETH | 0.00010405 | ||||
Migrate Stake | 20581246 | 175 days ago | IN | 0 ETH | 0.00013661 | ||||
Get Rewards | 16591509 | 735 days ago | IN | 0 ETH | 0.00265434 | ||||
Get Rewards | 16591478 | 735 days ago | IN | 0 ETH | 0.00244986 | ||||
Get Rewards | 16522397 | 744 days ago | IN | 0 ETH | 0.00172742 | ||||
Get Rewards | 16469395 | 752 days ago | IN | 0 ETH | 0.00268903 | ||||
Get Rewards | 16431825 | 757 days ago | IN | 0 ETH | 0.00187955 | ||||
Migrate Stake | 15875208 | 835 days ago | IN | 0 ETH | 0.00066968 | ||||
Migrate Stake | 15874888 | 835 days ago | IN | 0 ETH | 0.00103036 | ||||
Get Rewards | 15861775 | 837 days ago | IN | 0 ETH | 0.00049706 | ||||
Get Rewards | 15840300 | 840 days ago | IN | 0 ETH | 0.00228288 | ||||
Get Rewards | 15833153 | 841 days ago | IN | 0 ETH | 0.00199957 | ||||
Get Reward | 15833149 | 841 days ago | IN | 0 ETH | 0.00185192 | ||||
Get Reward | 15833132 | 841 days ago | IN | 0 ETH | 0.0034711 | ||||
Get Rewards | 15821488 | 842 days ago | IN | 0 ETH | 0.00269069 | ||||
Get Rewards | 15811025 | 844 days ago | IN | 0 ETH | 0.00252061 | ||||
Get Rewards | 15804785 | 845 days ago | IN | 0 ETH | 0.00543891 | ||||
Get Rewards | 15803733 | 845 days ago | IN | 0 ETH | 0.00426264 | ||||
Get Rewards | 15800768 | 845 days ago | IN | 0 ETH | 0.00322205 | ||||
Get Rewards | 15799257 | 845 days ago | IN | 0 ETH | 0.00506608 | ||||
Get Rewards | 15798039 | 845 days ago | IN | 0 ETH | 0.00637151 | ||||
Get Rewards | 15797189 | 846 days ago | IN | 0 ETH | 0.00545621 | ||||
Get Rewards | 15791200 | 846 days ago | IN | 0 ETH | 0.00546645 | ||||
Get Rewards | 15775806 | 849 days ago | IN | 0 ETH | 0.00337609 | ||||
Migrate Stake | 15747622 | 853 days ago | IN | 0 ETH | 0.00104918 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StaxLPStaking
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.4; // SPDX-License-Identifier: AGPL-3.0-or-later import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * Based on synthetix BaseRewardPool.sol & convex cvxLocker * Modified for use by TempleDAO */ contract StaxLPStaking is Ownable { using SafeERC20 for IERC20; IERC20 public stakingToken; address public rewardDistributor; uint256 public constant DURATION = 86400 * 7; uint256 private _totalSupply; address[] public rewardTokens; mapping(address => uint256) private _balances; mapping(address => Reward) public rewardData; mapping(address => mapping(address => uint256)) public claimableRewards; mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid; /// @dev For use when migrating to a new staking contract. address public migrator; struct Reward { uint40 periodFinish; uint216 rewardRate; // The reward amount (1e18) per total reward duration uint40 lastUpdateTime; uint216 rewardPerTokenStored; } event RewardAdded(address token, uint256 amount); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, address toAddress, uint256 amount); event RewardPaid(address indexed user, address toAddress, address rewardToken, uint256 reward); event UpdatedRewardDistributor(address distributor); event MigratorSet(address migrator); constructor(address _stakingToken, address _distributor) { stakingToken = IERC20(_stakingToken); rewardDistributor = _distributor; } // set distributor of rewards function setRewardDistributor(address _distributor) external onlyOwner { rewardDistributor = _distributor; emit UpdatedRewardDistributor(_distributor); } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function addReward(address _rewardToken) external onlyOwner { require(rewardData[_rewardToken].lastUpdateTime == 0, "exists"); rewardTokens.push(_rewardToken); rewardData[_rewardToken].lastUpdateTime = uint40(block.timestamp); rewardData[_rewardToken].periodFinish = uint40(block.timestamp); } function _rewardPerToken(address _rewardsToken) internal view returns (uint256) { if (totalSupply() == 0) { return rewardData[_rewardsToken].rewardPerTokenStored; } return rewardData[_rewardsToken].rewardPerTokenStored + (((_lastTimeRewardApplicable(rewardData[_rewardsToken].periodFinish) - rewardData[_rewardsToken].lastUpdateTime) * rewardData[_rewardsToken].rewardRate * 1e18) / totalSupply()); } function rewardPerToken(address _rewardsToken) external view returns (uint256) { return _rewardPerToken(_rewardsToken); } function rewardPeriodFinish(address _token) external view returns (uint40) { return rewardData[_token].periodFinish; } function earned(address _account, address _rewardsToken) external view returns (uint256) { return _earned(_account, _rewardsToken, _balances[_account]); } function _earned( address _account, address _rewardsToken, uint256 _balance ) internal view returns (uint256) { return (_balance * (_rewardPerToken(_rewardsToken) - userRewardPerTokenPaid[_account][_rewardsToken])) / 1e18 + claimableRewards[_account][_rewardsToken]; } function stake(uint256 _amount) external { stakeFor(msg.sender, _amount); } function stakeAll() external { uint256 balance = stakingToken.balanceOf(msg.sender); stakeFor(msg.sender, balance); } function stakeFor(address _for, uint256 _amount) public { require(_amount > 0, "Cannot stake 0"); // pull tokens and apply stake stakingToken.safeTransferFrom(msg.sender, address(this), _amount); _applyStake(_for, _amount); } function _applyStake(address _for, uint256 _amount) internal updateReward(_for) { _totalSupply += _amount; _balances[_for] += _amount; emit Staked(_for, _amount); } function _withdrawFor( address staker, address toAddress, uint256 amount, bool claimRewards, address rewardsToAddress ) internal updateReward(staker) { require(amount > 0, "Cannot withdraw 0"); require(_balances[staker] >= amount, "Not enough staked tokens"); _totalSupply -= amount; _balances[staker] -= amount; stakingToken.safeTransfer(toAddress, amount); emit Withdrawn(staker, toAddress, amount); if (claimRewards) { // can call internal because user reward already updated _getRewards(staker, rewardsToAddress); } } function withdraw(uint256 amount, bool claim) public { _withdrawFor(msg.sender, msg.sender, amount, claim, msg.sender); } function withdrawAll(bool claim) external { _withdrawFor(msg.sender, msg.sender, _balances[msg.sender], claim, msg.sender); } function getRewards(address staker) external updateReward(staker) { _getRewards(staker, staker); } // @dev internal function. make sure to call only after updateReward(account) function _getRewards(address staker, address rewardsToAddress) internal { for (uint256 i; i < rewardTokens.length; i++) { _getReward(staker, rewardTokens[i], rewardsToAddress); } } function getReward(address staker, address rewardToken) external updateReward(staker) { _getReward(staker, rewardToken, staker); } function _getReward(address staker, address rewardToken, address rewardsToAddress) internal { uint256 amount = claimableRewards[staker][rewardToken]; if (amount > 0) { claimableRewards[staker][rewardToken] = 0; IERC20(rewardToken).safeTransfer(rewardsToAddress, amount); emit RewardPaid(staker, rewardsToAddress, rewardToken, amount); } } function _lastTimeRewardApplicable(uint256 _finishTime) internal view returns (uint256) { if (_finishTime < block.timestamp) { return _finishTime; } return block.timestamp; } function _notifyReward(address _rewardsToken, uint256 _amount) internal { Reward storage rdata = rewardData[_rewardsToken]; if (block.timestamp >= rdata.periodFinish) { rdata.rewardRate = uint216(_amount / DURATION); } else { uint256 remaining = uint256(rdata.periodFinish) - block.timestamp; uint256 leftover = remaining * rdata.rewardRate; rdata.rewardRate = uint216((_amount + leftover) / DURATION); } rdata.lastUpdateTime = uint40(block.timestamp); rdata.periodFinish = uint40(block.timestamp + DURATION); } function notifyRewardAmount( address _rewardsToken, uint256 _amount ) external updateReward(address(0)) { require(msg.sender == rewardDistributor, "not distributor"); require(_amount > 0, "No reward"); require(rewardData[_rewardsToken].lastUpdateTime != 0, "unknown reward token"); _notifyReward(_rewardsToken, _amount); IERC20(_rewardsToken).safeTransferFrom(msg.sender, address(this), _amount); emit RewardAdded(_rewardsToken, _amount); } function setMigrator(address _migrator) external onlyOwner { migrator = _migrator; emit MigratorSet(_migrator); } /** * @notice For migrations to a new staking contract: * 1. User/DApp checks if the user has a balance in the `oldStakingContract` * 2. If yes, user calls this function `newStakingContract.migrateStake(oldStakingContract, balance)` * 3. Staking balances are migrated to the new contract, user will start to earn rewards in the new contract. * 4. Any claimable rewards in the old contract are sent directly to the user's wallet. * @param oldStaking The old staking contract funds are being migrated from. * @param amount The amount to migrate - generally this would be the staker's balance */ function migrateStake(address oldStaking, uint256 amount) external { StaxLPStaking(oldStaking).migrateWithdraw(msg.sender, amount); _applyStake(msg.sender, amount); } /** * @notice For migrations to a new staking contract. * 1. Withdraw `staker`s tokens to the new staking contract (the migrator) * 2. Any existing rewards are claimed and sent directly to the `staker` * @dev Called only from the new staking contract (the migrator). * `setMigrator(new_staking_contract)` needs to be called first * @param staker The staker who is being migrated to a new staking contract. * @param amount The amount to migrate - generally this would be the staker's balance */ function migrateWithdraw(address staker, uint256 amount) external onlyMigrator { _withdrawFor(staker, msg.sender, amount, true, staker); } modifier onlyMigrator() { require(msg.sender == migrator, "not migrator"); _; } modifier updateReward(address _account) { { // stack too deep for (uint256 i = 0; i < rewardTokens.length; i++) { address token = rewardTokens[i]; rewardData[token].rewardPerTokenStored = uint216(_rewardPerToken(token)); rewardData[token].lastUpdateTime = uint40(_lastTimeRewardApplicable(rewardData[token].periodFinish)); if (_account != address(0)) { claimableRewards[_account][token] = _earned(_account, token, _balances[_account]); userRewardPerTokenPaid[_account][token] = uint256(rewardData[token].rewardPerTokenStored); } } } _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } 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)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } 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"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @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"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 * ==== * * [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ 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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_distributor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"migrator","type":"address"}],"name":"MigratorSet","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":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"distributor","type":"address"}],"name":"UpdatedRewardDistributor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"claimableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"rewardToken","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oldStaking","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrateStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrateWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"notifyRewardAmount","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":[{"internalType":"address","name":"","type":"address"}],"name":"rewardData","outputs":[{"internalType":"uint40","name":"periodFinish","type":"uint40"},{"internalType":"uint216","name":"rewardRate","type":"uint216"},{"internalType":"uint40","name":"lastUpdateTime","type":"uint40"},{"internalType":"uint216","name":"rewardPerTokenStored","type":"uint216"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"rewardPeriodFinish","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_distributor","type":"address"}],"name":"setRewardDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"claim","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"claim","type":"bool"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002a4138038062002a418339810160408190526200003491620000de565b6200003f3362000071565b600180546001600160a01b039384166001600160a01b0319918216179091556002805492909316911617905562000115565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000d957600080fd5b919050565b60008060408385031215620000f1578182fd5b620000fc83620000c1565b91506200010c60208401620000c1565b90509250929050565b61291c80620001256000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063715018a6116101045780639c9b2e21116100a2578063b66503cf11610071578063b66503cf1461051d578063bdcd9c8014610530578063f122977714610543578063f2fde38b1461055657600080fd5b80639c9b2e21146104c4578063a1809b95146104d7578063a694fc3a146104ea578063acc2166a146104fd57600080fd5b80637bb7bed1116100de5780637bb7bed11461046b5780637cd07e471461047e5780638da5cb5b1461049e5780638dcb4061146104bc57600080fd5b8063715018a61461040b57806372f702f31461041357806379ee54f71461045857600080fd5b806338d07436116101715780636b0916951161014b5780636b0916951461036c5780636be9dcce1461037f5780637035ab98146103aa57806370a08231146103d557600080fd5b806338d07436146102965780633c24436c146102a957806348e5d9f8146102bc57600080fd5b8063211dc32d116101ad578063211dc32d1461020a57806323cf31181461021d5780632e297072146102305780632ee409081461028357600080fd5b806318160ddd146101d45780631be05289146101eb5780631c1c6fe5146101f5575b600080fd5b6003545b6040519081526020015b60405180910390f35b6101d862093a8081565b61020861020336600461269b565b610569565b005b6101d8610218366004612640565b61058a565b61020861022b366004612626565b6105c4565b61026d61023e366004612626565b73ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205464ffffffffff1690565b60405164ffffffffff90911681526020016101e2565b610208610291366004612672565b6106c4565b6102086102a4366004612703565b610761565b6102086102b7366004612672565b61076e565b6103206102ca366004612626565b6006602052600090815260409020805460019091015464ffffffffff808316927affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000009182900481169392831692919091041684565b6040805164ffffffffff95861681527affffffffffffffffffffffffffffffffffffffffffffffffffffff948516602082015294909216918401919091521660608201526080016101e2565b61020861037a366004612640565b6107fd565b6101d861038d366004612640565b600760209081526000928352604080842090915290825290205481565b6101d86103b8366004612640565b600860209081526000928352604080842090915290825290205481565b6101d86103e3366004612626565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b610208610a1c565b6001546104339073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e2565b610208610466366004612626565b610aa9565b6104336104793660046126d3565b610cc2565b6009546104339073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16610433565b610208610cf9565b6102086104d2366004612626565b610da7565b6102086104e5366004612626565b610f7c565b6102086104f83660046126d3565b611070565b6002546104339073ffffffffffffffffffffffffffffffffffffffff1681565b61020861052b366004612672565b61107a565b61020861053e366004612672565b61148a565b6101d8610551366004612626565b61151a565b610208610564366004612626565b61152b565b33600081815260056020526040902054610587919081908482611658565b50565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600560205260408120546105bd9084908490611a40565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461064a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f3ba4758949febc607e14523620298f8b5995b1848492ad7aa083372ac886ae07906020015b60405180910390a150565b6000811161072e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b6520300000000000000000000000000000000000006044820152606401610641565b6001546107539073ffffffffffffffffffffffffffffffffffffffff16333084611acd565b61075d8282611baf565b5050565b61075d3333848433611658565b60095473ffffffffffffffffffffffffffffffffffffffff1633146107ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6f74206d69677261746f7200000000000000000000000000000000000000006044820152606401610641565b61075d823383600186611658565b8160005b600454811015610a0b57600060048281548110610847577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905061087481611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff938416179055546108de9116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff93909316929092179091558316156109f85773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260409020546109769084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5080610a0381612870565b915050610801565b50610a17838385611fc9565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b610aa760006120a6565b565b8060005b600454811015610cb757600060048281548110610af3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050610b2081611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff93841617905554610b8a9116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9390931692909217909155831615610ca45773ffffffffffffffffffffffffffffffffffffffff8316600090815260056020526040902054610c229084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5080610caf81612870565b915050610aad565b5061075d828361211b565b60048181548110610cd257600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015610d6357600080fd5b505afa158015610d77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9b91906126eb565b905061058733826106c4565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090206001015464ffffffffff1615610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f65786973747300000000000000000000000000000000000000000000000000006044820152606401610641565b6004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01805473ffffffffffffffffffffffffffffffffffffffff9093167fffffffffffffffffffffffff000000000000000000000000000000000000000090931683179055600091825260066020526040909120908101805464ffffffffff42167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009182168117909255825416179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ffd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f52065d90f31a58861f4d8d731366bba55d1bd5efa2cf6476d73d9b516cc98f4b906020016106b9565b61058733826106c4565b6000805b600454811015611288576000600482815481106110c4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506110f181611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff9384161790555461115b9116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff93909316929092179091558316156112755773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260409020546111f39084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b508061128081612870565b91505061107e565b5060025473ffffffffffffffffffffffffffffffffffffffff16331461130a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f74206469737472696275746f7200000000000000000000000000000000006044820152606401610641565b60008211611374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f2072657761726400000000000000000000000000000000000000000000006044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090206001015464ffffffffff1661140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f756e6b6e6f776e2072657761726420746f6b656e0000000000000000000000006044820152606401610641565b61141483836121a0565b61143673ffffffffffffffffffffffffffffffffffffffff8416333085611acd565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018490527fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e29910160405180910390a1505050565b6040517f3c24436c0000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff831690633c24436c90604401600060405180830381600087803b1580156114f857600080fd5b505af115801561150c573d6000803e3d6000fd5b5050505061075d3382611baf565b600061152582611e5f565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff811661164f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610641565b610587816120a6565b8460005b600454811015611866576000600482815481106116a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506116cf81611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff938416179055546117399116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff93909316929092179091558316156118535773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260409020546117d19084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b508061185e81612870565b91505061165c565b50600084116118d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260056020526040902054841115611960576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4e6f7420656e6f756768207374616b656420746f6b656e7300000000000000006044820152606401610641565b8360036000828254611972919061282d565b909155505073ffffffffffffffffffffffffffffffffffffffff8616600090815260056020526040812080548692906119ac90849061282d565b90915550506001546119d59073ffffffffffffffffffffffffffffffffffffffff168686612339565b6040805173ffffffffffffffffffffffffffffffffffffffff8781168252602082018790528816917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a28215611a3857611a38868361211b565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600760209081526040808320948716808452948252808320549383526008825280832094835293905291822054670de0b6b3a764000090611a9d86611e5f565b611aa7919061282d565b611ab190856127f0565b611abb91906127b7565b611ac5919061279f565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052611ba99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261238f565b50505050565b8160005b600454811015611dbd57600060048281548110611bf9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050611c2681611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff93841617905554611c909116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9390931692909217909155831615611daa5773ffffffffffffffffffffffffffffffffffffffff8316600090815260056020526040902054611d289084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5080611db581612870565b915050611bb3565b508160036000828254611dd0919061279f565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604081208054849290611e0a90849061279f565b909155505060405182815273ffffffffffffffffffffffffffffffffffffffff8416907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a2505050565b6000611e6a60035490565b611ec0575073ffffffffffffffffffffffffffffffffffffffff166000908152600660205260409020600101546501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b60035473ffffffffffffffffffffffffffffffffffffffff8316600090815260066020526040902080546001909101547affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000008304169164ffffffffff91821691611f2b9116611fb4565b611f35919061282d565b611f3f91906127f0565b611f5190670de0b6b3a76400006127f0565b611f5b91906127b7565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090206001015461152591906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661279f565b600042821015611fc2575090565b5042919050565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600760209081526040808320938616835292905220548015611ba95773ffffffffffffffffffffffffffffffffffffffff808516600090815260076020908152604080832093871680845293909152812055612043908383612339565b6040805173ffffffffffffffffffffffffffffffffffffffff84811682528581166020830152918101839052908516907fce405e67b4d6e56e438257e15f160ae28b450e6e7659bbc4c1f4e09a1ac846cb9060600160405180910390a250505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b600454811015610a175761218e8360048381548110612166577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1684611fc9565b8061219881612870565b91505061211e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020805464ffffffffff16421061221c576121e162093a80836127b7565b81547affffffffffffffffffffffffffffffffffffffffffffffffffffff91909116650100000000000264ffffffffff9091161781556122be565b805460009061223390429064ffffffffff1661282d565b825490915060009061226b906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16836127f0565b905062093a8061227b828661279f565b61228591906127b7565b83547affffffffffffffffffffffffffffffffffffffffffffffffffffff91909116650100000000000264ffffffffff90911617835550505b6001810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000164264ffffffffff8116919091179091556123049062093a809061279f565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff919091161790555050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a179084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611b27565b60006123f1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661249b9092919063ffffffff16565b805190915015610a17578080602001905181019061240f91906126b7565b610a17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610641565b6060611ac584846000858573ffffffffffffffffffffffffffffffffffffffff85163b612524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610641565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161254d9190612732565b60006040518083038185875af1925050503d806000811461258a576040519150601f19603f3d011682016040523d82523d6000602084013e61258f565b606091505b509150915061259f8282866125aa565b979650505050505050565b606083156125b95750816105bd565b8251156125c95782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610641919061274e565b803573ffffffffffffffffffffffffffffffffffffffff8116811461262157600080fd5b919050565b600060208284031215612637578081fd5b6105bd826125fd565b60008060408385031215612652578081fd5b61265b836125fd565b9150612669602084016125fd565b90509250929050565b60008060408385031215612684578182fd5b61268d836125fd565b946020939093013593505050565b6000602082840312156126ac578081fd5b81356105bd816128d8565b6000602082840312156126c8578081fd5b81516105bd816128d8565b6000602082840312156126e4578081fd5b5035919050565b6000602082840312156126fc578081fd5b5051919050565b60008060408385031215612715578182fd5b823591506020830135612727816128d8565b809150509250929050565b60008251612744818460208701612844565b9190910192915050565b602081526000825180602084015261276d816040850160208701612844565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156127b2576127b26128a9565b500190565b6000826127eb577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612828576128286128a9565b500290565b60008282101561283f5761283f6128a9565b500390565b60005b8381101561285f578181015183820152602001612847565b83811115611ba95750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156128a2576128a26128a9565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b801515811461058757600080fdfea26469706673582212204918ee85a7ac17e943b1a959d07f607ee38c8534c56294a1dc4ca9258ef4537764736f6c63430008040033000000000000000000000000bcb8b7fc9197feda75c101fa69d3211b5a30dcd90000000000000000000000008c2d06e11ca4414e00cdea8f28633a2edaf79499
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063715018a6116101045780639c9b2e21116100a2578063b66503cf11610071578063b66503cf1461051d578063bdcd9c8014610530578063f122977714610543578063f2fde38b1461055657600080fd5b80639c9b2e21146104c4578063a1809b95146104d7578063a694fc3a146104ea578063acc2166a146104fd57600080fd5b80637bb7bed1116100de5780637bb7bed11461046b5780637cd07e471461047e5780638da5cb5b1461049e5780638dcb4061146104bc57600080fd5b8063715018a61461040b57806372f702f31461041357806379ee54f71461045857600080fd5b806338d07436116101715780636b0916951161014b5780636b0916951461036c5780636be9dcce1461037f5780637035ab98146103aa57806370a08231146103d557600080fd5b806338d07436146102965780633c24436c146102a957806348e5d9f8146102bc57600080fd5b8063211dc32d116101ad578063211dc32d1461020a57806323cf31181461021d5780632e297072146102305780632ee409081461028357600080fd5b806318160ddd146101d45780631be05289146101eb5780631c1c6fe5146101f5575b600080fd5b6003545b6040519081526020015b60405180910390f35b6101d862093a8081565b61020861020336600461269b565b610569565b005b6101d8610218366004612640565b61058a565b61020861022b366004612626565b6105c4565b61026d61023e366004612626565b73ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205464ffffffffff1690565b60405164ffffffffff90911681526020016101e2565b610208610291366004612672565b6106c4565b6102086102a4366004612703565b610761565b6102086102b7366004612672565b61076e565b6103206102ca366004612626565b6006602052600090815260409020805460019091015464ffffffffff808316927affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000009182900481169392831692919091041684565b6040805164ffffffffff95861681527affffffffffffffffffffffffffffffffffffffffffffffffffffff948516602082015294909216918401919091521660608201526080016101e2565b61020861037a366004612640565b6107fd565b6101d861038d366004612640565b600760209081526000928352604080842090915290825290205481565b6101d86103b8366004612640565b600860209081526000928352604080842090915290825290205481565b6101d86103e3366004612626565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b610208610a1c565b6001546104339073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e2565b610208610466366004612626565b610aa9565b6104336104793660046126d3565b610cc2565b6009546104339073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16610433565b610208610cf9565b6102086104d2366004612626565b610da7565b6102086104e5366004612626565b610f7c565b6102086104f83660046126d3565b611070565b6002546104339073ffffffffffffffffffffffffffffffffffffffff1681565b61020861052b366004612672565b61107a565b61020861053e366004612672565b61148a565b6101d8610551366004612626565b61151a565b610208610564366004612626565b61152b565b33600081815260056020526040902054610587919081908482611658565b50565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600560205260408120546105bd9084908490611a40565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461064a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f3ba4758949febc607e14523620298f8b5995b1848492ad7aa083372ac886ae07906020015b60405180910390a150565b6000811161072e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b6520300000000000000000000000000000000000006044820152606401610641565b6001546107539073ffffffffffffffffffffffffffffffffffffffff16333084611acd565b61075d8282611baf565b5050565b61075d3333848433611658565b60095473ffffffffffffffffffffffffffffffffffffffff1633146107ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6f74206d69677261746f7200000000000000000000000000000000000000006044820152606401610641565b61075d823383600186611658565b8160005b600454811015610a0b57600060048281548110610847577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905061087481611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff938416179055546108de9116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff93909316929092179091558316156109f85773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260409020546109769084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5080610a0381612870565b915050610801565b50610a17838385611fc9565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b610aa760006120a6565b565b8060005b600454811015610cb757600060048281548110610af3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050610b2081611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff93841617905554610b8a9116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9390931692909217909155831615610ca45773ffffffffffffffffffffffffffffffffffffffff8316600090815260056020526040902054610c229084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5080610caf81612870565b915050610aad565b5061075d828361211b565b60048181548110610cd257600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015610d6357600080fd5b505afa158015610d77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9b91906126eb565b905061058733826106c4565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090206001015464ffffffffff1615610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f65786973747300000000000000000000000000000000000000000000000000006044820152606401610641565b6004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01805473ffffffffffffffffffffffffffffffffffffffff9093167fffffffffffffffffffffffff000000000000000000000000000000000000000090931683179055600091825260066020526040909120908101805464ffffffffff42167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009182168117909255825416179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ffd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f52065d90f31a58861f4d8d731366bba55d1bd5efa2cf6476d73d9b516cc98f4b906020016106b9565b61058733826106c4565b6000805b600454811015611288576000600482815481106110c4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506110f181611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff9384161790555461115b9116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff93909316929092179091558316156112755773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260409020546111f39084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b508061128081612870565b91505061107e565b5060025473ffffffffffffffffffffffffffffffffffffffff16331461130a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f74206469737472696275746f7200000000000000000000000000000000006044820152606401610641565b60008211611374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f2072657761726400000000000000000000000000000000000000000000006044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090206001015464ffffffffff1661140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f756e6b6e6f776e2072657761726420746f6b656e0000000000000000000000006044820152606401610641565b61141483836121a0565b61143673ffffffffffffffffffffffffffffffffffffffff8416333085611acd565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018490527fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e29910160405180910390a1505050565b6040517f3c24436c0000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff831690633c24436c90604401600060405180830381600087803b1580156114f857600080fd5b505af115801561150c573d6000803e3d6000fd5b5050505061075d3382611baf565b600061152582611e5f565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff811661164f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610641565b610587816120a6565b8460005b600454811015611866576000600482815481106116a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506116cf81611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff938416179055546117399116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff93909316929092179091558316156118535773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260409020546117d19084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b508061185e81612870565b91505061165c565b50600084116118d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610641565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260056020526040902054841115611960576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4e6f7420656e6f756768207374616b656420746f6b656e7300000000000000006044820152606401610641565b8360036000828254611972919061282d565b909155505073ffffffffffffffffffffffffffffffffffffffff8616600090815260056020526040812080548692906119ac90849061282d565b90915550506001546119d59073ffffffffffffffffffffffffffffffffffffffff168686612339565b6040805173ffffffffffffffffffffffffffffffffffffffff8781168252602082018790528816917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a28215611a3857611a38868361211b565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600760209081526040808320948716808452948252808320549383526008825280832094835293905291822054670de0b6b3a764000090611a9d86611e5f565b611aa7919061282d565b611ab190856127f0565b611abb91906127b7565b611ac5919061279f565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052611ba99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261238f565b50505050565b8160005b600454811015611dbd57600060048281548110611bf9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050611c2681611e5f565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206001810180547affffffffffffffffffffffffffffffffffffffffffffffffffffff93909316650100000000000264ffffffffff93841617905554611c909116611fb4565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260066020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9390931692909217909155831615611daa5773ffffffffffffffffffffffffffffffffffffffff8316600090815260056020526040902054611d289084908390611a40565b73ffffffffffffffffffffffffffffffffffffffff84811660008181526007602090815260408083209487168084529482528083209590955560068152848220600101549282526008815284822093825292909252919020650100000000009091047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5080611db581612870565b915050611bb3565b508160036000828254611dd0919061279f565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604081208054849290611e0a90849061279f565b909155505060405182815273ffffffffffffffffffffffffffffffffffffffff8416907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a2505050565b6000611e6a60035490565b611ec0575073ffffffffffffffffffffffffffffffffffffffff166000908152600660205260409020600101546501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b60035473ffffffffffffffffffffffffffffffffffffffff8316600090815260066020526040902080546001909101547affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000008304169164ffffffffff91821691611f2b9116611fb4565b611f35919061282d565b611f3f91906127f0565b611f5190670de0b6b3a76400006127f0565b611f5b91906127b7565b73ffffffffffffffffffffffffffffffffffffffff831660009081526006602052604090206001015461152591906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661279f565b600042821015611fc2575090565b5042919050565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600760209081526040808320938616835292905220548015611ba95773ffffffffffffffffffffffffffffffffffffffff808516600090815260076020908152604080832093871680845293909152812055612043908383612339565b6040805173ffffffffffffffffffffffffffffffffffffffff84811682528581166020830152918101839052908516907fce405e67b4d6e56e438257e15f160ae28b450e6e7659bbc4c1f4e09a1ac846cb9060600160405180910390a250505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b600454811015610a175761218e8360048381548110612166577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1684611fc9565b8061219881612870565b91505061211e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020805464ffffffffff16421061221c576121e162093a80836127b7565b81547affffffffffffffffffffffffffffffffffffffffffffffffffffff91909116650100000000000264ffffffffff9091161781556122be565b805460009061223390429064ffffffffff1661282d565b825490915060009061226b906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16836127f0565b905062093a8061227b828661279f565b61228591906127b7565b83547affffffffffffffffffffffffffffffffffffffffffffffffffffff91909116650100000000000264ffffffffff90911617835550505b6001810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000164264ffffffffff8116919091179091556123049062093a809061279f565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff919091161790555050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610a179084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611b27565b60006123f1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661249b9092919063ffffffff16565b805190915015610a17578080602001905181019061240f91906126b7565b610a17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610641565b6060611ac584846000858573ffffffffffffffffffffffffffffffffffffffff85163b612524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610641565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161254d9190612732565b60006040518083038185875af1925050503d806000811461258a576040519150601f19603f3d011682016040523d82523d6000602084013e61258f565b606091505b509150915061259f8282866125aa565b979650505050505050565b606083156125b95750816105bd565b8251156125c95782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610641919061274e565b803573ffffffffffffffffffffffffffffffffffffffff8116811461262157600080fd5b919050565b600060208284031215612637578081fd5b6105bd826125fd565b60008060408385031215612652578081fd5b61265b836125fd565b9150612669602084016125fd565b90509250929050565b60008060408385031215612684578182fd5b61268d836125fd565b946020939093013593505050565b6000602082840312156126ac578081fd5b81356105bd816128d8565b6000602082840312156126c8578081fd5b81516105bd816128d8565b6000602082840312156126e4578081fd5b5035919050565b6000602082840312156126fc578081fd5b5051919050565b60008060408385031215612715578182fd5b823591506020830135612727816128d8565b809150509250929050565b60008251612744818460208701612844565b9190910192915050565b602081526000825180602084015261276d816040850160208701612844565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156127b2576127b26128a9565b500190565b6000826127eb577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612828576128286128a9565b500290565b60008282101561283f5761283f6128a9565b500390565b60005b8381101561285f578181015183820152602001612847565b83811115611ba95750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156128a2576128a26128a9565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b801515811461058757600080fdfea26469706673582212204918ee85a7ac17e943b1a959d07f607ee38c8534c56294a1dc4ca9258ef4537764736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bcb8b7fc9197feda75c101fa69d3211b5a30dcd90000000000000000000000008c2d06e11ca4414e00cdea8f28633a2edaf79499
-----Decoded View---------------
Arg [0] : _stakingToken (address): 0xBcB8b7FC9197fEDa75C101fA69d3211b5a30dCD9
Arg [1] : _distributor (address): 0x8c2D06e11ca4414e00CdEa8f28633A2edAf79499
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000bcb8b7fc9197feda75c101fa69d3211b5a30dcd9
Arg [1] : 0000000000000000000000008c2d06e11ca4414e00cdea8f28633a2edaf79499
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.