Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 188 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18978737 | 238 days ago | IN | 0 ETH | 0.00183498 | ||||
Claim | 18929321 | 245 days ago | IN | 0 ETH | 0.00227354 | ||||
Claim | 18921570 | 246 days ago | IN | 0 ETH | 0.00261186 | ||||
Claim | 18902249 | 249 days ago | IN | 0 ETH | 0.00108724 | ||||
Claim | 18900907 | 249 days ago | IN | 0 ETH | 0.00129215 | ||||
Claim | 18900902 | 249 days ago | IN | 0 ETH | 0.00425497 | ||||
Claim | 18894652 | 250 days ago | IN | 0 ETH | 0.00209151 | ||||
Claim | 18894650 | 250 days ago | IN | 0 ETH | 0.00298512 | ||||
Claim | 18893769 | 250 days ago | IN | 0 ETH | 0.00243292 | ||||
Claim | 18893110 | 250 days ago | IN | 0 ETH | 0.0019395 | ||||
Claim | 18893088 | 250 days ago | IN | 0 ETH | 0.00327919 | ||||
Claim | 18893013 | 250 days ago | IN | 0 ETH | 0.00199917 | ||||
Claim | 18892985 | 250 days ago | IN | 0 ETH | 0.00757702 | ||||
Claim | 18892822 | 250 days ago | IN | 0 ETH | 0.00200451 | ||||
Claim | 18892802 | 250 days ago | IN | 0 ETH | 0.00323335 | ||||
Claim | 18889277 | 251 days ago | IN | 0 ETH | 0.00082586 | ||||
Claim | 18889275 | 251 days ago | IN | 0 ETH | 0.00210746 | ||||
Claim | 18881797 | 252 days ago | IN | 0 ETH | 0.00479719 | ||||
Claim | 18878622 | 252 days ago | IN | 0 ETH | 0.003034 | ||||
Claim | 18878620 | 252 days ago | IN | 0 ETH | 0.00451792 | ||||
Claim | 18867554 | 254 days ago | IN | 0 ETH | 0.00278014 | ||||
Claim | 18860441 | 255 days ago | IN | 0 ETH | 0.0017951 | ||||
Claim | 18859904 | 255 days ago | IN | 0 ETH | 0.00124013 | ||||
Claim | 18853305 | 256 days ago | IN | 0 ETH | 0.00178931 | ||||
Claim | 18853302 | 256 days ago | IN | 0 ETH | 0.00294086 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Airdrop
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 1 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract Airdrop is Ownable { /// @notice Merkle root of airdrop tree bytes32 public merkleRoot; address public token; uint256 public claimPeriod; uint256 public claimablePercentByPeriod; uint256 public initialTimestap; mapping(address => uint256) public alreadyClaimed; mapping(address => uint256) public lastClaimTimestamp; /// ============ Errors ============ /// @notice Thrown if address has already claimed error AlreadyClaimed(); /// @notice Thrown if address/amount are not part of Merkle tree error NotInMerkle(); /// ============ Events ============ /// @notice Emitted when merkle root is updated event MerkleRootChanged(bytes32 merkleRoot); constructor() Ownable(_msgSender()) { claimPeriod = 5 minutes; initialTimestap = block.timestamp; claimablePercentByPeriod = 10; } /// @notice Emitted after a successful token claim /// @param to recipient of claim /// @param amount of tokens claimed event Claim(address indexed to, uint256 amount); /// ============ Functions ============ /// @notice Allows claiming tokens if address is part of merkle tree /// @param amount of tokens owed to claimee /// @param proof merkle proof to prove address and amount are in tree function claim(uint256 amount, bytes32[] calldata proof) external { address account = _msgSender(); bool valid; uint256 claimable; (valid, claimable) = canClaim(account, amount, proof); if (!valid) revert NotInMerkle(); require(claimable > 0, "No tokens available to claim yet"); if (lastClaimTimestamp[account] == 0) { lastClaimTimestamp[account] = block.timestamp; } lastClaimTimestamp[account] = block.timestamp; alreadyClaimed[account] += claimable; IERC20(token).transfer(account, claimable); emit Claim(account, claimable); } function calculateClaimable( address account, uint256 totalAmount ) public view returns (uint256) { if (lastClaimTimestamp[account] == 0) { return totalAmount / claimablePercentByPeriod; // 10% for the first claim } uint256 daysSinceFirstClaim = (block.timestamp - initialTimestap) / claimPeriod; uint256 totalEligible = (totalAmount * (daysSinceFirstClaim + 1)) / claimablePercentByPeriod; if (totalEligible > totalAmount) { totalEligible = totalAmount; } return totalEligible - alreadyClaimed[account]; } /* function calculateClaimable( address account, uint256 totalAmount ) public view returns (uint256) { if (firstClaimTimestamp[account] == 0) { return totalAmount / 10; // 10% for the first claim } uint256 daysSinceFirstClaim = (block.timestamp - firstClaimTimestamp[account]) / claimPeriod; uint256 totalEligible = (totalAmount * (daysSinceFirstClaim + 1)) / 10; if (totalEligible > totalAmount) { totalEligible = totalAmount; } return totalEligible - alreadyClaimed[account]; } */ /** * @dev Returns true if wallet can claim * @param account The address to check if can claim. */ function canClaim( address account, uint256 amount, bytes32[] calldata proof ) public view returns (bool, uint256) { bytes32 leaf = keccak256(abi.encodePacked(account, amount)); bool valid = MerkleProof.verify(proof, merkleRoot, leaf); uint256 claimable = calculateClaimable(account, amount); return (valid && claimable > 0, claimable); } /** * @dev Sets the merkle root. Only callable if the root is not yet set. * @param _merkleRoot The merkle root to set. */ function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { merkleRoot = _merkleRoot; emit MerkleRootChanged(_merkleRoot); } function setToken(address _token) public onlyOwner { require(_token != address(0), "Airdrop: Invalid token address"); token = _token; } function setClaimPeriod(uint256 _claimPeriod) public onlyOwner { claimPeriod = _claimPeriod; } function setClaimablePercentByPeriod( uint256 _claimablePercentByPeriod ) public onlyOwner { claimablePercentByPeriod = _claimablePercentByPeriod; } function withdraw() public onlyOwner { uint256 balance = IERC20(token).balanceOf(address(this)); IERC20(token).transfer(msg.sender, balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the Merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
{ "optimizer": { "enabled": true, "runs": 1 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"NotInMerkle","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"MerkleRootChanged","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":[{"internalType":"address","name":"","type":"address"}],"name":"alreadyClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"calculateClaimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"canClaim","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimablePercentByPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialTimestap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"_claimPeriod","type":"uint256"}],"name":"setClaimPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimablePercentByPeriod","type":"uint256"}],"name":"setClaimablePercentByPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610055565b5061012c60035542600555600a6004556100a5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b5e806100b46000396000f3fe608060405234801561001057600080fd5b50600436106100e65760003560e01c8063144fa6d7146100eb5780632eb4a7ab146101005780632f52ebb71461011c5780633ccfd60b1461012f578063715018a6146101375780637bc23aec1461013f5780637cb64759146101485780637dc2cd981461015b5780638da5cb5b146101645780639a2b91cd14610179578063bd9d518b14610182578063cdf47c5b146101a2578063d2c04f43146101b5578063dc38bdb5146101c8578063f2fde38b146101f2578063f54b893b14610205578063f5a9e9f214610225578063fc0c546a14610238575b600080fd5b6100fe6100f93660046108cf565b61024b565b005b61010960015481565b6040519081526020015b60405180910390f35b6100fe61012a366004610935565b6102d0565b6100fe610489565b6100fe61057d565b61010960055481565b6100fe610156366004610980565b610591565b61010960035481565b61016c6105d4565b6040516101139190610999565b61010960045481565b6101096101903660046108cf565b60076020526000908152604090205481565b6101096101b03660046109ad565b6105e3565b6100fe6101c3366004610980565b610696565b6101db6101d63660046109d7565b6106a3565b604080519215158352602083019190915201610113565b6100fe6102003660046108cf565b610751565b6101096102133660046108cf565b60066020526000908152604090205481565b6100fe610233366004610980565b61078f565b60025461016c906001600160a01b031681565b61025361079c565b6001600160a01b0381166102ae5760405162461bcd60e51b815260206004820152601e60248201527f41697264726f703a20496e76616c696420746f6b656e2061646472657373000060448201526064015b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b336000806102e0838787876106a3565b9092509050816103035760405163452c2df160e11b815260040160405180910390fd5b600081116103535760405162461bcd60e51b815260206004820181905260248201527f4e6f20746f6b656e7320617661696c61626c6520746f20636c61696d2079657460448201526064016102a5565b6001600160a01b038316600090815260076020526040812054900361038e576001600160a01b03831660009081526007602052604090204290555b6001600160a01b03831660009081526007602090815260408083204290556006909152812080548392906103c3908490610a46565b909155505060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906103fa9086908590600401610a59565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610a72565b50826001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d48260405161047991815260200190565b60405180910390a2505050505050565b61049161079c565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906104c2903090600401610999565b602060405180830381865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105039190610a94565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb906105369033908590600401610a59565b6020604051808303816000875af1158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190610a72565b5050565b61058561079c565b61058f60006107ce565b565b61059961079c565b60018190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c9060200160405180910390a150565b6000546001600160a01b031690565b6001600160a01b03821660009081526007602052604081205481036106165760045461060f9083610aad565b9050610690565b6000600354600554426106299190610acf565b6106339190610aad565b905060006004548260016106479190610a46565b6106519086610ae2565b61065b9190610aad565b9050838111156106685750825b6001600160a01b03851660009081526006602052604090205461068b9082610acf565b925050505b92915050565b61069e61079c565b600355565b6040516001600160601b0319606086901b1660208201526034810184905260009081908190605401604051602081830303815290604052805190602001209050600061072686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600154915085905061081e565b9050600061073489896105e3565b90508180156107435750600081115b999098509650505050505050565b61075961079c565b6001600160a01b038116610783576000604051631e4fbdf760e01b81526004016102a59190610999565b61078c816107ce565b50565b61079761079c565b600455565b336107a56105d4565b6001600160a01b03161461058f573360405163118cdaa760e01b81526004016102a59190610999565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008261082b8584610834565b14949350505050565b600081815b8451811015610879576108658286838151811061085857610858610af9565b6020026020010151610881565b91508061087181610b0f565b915050610839565b509392505050565b600081831061089d5760008281526020849052604090206108ac565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146108ca57600080fd5b919050565b6000602082840312156108e157600080fd5b6108ac826108b3565b60008083601f8401126108fc57600080fd5b5081356001600160401b0381111561091357600080fd5b6020830191508360208260051b850101111561092e57600080fd5b9250929050565b60008060006040848603121561094a57600080fd5b8335925060208401356001600160401b0381111561096757600080fd5b610973868287016108ea565b9497909650939450505050565b60006020828403121561099257600080fd5b5035919050565b6001600160a01b0391909116815260200190565b600080604083850312156109c057600080fd5b6109c9836108b3565b946020939093013593505050565b600080600080606085870312156109ed57600080fd5b6109f6856108b3565b93506020850135925060408501356001600160401b03811115610a1857600080fd5b610a24878288016108ea565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069057610690610a30565b6001600160a01b03929092168252602082015260400190565b600060208284031215610a8457600080fd5b815180151581146108ac57600080fd5b600060208284031215610aa657600080fd5b5051919050565b600082610aca57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561069057610690610a30565b808202811582820484141761069057610690610a30565b634e487b7160e01b600052603260045260246000fd5b600060018201610b2157610b21610a30565b506001019056fea2646970667358221220949b051903431ca64735be229acecd8f1de56e011d7049f4ffa752c781755c1064736f6c63430008140033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100e65760003560e01c8063144fa6d7146100eb5780632eb4a7ab146101005780632f52ebb71461011c5780633ccfd60b1461012f578063715018a6146101375780637bc23aec1461013f5780637cb64759146101485780637dc2cd981461015b5780638da5cb5b146101645780639a2b91cd14610179578063bd9d518b14610182578063cdf47c5b146101a2578063d2c04f43146101b5578063dc38bdb5146101c8578063f2fde38b146101f2578063f54b893b14610205578063f5a9e9f214610225578063fc0c546a14610238575b600080fd5b6100fe6100f93660046108cf565b61024b565b005b61010960015481565b6040519081526020015b60405180910390f35b6100fe61012a366004610935565b6102d0565b6100fe610489565b6100fe61057d565b61010960055481565b6100fe610156366004610980565b610591565b61010960035481565b61016c6105d4565b6040516101139190610999565b61010960045481565b6101096101903660046108cf565b60076020526000908152604090205481565b6101096101b03660046109ad565b6105e3565b6100fe6101c3366004610980565b610696565b6101db6101d63660046109d7565b6106a3565b604080519215158352602083019190915201610113565b6100fe6102003660046108cf565b610751565b6101096102133660046108cf565b60066020526000908152604090205481565b6100fe610233366004610980565b61078f565b60025461016c906001600160a01b031681565b61025361079c565b6001600160a01b0381166102ae5760405162461bcd60e51b815260206004820152601e60248201527f41697264726f703a20496e76616c696420746f6b656e2061646472657373000060448201526064015b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b336000806102e0838787876106a3565b9092509050816103035760405163452c2df160e11b815260040160405180910390fd5b600081116103535760405162461bcd60e51b815260206004820181905260248201527f4e6f20746f6b656e7320617661696c61626c6520746f20636c61696d2079657460448201526064016102a5565b6001600160a01b038316600090815260076020526040812054900361038e576001600160a01b03831660009081526007602052604090204290555b6001600160a01b03831660009081526007602090815260408083204290556006909152812080548392906103c3908490610a46565b909155505060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906103fa9086908590600401610a59565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610a72565b50826001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d48260405161047991815260200190565b60405180910390a2505050505050565b61049161079c565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a08231906104c2903090600401610999565b602060405180830381865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105039190610a94565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb906105369033908590600401610a59565b6020604051808303816000875af1158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190610a72565b5050565b61058561079c565b61058f60006107ce565b565b61059961079c565b60018190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c9060200160405180910390a150565b6000546001600160a01b031690565b6001600160a01b03821660009081526007602052604081205481036106165760045461060f9083610aad565b9050610690565b6000600354600554426106299190610acf565b6106339190610aad565b905060006004548260016106479190610a46565b6106519086610ae2565b61065b9190610aad565b9050838111156106685750825b6001600160a01b03851660009081526006602052604090205461068b9082610acf565b925050505b92915050565b61069e61079c565b600355565b6040516001600160601b0319606086901b1660208201526034810184905260009081908190605401604051602081830303815290604052805190602001209050600061072686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600154915085905061081e565b9050600061073489896105e3565b90508180156107435750600081115b999098509650505050505050565b61075961079c565b6001600160a01b038116610783576000604051631e4fbdf760e01b81526004016102a59190610999565b61078c816107ce565b50565b61079761079c565b600455565b336107a56105d4565b6001600160a01b03161461058f573360405163118cdaa760e01b81526004016102a59190610999565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008261082b8584610834565b14949350505050565b600081815b8451811015610879576108658286838151811061085857610858610af9565b6020026020010151610881565b91508061087181610b0f565b915050610839565b509392505050565b600081831061089d5760008281526020849052604090206108ac565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146108ca57600080fd5b919050565b6000602082840312156108e157600080fd5b6108ac826108b3565b60008083601f8401126108fc57600080fd5b5081356001600160401b0381111561091357600080fd5b6020830191508360208260051b850101111561092e57600080fd5b9250929050565b60008060006040848603121561094a57600080fd5b8335925060208401356001600160401b0381111561096757600080fd5b610973868287016108ea565b9497909650939450505050565b60006020828403121561099257600080fd5b5035919050565b6001600160a01b0391909116815260200190565b600080604083850312156109c057600080fd5b6109c9836108b3565b946020939093013593505050565b600080600080606085870312156109ed57600080fd5b6109f6856108b3565b93506020850135925060408501356001600160401b03811115610a1857600080fd5b610a24878288016108ea565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069057610690610a30565b6001600160a01b03929092168252602082015260400190565b600060208284031215610a8457600080fd5b815180151581146108ac57600080fd5b600060208284031215610aa657600080fd5b5051919050565b600082610aca57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561069057610690610a30565b808202811582820484141761069057610690610a30565b634e487b7160e01b600052603260045260246000fd5b600060018201610b2157610b21610a30565b506001019056fea2646970667358221220949b051903431ca64735be229acecd8f1de56e011d7049f4ffa752c781755c1064736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.