ETH Price: $2,974.65 (+2.55%)
Gas: 1 Gwei

Contract

0x5a06016aE4A9BdE110E3f176E0f00DFD6FCAD877
 

Overview

ETH Balance

0.041134711231935588 ETH

Eth Value

$122.36 (@ $2,974.65/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Unstake192982422024-02-24 15:08:23132 days ago1708787303IN
0x5a06016a...D6FCAD877
0 ETH0.0030285729.82582432
Claim192982412024-02-24 15:08:11132 days ago1708787291IN
0x5a06016a...D6FCAD877
0 ETH0.0009226127.76445979
Unstake191113522024-01-29 9:40:47158 days ago1706521247IN
0x5a06016a...D6FCAD877
0 ETH0.0015273815.04009421
Unstake189902032024-01-12 10:24:35175 days ago1705055075IN
0x5a06016a...D6FCAD877
0 ETH0.0046031417.62090874
Claim189837712024-01-11 12:45:59176 days ago1704977159IN
0x5a06016a...D6FCAD877
0 ETH0.0013152628.12923304
Claim189835682024-01-11 12:05:23176 days ago1704974723IN
0x5a06016a...D6FCAD877
0 ETH0.001397629.89025942
Unstake189711872024-01-09 18:27:47178 days ago1704824867IN
0x5a06016a...D6FCAD877
0 ETH0.0050968619.51089141
Claim189711862024-01-09 18:27:35178 days ago1704824855IN
0x5a06016a...D6FCAD877
0 ETH0.0012874520.1526789
Unstake189575412024-01-07 20:21:23180 days ago1704658883IN
0x5a06016a...D6FCAD877
0 ETH0.0077629729.71679453
Claim189536682024-01-07 7:14:11180 days ago1704611651IN
0x5a06016a...D6FCAD877
0 ETH0.0009921529.88142663
Claim189487452024-01-06 14:26:11181 days ago1704551171IN
0x5a06016a...D6FCAD877
0 ETH0.0013977829.89410732
Claim189487432024-01-06 14:25:47181 days ago1704551147IN
0x5a06016a...D6FCAD877
0 ETH0.0012918427.62830808
Unstake189479492024-01-06 11:41:35181 days ago1704541295IN
0x5a06016a...D6FCAD877
0 ETH0.0014828214.60475797
Stake189477692024-01-06 11:04:47181 days ago1704539087IN
0x5a06016a...D6FCAD877
0 ETH0.0012570912.44213153
Claim189472522024-01-06 9:20:47181 days ago1704532847IN
0x5a06016a...D6FCAD877
0 ETH0.000502410.74469156
Claim189469632024-01-06 8:22:35181 days ago1704529355IN
0x5a06016a...D6FCAD877
0 ETH0.0006073312.98886651
Claim189469422024-01-06 8:18:23181 days ago1704529103IN
0x5a06016a...D6FCAD877
0 ETH0.0006592314.09890844
Claim189422072024-01-05 16:18:23182 days ago1704471503IN
0x5a06016a...D6FCAD877
0 ETH0.0014767931.58372216
Claim189421962024-01-05 16:16:11182 days ago1704471371IN
0x5a06016a...D6FCAD877
0 ETH0.0014739531.52311211
Claim189421892024-01-05 16:14:47182 days ago1704471287IN
0x5a06016a...D6FCAD877
0 ETH0.0013629829.1497274
Unstake189414802024-01-05 13:51:11182 days ago1704462671IN
0x5a06016a...D6FCAD877
0 ETH0.0060200323.04477274
Claim189414782024-01-05 13:50:47182 days ago1704462647IN
0x5a06016a...D6FCAD877
0 ETH0.0015207123.80394022
Unstake189405412024-01-05 10:40:47182 days ago1704451247IN
0x5a06016a...D6FCAD877
0 ETH0.0032674912.50845088
Unstake189364922024-01-04 20:58:59183 days ago1704401939IN
0x5a06016a...D6FCAD877
0 ETH0.0024159223.78953241
Claim189364922024-01-04 20:58:59183 days ago1704401939IN
0x5a06016a...D6FCAD877
0 ETH0.0007905223.78953241
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
189837712024-01-11 12:45:59176 days ago1704977159
0x5a06016a...D6FCAD877
0.04089744 ETH
189835682024-01-11 12:05:23176 days ago1704974723
0x5a06016a...D6FCAD877
0.04771368 ETH
189711862024-01-09 18:27:35178 days ago1704824855
0x5a06016a...D6FCAD877
0.01767287 ETH
189487452024-01-06 14:26:11181 days ago1704551171
0x5a06016a...D6FCAD877
0.06939981 ETH
189487432024-01-06 14:25:47181 days ago1704551147
0x5a06016a...D6FCAD877
0.06939981 ETH
189472522024-01-06 9:20:47181 days ago1704532847
0x5a06016a...D6FCAD877
0.06444268 ETH
189469632024-01-06 8:22:35181 days ago1704529355
0x5a06016a...D6FCAD877
0.05452842 ETH
189469422024-01-06 8:18:23181 days ago1704529103
0x5a06016a...D6FCAD877
0.03965703 ETH
189422072024-01-05 16:18:23182 days ago1704471503
0x5a06016a...D6FCAD877
0.06493839 ETH
189421962024-01-05 16:16:11182 days ago1704471371
0x5a06016a...D6FCAD877
0.0340812 ETH
189421892024-01-05 16:14:47182 days ago1704471287
0x5a06016a...D6FCAD877
0.03067308 ETH
189414782024-01-05 13:50:47182 days ago1704462647
0x5a06016a...D6FCAD877
0.03300704 ETH
189328942024-01-04 8:52:23183 days ago1704358343
0x5a06016a...D6FCAD877
0.01097263 ETH
189262052024-01-03 10:20:59184 days ago1704277259
0x5a06016a...D6FCAD877
0.02677602 ETH
189190052024-01-02 10:08:23185 days ago1704190103
0x5a06016a...D6FCAD877
0.01639994 ETH
189025052023-12-31 2:31:59188 days ago1703989919
0x5a06016a...D6FCAD877
0.00317126 ETH
188973772023-12-30 9:13:59188 days ago1703927639
0x5a06016a...D6FCAD877
0.009884 ETH
188927222023-12-29 17:29:11189 days ago1703870951
0x5a06016a...D6FCAD877
0.00508818 ETH
188787932023-12-27 18:31:47191 days ago1703701907
0x5a06016a...D6FCAD877
0.08581644 ETH
188738182023-12-27 1:45:23192 days ago1703641523
0x5a06016a...D6FCAD877
0.01826961 ETH
188702662023-12-26 13:47:35192 days ago1703598455
0x5a06016a...D6FCAD877
0.00908832 ETH
188699382023-12-26 12:41:59192 days ago1703594519
0x5a06016a...D6FCAD877
0.0048736 ETH
188684422023-12-26 7:40:47192 days ago1703576447
0x5a06016a...D6FCAD877
0.06184488 ETH
188683982023-12-26 7:31:59192 days ago1703575919
0x5a06016a...D6FCAD877
0.06453073 ETH
188683922023-12-26 7:30:47192 days ago1703575847
0x5a06016a...D6FCAD877
0.06404825 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
InfinityStakingExternal

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : InfinityStakingExternal.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

library SafeMathInt {
    int256 private constant MIN_INT256 = int256(1) << 255;
    int256 private constant MAX_INT256 = ~(int256(1) << 255);

    /**
     * @dev Multiplies two int256 variables and fails on overflow.
     */
    function mul(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a * b;

        // Detect overflow when multiplying MIN_INT256 with -1
        require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
        require((b == 0) || (c / b == a));
        return c;
    }

    /**
     * @dev Division of two int256 variables and fails on overflow.
     */
    function div(int256 a, int256 b) internal pure returns (int256) {
        // Prevent overflow when dividing MIN_INT256 by -1
        require(b != -1 || a != MIN_INT256);

        // Solidity already throws when dividing by 0.
        return a / b;
    }

    /**
     * @dev Subtracts two int256 variables and fails on overflow.
     */
    function sub(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a - b;
        require((b >= 0 && c <= a) || (b < 0 && c > a));
        return c;
    }

    /**
     * @dev Adds two int256 variables and fails on overflow.
     */
    function add(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a + b;
        require((b >= 0 && c >= a) || (b < 0 && c < a));
        return c;
    }

    /**
     * @dev Converts to absolute value, and fails on overflow.
     */
    function abs(int256 a) internal pure returns (int256) {
        require(a != MIN_INT256);
        return a < 0 ? -a : a;
    }


    function toUint256Safe(int256 a) internal pure returns (uint256) {
        require(a >= 0);
        return uint256(a);
    }
}

library SafeMathUint {
  function toInt256Safe(uint256 a) internal pure returns (int256) {
    int256 b = int256(a);
    require(b >= 0);
    return b;
  }
}

interface DividendPayingContractOptionalInterface {
  function withdrawableDividendOf(address _owner) external view returns(uint256);
  function withdrawnDividendOf(address _owner) external view returns(uint256);
  function accumulativeDividendOf(address _owner) external view returns(uint256);
}

interface DividendPayingContractInterface {
  function dividendOf(address _owner) external view returns(uint256);
  function distributeDividends() external payable;
  function withdrawDividend() external;
  event DividendsDistributed(
    address indexed from,
    uint256 weiAmount
  );
  event DividendWithdrawn(
    address indexed to,
    uint256 weiAmount
  );
}

contract DividendPayingContract is DividendPayingContractInterface, DividendPayingContractOptionalInterface {
  using SafeMath for uint256;
  using SafeMathUint for uint256;
  using SafeMathInt for int256;

  uint256 constant internal magnitude = 2**128;

  uint256 internal magnifiedDividendPerShare;
                                                                         
  mapping(address => int256) internal magnifiedDividendCorrections;
  mapping(address => uint256) internal withdrawnDividends;
  
  mapping (address => uint256) public holderBalance;
  uint256 public totalBalance;

  uint256 public totalDividendsDistributed;

  receive() external payable {
    distributeDividends();
  }

  function distributeDividends() public override payable {
    if(totalBalance > 0 && msg.value > 0){
        magnifiedDividendPerShare = magnifiedDividendPerShare.add(
            (msg.value).mul(magnitude) / totalBalance
        );
        emit DividendsDistributed(msg.sender, msg.value);

        totalDividendsDistributed = totalDividendsDistributed.add(msg.value);
    }
  }

  function withdrawDividend() external virtual override {
    _withdrawDividendOfUser(payable(msg.sender));
  }

  function _withdrawDividendOfUser(address payable user) internal returns (uint256) {
    uint256 _withdrawableDividend = withdrawableDividendOf(user);
    if (_withdrawableDividend > 0) {
      withdrawnDividends[user] = withdrawnDividends[user].add(_withdrawableDividend);

      emit DividendWithdrawn(user, _withdrawableDividend);
      (bool success,) = user.call{value: _withdrawableDividend}("");

      if(!success) {
        withdrawnDividends[user] = withdrawnDividends[user].sub(_withdrawableDividend);
        return 0;
      }

      return _withdrawableDividend;
    }

    return 0;
  }

  function dividendOf(address _owner) external view override returns(uint256) {
    return withdrawableDividendOf(_owner);
  }

  function withdrawableDividendOf(address _owner) public view override returns(uint256) {
    return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]);
  }

  function withdrawnDividendOf(address _owner) external view override returns(uint256) {
    return withdrawnDividends[_owner];
  }

  function accumulativeDividendOf(address _owner) public view override returns(uint256) {
    return magnifiedDividendPerShare.mul(holderBalance[_owner]).toInt256Safe()
      .add(magnifiedDividendCorrections[_owner]).toUint256Safe() / magnitude;
  }

  function _increase(address account, uint256 value) internal {
    magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
      .sub( (magnifiedDividendPerShare.mul(value)).toInt256Safe() );
  }

  function _reduce(address account, uint256 value) internal {
    magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
      .add( (magnifiedDividendPerShare.mul(value)).toInt256Safe() );
  }

  function _setBalance(address account, uint256 newBalance) internal {
    uint256 currentBalance = holderBalance[account];
    holderBalance[account] = newBalance;
    if(newBalance > currentBalance) {
      uint256 increaseAmount = newBalance.sub(currentBalance);
      _increase(account, increaseAmount);
      totalBalance += increaseAmount;
    } else if(newBalance < currentBalance) {
      uint256 reduceAmount = currentBalance.sub(newBalance);
      _reduce(account, reduceAmount);
      totalBalance -= reduceAmount;
    }
  }
}


