ETH Price: $3,734.47 (+18.55%)
Gas: 19 Gwei

Contract

0x88dF825e83f6ED8be19209AC52B8E67CfF00D447
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
List Trait199164082024-05-21 6:10:5912 hrs ago1716271859IN
0x88dF825e...CfF00D447
0 ETH0.001047598.52528532
Buy Trait199084162024-05-20 3:20:2339 hrs ago1716175223IN
0x88dF825e...CfF00D447
0.015 ETH0.000199963.29814789
Buy Trait199083862024-05-20 3:14:2339 hrs ago1716174863IN
0x88dF825e...CfF00D447
0.011 ETH0.000180222.97260315
Buy Trait199083742024-05-20 3:11:5939 hrs ago1716174719IN
0x88dF825e...CfF00D447
0.017 ETH0.000167752.76693063
Buy Trait199083722024-05-20 3:11:3539 hrs ago1716174695IN
0x88dF825e...CfF00D447
0.017 ETH0.000174072.8711353
List Trait199082402024-05-20 2:45:1139 hrs ago1716173111IN
0x88dF825e...CfF00D447
0 ETH0.000360442.93331044
List Trait199035552024-05-19 11:02:112 days ago1716116531IN
0x88dF825e...CfF00D447
0 ETH0.000382053.10911038
List Trait199035552024-05-19 11:02:112 days ago1716116531IN
0x88dF825e...CfF00D447
0 ETH0.000382053.10911038
List Trait199035452024-05-19 11:00:112 days ago1716116411IN
0x88dF825e...CfF00D447
0 ETH0.000378273.07897328
List Trait199035442024-05-19 10:59:592 days ago1716116399IN
0x88dF825e...CfF00D447
0 ETH0.000349442.84379399
List Trait199035412024-05-19 10:59:232 days ago1716116363IN
0x88dF825e...CfF00D447
0 ETH0.000388923.16539511
List Trait199035362024-05-19 10:58:232 days ago1716116303IN
0x88dF825e...CfF00D447
0 ETH0.000351992.86476557
List Trait199035362024-05-19 10:58:232 days ago1716116303IN
0x88dF825e...CfF00D447
0 ETH0.000351992.86476557
List Trait199035342024-05-19 10:57:592 days ago1716116279IN
0x88dF825e...CfF00D447
0 ETH0.000331592.69852561
List Trait199035282024-05-19 10:56:472 days ago1716116207IN
0x88dF825e...CfF00D447
0 ETH0.000336822.74130943
List Trait199035262024-05-19 10:56:112 days ago1716116171IN
0x88dF825e...CfF00D447
0 ETH0.00034542.81088817
Cancel Listing199035242024-05-19 10:55:472 days ago1716116147IN
0x88dF825e...CfF00D447
0 ETH0.0000942.91727923
List Trait199035222024-05-19 10:55:232 days ago1716116123IN
0x88dF825e...CfF00D447
0 ETH0.000346432.81928829
List Trait199035212024-05-19 10:55:112 days ago1716116111IN
0x88dF825e...CfF00D447
0 ETH0.000356172.89851522
List Trait199035192024-05-19 10:54:472 days ago1716116087IN
0x88dF825e...CfF00D447
0 ETH0.000334382.72121511
List Trait199035182024-05-19 10:54:352 days ago1716116075IN
0x88dF825e...CfF00D447
0 ETH0.00034192.78242297
List Trait199035112024-05-19 10:53:112 days ago1716115991IN
0x88dF825e...CfF00D447
0 ETH0.000360182.93115349
List Trait199035102024-05-19 10:52:592 days ago1716115979IN
0x88dF825e...CfF00D447
0 ETH0.000374493.04792688
List Trait199035052024-05-19 10:51:592 days ago1716115919IN
0x88dF825e...CfF00D447
0 ETH0.000327132.66224763
List Trait199035052024-05-19 10:51:592 days ago1716115919IN
0x88dF825e...CfF00D447
0 ETH0.000327212.66312847
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
199084162024-05-20 3:20:2339 hrs ago1716175223
0x88dF825e...CfF00D447
0.013875 ETH
199084162024-05-20 3:20:2339 hrs ago1716175223
0x88dF825e...CfF00D447
0.001125 ETH
199083862024-05-20 3:14:2339 hrs ago1716174863
0x88dF825e...CfF00D447
0.010175 ETH
199083862024-05-20 3:14:2339 hrs ago1716174863
0x88dF825e...CfF00D447
0.000825 ETH
199083742024-05-20 3:11:5939 hrs ago1716174719
0x88dF825e...CfF00D447
0.015725 ETH
199083742024-05-20 3:11:5939 hrs ago1716174719
0x88dF825e...CfF00D447
0.001275 ETH
199083722024-05-20 3:11:3539 hrs ago1716174695
0x88dF825e...CfF00D447
0.015725 ETH
199083722024-05-20 3:11:3539 hrs ago1716174695
0x88dF825e...CfF00D447
0.001275 ETH
198872902024-05-17 4:23:354 days ago1715919815
0x88dF825e...CfF00D447
0.0259 ETH
198872902024-05-17 4:23:354 days ago1715919815
0x88dF825e...CfF00D447
0.0021 ETH
196726472024-04-17 3:56:2334 days ago1713326183
0x88dF825e...CfF00D447
0.01665 ETH
196726472024-04-17 3:56:2334 days ago1713326183
0x88dF825e...CfF00D447
0.00135 ETH
194458582024-03-16 7:03:5966 days ago1710572639
0x88dF825e...CfF00D447
0.00925 ETH
194458582024-03-16 7:03:5966 days ago1710572639
0x88dF825e...CfF00D447
0.00075 ETH
194375442024-03-15 3:01:5967 days ago1710471719
0x88dF825e...CfF00D447
0.01665 ETH
194375442024-03-15 3:01:5967 days ago1710471719
0x88dF825e...CfF00D447
0.00135 ETH
194333442024-03-14 12:47:4768 days ago1710420467
0x88dF825e...CfF00D447
0.04625 ETH
194333442024-03-14 12:47:4768 days ago1710420467
0x88dF825e...CfF00D447
0.00375 ETH
193988612024-03-09 16:53:3573 days ago1710003215
0x88dF825e...CfF00D447
0.00925 ETH
193988612024-03-09 16:53:3573 days ago1710003215
0x88dF825e...CfF00D447
0.00075 ETH
193984122024-03-09 15:23:2373 days ago1709997803
0x88dF825e...CfF00D447
0.0111 ETH
193984122024-03-09 15:23:2373 days ago1709997803
0x88dF825e...CfF00D447
0.0009 ETH
193237692024-02-28 4:51:5983 days ago1709095919
0x88dF825e...CfF00D447
0.023125 ETH
193237692024-02-28 4:51:5983 days ago1709095919
0x88dF825e...CfF00D447
0.001875 ETH
193085182024-02-26 1:38:2385 days ago1708911503
0x88dF825e...CfF00D447
0.069375 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NDTrading

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion
File 1 of 6 : NDTrading.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

