ETH Price: $2,545.81 (-4.37%)
Gas: 2 Gwei

Contract

0xe26485A2FBeEE1a61D14f4167E4369B7E7Bd23FE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Whitelist152720292022-08-03 22:01:03739 days ago1659564063IN
0xe26485A2...7E7Bd23FE
0 ETH0.0010441412.9144731
Whitelist152304662022-07-28 10:25:16745 days ago1659003916IN
0xe26485A2...7E7Bd23FE
0 ETH0.000663748.20953145
Whitelist152231662022-07-27 7:35:01746 days ago1658907301IN
0xe26485A2...7E7Bd23FE
0 ETH0.000637087.8817333
Whitelist152225102022-07-27 5:03:39747 days ago1658898219IN
0xe26485A2...7E7Bd23FE
0 ETH0.0008921211.73183622
Whitelist152220522022-07-27 3:14:30747 days ago1658891670IN
0xe26485A2...7E7Bd23FE
0 ETH0.000853810.56024866
Whitelist152220492022-07-27 3:13:21747 days ago1658891601IN
0xe26485A2...7E7Bd23FE
0 ETH0.0008358510.34079749
Whitelist152216122022-07-27 1:31:01747 days ago1658885461IN
0xe26485A2...7E7Bd23FE
0 ETH0.0008449410.45162389
Whitelist152214442022-07-27 0:52:35747 days ago1658883155IN
0xe26485A2...7E7Bd23FE
0 ETH0.000742379.1842515
Whitelist152175472022-07-26 10:18:17747 days ago1658830697IN
0xe26485A2...7E7Bd23FE
0 ETH0.000726888.99046524
Whitelist152153522022-07-26 2:03:47748 days ago1658801027IN
0xe26485A2...7E7Bd23FE
0 ETH0.001607519.88717254
Whitelist152136372022-07-25 19:40:13748 days ago1658778013IN
0xe26485A2...7E7Bd23FE
0 ETH0.003534943.72121235
Whitelist152113872022-07-25 11:26:26748 days ago1658748386IN
0xe26485A2...7E7Bd23FE
0 ETH0.0014751119.39640082
Whitelist152105182022-07-25 8:07:22748 days ago1658736442IN
0xe26485A2...7E7Bd23FE
0 ETH0.000513236.3494485
Whitelist152105162022-07-25 8:06:59748 days ago1658736419IN
0xe26485A2...7E7Bd23FE
0 ETH0.000494316.11632142
Whitelist152099012022-07-25 5:51:36748 days ago1658728296IN
0xe26485A2...7E7Bd23FE
0 ETH0.00061578.09808908
Whitelist152092002022-07-25 3:05:20749 days ago1658718320IN
0xe26485A2...7E7Bd23FE
0 ETH0.000723948.95404242
Whitelist152091962022-07-25 3:04:04749 days ago1658718244IN
0xe26485A2...7E7Bd23FE
0 ETH0.00067338.32773963
Whitelist152089832022-07-25 2:13:39749 days ago1658715219IN
0xe26485A2...7E7Bd23FE
0 ETH0.000770689.5344678
Whitelist152089212022-07-25 2:02:06749 days ago1658714526IN
0xe26485A2...7E7Bd23FE
0 ETH0.00068718.502981
Whitelist152089172022-07-25 2:00:41749 days ago1658714441IN
0xe26485A2...7E7Bd23FE
0 ETH0.000615767.61599846
Whitelist152089152022-07-25 2:00:04749 days ago1658714404IN
0xe26485A2...7E7Bd23FE
0 ETH0.000609697.54279357
Whitelist152085942022-07-25 0:44:09749 days ago1658709849IN
0xe26485A2...7E7Bd23FE
0 ETH0.0009809712.13311369
Whitelist152085662022-07-25 0:37:41749 days ago1658709461IN
0xe26485A2...7E7Bd23FE
0 ETH0.0010120313.31079661
Whitelist152084922022-07-25 0:19:45749 days ago1658708385IN
0xe26485A2...7E7Bd23FE
0 ETH0.000735659.0988443
Whitelist152084712022-07-25 0:15:17749 days ago1658708117IN
0xe26485A2...7E7Bd23FE
0 ETH0.0009252311.44823217
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Whitelist

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : Whitelist.sol
// SPDX-License-Identifier: MIT
/*
 ______     __                            __           __                      __
|_   _ \   [  |                          |  ]         [  |                    |  ]
  | |_) |   | |    .--.     .--.     .--.| |   .--.    | |--.    .---.    .--.| |
  |  __'.   | |  / .'`\ \ / .'`\ \ / /'`\' |  ( (`\]   | .-. |  / /__\\ / /'`\' |
 _| |__) |  | |  | \__. | | \__. | | \__/  |   `'.'.   | | | |  | \__., | \__/  |
|_______/  [___]  '.__.'   '.__.'   '.__.;__] [\__) ) [___]|__]  '.__.'  '.__.;__]
                      ________
                      ___  __ )_____ ______ _________________
                      __  __  |_  _ \_  __ `/__  ___/__  ___/
                      _  /_/ / /  __// /_/ / _  /    _(__  )
                      /_____/  \___/ \__,_/  /_/     /____/
*/
pragma solidity ^0.8.0;

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