contract DividendTracker is DividendPayingContract {

    event Claim(address indexed account, uint256 amount, bool indexed automatic);

    constructor() {}

    function getAccount(address _account)
        public view returns (
            address account,
            uint256 withdrawableDividends,
            uint256 totalDividends,
            uint256 balance) {
        account = _account;

        withdrawableDividends = withdrawableDividendOf(account);
        totalDividends = accumulativeDividendOf(account);

        balance = holderBalance[account];
    }
    function setBalance(address payable account, uint256 newBalance) internal {

        _setBalance(account, newBalance);

    	processAccount(account, true);
    }
    
    function processAccount(address payable account, bool automatic) internal returns (bool) {
        uint256 amount = _withdrawDividendOfUser(account);

    	if(amount > 0) {
            emit Claim(account, amount, automatic);
    		return true;
    	}

    	return false;
    }

    function getTotalDividendsDistributed() external view returns (uint256) {
        return totalDividendsDistributed;
    }

	function dividendTokenBalanceOf(address account) public view returns (uint256) {
		return holderBalance[account];
	}

    function getNumberOfDividends() external view returns(uint256) {
        return totalBalance;
    }
}


contract InfinityStakingExternal is Ownable, ReentrancyGuard, DividendTracker {

    IERC20 public immutable token;
    address public externalWallet;


    mapping (address => uint256) public holderUnlockTime;
    uint256 public lockDuration;

    event Staked(address user, uint256 amount);
    event Unstaked(address user, uint256 amount);

    constructor(address _token, uint256 _lockPeriodWeeks, address _externalWallet) {
        require(_token != address(0), "cannot be 0 address");
        token = IERC20(_token);

        externalWallet = _externalWallet;
        
        lockDuration = _lockPeriodWeeks * 1 weeks;       
    }


    function stake(uint256 _amount) external nonReentrant {
        require(_amount > 0, "Stake amount must be greater than zero");

        if(holderUnlockTime[msg.sender] == 0) {
            holderUnlockTime[msg.sender] = block.timestamp + lockDuration;
        }

        uint256 userAmount = holderBalance[msg.sender];

        uint256 amountTransferred = 0;

        uint256 initialBalance = token.balanceOf(externalWallet);
        token.transferFrom(address(msg.sender), externalWallet, _amount);
        amountTransferred = token.balanceOf(externalWallet) - initialBalance;
    
        setBalance(payable(msg.sender), userAmount + amountTransferred);

        emit Staked(msg.sender, _amount);
    }


    function unstake(uint256 _amount) external nonReentrant {
        require(_amount > 0, "Unstake amount must be greater than zero");

        uint256 userAmount = holderBalance[msg.sender];
        require(_amount <= userAmount, "Not enough tokens");
        require(holderUnlockTime[msg.sender] <= block.timestamp, "May not withdraw early");

        token.transferFrom(externalWallet, address(msg.sender), _amount);

        setBalance(payable(msg.sender), userAmount - _amount);

        if(userAmount > 0){
            holderUnlockTime[msg.sender] = block.timestamp + lockDuration;
        } else {
            holderUnlockTime[msg.sender] = 0;
        }

        emit Unstaked(msg.sender, _amount);
    }

    function returnBalance(address _staker) external view returns (uint256) {
        return holderBalance[_staker];
    }

    function withdrawAll() public nonReentrant {
        uint256 userAmount = holderBalance[msg.sender];
        require(userAmount > 0, "No tokens to withdraw");
        require(holderUnlockTime[msg.sender] <= block.timestamp, "Withdrawal locked");

        require(token.transfer(address(msg.sender), userAmount), "Transfer failed");
        token.transferFrom(externalWallet, address(msg.sender), userAmount);

        holderBalance[msg.sender] = 0;
        holderUnlockTime[msg.sender] = 0;

        emit Unstaked(msg.sender, userAmount);
    }

    function claim() external nonReentrant {
        processAccount(payable(msg.sender), false);
    }

    
    function withdrawEther(address payable recipient, uint256 amount) external onlyOwner {
        require(address(this).balance >= amount, "Insufficient balance in contract");
        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Transfer failed.");
    }
 
}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 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);
    }
}