/**
 * @author Asteria 🍖
 * @title New Dawn Trading Contract
 * @notice Used to buy and sell traits on the New Dawn marketplace
 */
contract NDTrading is Ownable {
    using ECDSA for bytes32;

    /// @param  'Empty'      transactionId hasn't been used yet
    /// @param  'Active'     transactionId currently ongoing
    /// @param  'Finished'   transactionId has been used
    enum TxState {
        Empty,
        Active,
        Finished
    }

    struct Transaction {
        uint256 price;
        address seller;
        address buyer;
        uint256 expireAt;
        TxState state;
    }

    event ListTrait(uint256 indexed transactionId);
    event CancelListing(uint256 indexed transactionId);
    event BuyTrait(uint256 indexed transactionId, address indexed wallet);
    event BuyingDisabled();

    /// @notice signer used for ECDSA verification
    address private signer;

    /// @notice min amount of time to keep a trait listed
    uint48 public minExpiry = 1 days;

    /// @notice max amount of time to keep a trait listed
    uint48 public maxExpiry = 180 days;

    address payable public NDRoyaltyAddress;
    uint96 public NDRoyaltyPercentage;

    /// @notice safe guard from malicious royalty setting. Set to 10%
    uint256 public constant MAX_PERCENTAGE = 1000;

    /// @notice mapping from id to 'Transaction' to hold all empty, active, or finished transactions
    mapping(uint256 txId => Transaction txInfo) public transactions;

    /// @notice safe guard against compromised owner
    bool private buyingDisabled;

    /// @param  _signer address of the expected recovered address for 'validSignature()'
    /// @param  _ndRoyaltyAddress address where royalties are sent from 'buyTrait()'
    /// @param  _ndRoyaltyPercentage percentage of royalties sent from 'buyTrait()'
    ///         (eg. 100 -> 1%)
    constructor(
        address _signer,
        address payable _ndRoyaltyAddress,
        uint256 _ndRoyaltyPercentage
    ) {
        require(
            _ndRoyaltyPercentage < MAX_PERCENTAGE,
            "ND: percentage too high"
        );

        signer = _signer;
        NDRoyaltyAddress = _ndRoyaltyAddress;
        NDRoyaltyPercentage = uint96(_ndRoyaltyPercentage);
    }

    // ---------------------------------------------------------- //
    // ------------------------ INTERNAL ------------------------ //
    // ---------------------------------------------------------- //
    function validSignature(
        uint256 price,
        uint256 expireAt,
        address buyer,
        uint256 transactionId,
        bytes memory signature
    ) internal view {
        bytes32 hash = keccak256(
            abi.encodePacked(
                "\x19Ethereum Signed Message:\n32",
                keccak256(
                    abi.encodePacked(
                        price,
                        expireAt,
                        buyer,
                        transactionId,
                        msg.sender
                    )
                )
            )
        );
        require(signer == hash.recover(signature), "ND: unauthorized");
    }

    function calcRoyalties(
        uint256 price
    ) internal view returns (uint256 toSeller, uint256 toRoyaltyAddr) {
        toRoyaltyAddr = (price * NDRoyaltyPercentage) / 1e4;
        toSeller = price - toRoyaltyAddr;
    }

    function transferPayments(
        address payable seller,
        uint256 toSeller,
        uint256 toRoyaltyAddr
    ) internal {
        (bool royaltySuccess, ) = NDRoyaltyAddress.call{value: toRoyaltyAddr}(
            ""
        );
        require(royaltySuccess, "ND: royalty transfer failed");

        (bool sellerSuccess, ) = seller.call{value: toSeller}("");
        require(sellerSuccess, "ND: seller transfer failed");
    }

    // ---------------------------------------------------------- //
    // ------------------------ EXTERNAL ------------------------ //
    // ---------------------------------------------------------- //
    /// @notice allows listing traits on the new dawn trait marketplace
    /// @param price amount in ETH to list the given trait for
    /// @param expireAt 'block.timestamp' of when to expire the current 'signature'
    /// @param buyer optional address of who can buy the specific trait
    /// @param transactionId specific id to be emitted and listened for off-chain
    /// @param signature bytes signature signed by 'signer'
    function listTrait(
        uint256 price,
        uint256 expireAt,
        address buyer,
        uint256 transactionId,
        bytes memory signature
    ) external {
        require(price > 0, "ND: invalid price");
        require(expireAt < block.timestamp + maxExpiry, "ND: expiry too long");
        require(expireAt > block.timestamp + minExpiry, "ND: expiry too short");

        Transaction storage transaction = transactions[transactionId];
        require(transaction.state == TxState.Empty, "ND: txId not empty");

        validSignature(price, expireAt, buyer, transactionId, signature);

        transaction.price = price;
        transaction.seller = msg.sender;
        transaction.buyer = buyer;
        transaction.expireAt = expireAt;
        transaction.state = TxState.Active;

        emit ListTrait(transactionId);
    }

    /// @notice allows cancelling a previously listed trait(s) on the new dawn trait martetplace
    /// @param transactionId specific id mapped to a specific transaction to cancel
    /// custom:reverts if state isn't active or seller doesn't equal msg.sender
    ///                it won't revert if the transaction's 'expireAt' has been met
    function cancelListing(uint256 transactionId) external {
        Transaction storage txn = transactions[transactionId];
        if (txn.expireAt > block.timestamp) {
            require(txn.state == TxState.Active, "ND: listing not active");
            require(msg.sender == txn.seller, "ND: not seller");
        }

        txn.state = TxState.Finished;
        emit CancelListing(transactionId);
    }

    /// @notice allows users to buy previously listed trait(s) on the new dawn trait martetplace
    /// @param transactionId specific id mapped to a specific transaction to buy
    function buyTrait(uint256 transactionId) external payable {
        require(!buyingDisabled, "ND: buying disabled");

        Transaction storage txn = transactions[transactionId];

        (uint256 toSeller, uint256 toRoyaltyAddr) = calcRoyalties(txn.price);

        require(txn.state == TxState.Active, "ND: listing not active");
        require(txn.expireAt > block.timestamp, "ND: transaction expired");
        require(txn.price == msg.value, "ND: invalid value");
        require(txn.seller != msg.sender, "ND: seller cannot be buyer");
        if (txn.buyer != address(0))
            require(txn.buyer == msg.sender, "ND: invalid buyer");

        address payable seller = payable(txn.seller);
        txn.state = TxState.Finished;

        transferPayments(seller, toSeller, toRoyaltyAddr);

        emit BuyTrait(transactionId, msg.sender);
    }

    // ------------------------------------------------------------ //
    // ------------------------ ONLY OWNER ------------------------ //
    // ------------------------------------------------------------ //
    /// @notice sets 'signer'
    ///         only callable by 'owner'
    function setSigner(address _signer) external onlyOwner {
        signer = _signer;
    }

    /// @notice sets 'NDRoyaltyAddress' 'NDRoyaltyPercentage'
    ///         only callable by 'owner'
    function setRoyaltyInfo(
        address payable _royaltyAddress,
        uint256 _royaltyPercentage
    ) external onlyOwner {
        require(_royaltyPercentage < MAX_PERCENTAGE, "ND: percentage too high");

        NDRoyaltyAddress = _royaltyAddress;
        NDRoyaltyPercentage = uint96(_royaltyPercentage);
    }

    /// @notice sets 'transactions['transactionId']' to '_txInfo'
    ///         only callable by 'owner'
    function setTransactionDetails(
        uint256 transactionId,
        Transaction calldata _txInfo
    ) external onlyOwner {
        transactions[transactionId] = _txInfo;
    }

    /// @notice sets 'minExpiry' and 'maxExpiry
    ///         only callable by 'owner'
    function setExpiries(
        uint48 newMinExpiry,
        uint48 newMaxExpiry
    ) external onlyOwner {
        minExpiry = newMinExpiry;
        maxExpiry = newMaxExpiry;
    }

    /// @notice sets 'BuyingDisabled' to true
    ///         only callable by 'owner'
    function disableBuying() external onlyOwner {
        buyingDisabled = true;
        emit BuyingDisabled();
    }
}

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 : 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 4 of 6 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 5000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "murky/=lib/murky/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address payable","name":"_ndRoyaltyAddress","type":"address"},{"internalType":"uint256","name":"_ndRoyaltyPercentage","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"transactionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"}],"name":"BuyTrait","type":"event"},{"anonymous":false,"inputs":[],"name":"BuyingDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"transactionId","type":"uint256"}],"name":"CancelListing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"transactionId","type":"uint256"}],"name":"ListTrait","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"},{"inputs":[],"name":"MAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NDRoyaltyAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NDRoyaltyPercentage","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"transactionId","type":"uint256"}],"name":"buyTrait","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"transactionId","type":"uint256"}],"name":"cancelListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableBuying","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expireAt","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"transactionId","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"listTrait","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxExpiry","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minExpiry","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"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":"uint48","name":"newMinExpiry","type":"uint48"},{"internalType":"uint48","name":"newMaxExpiry","type":"uint48"}],"name":"setExpiries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_royaltyAddress","type":"address"},{"internalType":"uint256","name":"_royaltyPercentage","type":"uint256"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"transactionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"expireAt","type":"uint256"},{"internalType":"enum NDTrading.TxState","name":"state","type":"uint8"}],"internalType":"struct NDTrading.Transaction","name":"_txInfo","type":"tuple"}],"name":"setTransactionDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"txId","type":"uint256"}],"name":"transactions","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"expireAt","type":"uint256"},{"internalType":"enum NDTrading.TxState","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600180546001600160a01b03167ced4e0000000001518000000000000000000000000000000000000000001790553480156200003f57600080fd5b50604051620018ab380380620018ab833981016040819052620000629162000165565b6200006d33620000fc565b6103e88110620000c35760405162461bcd60e51b815260206004820152601760248201527f4e443a2070657263656e7461676520746f6f2068696768000000000000000000604482015260640160405180910390fd5b600180546001600160a01b039485166001600160a01b03199091161790556001600160601b0316600160a01b02911617600255620001ad565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200016257600080fd5b50565b6000806000606084860312156200017b57600080fd5b835162000188816200014c565b60208501519093506200019b816200014c565b80925050604084015190509250925092565b6116ee80620001bd6000396000f3fe60806040526004361061010e5760003560e01c8063715018a6116100a5578063a7360f0a11610074578063e2e784d511610059578063e2e784d514610389578063e6fb6a2e146103a9578063f2fde38b146103e057600080fd5b8063a7360f0a14610349578063b91377961461036957600080fd5b8063715018a6146102585780638da5cb5b1461026d57806394be834d1461028b5780639ace38c2146102df57600080fd5b80633ab907b8116100e15780633ab907b8146101e15780634c255c97146102015780636273ca2c146102255780636c19e7831461023857600080fd5b806305daecbe14610113578063247f993b146101725780632e6530d614610189578063305a67a8146101c1575b600080fd5b34801561011f57600080fd5b50600254610150907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561017e57600080fd5b50610187610400565b005b34801561019557600080fd5b506002546101a9906001600160a01b031681565b6040516001600160a01b039091168152602001610169565b3480156101cd57600080fd5b506101876101dc3660046112a1565b610440565b3480156101ed57600080fd5b506101876101fc3660046112ba565b610563565b34801561020d57600080fd5b506102176103e881565b604051908152602001610169565b6101876102333660046112a1565b61058b565b34801561024457600080fd5b50610187610253366004611307565b610835565b34801561026457600080fd5b50610187610877565b34801561027957600080fd5b506000546001600160a01b03166101a9565b34801561029757600080fd5b506001546102c8907a010000000000000000000000000000000000000000000000000000900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610169565b3480156102eb57600080fd5b506103386102fa3660046112a1565b60036020819052600091825260409091208054600182015460028301549383015460049093015491936001600160a01b039182169391169160ff1685565b60405161016995949392919061135a565b34801561035557600080fd5b506101876103643660046113f5565b61088b565b34801561037557600080fd5b506101876103843660046114f1565b610aed565b34801561039557600080fd5b506101876103a4366004611524565b610b6c565b3480156103b557600080fd5b506001546102c89074010000000000000000000000000000000000000000900465ffffffffffff1681565b3480156103ec57600080fd5b506101876103fb366004611307565b610bfb565b610408610c8b565b6004805460ff191660011790556040517f44c1679cca34073ce70fed616f995237808d9599a35669fd39f3afd053e2b9b190600090a1565b600081815260036020819052604090912090810154421015610525576001600482015460ff1660028111156104775761047761132b565b146104c95760405162461bcd60e51b815260206004820152601660248201527f4e443a206c697374696e67206e6f74206163746976650000000000000000000060448201526064015b60405180910390fd5b60018101546001600160a01b031633146105255760405162461bcd60e51b815260206004820152600e60248201527f4e443a206e6f742073656c6c657200000000000000000000000000000000000060448201526064016104c0565b60048101805460ff1916600217905560405182907fa5a50019386103d06e1a716ed5398f455d38288e801607ee55320507043468e590600090a25050565b61056b610c8b565b600082815260036020526040902081906105858282611550565b50505050565b60045460ff16156105de5760405162461bcd60e51b815260206004820152601360248201527f4e443a20627579696e672064697361626c65640000000000000000000000000060448201526064016104c0565b6000818152600360205260408120805490919081906105fc90610ce5565b90925090506001600484015460ff16600281111561061c5761061c61132b565b146106695760405162461bcd60e51b815260206004820152601660248201527f4e443a206c697374696e67206e6f74206163746976650000000000000000000060448201526064016104c0565b428360030154116106bc5760405162461bcd60e51b815260206004820152601760248201527f4e443a207472616e73616374696f6e206578706972656400000000000000000060448201526064016104c0565b8254341461070c5760405162461bcd60e51b815260206004820152601160248201527f4e443a20696e76616c69642076616c756500000000000000000000000000000060448201526064016104c0565b6001830154336001600160a01b039091160361076a5760405162461bcd60e51b815260206004820152601a60248201527f4e443a2073656c6c65722063616e6e6f7420626520627579657200000000000060448201526064016104c0565b60028301546001600160a01b0316156107d95760028301546001600160a01b031633146107d95760405162461bcd60e51b815260206004820152601160248201527f4e443a20696e76616c696420627579657200000000000000000000000000000060448201526064016104c0565b600183015460048401805460ff191660021790556001600160a01b0316610801818484610d3e565b604051339086907fa38911f181a96395e9f6de4799216f37341a16f8fe08414cd061a000030e7dad90600090a35050505050565b61083d610c8b565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b61087f610c8b565b6108896000610e8b565b565b600085116108db5760405162461bcd60e51b815260206004820152601160248201527f4e443a20696e76616c696420707269636500000000000000000000000000000060448201526064016104c0565b60015461090e907a010000000000000000000000000000000000000000000000000000900465ffffffffffff1642611640565b841061095c5760405162461bcd60e51b815260206004820152601360248201527f4e443a2065787069727920746f6f206c6f6e670000000000000000000000000060448201526064016104c0565b6001546109899074010000000000000000000000000000000000000000900465ffffffffffff1642611640565b84116109d75760405162461bcd60e51b815260206004820152601460248201527f4e443a2065787069727920746f6f2073686f727400000000000000000000000060448201526064016104c0565b600082815260036020526040812090600482015460ff1660028111156109ff576109ff61132b565b14610a4c5760405162461bcd60e51b815260206004820152601260248201527f4e443a2074784964206e6f7420656d707479000000000000000000000000000060448201526064016104c0565b610a598686868686610ef3565b85815560018082018054337fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556002830180549091166001600160a01b0387161790556003820186905560048201805460ff19168280021790555060405183907f12d6a435dbdd2073d7333c3f8bbe5421f64e875c77d2d4a297a9a5faf78504c190600090a2505050505050565b610af5610c8b565b600180546001600160a01b03167401000000000000000000000000000000000000000065ffffffffffff9485160279ffffffffffffffffffffffffffffffffffffffffffffffffffff16177a0100000000000000000000000000000000000000000000000000009290931691909102919091179055565b610b74610c8b565b6103e88110610bc55760405162461bcd60e51b815260206004820152601760248201527f4e443a2070657263656e7461676520746f6f206869676800000000000000000060448201526064016104c0565b6bffffffffffffffffffffffff1674010000000000000000000000000000000000000000026001600160a01b0390911617600255565b610c03610c8b565b6001600160a01b038116610c7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c0565b610c8881610e8b565b50565b6000546001600160a01b031633146108895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104c0565b600254600090819061271090610d21907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1685611653565b610d2b919061166a565b9050610d3781846116a5565b9150915091565b6002546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610d8b576040519150601f19603f3d011682016040523d82523d6000602084013e610d90565b606091505b5050905080610de15760405162461bcd60e51b815260206004820152601b60248201527f4e443a20726f79616c7479207472616e73666572206661696c6564000000000060448201526064016104c0565b6000846001600160a01b03168460405160006040518083038185875af1925050503d8060008114610e2e576040519150601f19603f3d011682016040523d82523d6000602084013e610e33565b606091505b5050905080610e845760405162461bcd60e51b815260206004820152601a60248201527f4e443a2073656c6c6572207472616e73666572206661696c656400000000000060448201526064016104c0565b5050505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805160208082018890528183018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087811b8216818501526074840187905233901b1660948301528251808303608801815260a8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c884015260e480840191909152835180840390910181526101049092019092528051910120610fa8818361100d565b6001546001600160a01b039081169116146110055760405162461bcd60e51b815260206004820152601060248201527f4e443a20756e617574686f72697a65640000000000000000000000000000000060448201526064016104c0565b505050505050565b600080600061101c8585611033565b9150915061102981611078565b5090505b92915050565b60008082516041036110695760208301516040840151606085015160001a61105d878285856111dd565b94509450505050611071565b506000905060025b9250929050565b600081600481111561108c5761108c61132b565b036110945750565b60018160048111156110a8576110a861132b565b036110f55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c0565b60028160048111156111095761110961132b565b036111565760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c0565b600381600481111561116a5761116a61132b565b03610c885760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104c0565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112145750600090506003611298565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611268573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661129157600060019250925050611298565b9150600090505b94509492505050565b6000602082840312156112b357600080fd5b5035919050565b60008082840360c08112156112ce57600080fd5b8335925060a0601f19820112156112e457600080fd5b506020830190509250929050565b6001600160a01b0381168114610c8857600080fd5b60006020828403121561131957600080fd5b8135611324816112f2565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8581526001600160a01b038581166020830152841660408201526060810183905260a08101600383106113b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8260808301529695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080600060a0868803121561140d57600080fd5b85359450602086013593506040860135611426816112f2565b925060608601359150608086013567ffffffffffffffff8082111561144a57600080fd5b818801915088601f83011261145e57600080fd5b813581811115611470576114706113c6565b604051601f8201601f19908116603f01168101908382118183101715611498576114986113c6565b816040528281528b60208487010111156114b157600080fd5b8260208601602083013760006020848301015280955050505050509295509295909350565b803565ffffffffffff811681146114ec57600080fd5b919050565b6000806040838503121561150457600080fd5b61150d836114d6565b915061151b602084016114d6565b90509250929050565b6000806040838503121561153757600080fd5b8235611542816112f2565b946020939093013593505050565b813581556020820135611562816112f2565b6001820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555060408201356115a6816112f2565b6002820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555060608201356003820155600481016080830135600381106115fc57600080fd5b60ff1982541660ff8216811783555050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561102d5761102d611611565b808202811582820484141761102d5761102d611611565b6000826116a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561102d5761102d61161156fea2646970667358221220098cfffc717d8f0cea995c30db2d1f801c26be3e34e28e13cecf1cee823a31db64736f6c6343000812003300000000000000000000000034e80264f020b5ce469c3faf4374c1d8607a3930000000000000000000000000ddcc87f1d5801ba46dee90932fb83509d5c9947c00000000000000000000000000000000000000000000000000000000000002ee