interface IBloodToken {
  function spend(address wallet_, uint256 amount_) external;
}

contract Whitelist is Ownable {
  event Whitelisted(address wallet, uint256 project, uint256 price);

  IBloodToken public bloodToken;
  address public signer;

  mapping(address => mapping(uint256 => bool)) public whitelisted;
  mapping(uint256 => uint256) public projectSlots;

  /**
   * @dev Constructor
   * @param _token Address of Blood token.
   * @param _signer Address of the backend signer.
   */
  constructor(address _token, address _signer) {
    bloodToken = IBloodToken(_token);
    signer = _signer;
  }

  /**
   * @dev function for whitelisting by speding in game wallet money.
   * @notice This contract has to be whitelisted.
   * @param price Price for which user is buying whitelist.
   * @param project Project for which user is buying whitelist.
   * @param timestamp Signature creation timestamp.
   * @param signature Signature of above data.
   */
  function whitelist(
    uint256 price,
    uint256 project,
    uint256 timestamp,
    bytes memory signature
  ) external {
    require(!whitelisted[msg.sender][project], "Already whitelisted.");
    require(
      validateSignature(msg.sender, price, project, timestamp, signature),
      "Invalid signature."
    );
    // signature is valid for 60 minutes.
    require(timestamp + 3600 > block.timestamp, "Signature expired.");
    require(projectSlots[project] > 0, "No more slots available.");
    projectSlots[project]--;
    whitelisted[msg.sender][project] = true;

    bloodToken.spend(msg.sender, price);
    emit Whitelisted(msg.sender, project, price);
  }

  /**
   * @dev Validates signature.
   * @param _sender User wanting to whitelist.
   * @param _price Price for which user is buying whitelist.
   * @param _project Project for which user is buying whitelist.
   * @param _timestamp Signature creation timestamp.
   * @param _signature Signature of above data.
   */
  function validateSignature(
    address _sender,
    uint256 _price,
    uint256 _project,
    uint256 _timestamp,
    bytes memory _signature
  ) public view returns (bool) {
    bytes32 dataHash = keccak256(
      abi.encodePacked(_sender, _price, _project, _timestamp)
    );
    bytes32 message = ECDSA.toEthSignedMessageHash(dataHash);
    address receivedAddress = ECDSA.recover(message, _signature);
    return receivedAddress == signer;
  }

  function setSigner(address _signer) external onlyOwner {
    signer = _signer;
  }

  /**
   * @dev Sets slots available for a project.
   * @param projects Project ids.
   * @param slots Slots available.
   */
  function setProjects(uint256[] calldata projects, uint256[] calldata slots) external onlyOwner {
    for (uint8 i = 0; i < projects.length; i++) {
      projectSlots[projects[i]] = slots[i];
    }
  }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 5 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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
    }

    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");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' 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) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        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.
            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 if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } 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 (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // 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 4 of 5 : 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 5 of 5 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"project","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Whitelisted","type":"event"},{"inputs":[],"name":"bloodToken","outputs":[{"internalType":"contract IBloodToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectSlots","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"projects","type":"uint256[]"},{"internalType":"uint256[]","name":"slots","type":"uint256[]"}],"name":"setProjects","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_project","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"validateSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"project","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610f17380380610f1783398101604081905261002f916100d5565b61003833610069565b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055610108565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100d057600080fd5b919050565b600080604083850312156100e857600080fd5b6100f1836100b9565b91506100ff602084016100b9565b90509250929050565b610e00806101176000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638574466f116100715780638574466f1461014c5780638da5cb5b1461015f5780639996bf8a14610170578063ebedd54c14610183578063f2fde38b146101b1578063f639b165146101c457600080fd5b80632132a40c146100ae578063238ac933146100c35780636c19e783146100f35780636c1cac4a14610106578063715018a614610144575b600080fd5b6100c16100bc366004610b0d565b6101d7565b005b6002546100d6906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c1610101366004610b83565b610428565b610134610114366004610ba5565b600360209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100ea565b6100c1610474565b6100c161015a366004610c14565b6104aa565b6000546001600160a01b03166100d6565b61013461017e366004610c80565b61054a565b6101a3610191366004610ceb565b60046020526000908152604090205481565b6040519081526020016100ea565b6100c16101bf366004610b83565b61060a565b6001546100d6906001600160a01b031681565b33600090815260036020908152604080832086845290915290205460ff161561023e5760405162461bcd60e51b815260206004820152601460248201527320b63932b0b23c903bb434ba32b634b9ba32b21760611b60448201526064015b60405180910390fd5b61024b338585858561054a565b61028c5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b6044820152606401610235565b4261029983610e10610d1a565b116102db5760405162461bcd60e51b815260206004820152601260248201527129b4b3b730ba3ab9329032bc3834b932b21760711b6044820152606401610235565b6000838152600460205260409020546103365760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520736c6f747320617661696c61626c652e00000000000000006044820152606401610235565b600083815260046020526040812080549161035083610d32565b909155505033600081815260036020908152604080832087845290915290819020805460ff1916600190811790915554905163af7d6ca360e01b81526004810192909252602482018690526001600160a01b03169063af7d6ca390604401600060405180830381600087803b1580156103c857600080fd5b505af11580156103dc573d6000803e3d6000fd5b505060408051338152602081018790529081018790527f1b2d5773afec568c98779f6b1382306a08df138d18b1118d2ec11fece4d1e8b59250606001905060405180910390a150505050565b6000546001600160a01b031633146104525760405162461bcd60e51b815260040161023590610d49565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461049e5760405162461bcd60e51b815260040161023590610d49565b6104a860006106a5565b565b6000546001600160a01b031633146104d45760405162461bcd60e51b815260040161023590610d49565b60005b60ff81168411156105435782828260ff168181106104f7576104f7610d7e565b905060200201356004600087878560ff1681811061051757610517610d7e565b90506020020135815260200190815260200160002081905550808061053b90610d94565b9150506104d7565b5050505050565b60408051606087901b6bffffffffffffffffffffffff191660208083019190915260348201879052605482018690526074808301869052835180840390910181526094830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060b484015260d08084018290528451808503909101815260f090930190935281519101206000919060006105ec82866106f5565b6002546001600160a01b039081169116149998505050505050505050565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161023590610d49565b6001600160a01b0381166106995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610235565b6106a2816106a5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006107048585610719565b9150915061071181610789565b509392505050565b6000808251604114156107505760208301516040840151606085015160001a61074487828585610944565b94509450505050610782565b82516040141561077a576020830151604084015161076f868383610a31565b935093505050610782565b506000905060025b9250929050565b600081600481111561079d5761079d610db4565b14156107a65750565b60018160048111156107ba576107ba610db4565b14156108085760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610235565b600281600481111561081c5761081c610db4565b141561086a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610235565b600381600481111561087e5761087e610db4565b14156108d75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610235565b60048160048111156108eb576108eb610db4565b14156106a25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610235565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561097b5750600090506003610a28565b8460ff16601b1415801561099357508460ff16601c14155b156109a45750600090506004610a28565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156109f8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610a2157600060019250925050610a28565b9150600090505b94509492505050565b6000806001600160ff1b03831681610a4e60ff86901c601b610d1a565b9050610a5c87828885610944565b935093505050935093915050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610a9157600080fd5b813567ffffffffffffffff80821115610aac57610aac610a6a565b604051601f8301601f19908116603f01168101908282118183101715610ad457610ad4610a6a565b81604052838152866020858801011115610aed57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215610b2357600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115610b4f57600080fd5b610b5b87828801610a80565b91505092959194509250565b80356001600160a01b0381168114610b7e57600080fd5b919050565b600060208284031215610b9557600080fd5b610b9e82610b67565b9392505050565b60008060408385031215610bb857600080fd5b610bc183610b67565b946020939093013593505050565b60008083601f840112610be157600080fd5b50813567ffffffffffffffff811115610bf957600080fd5b6020830191508360208260051b850101111561078257600080fd5b60008060008060408587031215610c2a57600080fd5b843567ffffffffffffffff80821115610c4257600080fd5b610c4e88838901610bcf565b90965094506020870135915080821115610c6757600080fd5b50610c7487828801610bcf565b95989497509550505050565b600080600080600060a08688031215610c9857600080fd5b610ca186610b67565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff811115610cd257600080fd5b610cde88828901610a80565b9150509295509295909350565b600060208284031215610cfd57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610d2d57610d2d610d04565b500190565b600081610d4157610d41610d04565b506000190190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff811415610dab57610dab610d04565b60010192915050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122039347c56959374768af744ce620175e0998c99fc967b868d5ff63dbfca92fa4264736f6c634300080a00330000000000000000000000006d9b6821ab5b9111c64828dc7445f8c5066f0999000000000000000000000000bc6ce7afb386640201f5c4f5e4f0b153f5750b13

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638574466f116100715780638574466f1461014c5780638da5cb5b1461015f5780639996bf8a14610170578063ebedd54c14610183578063f2fde38b146101b1578063f639b165146101c457600080fd5b80632132a40c146100ae578063238ac933146100c35780636c19e783146100f35780636c1cac4a14610106578063715018a614610144575b600080fd5b6100c16100bc366004610b0d565b6101d7565b005b6002546100d6906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c1610101366004610b83565b610428565b610134610114366004610ba5565b600360209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100ea565b6100c1610474565b6100c161015a366004610c14565b6104aa565b6000546001600160a01b03166100d6565b61013461017e366004610c80565b61054a565b6101a3610191366004610ceb565b60046020526000908152604090205481565b6040519081526020016100ea565b6100c16101bf366004610b83565b61060a565b6001546100d6906001600160a01b031681565b33600090815260036020908152604080832086845290915290205460ff161561023e5760405162461bcd60e51b815260206004820152601460248201527320b63932b0b23c903bb434ba32b634b9ba32b21760611b60448201526064015b60405180910390fd5b61024b338585858561054a565b61028c5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b6044820152606401610235565b4261029983610e10610d1a565b116102db5760405162461bcd60e51b815260206004820152601260248201527129b4b3b730ba3ab9329032bc3834b932b21760711b6044820152606401610235565b6000838152600460205260409020546103365760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520736c6f747320617661696c61626c652e00000000000000006044820152606401610235565b600083815260046020526040812080549161035083610d32565b909155505033600081815260036020908152604080832087845290915290819020805460ff1916600190811790915554905163af7d6ca360e01b81526004810192909252602482018690526001600160a01b03169063af7d6ca390604401600060405180830381600087803b1580156103c857600080fd5b505af11580156103dc573d6000803e3d6000fd5b505060408051338152602081018790529081018790527f1b2d5773afec568c98779f6b1382306a08df138d18b1118d2ec11fece4d1e8b59250606001905060405180910390a150505050565b6000546001600160a01b031633146104525760405162461bcd60e51b815260040161023590610d49565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461049e5760405162461bcd60e51b815260040161023590610d49565b6104a860006106a5565b565b6000546001600160a01b031633146104d45760405162461bcd60e51b815260040161023590610d49565b60005b60ff81168411156105435782828260ff168181106104f7576104f7610d7e565b905060200201356004600087878560ff1681811061051757610517610d7e565b90506020020135815260200190815260200160002081905550808061053b90610d94565b9150506104d7565b5050505050565b60408051606087901b6bffffffffffffffffffffffff191660208083019190915260348201879052605482018690526074808301869052835180840390910181526094830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060b484015260d08084018290528451808503909101815260f090930190935281519101206000919060006105ec82866106f5565b6002546001600160a01b039081169116149998505050505050505050565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161023590610d49565b6001600160a01b0381166106995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610235565b6106a2816106a5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006107048585610719565b9150915061071181610789565b509392505050565b6000808251604114156107505760208301516040840151606085015160001a61074487828585610944565b94509450505050610782565b82516040141561077a576020830151604084015161076f868383610a31565b935093505050610782565b506000905060025b9250929050565b600081600481111561079d5761079d610db4565b14156107a65750565b60018160048111156107ba576107ba610db4565b14156108085760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610235565b600281600481111561081c5761081c610db4565b141561086a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610235565b600381600481111561087e5761087e610db4565b14156108d75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610235565b60048160048111156108eb576108eb610db4565b14156106a25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610235565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561097b5750600090506003610a28565b8460ff16601b1415801561099357508460ff16601c14155b156109a45750600090506004610a28565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156109f8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610a2157600060019250925050610a28565b9150600090505b94509492505050565b6000806001600160ff1b03831681610a4e60ff86901c601b610d1a565b9050610a5c87828885610944565b935093505050935093915050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610a9157600080fd5b813567ffffffffffffffff80821115610aac57610aac610a6a565b604051601f8301601f19908116603f01168101908282118183101715610ad457610ad4610a6a565b81604052838152866020858801011115610aed57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215610b2357600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115610b4f57600080fd5b610b5b87828801610a80565b91505092959194509250565b80356001600160a01b0381168114610b7e57600080fd5b919050565b600060208284031215610b9557600080fd5b610b9e82610b67565b9392505050565b60008060408385031215610bb857600080fd5b610bc183610b67565b946020939093013593505050565b60008083601f840112610be157600080fd5b50813567ffffffffffffffff811115610bf957600080fd5b6020830191508360208260051b850101111561078257600080fd5b60008060008060408587031215610c2a57600080fd5b843567ffffffffffffffff80821115610c4257600080fd5b610c4e88838901610bcf565b90965094506020870135915080821115610c6757600080fd5b50610c7487828801610bcf565b95989497509550505050565b600080600080600060a08688031215610c9857600080fd5b610ca186610b67565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff811115610cd257600080fd5b610cde88828901610a80565b9150509295509295909350565b600060208284031215610cfd57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610d2d57610d2d610d04565b500190565b600081610d4157610d41610d04565b506000190190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff811415610dab57610dab610d04565b60010192915050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122039347c56959374768af744ce620175e0998c99fc967b868d5ff63dbfca92fa4264736f6c634300080a0033

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

0000000000000000000000006d9b6821ab5b9111c64828dc7445f8c5066f0999000000000000000000000000bc6ce7afb386640201f5c4f5e4f0b153f5750b13

-----Decoded View---------------
Arg [0] : _token (address): 0x6D9B6821ab5B9111C64828dC7445F8c5066f0999
Arg [1] : _signer (address): 0xbc6CE7afB386640201F5C4f5E4F0b153f5750B13

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006d9b6821ab5b9111c64828dc7445f8c5066f0999
Arg [1] : 000000000000000000000000bc6ce7afb386640201f5c4f5e4f0b153f5750b13


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  ]

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.