File 3 of 6 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 6 : IERC20.sol
// 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);
}

File 5 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 6 of 6 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_lockPeriodWeeks","type":"uint256"},{"internalType":"address","name":"_externalWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"bool","name":"automatic","type":"bool"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"DividendWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"DividendsDistributed","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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"accumulativeDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeDividends","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"dividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"dividendTokenBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"externalWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAccount","outputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"withdrawableDividends","type":"uint256"},{"internalType":"uint256","name":"totalDividends","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumberOfDividends","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalDividendsDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"holderBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"holderUnlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"_staker","type":"address"}],"name":"returnBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDividendsDistributed","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":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawDividend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"withdrawableDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"withdrawnDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040523480156200001157600080fd5b50604051620017e3380380620017e383398101604081905262000034916200014c565b6200003f33620000df565b600180556001600160a01b0383166200009e5760405162461bcd60e51b815260206004820152601360248201527f63616e6e6f742062652030206164647265737300000000000000000000000000604482015260640160405180910390fd5b6001600160a01b03838116608052600880546001600160a01b031916918316919091179055620000d28262093a806200018d565b600a5550620001b9915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200014757600080fd5b919050565b6000806000606084860312156200016257600080fd5b6200016d846200012f565b92506020840151915062000184604085016200012f565b90509250925092565b8082028115828204841417620001b357634e487b7160e01b600052601160045260246000fd5b92915050565b6080516115e4620001ff600039600081816104cc0152818161072401528181610a1d01528181610aff01528181610cab01528181610d4a0152610ddc01526115e46000f3fe6080604052600436106101855760003560e01c8063853828b6116100d1578063a913a5f71161008a578063ad7a672f11610064578063ad7a672f1461043a578063f2fde38b14610450578063fbcbc0f114610470578063fc0c546a146104ba57600080fd5b8063a913a5f7146103aa578063aafd847a146103d7578063ab6ddfa81461040d57600080fd5b8063853828b61461030157806385a6b3ae146103165780638da5cb5b1461032c57806391b89fba1461034a578063a694fc3a1461036a578063a8b9d2401461038a57600080fd5b80634e71d92d1161013e5780636a474002116101185780636a4740021461028a578063715018a61461029f57806371778e7d146102b457806371d27144146102c957600080fd5b80634e71d92d14610255578063522f68151461026a5780636843cd84146101ca57600080fd5b806303c833021461019957806304554443146101a1578063264b2b8e146101ca57806327ce0147146102005780632e17de781461022057806330bb4cff1461024057600080fd5b36610194576101926104ee565b005b600080fd5b6101926104ee565b3480156101ad57600080fd5b506101b7600a5481565b6040519081526020015b60405180910390f35b3480156101d657600080fd5b506101b76101e5366004611454565b6001600160a01b031660009081526005602052604090205490565b34801561020c57600080fd5b506101b761021b366004611454565b610578565b34801561022c57600080fd5b5061019261023b366004611471565b6105db565b34801561024c57600080fd5b506007546101b7565b34801561026157600080fd5b50610192610826565b34801561027657600080fd5b5061019261028536600461148a565b610843565b34801561029657600080fd5b50610192610936565b3480156102ab57600080fd5b5061019261093f565b3480156102c057600080fd5b506006546101b7565b3480156102d557600080fd5b506008546102e9906001600160a01b031681565b6040516001600160a01b0390911681526020016101c1565b34801561030d57600080fd5b50610192610951565b34801561032257600080fd5b506101b760075481565b34801561033857600080fd5b506000546001600160a01b03166102e9565b34801561035657600080fd5b506101b7610365366004611454565b610bce565b34801561037657600080fd5b50610192610385366004611471565b610bd9565b34801561039657600080fd5b506101b76103a5366004611454565b610ea6565b3480156103b657600080fd5b506101b76103c5366004611454565b60096020526000908152604090205481565b3480156103e357600080fd5b506101b76103f2366004611454565b6001600160a01b031660009081526004602052604090205490565b34801561041957600080fd5b506101b7610428366004611454565b60056020526000908152604090205481565b34801561044657600080fd5b506101b760065481565b34801561045c57600080fd5b5061019261046b366004611454565b610ed2565b34801561047c57600080fd5b5061049061048b366004611454565b610f48565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101c1565b3480156104c657600080fd5b506102e97f000000000000000000000000000000000000000000000000000000000000000081565b60006006541180156105005750600034115b156105765760065461052d9061051a34600160801b610f86565b61052491906114cc565b60025490610f99565b60025560405134815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a26007546105729034610f99565b6007555b565b6001600160a01b0381166000908152600360209081526040808320546005909252822054600254600160801b926105cb926105c6926105c0916105bb9190610f86565b610fa5565b90610fb5565b610ff3565b6105d591906114cc565b92915050565b6105e3611006565b600081116106495760405162461bcd60e51b815260206004820152602860248201527f556e7374616b6520616d6f756e74206d7573742062652067726561746572207460448201526768616e207a65726f60c01b60648201526084015b60405180910390fd5b336000908152600560205260409020548082111561069d5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820746f6b656e7360781b6044820152606401610640565b336000908152600960205260409020544210156106f55760405162461bcd60e51b81526020600482015260166024820152754d6179206e6f74207769746864726177206561726c7960501b6044820152606401610640565b6008546040516323b872dd60e01b81526001600160a01b039182166004820152336024820152604481018490527f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af115801561076f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079391906114ee565b506107a7336107a28484611510565b61105f565b80156107cf57600a546107ba9042611523565b336000908152600960205260409020556107e0565b336000908152600960205260408120555b60408051338152602081018490527f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75910160405180910390a15061082360018055565b50565b61082e611006565b610839336000611070565b5061057660018055565b61084b6110de565b8047101561089b5760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520696e20636f6e74726163746044820152606401610640565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146108e8576040519150601f19603f3d011682016040523d82523d6000602084013e6108ed565b606091505b50509050806109315760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610640565b505050565b61082333611138565b6109476110de565b6105766000611279565b610959611006565b33600090815260056020526040902054806109ae5760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b6044820152606401610640565b33600090815260096020526040902054421015610a015760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b081b1bd8dad959607a1b6044820152606401610640565b60405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610a6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9291906114ee565b610ad05760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610640565b6008546040516323b872dd60e01b81526001600160a01b039182166004820152336024820152604481018390527f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af1158015610b4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6e91906114ee565b503360008181526005602090815260408083208390556009825280832092909255815192835282018390527f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75910160405180910390a15061057660018055565b60006105d582610ea6565b610be1611006565b60008111610c405760405162461bcd60e51b815260206004820152602660248201527f5374616b6520616d6f756e74206d7573742062652067726561746572207468616044820152656e207a65726f60d01b6064820152608401610640565b336000908152600960205260408120549003610c7457600a54610c639042611523565b336000908152600960205260409020555b336000908152600560205260408082205460085491516370a0823160e01b81526001600160a01b03928316600482015290929182917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d189190611536565b6008546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018790529192507f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015610d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db791906114ee565b506008546040516370a0823160e01b81526001600160a01b03918216600482015282917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611536565b610e519190611510565b9150610e61336107a28486611523565b60408051338152602081018690527f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d910160405180910390a150505061082360018055565b6001600160a01b0381166000908152600460205260408120546105d590610ecc84610578565b906112c9565b610eda6110de565b6001600160a01b038116610f3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610640565b61082381611279565b8060008080610f5684610ea6565b9250610f6184610578565b6001600160a01b03851660009081526005602052604090205494969395509392915050565b6000610f92828461154f565b9392505050565b6000610f928284611523565b600081818112156105d557600080fd5b600080610fc28385611566565b905060008312158015610fd55750838112155b80610fea5750600083128015610fea57508381125b610f9257600080fd5b60008082121561100257600080fd5b5090565b6002600154036110585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610640565b6002600155565b61106982826112d5565b6109318260015b60008061107c84611138565b905080156110d457821515846001600160a01b03167fa2c38e2d2fb7e3e1912d937fd1ca11ed6d51864dee4cfa7a7bf02becd7acf092836040516110c291815260200190565b60405180910390a360019150506105d5565b5060009392505050565b6000546001600160a01b031633146105765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610640565b60008061114483610ea6565b90508015611270576001600160a01b03831660009081526004602052604090205461116f9082610f99565b6001600160a01b038416600081815260046020526040908190209290925590517fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d906111be9084815260200190565b60405180910390a26000836001600160a01b03168260405160006040518083038185875af1925050503d8060008114611213576040519150601f19603f3d011682016040523d82523d6000602084013e611218565b606091505b5050905080611269576001600160a01b03841660009081526004602052604090205461124490836112c9565b6001600160a01b03909416600090815260046020526040812094909455509192915050565b5092915050565b50600092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610f928284611510565b6001600160a01b03821660009081526005602052604090208054908290558082111561133157600061130783836112c9565b9050611313848261136e565b80600660008282546113259190611523565b90915550610931915050565b8082101561093157600061134582846112c9565b905061135184826113c8565b80600660008282546113639190611510565b909155505050505050565b6113a86113896105bb83600254610f8690919063ffffffff16565b6001600160a01b03841660009081526003602052604090205490611402565b6001600160a01b0390921660009081526003602052604090209190915550565b6113a86113e36105bb83600254610f8690919063ffffffff16565b6001600160a01b03841660009081526003602052604090205490610fb5565b60008061140f838561158e565b9050600083121580156114225750838113155b80610fea5750600083128015610fea5750838113610f9257600080fd5b6001600160a01b038116811461082357600080fd5b60006020828403121561146657600080fd5b8135610f928161143f565b60006020828403121561148357600080fd5b5035919050565b6000806040838503121561149d57600080fd5b82356114a88161143f565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b6000826114e957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561150057600080fd5b81518015158114610f9257600080fd5b818103818111156105d5576105d56114b6565b808201808211156105d5576105d56114b6565b60006020828403121561154857600080fd5b5051919050565b80820281158282048414176105d5576105d56114b6565b8082018281126000831280158216821582161715611586576115866114b6565b505092915050565b8181036000831280158383131683831282161715611269576112696114b656fea2646970667358221220cdc80de16f870603dff8e66815aff130cac7e4918ae999a326c8fefee16a00b664736f6c63430008130033000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd9600000000000000000000000000000000000000000000000000000000000000010000000000000000000000006ef67a1946d93c5db2d1b88e2809665f684d8d15

Deployed Bytecode

0x6080604052600436106101855760003560e01c8063853828b6116100d1578063a913a5f71161008a578063ad7a672f11610064578063ad7a672f1461043a578063f2fde38b14610450578063fbcbc0f114610470578063fc0c546a146104ba57600080fd5b8063a913a5f7146103aa578063aafd847a146103d7578063ab6ddfa81461040d57600080fd5b8063853828b61461030157806385a6b3ae146103165780638da5cb5b1461032c57806391b89fba1461034a578063a694fc3a1461036a578063a8b9d2401461038a57600080fd5b80634e71d92d1161013e5780636a474002116101185780636a4740021461028a578063715018a61461029f57806371778e7d146102b457806371d27144146102c957600080fd5b80634e71d92d14610255578063522f68151461026a5780636843cd84146101ca57600080fd5b806303c833021461019957806304554443146101a1578063264b2b8e146101ca57806327ce0147146102005780632e17de781461022057806330bb4cff1461024057600080fd5b36610194576101926104ee565b005b600080fd5b6101926104ee565b3480156101ad57600080fd5b506101b7600a5481565b6040519081526020015b60405180910390f35b3480156101d657600080fd5b506101b76101e5366004611454565b6001600160a01b031660009081526005602052604090205490565b34801561020c57600080fd5b506101b761021b366004611454565b610578565b34801561022c57600080fd5b5061019261023b366004611471565b6105db565b34801561024c57600080fd5b506007546101b7565b34801561026157600080fd5b50610192610826565b34801561027657600080fd5b5061019261028536600461148a565b610843565b34801561029657600080fd5b50610192610936565b3480156102ab57600080fd5b5061019261093f565b3480156102c057600080fd5b506006546101b7565b3480156102d557600080fd5b506008546102e9906001600160a01b031681565b6040516001600160a01b0390911681526020016101c1565b34801561030d57600080fd5b50610192610951565b34801561032257600080fd5b506101b760075481565b34801561033857600080fd5b506000546001600160a01b03166102e9565b34801561035657600080fd5b506101b7610365366004611454565b610bce565b34801561037657600080fd5b50610192610385366004611471565b610bd9565b34801561039657600080fd5b506101b76103a5366004611454565b610ea6565b3480156103b657600080fd5b506101b76103c5366004611454565b60096020526000908152604090205481565b3480156103e357600080fd5b506101b76103f2366004611454565b6001600160a01b031660009081526004602052604090205490565b34801561041957600080fd5b506101b7610428366004611454565b60056020526000908152604090205481565b34801561044657600080fd5b506101b760065481565b34801561045c57600080fd5b5061019261046b366004611454565b610ed2565b34801561047c57600080fd5b5061049061048b366004611454565b610f48565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101c1565b3480156104c657600080fd5b506102e97f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd9681565b60006006541180156105005750600034115b156105765760065461052d9061051a34600160801b610f86565b61052491906114cc565b60025490610f99565b60025560405134815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a26007546105729034610f99565b6007555b565b6001600160a01b0381166000908152600360209081526040808320546005909252822054600254600160801b926105cb926105c6926105c0916105bb9190610f86565b610fa5565b90610fb5565b610ff3565b6105d591906114cc565b92915050565b6105e3611006565b600081116106495760405162461bcd60e51b815260206004820152602860248201527f556e7374616b6520616d6f756e74206d7573742062652067726561746572207460448201526768616e207a65726f60c01b60648201526084015b60405180910390fd5b336000908152600560205260409020548082111561069d5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820746f6b656e7360781b6044820152606401610640565b336000908152600960205260409020544210156106f55760405162461bcd60e51b81526020600482015260166024820152754d6179206e6f74207769746864726177206561726c7960501b6044820152606401610640565b6008546040516323b872dd60e01b81526001600160a01b039182166004820152336024820152604481018490527f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd96909116906323b872dd906064016020604051808303816000875af115801561076f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079391906114ee565b506107a7336107a28484611510565b61105f565b80156107cf57600a546107ba9042611523565b336000908152600960205260409020556107e0565b336000908152600960205260408120555b60408051338152602081018490527f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75910160405180910390a15061082360018055565b50565b61082e611006565b610839336000611070565b5061057660018055565b61084b6110de565b8047101561089b5760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520696e20636f6e74726163746044820152606401610640565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146108e8576040519150601f19603f3d011682016040523d82523d6000602084013e6108ed565b606091505b50509050806109315760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610640565b505050565b61082333611138565b6109476110de565b6105766000611279565b610959611006565b33600090815260056020526040902054806109ae5760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b6044820152606401610640565b33600090815260096020526040902054421015610a015760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b081b1bd8dad959607a1b6044820152606401610640565b60405163a9059cbb60e01b8152336004820152602481018290527f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd966001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610a6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9291906114ee565b610ad05760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610640565b6008546040516323b872dd60e01b81526001600160a01b039182166004820152336024820152604481018390527f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd96909116906323b872dd906064016020604051808303816000875af1158015610b4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6e91906114ee565b503360008181526005602090815260408083208390556009825280832092909255815192835282018390527f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75910160405180910390a15061057660018055565b60006105d582610ea6565b610be1611006565b60008111610c405760405162461bcd60e51b815260206004820152602660248201527f5374616b6520616d6f756e74206d7573742062652067726561746572207468616044820152656e207a65726f60d01b6064820152608401610640565b336000908152600960205260408120549003610c7457600a54610c639042611523565b336000908152600960205260409020555b336000908152600560205260408082205460085491516370a0823160e01b81526001600160a01b03928316600482015290929182917f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd96909116906370a0823190602401602060405180830381865afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d189190611536565b6008546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018790529192507f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd9616906323b872dd906064016020604051808303816000875af1158015610d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db791906114ee565b506008546040516370a0823160e01b81526001600160a01b03918216600482015282917f000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd9616906370a0823190602401602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611536565b610e519190611510565b9150610e61336107a28486611523565b60408051338152602081018690527f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d910160405180910390a150505061082360018055565b6001600160a01b0381166000908152600460205260408120546105d590610ecc84610578565b906112c9565b610eda6110de565b6001600160a01b038116610f3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610640565b61082381611279565b8060008080610f5684610ea6565b9250610f6184610578565b6001600160a01b03851660009081526005602052604090205494969395509392915050565b6000610f92828461154f565b9392505050565b6000610f928284611523565b600081818112156105d557600080fd5b600080610fc28385611566565b905060008312158015610fd55750838112155b80610fea5750600083128015610fea57508381125b610f9257600080fd5b60008082121561100257600080fd5b5090565b6002600154036110585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610640565b6002600155565b61106982826112d5565b6109318260015b60008061107c84611138565b905080156110d457821515846001600160a01b03167fa2c38e2d2fb7e3e1912d937fd1ca11ed6d51864dee4cfa7a7bf02becd7acf092836040516110c291815260200190565b60405180910390a360019150506105d5565b5060009392505050565b6000546001600160a01b031633146105765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610640565b60008061114483610ea6565b90508015611270576001600160a01b03831660009081526004602052604090205461116f9082610f99565b6001600160a01b038416600081815260046020526040908190209290925590517fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d906111be9084815260200190565b60405180910390a26000836001600160a01b03168260405160006040518083038185875af1925050503d8060008114611213576040519150601f19603f3d011682016040523d82523d6000602084013e611218565b606091505b5050905080611269576001600160a01b03841660009081526004602052604090205461124490836112c9565b6001600160a01b03909416600090815260046020526040812094909455509192915050565b5092915050565b50600092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610f928284611510565b6001600160a01b03821660009081526005602052604090208054908290558082111561133157600061130783836112c9565b9050611313848261136e565b80600660008282546113259190611523565b90915550610931915050565b8082101561093157600061134582846112c9565b905061135184826113c8565b80600660008282546113639190611510565b909155505050505050565b6113a86113896105bb83600254610f8690919063ffffffff16565b6001600160a01b03841660009081526003602052604090205490611402565b6001600160a01b0390921660009081526003602052604090209190915550565b6113a86113e36105bb83600254610f8690919063ffffffff16565b6001600160a01b03841660009081526003602052604090205490610fb5565b60008061140f838561158e565b9050600083121580156114225750838113155b80610fea5750600083128015610fea5750838113610f9257600080fd5b6001600160a01b038116811461082357600080fd5b60006020828403121561146657600080fd5b8135610f928161143f565b60006020828403121561148357600080fd5b5035919050565b6000806040838503121561149d57600080fd5b82356114a88161143f565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b6000826114e957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561150057600080fd5b81518015158114610f9257600080fd5b818103818111156105d5576105d56114b6565b808201808211156105d5576105d56114b6565b60006020828403121561154857600080fd5b5051919050565b80820281158282048414176105d5576105d56114b6565b8082018281126000831280158216821582161715611586576115866114b6565b505092915050565b8181036000831280158383131683831282161715611269576112696114b656fea2646970667358221220cdc80de16f870603dff8e66815aff130cac7e4918ae999a326c8fefee16a00b664736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd9600000000000000000000000000000000000000000000000000000000000000010000000000000000000000006ef67a1946d93c5db2d1b88e2809665f684d8d15

-----Decoded View---------------
Arg [0] : _token (address): 0xb3CE971A55B1c3F03314BCE2DD81d0C1cd69bD96
Arg [1] : _lockPeriodWeeks (uint256): 1
Arg [2] : _externalWallet (address): 0x6Ef67a1946D93c5dB2D1B88e2809665f684D8d15

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000b3ce971a55b1c3f03314bce2dd81d0c1cd69bd96
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 0000000000000000000000006ef67a1946d93c5db2d1b88e2809665f684d8d15


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.