Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Merkle Root | 13976285 | 1117 days ago | IN | 0 ETH | 0.00545432 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
13980550 | 1116 days ago | 0 ETH | |||||
13979808 | 1116 days ago | 0 ETH | |||||
13979787 | 1116 days ago | 0 ETH | |||||
13979468 | 1116 days ago | 0 ETH | |||||
13979452 | 1116 days ago | 0 ETH | |||||
13979451 | 1116 days ago | 0 ETH | |||||
13979407 | 1116 days ago | 0 ETH | |||||
13979386 | 1116 days ago | 0 ETH | |||||
13979223 | 1116 days ago | 0 ETH | |||||
13979145 | 1116 days ago | 0 ETH | |||||
13978987 | 1116 days ago | 0 ETH | |||||
13978901 | 1116 days ago | 0 ETH | |||||
13978898 | 1116 days ago | 0 ETH | |||||
13978881 | 1116 days ago | 0 ETH | |||||
13978857 | 1116 days ago | 0 ETH | |||||
13978827 | 1116 days ago | 0 ETH | |||||
13978809 | 1116 days ago | 0 ETH | |||||
13978701 | 1116 days ago | 0 ETH | |||||
13978695 | 1116 days ago | 0 ETH | |||||
13978577 | 1116 days ago | 0 ETH | |||||
13978562 | 1116 days ago | 0 ETH | |||||
13978532 | 1116 days ago | 0 ETH | |||||
13978517 | 1116 days ago | 0 ETH | |||||
13978495 | 1116 days ago | 0 ETH | |||||
13978470 | 1116 days ago | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CCPS
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 12000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface iAllowList { function isAllowed(address address_, uint8 amount, bytes32[] memory proof_) external view returns (bool); } contract CCPS is Ownable, iAllowList { bytes32 public merkleRoot = 0xe241e9c537356e29fd3030655e55d5902204b94d90931d9acbbde3a620532b09; function isAllowed(address sender, uint8 amount, bytes32[] memory proof) external override view returns(bool) { bytes32 leaf = keccak256(abi.encodePacked(sender, amount)); return MerkleProof.verify(proof, merkleRoot, leaf); } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { merkleRoot = _merkleRoot; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// 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; } }
{ "optimizer": { "enabled": true, "runs": 12000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint8","name":"amount","type":"uint8"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040527fe241e9c537356e29fd3030655e55d5902204b94d90931d9acbbde3a620532b0960015534801561003457600080fd5b5061003e33610043565b610093565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610772806100a26000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80637cb64759116100505780637cb64759146100c05780638da5cb5b146100d3578063f2fde38b146100fb57600080fd5b80632eb4a7ab1461007757806357d1c3b414610093578063715018a6146100b6575b600080fd5b61008060015481565b6040519081526020015b60405180910390f35b6100a66100a136600461058f565b61010e565b604051901515815260200161008a565b6100be61019f565b005b6100be6100ce366004610697565b610231565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008a565b6100be61010936600461056e565b6102b7565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b1660208201527fff0000000000000000000000000000000000000000000000000000000000000060f884901b166034820152600090819060350160405160208183030381529060405280519060200120905061019683600154836103e7565b95945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61022f60006103fd565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161021c565b600155565b60005473ffffffffffffffffffffffffffffffffffffffff163314610338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161021c565b73ffffffffffffffffffffffffffffffffffffffff81166103db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161021c565b6103e4816103fd565b50565b6000826103f48584610472565b14949350505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b845181101561053d5760008582815181106104bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116104fd57604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061052a565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610535816106af565b915050610477565b509392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461056957600080fd5b919050565b60006020828403121561057f578081fd5b61058882610545565b9392505050565b6000806000606084860312156105a3578182fd5b6105ac84610545565b925060208085013560ff811681146105c2578384fd5b9250604085013567ffffffffffffffff808211156105de578384fd5b818701915087601f8301126105f1578384fd5b8135818111156106035761060361070d565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156106465761064661070d565b604052828152858101935084860182860187018c1015610664578788fd5b8795505b83861015610686578035855260019590950194938601938601610668565b508096505050505050509250925092565b6000602082840312156106a8578081fd5b5035919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610706577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220accf875ade3730ae55850ba1e0d76052b633f1c7819a5ade39f4d1417f0c52bc64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100725760003560e01c80637cb64759116100505780637cb64759146100c05780638da5cb5b146100d3578063f2fde38b146100fb57600080fd5b80632eb4a7ab1461007757806357d1c3b414610093578063715018a6146100b6575b600080fd5b61008060015481565b6040519081526020015b60405180910390f35b6100a66100a136600461058f565b61010e565b604051901515815260200161008a565b6100be61019f565b005b6100be6100ce366004610697565b610231565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008a565b6100be61010936600461056e565b6102b7565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b1660208201527fff0000000000000000000000000000000000000000000000000000000000000060f884901b166034820152600090819060350160405160208183030381529060405280519060200120905061019683600154836103e7565b95945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61022f60006103fd565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161021c565b600155565b60005473ffffffffffffffffffffffffffffffffffffffff163314610338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161021c565b73ffffffffffffffffffffffffffffffffffffffff81166103db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161021c565b6103e4816103fd565b50565b6000826103f48584610472565b14949350505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b845181101561053d5760008582815181106104bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116104fd57604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061052a565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610535816106af565b915050610477565b509392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461056957600080fd5b919050565b60006020828403121561057f578081fd5b61058882610545565b9392505050565b6000806000606084860312156105a3578182fd5b6105ac84610545565b925060208085013560ff811681146105c2578384fd5b9250604085013567ffffffffffffffff808211156105de578384fd5b818701915087601f8301126105f1578384fd5b8135818111156106035761060361070d565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156106465761064661070d565b604052828152858101935084860182860187018c1015610664578788fd5b8795505b83861015610686578035855260019590950194938601938601610668565b508096505050505050509250925092565b6000602082840312156106a8578081fd5b5035919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610706577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220accf875ade3730ae55850ba1e0d76052b633f1c7819a5ade39f4d1417f0c52bc64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.