Deployed Bytecode

0x60806040526004361061010e5760003560e01c8063715018a6116100a5578063a7360f0a11610074578063e2e784d511610059578063e2e784d514610389578063e6fb6a2e146103a9578063f2fde38b146103e057600080fd5b8063a7360f0a14610349578063b91377961461036957600080fd5b8063715018a6146102585780638da5cb5b1461026d57806394be834d1461028b5780639ace38c2146102df57600080fd5b80633ab907b8116100e15780633ab907b8146101e15780634c255c97146102015780636273ca2c146102255780636c19e7831461023857600080fd5b806305daecbe14610113578063247f993b146101725780632e6530d614610189578063305a67a8146101c1575b600080fd5b34801561011f57600080fd5b50600254610150907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561017e57600080fd5b50610187610400565b005b34801561019557600080fd5b506002546101a9906001600160a01b031681565b6040516001600160a01b039091168152602001610169565b3480156101cd57600080fd5b506101876101dc3660046112a1565b610440565b3480156101ed57600080fd5b506101876101fc3660046112ba565b610563565b34801561020d57600080fd5b506102176103e881565b604051908152602001610169565b6101876102333660046112a1565b61058b565b34801561024457600080fd5b50610187610253366004611307565b610835565b34801561026457600080fd5b50610187610877565b34801561027957600080fd5b506000546001600160a01b03166101a9565b34801561029757600080fd5b506001546102c8907a010000000000000000000000000000000000000000000000000000900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610169565b3480156102eb57600080fd5b506103386102fa3660046112a1565b60036020819052600091825260409091208054600182015460028301549383015460049093015491936001600160a01b039182169391169160ff1685565b60405161016995949392919061135a565b34801561035557600080fd5b506101876103643660046113f5565b61088b565b34801561037557600080fd5b506101876103843660046114f1565b610aed565b34801561039557600080fd5b506101876103a4366004611524565b610b6c565b3480156103b557600080fd5b506001546102c89074010000000000000000000000000000000000000000900465ffffffffffff1681565b3480156103ec57600080fd5b506101876103fb366004611307565b610bfb565b610408610c8b565b6004805460ff191660011790556040517f44c1679cca34073ce70fed616f995237808d9599a35669fd39f3afd053e2b9b190600090a1565b600081815260036020819052604090912090810154421015610525576001600482015460ff1660028111156104775761047761132b565b146104c95760405162461bcd60e51b815260206004820152601660248201527f4e443a206c697374696e67206e6f74206163746976650000000000000000000060448201526064015b60405180910390fd5b60018101546001600160a01b031633146105255760405162461bcd60e51b815260206004820152600e60248201527f4e443a206e6f742073656c6c657200000000000000000000000000000000000060448201526064016104c0565b60048101805460ff1916600217905560405182907fa5a50019386103d06e1a716ed5398f455d38288e801607ee55320507043468e590600090a25050565b61056b610c8b565b600082815260036020526040902081906105858282611550565b50505050565b60045460ff16156105de5760405162461bcd60e51b815260206004820152601360248201527f4e443a20627579696e672064697361626c65640000000000000000000000000060448201526064016104c0565b6000818152600360205260408120805490919081906105fc90610ce5565b90925090506001600484015460ff16600281111561061c5761061c61132b565b146106695760405162461bcd60e51b815260206004820152601660248201527f4e443a206c697374696e67206e6f74206163746976650000000000000000000060448201526064016104c0565b428360030154116106bc5760405162461bcd60e51b815260206004820152601760248201527f4e443a207472616e73616374696f6e206578706972656400000000000000000060448201526064016104c0565b8254341461070c5760405162461bcd60e51b815260206004820152601160248201527f4e443a20696e76616c69642076616c756500000000000000000000000000000060448201526064016104c0565b6001830154336001600160a01b039091160361076a5760405162461bcd60e51b815260206004820152601a60248201527f4e443a2073656c6c65722063616e6e6f7420626520627579657200000000000060448201526064016104c0565b60028301546001600160a01b0316156107d95760028301546001600160a01b031633146107d95760405162461bcd60e51b815260206004820152601160248201527f4e443a20696e76616c696420627579657200000000000000000000000000000060448201526064016104c0565b600183015460048401805460ff191660021790556001600160a01b0316610801818484610d3e565b604051339086907fa38911f181a96395e9f6de4799216f37341a16f8fe08414cd061a000030e7dad90600090a35050505050565b61083d610c8b565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b61087f610c8b565b6108896000610e8b565b565b600085116108db5760405162461bcd60e51b815260206004820152601160248201527f4e443a20696e76616c696420707269636500000000000000000000000000000060448201526064016104c0565b60015461090e907a010000000000000000000000000000000000000000000000000000900465ffffffffffff1642611640565b841061095c5760405162461bcd60e51b815260206004820152601360248201527f4e443a2065787069727920746f6f206c6f6e670000000000000000000000000060448201526064016104c0565b6001546109899074010000000000000000000000000000000000000000900465ffffffffffff1642611640565b84116109d75760405162461bcd60e51b815260206004820152601460248201527f4e443a2065787069727920746f6f2073686f727400000000000000000000000060448201526064016104c0565b600082815260036020526040812090600482015460ff1660028111156109ff576109ff61132b565b14610a4c5760405162461bcd60e51b815260206004820152601260248201527f4e443a2074784964206e6f7420656d707479000000000000000000000000000060448201526064016104c0565b610a598686868686610ef3565b85815560018082018054337fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556002830180549091166001600160a01b0387161790556003820186905560048201805460ff19168280021790555060405183907f12d6a435dbdd2073d7333c3f8bbe5421f64e875c77d2d4a297a9a5faf78504c190600090a2505050505050565b610af5610c8b565b600180546001600160a01b03167401000000000000000000000000000000000000000065ffffffffffff9485160279ffffffffffffffffffffffffffffffffffffffffffffffffffff16177a0100000000000000000000000000000000000000000000000000009290931691909102919091179055565b610b74610c8b565b6103e88110610bc55760405162461bcd60e51b815260206004820152601760248201527f4e443a2070657263656e7461676520746f6f206869676800000000000000000060448201526064016104c0565b6bffffffffffffffffffffffff1674010000000000000000000000000000000000000000026001600160a01b0390911617600255565b610c03610c8b565b6001600160a01b038116610c7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104c0565b610c8881610e8b565b50565b6000546001600160a01b031633146108895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104c0565b600254600090819061271090610d21907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1685611653565b610d2b919061166a565b9050610d3781846116a5565b9150915091565b6002546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610d8b576040519150601f19603f3d011682016040523d82523d6000602084013e610d90565b606091505b5050905080610de15760405162461bcd60e51b815260206004820152601b60248201527f4e443a20726f79616c7479207472616e73666572206661696c6564000000000060448201526064016104c0565b6000846001600160a01b03168460405160006040518083038185875af1925050503d8060008114610e2e576040519150601f19603f3d011682016040523d82523d6000602084013e610e33565b606091505b5050905080610e845760405162461bcd60e51b815260206004820152601a60248201527f4e443a2073656c6c6572207472616e73666572206661696c656400000000000060448201526064016104c0565b5050505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805160208082018890528183018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087811b8216818501526074840187905233901b1660948301528251808303608801815260a8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060c884015260e480840191909152835180840390910181526101049092019092528051910120610fa8818361100d565b6001546001600160a01b039081169116146110055760405162461bcd60e51b815260206004820152601060248201527f4e443a20756e617574686f72697a65640000000000000000000000000000000060448201526064016104c0565b505050505050565b600080600061101c8585611033565b9150915061102981611078565b5090505b92915050565b60008082516041036110695760208301516040840151606085015160001a61105d878285856111dd565b94509450505050611071565b506000905060025b9250929050565b600081600481111561108c5761108c61132b565b036110945750565b60018160048111156110a8576110a861132b565b036110f55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c0565b60028160048111156111095761110961132b565b036111565760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c0565b600381600481111561116a5761116a61132b565b03610c885760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104c0565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112145750600090506003611298565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611268573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661129157600060019250925050611298565b9150600090505b94509492505050565b6000602082840312156112b357600080fd5b5035919050565b60008082840360c08112156112ce57600080fd5b8335925060a0601f19820112156112e457600080fd5b506020830190509250929050565b6001600160a01b0381168114610c8857600080fd5b60006020828403121561131957600080fd5b8135611324816112f2565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8581526001600160a01b038581166020830152841660408201526060810183905260a08101600383106113b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8260808301529695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080600060a0868803121561140d57600080fd5b85359450602086013593506040860135611426816112f2565b925060608601359150608086013567ffffffffffffffff8082111561144a57600080fd5b818801915088601f83011261145e57600080fd5b813581811115611470576114706113c6565b604051601f8201601f19908116603f01168101908382118183101715611498576114986113c6565b816040528281528b60208487010111156114b157600080fd5b8260208601602083013760006020848301015280955050505050509295509295909350565b803565ffffffffffff811681146114ec57600080fd5b919050565b6000806040838503121561150457600080fd5b61150d836114d6565b915061151b602084016114d6565b90509250929050565b6000806040838503121561153757600080fd5b8235611542816112f2565b946020939093013593505050565b813581556020820135611562816112f2565b6001820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555060408201356115a6816112f2565b6002820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555060608201356003820155600481016080830135600381106115fc57600080fd5b60ff1982541660ff8216811783555050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561102d5761102d611611565b808202811582820484141761102d5761102d611611565b6000826116a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561102d5761102d61161156fea2646970667358221220098cfffc717d8f0cea995c30db2d1f801c26be3e34e28e13cecf1cee823a31db64736f6c63430008120033

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

00000000000000000000000034e80264f020b5ce469c3faf4374c1d8607a3930000000000000000000000000ddcc87f1d5801ba46dee90932fb83509d5c9947c00000000000000000000000000000000000000000000000000000000000002ee

-----Decoded View---------------
Arg [0] : _signer (address): 0x34e80264f020b5cE469c3faf4374c1d8607a3930
Arg [1] : _ndRoyaltyAddress (address): 0xddcc87F1D5801ba46dee90932fB83509d5C9947c
Arg [2] : _ndRoyaltyPercentage (uint256): 750

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000034e80264f020b5ce469c3faf4374c1d8607a3930
Arg [1] : 000000000000000000000000ddcc87f1d5801ba46dee90932fb83509d5c9947c
Arg [2] : 00000000000000000000000000000000000000000000000000000000000002ee


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.