ETH Price: $2,141.93 (-2.01%)

Contract

0x9D732AFA9f6726eFDF2c071fB0ffa4Efd8cE505f
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake229682582025-07-21 14:47:11241 days ago1753109231IN
0x9D732AFA...fd8cE505f
0 ETH0.000659215.7103404
Unstake226737482025-06-10 11:05:11282 days ago1749553511IN
0x9D732AFA...fd8cE505f
0 ETH0.000274072.37409082
Unstake223552072025-04-26 19:08:59327 days ago1745694539IN
0x9D732AFA...fd8cE505f
0 ETH0.000122510.92432993
Unstake223233922025-04-22 8:36:59331 days ago1745311019IN
0x9D732AFA...fd8cE505f
0 ETH0.000058280.43977458
Unstake222944782025-04-18 7:45:11335 days ago1744962311IN
0x9D732AFA...fd8cE505f
0 ETH0.000103540.89691267
Unstake222876992025-04-17 9:04:11336 days ago1744880651IN
0x9D732AFA...fd8cE505f
0 ETH0.000049690.95367515
Unstake222664112025-04-14 9:44:11339 days ago1744623851IN
0x9D732AFA...fd8cE505f
0 ETH0.000061470.5325412
Unstake221478592025-03-28 20:41:35355 days ago1743194495IN
0x9D732AFA...fd8cE505f
0 ETH0.000101580.87992181
Unstake220824982025-03-19 17:47:11365 days ago1742406431IN
0x9D732AFA...fd8cE505f
0 ETH0.000157221.36192761
Stake DUEL219237702025-02-25 13:54:23387 days ago1740491663IN
0x9D732AFA...fd8cE505f
0 ETH0.000489463.12361519
Stake DUEL218279252025-02-12 4:02:11400 days ago1739332931IN
0x9D732AFA...fd8cE505f
0 ETH0.00044612.93664982
Unstake218084912025-02-09 10:55:11403 days ago1739098511IN
0x9D732AFA...fd8cE505f
0 ETH0.000204871.7746715
Unstake218044662025-02-08 21:25:59403 days ago1739049959IN
0x9D732AFA...fd8cE505f
0 ETH0.000153811.33238277
Unstake217755092025-02-04 20:25:59407 days ago1738700759IN
0x9D732AFA...fd8cE505f
0 ETH0.000673839.9319856
Unstake217713642025-02-04 6:31:47408 days ago1738650707IN
0x9D732AFA...fd8cE505f
0 ETH0.000277722.40577298
Unstake217057952025-01-26 2:46:23417 days ago1737859583IN
0x9D732AFA...fd8cE505f
0 ETH0.000422493.65980006
Unstake217043242025-01-25 21:51:35417 days ago1737841895IN
0x9D732AFA...fd8cE505f
0 ETH0.000545844.72827843
Unstake216936032025-01-24 9:56:11419 days ago1737712571IN
0x9D732AFA...fd8cE505f
0 ETH0.0013647611.8219871
Unstake216892502025-01-23 19:21:23419 days ago1737660083IN
0x9D732AFA...fd8cE505f
0 ETH0.001214659.16420136
Unstake216710352025-01-21 6:20:35422 days ago1737440435IN
0x9D732AFA...fd8cE505f
0 ETH0.000820377.10631128
Unstake216565582025-01-19 5:51:23424 days ago1737265883IN
0x9D732AFA...fd8cE505f
0 ETH0.0003058414.44019666
Unstake216565302025-01-19 5:45:47424 days ago1737265547IN
0x9D732AFA...fd8cE505f
0 ETH0.0003255315.36979841
Stake DUEL216561522025-01-19 4:29:35424 days ago1737260975IN
0x9D732AFA...fd8cE505f
0 ETH0.0018488211.79768665
Unstake216460392025-01-17 18:35:35426 days ago1737138935IN
0x9D732AFA...fd8cE505f
0 ETH0.000826612.18583463
Unstake216314792025-01-15 17:48:59428 days ago1736963339IN
0x9D732AFA...fd8cE505f
0 ETH0.0007100313.62406635
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer229682582025-07-21 14:47:11241 days ago1753109231
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes229682582025-07-21 14:47:11241 days ago1753109231
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes229682582025-07-21 14:47:11241 days ago1753109231
0x9D732AFA...fd8cE505f
0 ETH
Transfer226737482025-06-10 11:05:11282 days ago1749553511
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes226737482025-06-10 11:05:11282 days ago1749553511
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes226737482025-06-10 11:05:11282 days ago1749553511
0x9D732AFA...fd8cE505f
0 ETH
Transfer223552072025-04-26 19:08:59327 days ago1745694539
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes223552072025-04-26 19:08:59327 days ago1745694539
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes223552072025-04-26 19:08:59327 days ago1745694539
0x9D732AFA...fd8cE505f
0 ETH
Transfer223233922025-04-22 8:36:59331 days ago1745311019
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes223233922025-04-22 8:36:59331 days ago1745311019
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes223233922025-04-22 8:36:59331 days ago1745311019
0x9D732AFA...fd8cE505f
0 ETH
Transfer222944782025-04-18 7:45:11335 days ago1744962311
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes222944782025-04-18 7:45:11335 days ago1744962311
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes222944782025-04-18 7:45:11335 days ago1744962311
0x9D732AFA...fd8cE505f
0 ETH
Transfer222876992025-04-17 9:04:11336 days ago1744880651
0x9D732AFA...fd8cE505f
0 ETH
Transfer222664112025-04-14 9:44:11339 days ago1744623851
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes222664112025-04-14 9:44:11339 days ago1744623851
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes222664112025-04-14 9:44:11339 days ago1744623851
0x9D732AFA...fd8cE505f
0 ETH
Transfer221478592025-03-28 20:41:35355 days ago1743194495
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes221478592025-03-28 20:41:35355 days ago1743194495
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes221478592025-03-28 20:41:35355 days ago1743194495
0x9D732AFA...fd8cE505f
0 ETH
Transfer220824982025-03-19 17:47:11365 days ago1742406431
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes220824982025-03-19 17:47:11365 days ago1742406431
0x9D732AFA...fd8cE505f
0 ETH
Wallet Stakes220824982025-03-19 17:47:11365 days ago1742406431
0x9D732AFA...fd8cE505f
0 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DUELStaking

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

