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
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add Controller | 13823193 | 1168 days ago | IN | 0 ETH | 0.00391901 |
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
|
||||
---|---|---|---|---|---|---|---|
13858104 | 1163 days ago | 0 ETH | |||||
13855276 | 1163 days ago | 0 ETH | |||||
13855276 | 1163 days ago | 0 ETH | |||||
13855276 | 1163 days ago | 0 ETH | |||||
13855246 | 1163 days ago | 0 ETH | |||||
13855246 | 1163 days ago | 0 ETH | |||||
13855246 | 1163 days ago | 0 ETH | |||||
13855246 | 1163 days ago | 0 ETH | |||||
13855246 | 1163 days ago | 0 ETH | |||||
13855246 | 1163 days ago | 0 ETH | |||||
13847902 | 1164 days ago | 0 ETH | |||||
13847902 | 1164 days ago | 0 ETH | |||||
13847902 | 1164 days ago | 0 ETH | |||||
13847902 | 1164 days ago | 0 ETH | |||||
13847847 | 1164 days ago | 0 ETH | |||||
13847847 | 1164 days ago | 0 ETH | |||||
13847847 | 1164 days ago | 0 ETH | |||||
13847847 | 1164 days ago | 0 ETH | |||||
13847454 | 1164 days ago | 0 ETH | |||||
13847454 | 1164 days ago | 0 ETH | |||||
13846235 | 1165 days ago | 0 ETH | |||||
13846235 | 1165 days ago | 0 ETH | |||||
13841962 | 1165 days ago | 0 ETH | |||||
13841962 | 1165 days ago | 0 ETH | |||||
13841962 | 1165 days ago | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Randomizer
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721// SPDX-License-Identifier: MITpragma solidity ^0.8.9;import "@openzeppelin/contracts/access/Ownable.sol";import "./ICryptoBees.sol";import "./Traits.sol";import "./IAttack.sol";contract Randomizer is Ownable {struct Commit {uint256 block;address sender;}mapping(uint256 => Commit) commits;mapping(address => bool) controllers;uint256 commitIndex;event CommitHash(address indexed sender, uint256 block, uint256 index);constructor() {}function createCommit() public {require(controllers[msg.sender], "Not permitted");commits[commitIndex].block = block.number;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)pragma solidity ^0.8.0;import "../utils/Context.sol";/*** @dev Contract module which provides a basic access control mechanism, where* there is an account (an owner) that can be granted exclusive access to* specific functions.** By default, the owner account will be the one that deploys the contract. This* can later be changed with {transferOwnership}.** This module is used through inheritance. It will make available the modifier* `onlyOwner`, which can be applied to your functions to restrict their use to* the owner.*/abstract contract Ownable is Context {address private _owner;event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);/*** @dev Initializes the contract setting the deployer as the initial owner.
1234567891011121314151617181920212223242526//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721// SPDX-License-Identifier: MITpragma solidity ^0.8.9;// import "@openzeppelin/contracts/token/ERC721/IERC721.sol";interface ICryptoBees {struct Token {uint8 _type;uint8 color;uint8 eyes;uint8 mouth;uint8 nose;uint8 hair;uint8 accessory;uint8 feelers;uint8 strength;uint48 lastAttackTimestamp;uint48 cooldownTillTimestamp;}function getMinted() external view returns (uint256 m);function increaseTokensPot(address _owner, uint256 amount) external;function updateTokensLastAttack(
1234567891011121314151617181920212223242526//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721// SPDX-License-Identifier: MITpragma solidity ^0.8.9;import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/utils/Strings.sol";import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";import "hardhat/console.sol";import "./ICryptoBees.sol";import "./IHoney.sol";import "./Base64.sol";contract Traits is Ownable {using Strings for uint256;using MerkleProof for bytes32[];// struct to store each trait's data for metadata and renderingstruct Trait {string name;string png;}string unrevealedImage;ICryptoBees beesContract;IHoney honeyContract;// mint price ETH
1234567891011121314151617181920212223// SPDX-License-Identifier: MIT LICENSEpragma solidity ^0.8.9;interface IAttack {struct Settings {uint8 bearChance;uint8 beekeeperMultiplier;uint24 hiveProtectionBear;uint24 hiveProtectionKeeper;uint24 bearCooldownBase;uint24 bearCooldownPerHiveDay;uint24 beekeeperCooldownBase;uint24 beekeeperCooldownPerHiveDay;uint8 attacksToRestart;}struct UnresolvedAttack {uint24 tokenId;uint48 nonce;uint64 block;uint32 howMuch;}}
123456789101112131415161718192021222324// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.0 (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;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.0 (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.solif (value == 0) {return "0";}uint256 temp = value;uint256 digits;while (temp != 0) {digits++;temp /= 10;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.0 (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) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >= 0.4.22 <0.9.0;library console {address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);function _sendLogPayload(bytes memory payload) private view {uint256 payloadLength = payload.length;address consoleAddress = CONSOLE_ADDRESS;assembly {let payloadStart := add(payload, 32)let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)}}function log() internal view {_sendLogPayload(abi.encodeWithSignature("log()"));}function logInt(int p0) internal view {_sendLogPayload(abi.encodeWithSignature("log(int)", p0));}function logUint(uint p0) internal view {_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));}
1234567891011121314151617// SPDX-License-Identifier: MIT LICENSEpragma solidity ^0.8.9;interface IHoney {function mint(address to, uint256 amount) external;function mintGiveaway(address[] calldata addresses, uint256 amount) external;function burn(address from, uint256 amount) external;function disableGiveaway() external;function addController(address controller) external;function removeController(address controller) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.9;library Base64 {string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function encode(bytes memory data) internal pure returns (string memory) {if (data.length == 0) return "";// load the table into memorystring memory table = TABLE;// multiply by 4/3 rounded upuint256 encodedLen = 4 * ((data.length + 2) / 3);// add some extra buffer at the end required for the writingstring memory result = new string(encodedLen + 32);// solhint-disable-next-line no-inline-assemblyassembly {// set the actual output lengthmstore(result, encodedLen)// prepare the lookup tablelet tablePtr := add(table, 1)
12345678910111213141516171819{"optimizer": {"enabled": true,"runs": 200},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"CommitHash","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":"controller","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createCommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"to","type":"uint256"}],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"revealSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105828061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063916fbda41161005b578063916fbda4146100eb578063a7fc7a07146100f3578063f2fde38b14610106578063f6a74ed71461011957600080fd5b80630413a0f01461008d578063310bd74b146100b3578063715018a6146100c85780638da5cb5b146100d0575b600080fd5b6100a061009b366004610489565b61012c565b6040519081526020015b60405180910390f35b6100c66100c1366004610489565b6101b3565b005b6100c66101eb565b6000546040516001600160a01b0390911681526020016100aa565b6100c6610221565b6100c66101013660046104a2565b610305565b6100c66101143660046104a2565b610353565b6100c66101273660046104a2565b6103ee565b60006003548210801561014c575060008281526001602052604090205443115b156101ab5760008281526001602081815260409283902091820154915483516001600160a01b03909316918301919091529181018490529040606082015260800160408051601f19818403018152919052805160209091012092915050565b506000919050565b6000546001600160a01b031633146101e65760405162461bcd60e51b81526004016101dd906104d2565b60405180910390fd5b600355565b6000546001600160a01b031633146102155760405162461bcd60e51b81526004016101dd906104d2565b61021f6000610439565b565b3360009081526002602052604090205460ff166102705760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c195c9b5a5d1d1959609a1b60448201526064016101dd565b600380546000908152600160208190526040808320439055835483528220810180546001600160a01b031916321790558254909291906102b190849061051d565b909155505060035432907f72c5a6bb2564859e4acc3a7296dbf32cf9cbddeebd48dce6ddf051add9abc5ee9043906102eb90600190610535565b6040805192835260208301919091520160405180910390a2565b6000546001600160a01b0316331461032f5760405162461bcd60e51b81526004016101dd906104d2565b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b6000546001600160a01b0316331461037d5760405162461bcd60e51b81526004016101dd906104d2565b6001600160a01b0381166103e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101dd565b6103eb81610439565b50565b6000546001600160a01b031633146104185760405162461bcd60e51b81526004016101dd906104d2565b6001600160a01b03166000908152600260205260409020805460ff19169055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561049b57600080fd5b5035919050565b6000602082840312156104b457600080fd5b81356001600160a01b03811681146104cb57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561053057610530610507565b500190565b60008282101561054757610547610507565b50039056fea2646970667358221220e98ea9a08709b1fb331a2d4eb3565622225a203a5754788994331d8bc914169e64736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063916fbda41161005b578063916fbda4146100eb578063a7fc7a07146100f3578063f2fde38b14610106578063f6a74ed71461011957600080fd5b80630413a0f01461008d578063310bd74b146100b3578063715018a6146100c85780638da5cb5b146100d0575b600080fd5b6100a061009b366004610489565b61012c565b6040519081526020015b60405180910390f35b6100c66100c1366004610489565b6101b3565b005b6100c66101eb565b6000546040516001600160a01b0390911681526020016100aa565b6100c6610221565b6100c66101013660046104a2565b610305565b6100c66101143660046104a2565b610353565b6100c66101273660046104a2565b6103ee565b60006003548210801561014c575060008281526001602052604090205443115b156101ab5760008281526001602081815260409283902091820154915483516001600160a01b03909316918301919091529181018490529040606082015260800160408051601f19818403018152919052805160209091012092915050565b506000919050565b6000546001600160a01b031633146101e65760405162461bcd60e51b81526004016101dd906104d2565b60405180910390fd5b600355565b6000546001600160a01b031633146102155760405162461bcd60e51b81526004016101dd906104d2565b61021f6000610439565b565b3360009081526002602052604090205460ff166102705760405162461bcd60e51b815260206004820152600d60248201526c139bdd081c195c9b5a5d1d1959609a1b60448201526064016101dd565b600380546000908152600160208190526040808320439055835483528220810180546001600160a01b031916321790558254909291906102b190849061051d565b909155505060035432907f72c5a6bb2564859e4acc3a7296dbf32cf9cbddeebd48dce6ddf051add9abc5ee9043906102eb90600190610535565b6040805192835260208301919091520160405180910390a2565b6000546001600160a01b0316331461032f5760405162461bcd60e51b81526004016101dd906104d2565b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b6000546001600160a01b0316331461037d5760405162461bcd60e51b81526004016101dd906104d2565b6001600160a01b0381166103e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101dd565b6103eb81610439565b50565b6000546001600160a01b031633146104185760405162461bcd60e51b81526004016101dd906104d2565b6001600160a01b03166000908152600260205260409020805460ff19169055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561049b57600080fd5b5035919050565b6000602082840312156104b457600080fd5b81356001600160a01b03811681146104cb57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561053057610530610507565b500190565b60008282101561054757610547610507565b50039056fea2646970667358221220e98ea9a08709b1fb331a2d4eb3565622225a203a5754788994331d8bc914169e64736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.