contract DUELStakingV1 {
    struct Stake {
        uint256 amount;
        uint256 startTime;
        uint32 durationDays;
        bytes32 lastClaimedCheckpoint;
    }
    mapping(address => Stake[]) public walletStakes;
}

contract DUELStaking is Ownable {
    address public duelToken;
    DUELStakingV1 public stakesV1;
    mapping(address => bool) public v1transferred;

    struct Stake {
        uint256 amount;
        uint256 startTime;
        uint32 durationDays;
        bytes32 lastClaimedCheckpoint;
    }
    mapping(address => Stake[]) public walletStakes;

    address[] public allStakers;
    uint256 public allStakersLength;

    mapping(address => bytes32) public lastClaimedCheckpoint;
    bytes32 public currentCheckpoint;

    event Staked(address indexed wallet, uint256 amount, uint32 periodDays);
    event Unstaked(address indexed wallet, Stake stakeInfo);

    constructor(address _duelToken) Ownable(msg.sender) {
        duelToken = _duelToken;
    }

    function setDuelToken(address newContract) external onlyOwner {
        duelToken = newContract;
    }

    function setStakesV1(DUELStakingV1 newContract) external onlyOwner {
        stakesV1 = newContract;
    }

    function batchV1Transition(address[] memory wallets) external onlyOwner {
        for (uint16 i = 0; i < wallets.length; i++) {
            singleV1Transition(wallets[i]);
        }
    }

    function updateStakeCheckpoint(bytes32 newCheckpoint) external onlyOwner {
        currentCheckpoint = newCheckpoint;
    }

    function singleV1Transition(address wallet) public {
        require(
            wallet == _msgSender() ||
                _msgSender() == owner() ||
                _msgSender() == duelToken,
            "ACCESS_FORBIDDEN"
        );
        if (v1transferred[wallet]) {
            return;
        }

        for (uint8 j = 0; j < 255; j++) {
            try stakesV1.walletStakes(wallet, j) returns (
                uint256 amount,
                uint256 startTime,
                uint32 durationDays,
                bytes32 lastClaimed
            ) {
                if (amount == 0) continue;
                IERC20(duelToken).transferFrom(owner(), address(this), amount);
                Stake memory newStake = Stake(
                    amount,
                    startTime,
                    durationDays,
                    lastClaimed
                );
                walletStakes[wallet].push(newStake);
            } catch {
                break;
            }
        }
        allStakers.push(wallet);
        allStakersLength++;
        v1transferred[wallet] = true;
    }

    function stakeDUEL(uint256 amount, uint32 periodDays) external {
        if (!v1transferred[_msgSender()] && getStakesLength(_msgSender()) > 0) {
            singleV1Transition(_msgSender());
        }

        IERC20(duelToken).transferFrom(_msgSender(), address(this), amount);
        Stake memory newStake = Stake({
            amount: amount,
            startTime: block.timestamp,
            durationDays: periodDays,
            lastClaimedCheckpoint: ""
        });

        walletStakes[_msgSender()].push(newStake);
        allStakers.push(_msgSender());
        allStakersLength++;
        emit Staked(_msgSender(), amount, periodDays);
    }

    function stakeFor(
        address wallet,
        uint256 amount,
        uint32 periodDays
    ) public {
        require(
            _msgSender() == duelToken || _msgSender() == owner(),
            "ACCESS_FORBIDDEN"
        );
        if (!v1transferred[wallet] && getStakesLength(_msgSender()) > 0) {
            singleV1Transition(wallet);
        }

        IERC20(duelToken).transferFrom(owner(), address(this), amount);
        Stake memory newStake = Stake({
            amount: amount,
            startTime: block.timestamp,
            durationDays: periodDays,
            lastClaimedCheckpoint: ""
        });

        walletStakes[wallet].push(newStake);
        allStakers.push(wallet);
        allStakersLength++;
        emit Staked(wallet, amount, periodDays);
    }

    function updateStake(
        address wallet,
        uint256 index,
        uint256 _newAmount,
        uint256 _newStartTime,
        uint32 _newDurationDays,
        bytes32 _newLastClaimed
    ) external onlyOwner {
        Stake memory newStake = Stake(
            _newAmount,
            _newStartTime,
            _newDurationDays,
            _newLastClaimed
        );
        walletStakes[wallet][index] = newStake;
    }

    function getStakesLength(address wallet) public view returns (uint256) {
        uint256 total_length = walletStakes[wallet].length;

        if (!v1transferred[wallet] && stakesV1 != DUELStakingV1(address(0))) {
            for (uint8 j = 0; j < 255; j++) {
                try stakesV1.walletStakes(wallet, j) returns (
                    uint256 amount,
                    uint256,
                    uint32,
                    bytes32
                ) {
                    if (amount == 0) continue;
                    total_length++;
                } catch {
                    break;
                }
            }
        }

        return total_length;
    }

    function claimStake(
        uint16 index,
        uint256 amount,
        bytes32[] calldata merkleProof
    ) external {
        if (!v1transferred[_msgSender()] && getStakesLength(_msgSender()) > 0) {
            singleV1Transition(_msgSender());
        }

        Stake memory stakeInfo = walletStakes[_msgSender()][index];
        require(stakeInfo.amount > 0, "STAKE_INACTIVE");

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount));
        require(
            MerkleProof.verify(merkleProof, currentCheckpoint, leaf),
            "INCORRECT_PROOF"
        );
        require(
            lastClaimedCheckpoint[_msgSender()] != currentCheckpoint,
            "STAKE_CLAIMED"
        );

        lastClaimedCheckpoint[_msgSender()] = currentCheckpoint;
        IERC20(duelToken).transferFrom(owner(), _msgSender(), amount);
    }

    function getStake(
        address wallet,
        uint8 index
    ) external view returns (uint256, uint256, uint32, bytes32) {
        if (walletStakes[wallet].length > index) {
            Stake memory stakeInfo = walletStakes[_msgSender()][index];
            return (
                stakeInfo.amount,
                stakeInfo.startTime,
                stakeInfo.durationDays,
                stakeInfo.lastClaimedCheckpoint
            );
        }

        try stakesV1.walletStakes(wallet, index) returns (
            uint256 amount,
            uint256 startTime,
            uint32 durationDays,
            bytes32 lastClaimed
        ) {
            return (amount, startTime, durationDays, lastClaimed);
        } catch {
            return (0, 0, 0, "");
        }
    }

    function unstake(uint16 index) external {
        if (!v1transferred[_msgSender()] && getStakesLength(_msgSender()) > 0) {
            singleV1Transition(_msgSender());
        }

        Stake memory stakeInfo = walletStakes[_msgSender()][index];
        require(stakeInfo.amount > 0, "STAKE_INACTIVE");

        require(
            block.timestamp >= stakeInfo.startTime + stakeInfo.durationDays,
            "STAKE_LOCKED"
        );

        delete walletStakes[_msgSender()][index];
        IERC20(duelToken).transfer(_msgSender(), stakeInfo.amount);
        emit Unstaked(_msgSender(), stakeInfo);
    }

    function withdrawDUEL(uint256 amount) external onlyOwner {
        if (amount == 0) {
            amount = IERC20(duelToken).balanceOf(address(this));
        }
        IERC20(duelToken).transfer(_msgSender(), amount);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_duelToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"periodDays","type":"uint32"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint32","name":"durationDays","type":"uint32"},{"internalType":"bytes32","name":"lastClaimedCheckpoint","type":"bytes32"}],"indexed":false,"internalType":"struct DUELStaking.Stake","name":"stakeInfo","type":"tuple"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allStakers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allStakersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"}],"name":"batchV1Transition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"index","type":"uint16"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claimStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentCheckpoint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duelToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint8","name":"index","type":"uint8"}],"name":"getStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getStakesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimedCheckpoint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"newContract","type":"address"}],"name":"setDuelToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract DUELStakingV1","name":"newContract","type":"address"}],"name":"setStakesV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"singleV1Transition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint32","name":"periodDays","type":"uint32"}],"name":"stakeDUEL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint32","name":"periodDays","type":"uint32"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakesV1","outputs":[{"internalType":"contract DUELStakingV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"index","type":"uint16"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"_newAmount","type":"uint256"},{"internalType":"uint256","name":"_newStartTime","type":"uint256"},{"internalType":"uint32","name":"_newDurationDays","type":"uint32"},{"internalType":"bytes32","name":"_newLastClaimed","type":"bytes32"}],"name":"updateStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newCheckpoint","type":"bytes32"}],"name":"updateStakeCheckpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"v1transferred","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"walletStakes","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint32","name":"durationDays","type":"uint32"},{"internalType":"bytes32","name":"lastClaimedCheckpoint","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawDUEL","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001f8938038062001f8983398101604081905262000034916200011e565b338062000062576000604051631e4fbdf760e01b81526004016200005991906200015c565b60405180910390fd5b6200006d8162000094565b50600180546001600160a01b0319166001600160a01b03929092169190911790556200016c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b6200010281620000e4565b81146200010e57600080fd5b50565b8051620000f181620000f7565b600060208284031215620001355762000135600080fd5b600062000143848462000111565b949350505050565b6200015681620000e4565b82525050565b60208101620000f182846200014b565b611e0d806200017c6000396000f3fe608060405234801561001057600080fd5b50600436106101575760003560e01c8063909767d9116100c3578063e063f80a1161007c578063e063f80a146102ec578063e8e74cab146102ff578063ed1e4fd414610312578063f2fde38b14610325578063fb4bf89514610338578063fec5fe611461034b57600080fd5b8063909767d9146102845780639385408614610297578063acae5e76146102aa578063ba2918b0146102bd578063c3214d6c146102c6578063d7203760146102d957600080fd5b80635fcf41a7116101155780635fcf41a714610209578063604acd231461022957806365c9ce321461023c578063715018a61461024f5780637e68fe4e146102575780638da5cb5b1461026a57600080fd5b806246aba31461015c5780631f189d22146101715780633d64c485146101aa57806340f320bb146101bd57806347d28372146101d057806356a05323146101e6575b600080fd5b61016f61016a3660046114d0565b61036b565b005b61019461017f36600461151e565b60036020526000908152604090205460ff1681565b6040516101a19190611549565b60405180910390f35b61016f6101b8366004611576565b610589565b61016f6101cb3660046115bf565b6105b3565b6101d960085481565b6040516101a19190611615565b6101f96101f4366004611623565b6107e2565b6040516101a1949392919061166c565b60025461021c906001600160a01b031681565b6040516101a191906116ec565b61016f6102373660046116fa565b610831565b61016f61024a36600461176d565b61083e565b61016f610a52565b61016f6102653660046116fa565b610a66565b6000546001600160a01b03165b6040516101a191906117e4565b6101d961029236600461151e565b610b61565b61016f6102a53660046117f2565b610c60565b61016f6102b836600461151e565b610d11565b6101d960065481565b6102776102d43660046116fa565b610fbd565b600154610277906001600160a01b031681565b61016f6102fa36600461151e565b610fe7565b61016f61030d366004611983565b611011565b6101f96103203660046119d2565b611061565b61016f61033336600461151e565b61119f565b61016f610346366004611a05565b6111dd565b6101d961035936600461151e565b60076020526000908152604090205481565b3360009081526003602052604090205460ff161580156103935750600061039133610b61565b115b156103a1576103a133610d11565b336000908152600460205260408120805461ffff84169081106103c6576103c6611a38565b60009182526020918290206040805160808101825260049093029091018054808452600182015494840194909452600281015463ffffffff169183019190915260030154606082015291506104365760405162461bcd60e51b815260040161042d90611a76565b60405180910390fd5b806040015163ffffffff1681602001516104509190611a9c565b42101561046f5760405162461bcd60e51b815260040161042d90611ad2565b336000908152600460205260409020805461ffff841690811061049457610494611a38565b600091825260208220600490910201818155600180820183905560028201805463ffffffff19169055600390910191909155546001600160a01b031663a9059cbb6104dc3390565b83516040516001600160e01b031960e085901b168152610500929190600401611ae2565b6020604051808303816000875af115801561051f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105439190611b10565b50336001600160a01b03167f6a2762f2a1d8e5d3f36d965586099219c2c27bf3ef6e14ff76762a1cdcb5d5fa8260405161057d9190611b81565b60405180910390a25050565b6105916113a6565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316336001600160a01b031614806105df57506000546001600160a01b031633145b6105fb5760405162461bcd60e51b815260040161042d90611bb6565b6001600160a01b03831660009081526003602052604090205460ff1615801561062c5750600061062a33610b61565b115b1561063a5761063a83610d11565b6001546001600160a01b03166323b872dd61065d6000546001600160a01b031690565b30856040518463ffffffff1660e01b815260040161067d93929190611bc6565b6020604051808303816000875af115801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c09190611b10565b506040805160808101825283815242602080830191825263ffffffff8581168486019081526000606086018181526001600160a01b038b168083526004808752988320805460018082018355918552968420895197909a02909901958655955185890155915160028501805463ffffffff191691909416179092555160039092019190915560058054948501815581527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090930180546001600160a01b031916909117905560068054919261079483611bee565b9190505550836001600160a01b03167f1186a0fd4b6c8a1f60c379695fa5433d9528920b68d49c541a722a287e5de57884846040516107d4929190611c08565b60405180910390a250505050565b600460205281600052604060002081815481106107fe57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925063ffffffff9091169084565b6108396113a6565b600855565b3360009081526003602052604090205460ff161580156108665750600061086433610b61565b115b156108745761087433610d11565b336000908152600460205260408120805461ffff871690811061089957610899611a38565b60009182526020918290206040805160808101825260049093029091018054808452600182015494840194909452600281015463ffffffff169183019190915260030154606082015291506109005760405162461bcd60e51b815260040161042d90611a76565b60003385604051602001610915929190611c4b565b60405160208183030381529060405280519060200120905061096e8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060085491508490506113d3565b61098a5760405162461bcd60e51b815260040161042d90611c97565b60085433600090815260076020526040902054036109ba5760405162461bcd60e51b815260040161042d90611ccb565b6008543360008181526007602052604080822093909355600154905492516323b872dd60e01b81526001600160a01b03918216936323b872dd93610a0693909116918a90600401611bc6565b6020604051808303816000875af1158015610a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a499190611b10565b50505050505050565b610a5a6113a6565b610a6460006113eb565b565b610a6e6113a6565b80600003610aea576001546040516370a0823160e01b81526001600160a01b03909116906370a0823190610aa69030906004016117e4565b602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190611ce6565b90505b6001546001600160a01b031663a9059cbb33836040518363ffffffff1660e01b8152600401610b1a929190611ae2565b6020604051808303816000875af1158015610b39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5d9190611b10565b5050565b6001600160a01b038116600090815260046020908152604080832054600390925282205460ff16158015610b9f57506002546001600160a01b031615155b15610c5a5760005b60ff8160ff161015610c58576002546040516356a0532360e01b81526001600160a01b03909116906356a0532390610be59087908590600401611d1f565b608060405180830381865afa925050508015610c1e575060408051601f3d908101601f19168201909252610c1b91810190611d45565b60015b15610c585783600003610c345750505050610c46565b85610c3e81611bee565b965050505050505b80610c5081611da9565b915050610ba7565b505b92915050565b610c686113a6565b60408051608081018252858152602080820186905263ffffffff851682840152606082018490526001600160a01b0389166000908152600490915291909120805482919088908110610cbc57610cbc611a38565b6000918252602091829020835160049290920201908155908201516001820155604082015160028201805463ffffffff191663ffffffff90921691909117905560609091015160039091015550505050505050565b6001600160a01b038116331480610d3257506000546001600160a01b031633145b80610d5057506001546001600160a01b0316336001600160a01b0316145b610d6c5760405162461bcd60e51b815260040161042d90611bb6565b6001600160a01b03811660009081526003602052604090205460ff1615610d905750565b60005b60ff8160ff161015610f3b576002546040516356a0532360e01b81526001600160a01b03909116906356a0532390610dd19085908590600401611d1f565b608060405180830381865afa925050508015610e0a575060408051601f3d908101601f19168201909252610e0791810190611d45565b60015b15610f3b5783600003610e205750505050610f29565b6001546001600160a01b03166323b872dd610e436000546001600160a01b031690565b30876040518463ffffffff1660e01b8152600401610e6393929190611bc6565b6020604051808303816000875af1158015610e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea69190611b10565b5060408051608081018252948552602080860194855263ffffffff938416868301908152606087019384526001600160a01b0389166000908152600480845293812080546001808201835591835293909120975192909302909601908155935190840155925160028301805463ffffffff19169190921617905590516003909101555b80610f3381611da9565b915050610d93565b506005805460018101825560009182527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0384161790556006805491610f9483611bee565b90915550506001600160a01b03166000908152600360205260409020805460ff19166001179055565b60058181548110610fcd57600080fd5b6000918252602090912001546001600160a01b0316905081565b610fef6113a6565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6110196113a6565b60005b81518161ffff161015610b5d5761104f828261ffff168151811061104257611042611a38565b6020026020010151610d11565b8061105981611dbf565b91505061101c565b6001600160a01b03821660009081526004602052604081205481908190819060ff8616101561110b57336000908152600460205260408120805460ff88169081106110ae576110ae611a38565b600091825260209182902060408051608081018252600490930290910180548084526001820154948401859052600282015463ffffffff169284018390526003909101546060909301839052975091955090935091506111969050565b6002546040516356a0532360e01b81526001600160a01b03909116906356a053239061113d9089908990600401611d1f565b608060405180830381865afa925050508015611176575060408051601f3d908101601f1916820190925261117391810190611d45565b60015b61118b57506000925082915081905080611196565b929650909450925090505b92959194509250565b6111a76113a6565b6001600160a01b0381166111d1576000604051631e4fbdf760e01b815260040161042d91906117e4565b6111da816113eb565b50565b3360009081526003602052604090205460ff161580156112055750600061120333610b61565b115b156112135761121333610d11565b6001546001600160a01b03166323b872dd3330856040518463ffffffff1660e01b815260040161124593929190611bc6565b6020604051808303816000875af1158015611264573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112889190611b10565b506040805160808101825283815242602080830191825263ffffffff858116848601908152600060608601818152338083526004808752988320805460018082018355918552968420895197909a02909901958655955185890155915160028501805463ffffffff191691909416179092555160039092019190915560058054948501815581527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090930180546001600160a01b031916909117905560068054919261135383611bee565b919050555061135f3390565b6001600160a01b03167f1186a0fd4b6c8a1f60c379695fa5433d9528920b68d49c541a722a287e5de5788484604051611399929190611c08565b60405180910390a2505050565b6000546001600160a01b03163314610a64573360405163118cdaa760e01b815260040161042d91906117e4565b6000826113e0858461143b565b1490505b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b84518110156114805761146c8286838151811061145f5761145f611a38565b6020026020010151611488565b91508061147881611bee565b915050611440565b509392505050565b60008183106114a45760008281526020849052604090206113e4565b5060009182526020526040902090565b61ffff81165b81146111da57600080fd5b8035610c5a816114b4565b6000602082840312156114e5576114e5600080fd5b60006114f184846114c5565b949350505050565b60006001600160a01b038216610c5a565b6114ba816114f9565b8035610c5a8161150a565b60006020828403121561153357611533600080fd5b60006114f18484611513565b8015155b82525050565b60208101610c5a828461153f565b6000610c5a826114f9565b6114ba81611557565b8035610c5a81611562565b60006020828403121561158b5761158b600080fd5b60006114f1848461156b565b806114ba565b8035610c5a81611597565b63ffffffff81166114ba565b8035610c5a816115a8565b6000806000606084860312156115d7576115d7600080fd5b60006115e38686611513565b93505060206115f48682870161159d565b9250506040611605868287016115b4565b9150509250925092565b80611543565b60208101610c5a828461160f565b6000806040838503121561163957611639600080fd5b60006116458585611513565b92505060206116568582860161159d565b9150509250929050565b63ffffffff8116611543565b6080810161167a828761160f565b611687602083018661160f565b6116946040830185611660565b6116a1606083018461160f565b95945050505050565b6000610c5a6001600160a01b0383166116c1565b90565b6001600160a01b031690565b6000610c5a826116aa565b6000610c5a826116cd565b611543816116d8565b60208101610c5a82846116e3565b60006020828403121561170f5761170f600080fd5b60006114f1848461159d565b60008083601f84011261173057611730600080fd5b50813567ffffffffffffffff81111561174b5761174b600080fd5b60208301915083602082028301111561176657611766600080fd5b9250929050565b6000806000806060858703121561178657611786600080fd5b600061179287876114c5565b94505060206117a38782880161159d565b935050604085013567ffffffffffffffff8111156117c3576117c3600080fd5b6117cf8782880161171b565b95989497509550505050565b611543816114f9565b60208101610c5a82846117db565b60008060008060008060c0878903121561180e5761180e600080fd5b600061181a8989611513565b965050602061182b89828a0161159d565b955050604061183c89828a0161159d565b945050606061184d89828a0161159d565b935050608061185e89828a016115b4565b92505060a061186f89828a0161159d565b9150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156118b8576118b861187c565b6040525050565b60006118ca60405190565b90506118d68282611892565b919050565b600067ffffffffffffffff8211156118f5576118f561187c565b5060209081020190565b600061191261190d846118db565b6118bf565b8381529050602080820190840283018581111561193157611931600080fd5b835b8181101561195557806119468882611513565b84525060209283019201611933565b5050509392505050565b600082601f83011261197357611973600080fd5b81356114f18482602086016118ff565b60006020828403121561199857611998600080fd5b813567ffffffffffffffff8111156119b2576119b2600080fd5b6114f18482850161195f565b60ff81166114ba565b8035610c5a816119be565b600080604083850312156119e8576119e8600080fd5b60006119f48585611513565b9250506020611656858286016119c7565b60008060408385031215611a1b57611a1b600080fd5b6000611a27858561159d565b9250506020611656858286016115b4565b634e487b7160e01b600052603260045260246000fd5b600e81526000602082016d5354414b455f494e41435449564560901b815291505b5060200190565b60208082528101610c5a81611a4e565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c5a57610c5a611a86565b600c81526000602082016b14d51052d157d313d0d2d15160a21b81529150611a6f565b60208082528101610c5a81611aaf565b60408101611af082856117db565b6113e4602083018461160f565b8015156114ba565b8051610c5a81611afd565b600060208284031215611b2557611b25600080fd5b60006114f18484611b05565b80516080830190611b42848261160f565b506020820151611b55602085018261160f565b506040820151611b686040850182611660565b506060820151611b7b606085018261160f565b50505050565b60808101610c5a8284611b31565b601081526000602082016f20a1a1a2a9a9afa327a92124a22222a760811b81529150611a6f565b60208082528101610c5a81611b8f565b60608101611bd482866117db565b611be160208301856117db565b6114f1604083018461160f565b60006000198203611c0157611c01611a86565b5060010190565b60408101611c16828561160f565b6113e46020830184611660565b6000610c5a8260601b90565b6000610c5a82611c23565b611543611c46826114f9565b611c2f565b6000611c578285611c3a565b601482019150611c67828461160f565b5060200192915050565b600f81526000602082016e24a721a7a92922a1aa2fa82927a7a360891b81529150611a6f565b60208082528101610c5a81611c71565b600d81526000602082016c14d51052d157d0d31052535151609a1b81529150611a6f565b60208082528101610c5a81611ca7565b8051610c5a81611597565b600060208284031215611cfb57611cfb600080fd5b60006114f18484611cdb565b6000610c5a6116be60ff841681565b61154381611d07565b60408101611d2d82856117db565b6113e46020830184611d16565b8051610c5a816115a8565b60008060008060808587031215611d5e57611d5e600080fd5b6000611d6a8787611cdb565b9450506020611d7b87828801611cdb565b9350506040611d8c87828801611d3a565b9250506060611d9d87828801611cdb565b91505092959194509250565b60ff16600060fe198201611c0157611c01611a86565b61ffff16600061fffe198201611c0157611c01611a8656fea2646970667358221220971deafd0b9970845f50e602d207ece9e1ff864f4ac19bc51d23d48423e3877964736f6c63430008140033000000000000000000000000943af2ece93118b973c95c2f698ee9d15002e604

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101575760003560e01c8063909767d9116100c3578063e063f80a1161007c578063e063f80a146102ec578063e8e74cab146102ff578063ed1e4fd414610312578063f2fde38b14610325578063fb4bf89514610338578063fec5fe611461034b57600080fd5b8063909767d9146102845780639385408614610297578063acae5e76146102aa578063ba2918b0146102bd578063c3214d6c146102c6578063d7203760146102d957600080fd5b80635fcf41a7116101155780635fcf41a714610209578063604acd231461022957806365c9ce321461023c578063715018a61461024f5780637e68fe4e146102575780638da5cb5b1461026a57600080fd5b806246aba31461015c5780631f189d22146101715780633d64c485146101aa57806340f320bb146101bd57806347d28372146101d057806356a05323146101e6575b600080fd5b61016f61016a3660046114d0565b61036b565b005b61019461017f36600461151e565b60036020526000908152604090205460ff1681565b6040516101a19190611549565b60405180910390f35b61016f6101b8366004611576565b610589565b61016f6101cb3660046115bf565b6105b3565b6101d960085481565b6040516101a19190611615565b6101f96101f4366004611623565b6107e2565b6040516101a1949392919061166c565b60025461021c906001600160a01b031681565b6040516101a191906116ec565b61016f6102373660046116fa565b610831565b61016f61024a36600461176d565b61083e565b61016f610a52565b61016f6102653660046116fa565b610a66565b6000546001600160a01b03165b6040516101a191906117e4565b6101d961029236600461151e565b610b61565b61016f6102a53660046117f2565b610c60565b61016f6102b836600461151e565b610d11565b6101d960065481565b6102776102d43660046116fa565b610fbd565b600154610277906001600160a01b031681565b61016f6102fa36600461151e565b610fe7565b61016f61030d366004611983565b611011565b6101f96103203660046119d2565b611061565b61016f61033336600461151e565b61119f565b61016f610346366004611a05565b6111dd565b6101d961035936600461151e565b60076020526000908152604090205481565b3360009081526003602052604090205460ff161580156103935750600061039133610b61565b115b156103a1576103a133610d11565b336000908152600460205260408120805461ffff84169081106103c6576103c6611a38565b60009182526020918290206040805160808101825260049093029091018054808452600182015494840194909452600281015463ffffffff169183019190915260030154606082015291506104365760405162461bcd60e51b815260040161042d90611a76565b60405180910390fd5b806040015163ffffffff1681602001516104509190611a9c565b42101561046f5760405162461bcd60e51b815260040161042d90611ad2565b336000908152600460205260409020805461ffff841690811061049457610494611a38565b600091825260208220600490910201818155600180820183905560028201805463ffffffff19169055600390910191909155546001600160a01b031663a9059cbb6104dc3390565b83516040516001600160e01b031960e085901b168152610500929190600401611ae2565b6020604051808303816000875af115801561051f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105439190611b10565b50336001600160a01b03167f6a2762f2a1d8e5d3f36d965586099219c2c27bf3ef6e14ff76762a1cdcb5d5fa8260405161057d9190611b81565b60405180910390a25050565b6105916113a6565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316336001600160a01b031614806105df57506000546001600160a01b031633145b6105fb5760405162461bcd60e51b815260040161042d90611bb6565b6001600160a01b03831660009081526003602052604090205460ff1615801561062c5750600061062a33610b61565b115b1561063a5761063a83610d11565b6001546001600160a01b03166323b872dd61065d6000546001600160a01b031690565b30856040518463ffffffff1660e01b815260040161067d93929190611bc6565b6020604051808303816000875af115801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c09190611b10565b506040805160808101825283815242602080830191825263ffffffff8581168486019081526000606086018181526001600160a01b038b168083526004808752988320805460018082018355918552968420895197909a02909901958655955185890155915160028501805463ffffffff191691909416179092555160039092019190915560058054948501815581527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090930180546001600160a01b031916909117905560068054919261079483611bee565b9190505550836001600160a01b03167f1186a0fd4b6c8a1f60c379695fa5433d9528920b68d49c541a722a287e5de57884846040516107d4929190611c08565b60405180910390a250505050565b600460205281600052604060002081815481106107fe57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925063ffffffff9091169084565b6108396113a6565b600855565b3360009081526003602052604090205460ff161580156108665750600061086433610b61565b115b156108745761087433610d11565b336000908152600460205260408120805461ffff871690811061089957610899611a38565b60009182526020918290206040805160808101825260049093029091018054808452600182015494840194909452600281015463ffffffff169183019190915260030154606082015291506109005760405162461bcd60e51b815260040161042d90611a76565b60003385604051602001610915929190611c4b565b60405160208183030381529060405280519060200120905061096e8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060085491508490506113d3565b61098a5760405162461bcd60e51b815260040161042d90611c97565b60085433600090815260076020526040902054036109ba5760405162461bcd60e51b815260040161042d90611ccb565b6008543360008181526007602052604080822093909355600154905492516323b872dd60e01b81526001600160a01b03918216936323b872dd93610a0693909116918a90600401611bc6565b6020604051808303816000875af1158015610a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a499190611b10565b50505050505050565b610a5a6113a6565b610a6460006113eb565b565b610a6e6113a6565b80600003610aea576001546040516370a0823160e01b81526001600160a01b03909116906370a0823190610aa69030906004016117e4565b602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190611ce6565b90505b6001546001600160a01b031663a9059cbb33836040518363ffffffff1660e01b8152600401610b1a929190611ae2565b6020604051808303816000875af1158015610b39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5d9190611b10565b5050565b6001600160a01b038116600090815260046020908152604080832054600390925282205460ff16158015610b9f57506002546001600160a01b031615155b15610c5a5760005b60ff8160ff161015610c58576002546040516356a0532360e01b81526001600160a01b03909116906356a0532390610be59087908590600401611d1f565b608060405180830381865afa925050508015610c1e575060408051601f3d908101601f19168201909252610c1b91810190611d45565b60015b15610c585783600003610c345750505050610c46565b85610c3e81611bee565b965050505050505b80610c5081611da9565b915050610ba7565b505b92915050565b610c686113a6565b60408051608081018252858152602080820186905263ffffffff851682840152606082018490526001600160a01b0389166000908152600490915291909120805482919088908110610cbc57610cbc611a38565b6000918252602091829020835160049290920201908155908201516001820155604082015160028201805463ffffffff191663ffffffff90921691909117905560609091015160039091015550505050505050565b6001600160a01b038116331480610d3257506000546001600160a01b031633145b80610d5057506001546001600160a01b0316336001600160a01b0316145b610d6c5760405162461bcd60e51b815260040161042d90611bb6565b6001600160a01b03811660009081526003602052604090205460ff1615610d905750565b60005b60ff8160ff161015610f3b576002546040516356a0532360e01b81526001600160a01b03909116906356a0532390610dd19085908590600401611d1f565b608060405180830381865afa925050508015610e0a575060408051601f3d908101601f19168201909252610e0791810190611d45565b60015b15610f3b5783600003610e205750505050610f29565b6001546001600160a01b03166323b872dd610e436000546001600160a01b031690565b30876040518463ffffffff1660e01b8152600401610e6393929190611bc6565b6020604051808303816000875af1158015610e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea69190611b10565b5060408051608081018252948552602080860194855263ffffffff938416868301908152606087019384526001600160a01b0389166000908152600480845293812080546001808201835591835293909120975192909302909601908155935190840155925160028301805463ffffffff19169190921617905590516003909101555b80610f3381611da9565b915050610d93565b506005805460018101825560009182527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0384161790556006805491610f9483611bee565b90915550506001600160a01b03166000908152600360205260409020805460ff19166001179055565b60058181548110610fcd57600080fd5b6000918252602090912001546001600160a01b0316905081565b610fef6113a6565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6110196113a6565b60005b81518161ffff161015610b5d5761104f828261ffff168151811061104257611042611a38565b6020026020010151610d11565b8061105981611dbf565b91505061101c565b6001600160a01b03821660009081526004602052604081205481908190819060ff8616101561110b57336000908152600460205260408120805460ff88169081106110ae576110ae611a38565b600091825260209182902060408051608081018252600490930290910180548084526001820154948401859052600282015463ffffffff169284018390526003909101546060909301839052975091955090935091506111969050565b6002546040516356a0532360e01b81526001600160a01b03909116906356a053239061113d9089908990600401611d1f565b608060405180830381865afa925050508015611176575060408051601f3d908101601f1916820190925261117391810190611d45565b60015b61118b57506000925082915081905080611196565b929650909450925090505b92959194509250565b6111a76113a6565b6001600160a01b0381166111d1576000604051631e4fbdf760e01b815260040161042d91906117e4565b6111da816113eb565b50565b3360009081526003602052604090205460ff161580156112055750600061120333610b61565b115b156112135761121333610d11565b6001546001600160a01b03166323b872dd3330856040518463ffffffff1660e01b815260040161124593929190611bc6565b6020604051808303816000875af1158015611264573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112889190611b10565b506040805160808101825283815242602080830191825263ffffffff858116848601908152600060608601818152338083526004808752988320805460018082018355918552968420895197909a02909901958655955185890155915160028501805463ffffffff191691909416179092555160039092019190915560058054948501815581527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090930180546001600160a01b031916909117905560068054919261135383611bee565b919050555061135f3390565b6001600160a01b03167f1186a0fd4b6c8a1f60c379695fa5433d9528920b68d49c541a722a287e5de5788484604051611399929190611c08565b60405180910390a2505050565b6000546001600160a01b03163314610a64573360405163118cdaa760e01b815260040161042d91906117e4565b6000826113e0858461143b565b1490505b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b84518110156114805761146c8286838151811061145f5761145f611a38565b6020026020010151611488565b91508061147881611bee565b915050611440565b509392505050565b60008183106114a45760008281526020849052604090206113e4565b5060009182526020526040902090565b61ffff81165b81146111da57600080fd5b8035610c5a816114b4565b6000602082840312156114e5576114e5600080fd5b60006114f184846114c5565b949350505050565b60006001600160a01b038216610c5a565b6114ba816114f9565b8035610c5a8161150a565b60006020828403121561153357611533600080fd5b60006114f18484611513565b8015155b82525050565b60208101610c5a828461153f565b6000610c5a826114f9565b6114ba81611557565b8035610c5a81611562565b60006020828403121561158b5761158b600080fd5b60006114f1848461156b565b806114ba565b8035610c5a81611597565b63ffffffff81166114ba565b8035610c5a816115a8565b6000806000606084860312156115d7576115d7600080fd5b60006115e38686611513565b93505060206115f48682870161159d565b9250506040611605868287016115b4565b9150509250925092565b80611543565b60208101610c5a828461160f565b6000806040838503121561163957611639600080fd5b60006116458585611513565b92505060206116568582860161159d565b9150509250929050565b63ffffffff8116611543565b6080810161167a828761160f565b611687602083018661160f565b6116946040830185611660565b6116a1606083018461160f565b95945050505050565b6000610c5a6001600160a01b0383166116c1565b90565b6001600160a01b031690565b6000610c5a826116aa565b6000610c5a826116cd565b611543816116d8565b60208101610c5a82846116e3565b60006020828403121561170f5761170f600080fd5b60006114f1848461159d565b60008083601f84011261173057611730600080fd5b50813567ffffffffffffffff81111561174b5761174b600080fd5b60208301915083602082028301111561176657611766600080fd5b9250929050565b6000806000806060858703121561178657611786600080fd5b600061179287876114c5565b94505060206117a38782880161159d565b935050604085013567ffffffffffffffff8111156117c3576117c3600080fd5b6117cf8782880161171b565b95989497509550505050565b611543816114f9565b60208101610c5a82846117db565b60008060008060008060c0878903121561180e5761180e600080fd5b600061181a8989611513565b965050602061182b89828a0161159d565b955050604061183c89828a0161159d565b945050606061184d89828a0161159d565b935050608061185e89828a016115b4565b92505060a061186f89828a0161159d565b9150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156118b8576118b861187c565b6040525050565b60006118ca60405190565b90506118d68282611892565b919050565b600067ffffffffffffffff8211156118f5576118f561187c565b5060209081020190565b600061191261190d846118db565b6118bf565b8381529050602080820190840283018581111561193157611931600080fd5b835b8181101561195557806119468882611513565b84525060209283019201611933565b5050509392505050565b600082601f83011261197357611973600080fd5b81356114f18482602086016118ff565b60006020828403121561199857611998600080fd5b813567ffffffffffffffff8111156119b2576119b2600080fd5b6114f18482850161195f565b60ff81166114ba565b8035610c5a816119be565b600080604083850312156119e8576119e8600080fd5b60006119f48585611513565b9250506020611656858286016119c7565b60008060408385031215611a1b57611a1b600080fd5b6000611a27858561159d565b9250506020611656858286016115b4565b634e487b7160e01b600052603260045260246000fd5b600e81526000602082016d5354414b455f494e41435449564560901b815291505b5060200190565b60208082528101610c5a81611a4e565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c5a57610c5a611a86565b600c81526000602082016b14d51052d157d313d0d2d15160a21b81529150611a6f565b60208082528101610c5a81611aaf565b60408101611af082856117db565b6113e4602083018461160f565b8015156114ba565b8051610c5a81611afd565b600060208284031215611b2557611b25600080fd5b60006114f18484611b05565b80516080830190611b42848261160f565b506020820151611b55602085018261160f565b506040820151611b686040850182611660565b506060820151611b7b606085018261160f565b50505050565b60808101610c5a8284611b31565b601081526000602082016f20a1a1a2a9a9afa327a92124a22222a760811b81529150611a6f565b60208082528101610c5a81611b8f565b60608101611bd482866117db565b611be160208301856117db565b6114f1604083018461160f565b60006000198203611c0157611c01611a86565b5060010190565b60408101611c16828561160f565b6113e46020830184611660565b6000610c5a8260601b90565b6000610c5a82611c23565b611543611c46826114f9565b611c2f565b6000611c578285611c3a565b601482019150611c67828461160f565b5060200192915050565b600f81526000602082016e24a721a7a92922a1aa2fa82927a7a360891b81529150611a6f565b60208082528101610c5a81611c71565b600d81526000602082016c14d51052d157d0d31052535151609a1b81529150611a6f565b60208082528101610c5a81611ca7565b8051610c5a81611597565b600060208284031215611cfb57611cfb600080fd5b60006114f18484611cdb565b6000610c5a6116be60ff841681565b61154381611d07565b60408101611d2d82856117db565b6113e46020830184611d16565b8051610c5a816115a8565b60008060008060808587031215611d5e57611d5e600080fd5b6000611d6a8787611cdb565b9450506020611d7b87828801611cdb565b9350506040611d8c87828801611d3a565b9250506060611d9d87828801611cdb565b91505092959194509250565b60ff16600060fe198201611c0157611c01611a86565b61ffff16600061fffe198201611c0157611c01611a8656fea2646970667358221220971deafd0b9970845f50e602d207ece9e1ff864f4ac19bc51d23d48423e3877964736f6c63430008140033

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

000000000000000000000000943af2ece93118b973c95c2f698ee9d15002e604

-----Decoded View---------------
Arg [0] : _duelToken (address): 0x943Af2ece93118B973c95c2F698EE9D15002e604

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000943af2ece93118b973c95c2f698ee9d15002e604


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.