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 4,892 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Burn Utilities | 20206426 | 6 hrs ago | IN | 0 ETH | 0.00025256 | ||||
Withdraw From Ba... | 20196638 | 39 hrs ago | IN | 0 ETH | 0.00048179 | ||||
Withdraw From Ba... | 20150489 | 8 days ago | IN | 0 ETH | 0.00047937 | ||||
Withdraw From Ba... | 20150434 | 8 days ago | IN | 0 ETH | 0.00019083 | ||||
Withdraw From Ba... | 20145653 | 8 days ago | IN | 0 ETH | 0.00071347 | ||||
Withdraw From Ba... | 20142849 | 9 days ago | IN | 0 ETH | 0.00081983 | ||||
Withdraw From Ba... | 20139519 | 9 days ago | IN | 0 ETH | 0.00082569 | ||||
Burn Utilities | 20137421 | 9 days ago | IN | 0 ETH | 0.00028275 | ||||
Burn Utilities | 20137418 | 9 days ago | IN | 0 ETH | 0.00026215 | ||||
Burn Utilities | 20128037 | 11 days ago | IN | 0 ETH | 0.00063088 | ||||
Burn Utilities | 20119897 | 12 days ago | IN | 0 ETH | 0.00104896 | ||||
Withdraw From Ba... | 20116414 | 12 days ago | IN | 0 ETH | 0.00120778 | ||||
Withdraw From Ba... | 20115128 | 13 days ago | IN | 0 ETH | 0.00119144 | ||||
Burn Utilities | 20105003 | 14 days ago | IN | 0 ETH | 0.00032598 | ||||
Burn Utilities | 20105000 | 14 days ago | IN | 0 ETH | 0.0003721 | ||||
Mint Utilities | 20102125 | 14 days ago | IN | 0 ETH | 0.0004416 | ||||
Mint Utilities | 20102122 | 14 days ago | IN | 0 ETH | 0.00044511 | ||||
Mint Utilities | 20102120 | 14 days ago | IN | 0 ETH | 0.000422 | ||||
Mint Utilities | 20102115 | 14 days ago | IN | 0 ETH | 0.00041643 | ||||
Burn Utilities | 20101855 | 14 days ago | IN | 0 ETH | 0.00025574 | ||||
Burn Utilities | 20098950 | 15 days ago | IN | 0 ETH | 0.0003338 | ||||
Burn Utilities | 20098943 | 15 days ago | IN | 0 ETH | 0.00033002 | ||||
Burn Utilities | 20098929 | 15 days ago | IN | 0 ETH | 0.00030026 | ||||
Burn Utilities | 20098920 | 15 days ago | IN | 0 ETH | 0.00031315 | ||||
Burn Utilities | 20098908 | 15 days ago | IN | 0 ETH | 0.00031622 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
UtilitiesInteractions
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 // solhint-disable-next-line pragma solidity 0.8.12; import "./interface/IMasterContract.sol"; import "./reduced_interfaces/BAPGenesisInterface.sol"; import "./reduced_interfaces/BAPTeenBullsInterface.sol"; import "./reduced_interfaces/BAPUtilitiesInterface.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /// @title Bulls and Apes Project - Utilities Interactions /// @author BAP Dev Team /// @notice Handle the use of the utilities inside BAP ecosystem contract UtilitiesInteractions is Ownable, IERC721Receiver { using Strings for uint256; /// @notice Master contract instance IMasterContract public masterContract; /// @notice OG Bulls contract instance BAPGenesisInterface public bapGenesis; /// @notice Teen Bulls contract instance BAPTeenBullsInterface public bapTeenBulls; /// @notice Utility contract instance BAPUtilitiesInterface public bapUtilities; /// @notice Address of the wallet that signs messages address public secret; /// @notice Cooldown period for METH bank withdraw uint256 public withdrawCoolDown = 1 hours; /// @notice Max amount of Merger Orbs that can be purchased uint256 public constant MERGER_ORB_AMOUNT = 1490; /// @notice Utility ID for the Merger Orb uint256 public constant MERGER_ORB = 2; /// @notice counter for Merger Orbs purchased uint256 public mergerOrbCounter = 0; /// @notice Last token received, Used for resurrecting uint256 private lastTokenReceived; /// @notice Boolean to prevent Teens being sent to the contract, only allowed when reviving bool private isReviving = false; /// @notice Mapping of User last withdraw from METH bank mapping(address => uint256) public lastWithdraw; /// @notice Mapping to check if a Teen has been resurrected mapping(uint256 => bool) public isResurrected; /// @notice Mapping to identify God Bulls mapping(uint256 => bool) public isGod; /// @notice Mapping to check if a signature has been used mapping(bytes => bool) public usedSignatures; /// @notice Resurrection event event TeenResurrected( address user, uint256 sacrificed, uint256 resurrected, uint256 newlyMinted, uint256 offChainUtility ); /// @notice Event emitted during on-chain Replenish event BreedingReplenish(address user, uint256 tokenId, uint256 timestamp); /// @notice Event emitted during on-chain Merger Orb purchase event MergerOrbBought(address user, uint256 timestamp); /// @notice Event for off chain payment for Merger Orb event OffChainMethPayment(address user, uint256 amount, uint256 timestamp); /// @notice Event for off chain minting of the Merger Orb event MergerOrbOffChainMint(address user, uint256 timestamp); /// @notice Event for Utility burned off chain event UtilityBurnedOffChain( address user, uint256 utilityId, uint256 timestamp ); /// @notice Event for Utilities burned on chain as deposit event UtilityBurnedOnChain( address user, uint256[] utilityIds, uint256[] amounts, uint256 timestamp ); /// @notice Event for Utilities off chain being minted event UtilitiesMinted( address user, uint256[] utilityIds, uint256[] amounts, uint256 timestamp ); /// @notice Event for METH withdrawn from the bank event MethWithdrawn(address user, uint256 amount, bytes signature, uint256 timestamp); /// @notice Deploys the contract and sets the instances addresses /// @param masterContractAddress: Address of the Master Contract /// @param genesisAddress: Address of the OG Bulls contract /// @param teensAddress: Address of the Teen Bulls contract /// @param utilitiesAddress: Address of the Utilities contract /// @dev Sets the God Bulls that IDs are less than 10000 constructor( address masterContractAddress, address genesisAddress, address teensAddress, address utilitiesAddress ) { masterContract = IMasterContract(masterContractAddress); bapGenesis = BAPGenesisInterface(genesisAddress); bapTeenBulls = BAPTeenBullsInterface(teensAddress); bapUtilities = BAPUtilitiesInterface(utilitiesAddress); isGod[2016] = true; isGod[3622] = true; isGod[3714] = true; isGod[4473] = true; isGod[4741] = true; isGod[5843] = true; isGod[6109] = true; isGod[7977] = true; isGod[8190] = true; isGod[9690] = true; mergerOrbCounter = bapUtilities.mergerOrbsPurchased(); } /// @notice Handle the resurrection of a Teen Bull /// @param utilityId: ID of the utility used to resurrect /// @param sacrificed: ID of the Teen Bull sacrificed /// @param resurrected: ID of the Teen Bull to resurrect /// @param timeOut: Time out for the signature /// @param offChainUtility: Boolean to check if the utility is on-chain or off-chain /// @param signature: Signature to check above parameters function teenResurrect( uint256 utilityId, uint256 sacrificed, uint256 resurrected, uint256 timeOut, uint256 offChainUtility, bytes memory signature ) external { require( utilityId >= 30 && utilityId < 34, "teenResurrect: Wrong utilityId id" ); require( timeOut > block.timestamp, "teenResurrect: Signature is expired" ); require( _verifyHashSignature( keccak256( abi.encode( msg.sender, utilityId, sacrificed, resurrected, timeOut, offChainUtility // 0 for on-chain, 1 for off-chain ) ), signature ), "teenResurrect: Signature is invalid" ); require( !isResurrected[sacrificed], "teenResurrect: Can't sacrifice a resurrected Teen Bull" ); require( !isResurrected[resurrected], "teenResurrect: Can't resurrect an already resurrected Teen Bull" ); if (offChainUtility == 0) { masterContract.burn(utilityId, 1); } else { emit UtilityBurnedOffChain(msg.sender, utilityId, block.timestamp); } _burnTeen(sacrificed); isReviving = true; bapTeenBulls.airdrop(address(this), 1); isReviving = false; isResurrected[lastTokenReceived] = true; isResurrected[resurrected] = true; bapTeenBulls.safeTransferFrom( address(this), msg.sender, lastTokenReceived ); emit TeenResurrected( msg.sender, sacrificed, resurrected, lastTokenReceived, offChainUtility ); lastTokenReceived = 0; } /// @notice Handle the purchase of a Merger Orb /// @param teen: ID of the Teen Bull to sacrifice /// @dev Teen needs to be burned to be able to buy the Merger Orb function buyMergeOrb(uint256 teen) external { require( mergerOrbCounter < MERGER_ORB_AMOUNT, "buyMergeOrb: Merger Orbs sold out" ); masterContract.pay(2400, 1200); _burnTeen(teen); masterContract.airdrop(msg.sender, 1, MERGER_ORB); mergerOrbCounter++; emit MergerOrbBought(msg.sender, block.timestamp); } /// @notice Handle the generation of Teen Bulls /// @dev Needs to pay METH and burn an Incubator function generateTeenBull() external { masterContract.pay(600, 300); masterContract.burn(1, 1); masterContract.airdrop(msg.sender, 1); } /// @notice Handle the purchase of a Merger Orb using off-chain payment or minting off-chain /// @param teen: ID of the Teen Bull to sacrifice /// @param timeOut: Time out for the signature /// @param offChainPayment: Boolean to check if the payment is on-chain or off-chain /// @param offChainMint: Boolean to check if the minting is on-chain or off-chain /// @param signature: Signature to check above parameters /// @dev If payment or mint is off-chain, emit the corresponding event function offChainMergeOrb( uint256 teen, uint256 timeOut, bool offChainPayment, bool offChainMint, bytes memory signature ) external { require( mergerOrbCounter < MERGER_ORB_AMOUNT, "offChainMergeOrb: Merger Orbs sold out" ); require( timeOut > block.timestamp, "offChainMergeOrb: Signature is expired" ); require( !usedSignatures[signature], "offChainMergeOrb: Signature already used" ); require( _verifyHashSignature( keccak256( abi.encode(msg.sender, teen, offChainPayment, offChainMint) ), signature ), "offChainMergeOrb: Signature is invalid" ); usedSignatures[signature] = true; if (!offChainPayment) { masterContract.pay(2400, 1200); } else { emit OffChainMethPayment(msg.sender, 2400, block.timestamp); } _burnTeen(teen); if (!offChainMint) { masterContract.airdrop(msg.sender, 1, MERGER_ORB); emit MergerOrbBought(msg.sender, block.timestamp); } else { emit MergerOrbOffChainMint(msg.sender, block.timestamp); } mergerOrbCounter++; } /// @notice Handle the breeding replenishment using on-chain utilities /// @param utilityId: ID of the utility used to replenish /// @param tokenId: ID of the Bull to replenish /// @param signature: Signature to check above parameters /// @dev Only the owner of the Bull can replenish and God Bulls cannot claim extra breeding function replenishBreedings( uint256 utilityId, uint256 tokenId, bytes memory signature ) external { require( utilityId >= 40 && utilityId < 45, "replenishBreedings: Wrong utilityId id" ); require( _verifyHashSignature( keccak256(abi.encode(msg.sender, utilityId, tokenId)), signature ), "replenishBreedings: Signature is invalid" ); require( bapGenesis.ownerOf(tokenId) == msg.sender, "replenishBreedings: Only the owner can replenish" ); require( !godBulls(tokenId), "replenishBreedings: God bulls cannot claim extra breeding" ); masterContract.burn(utilityId, 1); emit BreedingReplenish(msg.sender, tokenId, block.timestamp); } /// @notice Handle the burning of Utilities as deposit to be used off-chain /// @param utilityIds: IDs of the Utilities to burn /// @param amounts: Amounts to burn for each Utility function burnUtilities( uint256[] memory utilityIds, uint256[] memory amounts ) external { require( utilityIds.length == amounts.length, "burnUtilities: Arrays length mismatch" ); for (uint256 i = 0; i < utilityIds.length; i++) { masterContract.burn(utilityIds[i], amounts[i]); } emit UtilityBurnedOnChain( msg.sender, utilityIds, amounts, block.timestamp ); } /// @notice Handle the minting of Utilities held off-chain /// @param utilityIds: IDs of the Utilities to mint /// @param amounts: Amounts to mint for each Utility /// @param timeOut: Time out for the signature /// @param signature: Signature to check above parameters function mintUtilities( uint256[] memory utilityIds, uint256[] memory amounts, uint256 timeOut, bytes memory signature ) external { require( timeOut > block.timestamp, "mintUtilities: Signature is expired" ); require( !usedSignatures[signature], "mintUtilities: Signature already used" ); require( utilityIds.length == amounts.length, "mintUtilities: Arrays length mismatch" ); usedSignatures[signature] = true; string memory mintCode; for (uint256 i = 0; i < utilityIds.length; i++) { mintCode = string.concat(mintCode, "ID", utilityIds[i].toString()); mintCode = string.concat(mintCode, "A", amounts[i].toString()); masterContract.airdrop(msg.sender, amounts[i], utilityIds[i]); } require( _verifyHashSignature( keccak256(abi.encode(msg.sender, mintCode, timeOut)), signature ), "mintUtilities: Signature is invalid" ); emit UtilitiesMinted(msg.sender, utilityIds, amounts, block.timestamp); } /// @notice Handle the withdrawal from user's METH bank /// @param amount: Amount to withdraw /// @param timeOut: Time out for the signature /// @param signature: Signature to check above parameters function withdrawFromBank( uint256 amount, uint256 timeOut, bytes memory signature ) external { require(timeOut > block.timestamp, "withdrawFromBank: Signature is expired"); require(!usedSignatures[signature], "withdrawFromBank: Signature already used"); require(amount > 0, "withdrawFromBank: Amount must be greater than 0"); require( lastWithdraw[msg.sender] + withdrawCoolDown < block.timestamp, "withdrawFromBank: Withdrawal is too soon" ); require( _verifyHashSignature( keccak256(abi.encode(amount, msg.sender, timeOut )), signature ), "withdrawFromBank: Signature is invalid" ); usedSignatures[signature] = true; lastWithdraw[msg.sender] = block.timestamp; masterContract.claim(msg.sender, amount); emit MethWithdrawn(msg.sender, amount, signature, block.timestamp); } /// @notice Internal function to burn a Teen Bull /// @param tokenId: ID of the Teen Bull to burn /// @dev Only the owner of the Teen Bull can burn it and resurrected Teen Bulls cannot be burned function _burnTeen(uint256 tokenId) internal { require( bapTeenBulls.ownerOf(tokenId) == msg.sender, "Only the owner can burn" ); require(!isResurrected[tokenId], "Can't burn resurrected teens"); bapTeenBulls.burnTeenBull(tokenId); } /// @notice Internal function to set isResurrected status on previously resurrected Teen Bulls /// @param tokenIds: Array of Teen Bull IDs to set isResurrected status /// @param boolean: Boolean to set isResurrected status /// @dev Only used to set isResurrected status on Teen Bulls resurrected before the contract deployment function setIsResurrected( uint256[] memory tokenIds, bool boolean ) external onlyOwner { for (uint256 i = 0; i < tokenIds.length; i++) { isResurrected[tokenIds[i]] = boolean; } } /// @notice Internal function to set a new signer /// @param newSigner: Address of the new signer /// @dev Only the owner can set a new signer function setSigner(address newSigner) external onlyOwner { require(newSigner != address(0), "Invalid address"); secret = newSigner; } /// @notice Internal function to set the withdraw cool down /// @param newCoolDown: New withdraw cool down /// @dev Only the owner can set the withdraw cool down function setWithdrawCoolDown(uint256 newCoolDown) external onlyOwner { withdrawCoolDown = newCoolDown; } /// @notice Internal function to check if a Bull is a God Bull /// @param tokenId: ID of the Bull to check function godBulls(uint256 tokenId) internal view returns (bool) { return tokenId > 10010 || isGod[tokenId]; } /// @notice Internal function to handle the transfer of a Teen Bull during the resurrection process /// @param tokenId: ID of the Teen Bull to transfer /// @dev Only accept transfers from BAP Teens and only while reviving function onERC721Received( address, address, uint256 tokenId, bytes memory ) external virtual override returns (bytes4) { require( msg.sender == address(bapTeenBulls), "Only receive from BAP Teens" ); require(isReviving, "Only accept transfers while reviving"); lastTokenReceived = tokenId; return this.onERC721Received.selector; } /// @notice Transfer ownership from external contracts owned by this contract /// @param _contract Address of the external contract /// @param _newOwner New owner /// @dev Only contract owner can call this function function transferOwnershipExternalContract( address _contract, address _newOwner ) external onlyOwner { Ownable(_contract).transferOwnership(_newOwner); } /// @notice Internal function to check if a signature is valid /// @param freshHash: Hash to check /// @param signature: Signature to check function _verifyHashSignature( bytes32 freshHash, bytes memory signature ) internal view returns (bool) { bytes32 hash = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash) ); bytes32 r; bytes32 s; uint8 v; if (signature.length != 65) { return false; } assembly { r := mload(add(signature, 32)) s := mload(add(signature, 64)) v := byte(0, mload(add(signature, 96))) } if (v < 27) { v += 27; } address signer = address(0); if (v == 27 || v == 28) { // solium-disable-next-line arg-overflow signer = ecrecover(hash, v, r, s); } return secret == signer; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; interface BAPUtilitiesInterface { function burn(uint256, uint256) external; function purchaseIncubator() external; function purchaseMergerOrb() external; function mergerOrbsPurchased() external view returns (uint256); function transferOwnership(address) external; function airdrop( address, uint256, uint256 ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; interface BAPTeenBullsInterface { function generateTeenBull() external; function generateMergerOrb() external; function ownerOf(uint256) external view returns (address); function burnTeenBull(uint256) external; function airdrop(address, uint256) external; function safeTransferFrom( address, address, uint256 ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; interface BAPGenesisInterface { function minted() external view returns (uint256); function mintingDatetime(uint256) external view returns (uint256); function updateBullBreedings(uint256) external; function ownerOf(uint256) external view returns (address); function breedings(uint256) external view returns (uint256); function maxBreedings() external view returns (uint256); function generateGodBull() external; function refund(address, uint256) external payable; function safeTransferFrom( address, address, uint256 ) external; function genesisTimestamp() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 // solhint-disable-next-line pragma solidity 0.8.12; interface IMasterContract { // METH functions function claim(address to, uint256 amount) external; function pay(uint256 payment, uint256 fee) external; // Teens functions function airdrop(address to, uint256 amount) external; function burnTeenBull(uint256 tokenId) external; // Utilities functions function burn(uint256 id, uint256 amount) external; function airdrop( address to, uint256 amount, uint256 id ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"masterContractAddress","type":"address"},{"internalType":"address","name":"genesisAddress","type":"address"},{"internalType":"address","name":"teensAddress","type":"address"},{"internalType":"address","name":"utilitiesAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BreedingReplenish","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MergerOrbBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MergerOrbOffChainMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MethWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"OffChainMethPayment","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"sacrificed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"resurrected","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newlyMinted","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"offChainUtility","type":"uint256"}],"name":"TeenResurrected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"utilityIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UtilitiesMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"utilityId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UtilityBurnedOffChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"utilityIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UtilityBurnedOnChain","type":"event"},{"inputs":[],"name":"MERGER_ORB","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MERGER_ORB_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bapGenesis","outputs":[{"internalType":"contract BAPGenesisInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bapTeenBulls","outputs":[{"internalType":"contract BAPTeenBullsInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bapUtilities","outputs":[{"internalType":"contract BAPUtilitiesInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"utilityIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnUtilities","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"teen","type":"uint256"}],"name":"buyMergeOrb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateTeenBull","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isGod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isResurrected","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterContract","outputs":[{"internalType":"contract IMasterContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mergerOrbCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"utilityIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintUtilities","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"teen","type":"uint256"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"bool","name":"offChainPayment","type":"bool"},{"internalType":"bool","name":"offChainMint","type":"bool"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"offChainMergeOrb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":"utilityId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"replenishBreedings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secret","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"boolean","type":"bool"}],"name":"setIsResurrected","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCoolDown","type":"uint256"}],"name":"setWithdrawCoolDown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"utilityId","type":"uint256"},{"internalType":"uint256","name":"sacrificed","type":"uint256"},{"internalType":"uint256","name":"resurrected","type":"uint256"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"uint256","name":"offChainUtility","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"teenResurrect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnershipExternalContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"usedSignatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawCoolDown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"timeOut","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"withdrawFromBank","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052610e1060065560006007556009805460ff191690553480156200002657600080fd5b5060405162002d3d38038062002d3d833981016040819052620000499162000323565b6200005433620002b6565b600180546001600160a01b038087166001600160a01b03199283161783556002805487831690841617905560038054868316908416179055600480549185169190921681178255600c60209081527fb18fcbe4d6ea2783795f9d37e1555b12da77e9b6a491648575477e5822cc5f1d805460ff1990811686179091557f0750c4bfc6012e6b47eec8a77895442205d860d4f8ff1899a6ca4189bc15b7be80548216861790557fe12cb0a4bb4cf38ae6d981f8b2d588aa79d57c3683e40c10d47f2c4201d2bd6880548216861790557f0372364d389a1230bafcf93adc4af9b10a142a76c91a39ecda1171d57b9572f580548216861790557f5fc372c41739f9a8c22173f1fa84161ab1ba94a722e6681f0f9ef530efc2d1db80548216861790557fdff95c89c7a43f479b73de112958acfa024bb2ae67e65a3a56782ec5e26e44a380548216861790557fb4178acc96fa862b0f48643583191a6745d120f7f872c321e34af8b1b174d8e780548216861790557fae78ac469b62e2bde2f908999323cdba32f64f2ab6eb934141a53b397c3a1fa380548216861790557ffb873331adada06af483a9cac1da58619e09726eb453f435ef1b78d02ac6675180548216861790556125da6000527fc98b042b6adf19b51ec90b3f36c6affdd9e5071ddb449f17a577340360c6524d8054909116909417909355604080516301a86d8b60e61b815290519193636a1b62c0938281019391928290030181865afa15801562000282573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002a8919062000380565b600755506200039a92505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200031e57600080fd5b919050565b600080600080608085870312156200033a57600080fd5b620003458562000306565b9350620003556020860162000306565b9250620003656040860162000306565b9150620003756060860162000306565b905092959194509250565b6000602082840312156200039357600080fd5b5051919050565b61299380620003aa6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637bebe4cb11610104578063b6b465ed116100a2578063e949580e11610071578063e949580e146103ec578063f2fde38b1461041a578063f62694f71461042d578063f77452e61461045057600080fd5b8063b6b465ed146103ab578063c5577ff7146103be578063cd446e22146103c6578063d1efd30d146103d957600080fd5b80638da5cb5b116100de5780638da5cb5b146103615780639dbe5a8214610372578063b09c2a3d14610385578063b1811df81461039857600080fd5b80637bebe4cb146103285780637f154deb1461033b578063850f700e1461034e57600080fd5b806346e27cdd116101715780636c19e7831161014b5780636c19e783146102f15780636f02d3d1146103045780636f55094f1461030d578063715018a61461032057600080fd5b806346e27cdd14610295578063535c33ef1461029e578063624d7b72146102d157600080fd5b8063214e24ea116101ad578063214e24ea1461023157806323ec522e1461025c578063243309821461026f57806338783d731461028257600080fd5b806301d81608146101d45780630610f570146101f0578063150b7a0214610205575b600080fd5b6101dd60075481565b6040519081526020015b60405180910390f35b6102036101fe3660046122a0565b610458565b005b610218610213366004612389565b6105c0565b6040516001600160e01b031990911681526020016101e7565b600454610244906001600160a01b031681565b6040516001600160a01b0390911681526020016101e7565b61020361026a3660046123f5565b61068e565b61020361027d366004612445565b6109d0565b600254610244906001600160a01b031681565b6101dd60065481565b6102c16102ac36600461247e565b600b6020526000908152604090205460ff1681565b60405190151581526020016101e7565b6101dd6102df366004612497565b600a6020526000908152604090205481565b6102036102ff366004612497565b610a37565b6101dd6105d281565b61020361031b3660046124d0565b610aa9565b610203610e59565b610203610336366004612542565b610e6d565b610203610349366004612590565b610edd565b600354610244906001600160a01b031681565b6000546001600160a01b0316610244565b61020361038036600461247e565b611360565b6102036103933660046123f5565b6114e4565b6102036103a63660046125fc565b6117b5565b6102036103b936600461247e565b611b2b565b610203611b38565b600154610244906001600160a01b031681565b600554610244906001600160a01b031681565b6102c16103fa366004612682565b8051602081830181018051600d8252928201919093012091525460ff1681565b610203610428366004612497565b611c6a565b6102c161043b36600461247e565b600c6020526000908152604090205460ff1681565b6101dd600281565b80518251146104bc5760405162461bcd60e51b815260206004820152602560248201527f6275726e5574696c69746965733a20417272617973206c656e677468206d69736044820152640dac2e8c6d60db1b60648201526084015b60405180910390fd5b60005b825181101561057e5760015483516001600160a01b039091169063b390c0ab908590849081106104f1576104f16126bf565b602002602001015184848151811061050b5761050b6126bf565b60200260200101516040518363ffffffff1660e01b8152600401610539929190918252602082015260400190565b600060405180830381600087803b15801561055357600080fd5b505af1158015610567573d6000803e3d6000fd5b505050508080610576906126eb565b9150506104bf565b507fb3a4973397b8540c4da7f6046fc4e8727fe984bfba50234d608978c9eb0f43af338383426040516105b49493929190612741565b60405180910390a15050565b6003546000906001600160a01b0316331461061d5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920726563656976652066726f6d20424150205465656e73000000000060448201526064016104b3565b60095460ff1661067b5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c7920616363657074207472616e7366657273207768696c65207265766960448201526376696e6760e01b60648201526084016104b3565b505060085550630a85bd0160e11b919050565b4282116106ec5760405162461bcd60e51b815260206004820152602660248201527f776974686472617746726f6d42616e6b3a205369676e617475726520697320656044820152651e1c1a5c995960d21b60648201526084016104b3565b600d816040516106fc91906127b5565b9081526040519081900360200190205460ff161561076d5760405162461bcd60e51b815260206004820152602860248201527f776974686472617746726f6d42616e6b3a205369676e617475726520616c726560448201526718591e481d5cd95960c21b60648201526084016104b3565b600083116107d55760405162461bcd60e51b815260206004820152602f60248201527f776974686472617746726f6d42616e6b3a20416d6f756e74206d75737420626560448201526e02067726561746572207468616e203608c1b60648201526084016104b3565b600654336000908152600a602052604090205442916107f3916127d1565b106108515760405162461bcd60e51b815260206004820152602860248201527f776974686472617746726f6d42616e6b3a205769746864726177616c206973206044820152673a37b79039b7b7b760c11b60648201526084016104b3565b604080516020810185905233918101919091526060810183905261088f906080015b6040516020818303038152906040528051906020012082611ce3565b6108ea5760405162461bcd60e51b815260206004820152602660248201527f776974686472617746726f6d42616e6b3a205369676e617475726520697320696044820152651b9d985b1a5960d21b60648201526084016104b3565b6001600d826040516108fc91906127b5565b9081526040805160209281900383018120805460ff191694151594909417909355336000818152600a9093529120429055600154635569f64b60e11b83526004830191909152602482018590526001600160a01b03169063aad3ec9690604401600060405180830381600087803b15801561097657600080fd5b505af115801561098a573d6000803e3d6000fd5b505050507f575b71ce435e3c8ecd25df4d01d1897ae48b3a3d50dc0f2e543b9f5f434ff25a338483426040516109c39493929190612815565b60405180910390a1505050565b6109d8611e14565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b90602401600060405180830381600087803b158015610a1b57600080fd5b505af1158015610a2f573d6000803e3d6000fd5b505050505050565b610a3f611e14565b6001600160a01b038116610a875760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016104b3565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6105d260075410610b0b5760405162461bcd60e51b815260206004820152602660248201527f6f6666436861696e4d657267654f72623a204d6572676572204f72627320736f6044820152651b19081bdd5d60d21b60648201526084016104b3565b428411610b695760405162461bcd60e51b815260206004820152602660248201527f6f6666436861696e4d657267654f72623a205369676e617475726520697320656044820152651e1c1a5c995960d21b60648201526084016104b3565b600d81604051610b7991906127b5565b9081526040519081900360200190205460ff1615610bea5760405162461bcd60e51b815260206004820152602860248201527f6f6666436861696e4d657267654f72623a205369676e617475726520616c726560448201526718591e481d5cd95960c21b60648201526084016104b3565b6040805133602082015290810186905283151560608201528215156080820152610c169060a001610873565b610c715760405162461bcd60e51b815260206004820152602660248201527f6f6666436861696e4d657267654f72623a205369676e617475726520697320696044820152651b9d985b1a5960d21b60648201526084016104b3565b6001600d82604051610c8391906127b5565b908152604051908190036020019020805491151560ff1990921691909117905582610d14576001546040516377a4777360e11b815261096060048201526104b060248201526001600160a01b039091169063ef48eee690604401600060405180830381600087803b158015610cf757600080fd5b505af1158015610d0b573d6000803e3d6000fd5b50505050610d52565b7fd01cf9c3d290b1060b5b2d6a8d0cfa927a6056446a89830555f9e3ea5d5d26c63361096042604051610d499392919061284d565b60405180910390a15b610d5b85611e6e565b81610e04576001805460405163e1bc296760e01b81526001600160a01b039091169163e1bc296791610d9491339160029060040161284d565b600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b5050604080513381524260208201527f10d241ea439c0d02215e1e0241a6e212a04bbbb35068a767dfb330b371164c2d935001905060405180910390a1610e3d565b604080513381524260208201527f257defe2ab394543d8bd8fcbc103654db56d5e58ae10abf03dc496d1692a1bc3910160405180910390a15b60078054906000610e4d836126eb565b91905055505050505050565b610e61611e14565b610e6b6000611ff1565b565b610e75611e14565b60005b8251811015610ed85781600b6000858481518110610e9857610e986126bf565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ed0906126eb565b915050610e78565b505050565b601e8610158015610eee5750602286105b610f445760405162461bcd60e51b815260206004820152602160248201527f7465656e5265737572726563743a2057726f6e67207574696c697479496420696044820152601960fa1b60648201526084016104b3565b428311610f9f5760405162461bcd60e51b815260206004820152602360248201527f7465656e5265737572726563743a205369676e617475726520697320657870696044820152621c995960ea1b60648201526084016104b3565b60408051336020820152908101879052606081018690526080810185905260a0810184905260c08101839052610fd79060e001610873565b61102f5760405162461bcd60e51b815260206004820152602360248201527f7465656e5265737572726563743a205369676e617475726520697320696e76616044820152621b1a5960ea1b60648201526084016104b3565b6000858152600b602052604090205460ff16156110ad5760405162461bcd60e51b815260206004820152603660248201527f7465656e5265737572726563743a2043616e2774207361637269666963652061604482015275081c995cdd5c9c9958dd1959081519595b88109d5b1b60521b60648201526084016104b3565b6000848152600b602052604090205460ff16156111325760405162461bcd60e51b815260206004820152603f60248201527f7465656e5265737572726563743a2043616e277420726573757272656374206160448201527f6e20616c7265616479207265737572726563746564205465656e2042756c6c0060648201526084016104b3565b816111a1576001805460405163b390c0ab60e01b81526004810189905260248101929092526001600160a01b03169063b390c0ab90604401600060405180830381600087803b15801561118457600080fd5b505af1158015611198573d6000803e3d6000fd5b505050506111dd565b7fbf348d57f40d5e718c36e92188472e18417442d08bda9ea3dc50a291418eea433387426040516111d49392919061284d565b60405180910390a15b6111e685611e6e565b6009805460ff191660019081179091556003546040516322e9330f60e21b815230600482015260248101929092526001600160a01b031690638ba4cc3c90604401600060405180830381600087803b15801561124157600080fd5b505af1158015611255573d6000803e3d6000fd5b50506009805460ff19908116909155600880546000908152600b60205260408082208054851660019081179091558a835291819020805490941690911790925560035490549151632142170760e11b815230600482015233602482015260448101929092526001600160a01b031692506342842e0e9150606401600060405180830381600087803b1580156112e957600080fd5b505af11580156112fd573d6000803e3d6000fd5b505060085460408051338152602081018a9052808201899052606081019290925260808201869052517f772a3dfb63f8a4904bc5c5c5881e63083f06959f0cd784079eb92583712fcaa793509081900360a0019150a15050600060085550505050565b6105d2600754106113bd5760405162461bcd60e51b815260206004820152602160248201527f6275794d657267654f72623a204d6572676572204f72627320736f6c64206f756044820152601d60fa1b60648201526084016104b3565b6001546040516377a4777360e11b815261096060048201526104b060248201526001600160a01b039091169063ef48eee690604401600060405180830381600087803b15801561140c57600080fd5b505af1158015611420573d6000803e3d6000fd5b5050505061142d81611e6e565b6001805460405163e1bc296760e01b81526001600160a01b039091169163e1bc29679161146191339160029060040161284d565b600060405180830381600087803b15801561147b57600080fd5b505af115801561148f573d6000803e3d6000fd5b5050600780549250905060006114a4836126eb565b9091555050604080513381524260208201527f10d241ea439c0d02215e1e0241a6e212a04bbbb35068a767dfb330b371164c2d910160405180910390a150565b602883101580156114f55750602d83105b6115505760405162461bcd60e51b815260206004820152602660248201527f7265706c656e6973684272656564696e67733a2057726f6e67207574696c69746044820152651e5259081a5960d21b60648201526084016104b3565b6115683384846040516020016108739392919061284d565b6115c55760405162461bcd60e51b815260206004820152602860248201527f7265706c656e6973684272656564696e67733a205369676e6174757265206973604482015267081a5b9d985b1a5960c21b60648201526084016104b3565b6002546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e90602401602060405180830381865afa15801561160e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611632919061286e565b6001600160a01b0316146116a15760405162461bcd60e51b815260206004820152603060248201527f7265706c656e6973684272656564696e67733a204f6e6c7920746865206f776e60448201526f0cae440c6c2dc40e4cae0d8cadcd2e6d60831b60648201526084016104b3565b6116aa82612041565b1561171d5760405162461bcd60e51b815260206004820152603960248201527f7265706c656e6973684272656564696e67733a20476f642062756c6c7320636160448201527f6e6e6f7420636c61696d206578747261206272656564696e670000000000000060648201526084016104b3565b6001805460405163b390c0ab60e01b81526004810186905260248101929092526001600160a01b03169063b390c0ab90604401600060405180830381600087803b15801561176a57600080fd5b505af115801561177e573d6000803e3d6000fd5b505050507f8169d5944e992090f148f4a81dab1fc0a5fe35393ae06022464eafc709b8e0dc3383426040516109c39392919061284d565b4282116118105760405162461bcd60e51b815260206004820152602360248201527f6d696e745574696c69746965733a205369676e617475726520697320657870696044820152621c995960ea1b60648201526084016104b3565b600d8160405161182091906127b5565b9081526040519081900360200190205460ff161561188e5760405162461bcd60e51b815260206004820152602560248201527f6d696e745574696c69746965733a205369676e617475726520616c7265616479604482015264081d5cd95960da1b60648201526084016104b3565b82518451146118ed5760405162461bcd60e51b815260206004820152602560248201527f6d696e745574696c69746965733a20417272617973206c656e677468206d69736044820152640dac2e8c6d60db1b60648201526084016104b3565b6001600d826040516118ff91906127b5565b908152604051908190036020019020805491151560ff19909216919091179055606060005b8551811015611a5a5781611950878381518110611943576119436126bf565b6020026020010151612064565b60405160200161196192919061288b565b604051602081830303815290604052915081611988868381518110611943576119436126bf565b6040516020016119999291906128c8565b60408051601f1981840301815291905260015486519193506001600160a01b03169063e1bc29679033908890859081106119d5576119d56126bf565b60200260200101518985815181106119ef576119ef6126bf565b60200260200101516040518463ffffffff1660e01b8152600401611a159392919061284d565b600060405180830381600087803b158015611a2f57600080fd5b505af1158015611a43573d6000803e3d6000fd5b505050508080611a52906126eb565b915050611924565b50611a8f338285604051602001611a7393929190612904565b6040516020818303038152906040528051906020012083611ce3565b611ae75760405162461bcd60e51b815260206004820152602360248201527f6d696e745574696c69746965733a205369676e617475726520697320696e76616044820152621b1a5960ea1b60648201526084016104b3565b7fa51ab24ef8636add05ce7cdc8088bccdbbd533f2f757f2c1e9d4adc1c544e96533868642604051611b1c9493929190612741565b60405180910390a15050505050565b611b33611e14565b600655565b6001546040516377a4777360e11b8152610258600482015261012c60248201526001600160a01b039091169063ef48eee690604401600060405180830381600087803b158015611b8757600080fd5b505af1158015611b9b573d6000803e3d6000fd5b50506001805460405163b390c0ab60e01b81526004810183905260248101929092526001600160a01b0316925063b390c0ab9150604401600060405180830381600087803b158015611bec57600080fd5b505af1158015611c00573d6000803e3d6000fd5b5050600180546040516322e9330f60e21b815233600482015260248101929092526001600160a01b03169250638ba4cc3c9150604401600060405180830381600087803b158015611c5057600080fd5b505af1158015611c64573d6000803e3d6000fd5b50505050565b611c72611e14565b6001600160a01b038116611cd75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104b3565b611ce081611ff1565b50565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390526000908190605c0160405160208183030381529060405280519060200120905060008060008551604114611d4e576000945050505050611e0e565b50505060208301516040840151606085015160001a601b811015611d7a57611d77601b82612938565b90505b60008160ff16601b1480611d9157508160ff16601c145b15611df65760408051600081526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611de9573d6000803e3d6000fd5b5050506020604051035190505b6005546001600160a01b039081169116149450505050505b92915050565b6000546001600160a01b03163314610e6b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b3565b6003546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e90602401602060405180830381865afa158015611eb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611edb919061286e565b6001600160a01b031614611f315760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920746865206f776e65722063616e206275726e00000000000000000060448201526064016104b3565b6000818152600b602052604090205460ff1615611f905760405162461bcd60e51b815260206004820152601c60248201527f43616e2774206275726e207265737572726563746564207465656e730000000060448201526064016104b3565b60035460405163299f537360e01b8152600481018390526001600160a01b039091169063299f537390602401600060405180830381600087803b158015611fd657600080fd5b505af1158015611fea573d6000803e3d6000fd5b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061271a821180611e0e5750506000908152600c602052604090205460ff1690565b6060600061207183612101565b600101905060008167ffffffffffffffff811115612091576120916121d9565b6040519080825280601f01601f1916602001820160405280156120bb576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846120f4576120f9565b6120c5565b509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106121405772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061216c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061218a57662386f26fc10000830492506010015b6305f5e10083106121a2576305f5e100830492506008015b61271083106121b657612710830492506004015b606483106121c8576064830492506002015b600a8310611e0e5760010192915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612218576122186121d9565b604052919050565b600082601f83011261223157600080fd5b8135602067ffffffffffffffff82111561224d5761224d6121d9565b8160051b61225c8282016121ef565b928352848101820192828101908785111561227657600080fd5b83870192505b848310156122955782358252918301919083019061227c565b979650505050505050565b600080604083850312156122b357600080fd5b823567ffffffffffffffff808211156122cb57600080fd5b6122d786838701612220565b935060208501359150808211156122ed57600080fd5b506122fa85828601612220565b9150509250929050565b6001600160a01b0381168114611ce057600080fd5b600082601f83011261232a57600080fd5b813567ffffffffffffffff811115612344576123446121d9565b612357601f8201601f19166020016121ef565b81815284602083860101111561236c57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561239f57600080fd5b84356123aa81612304565b935060208501356123ba81612304565b925060408501359150606085013567ffffffffffffffff8111156123dd57600080fd5b6123e987828801612319565b91505092959194509250565b60008060006060848603121561240a57600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561242f57600080fd5b61243b86828701612319565b9150509250925092565b6000806040838503121561245857600080fd5b823561246381612304565b9150602083013561247381612304565b809150509250929050565b60006020828403121561249057600080fd5b5035919050565b6000602082840312156124a957600080fd5b81356124b481612304565b9392505050565b803580151581146124cb57600080fd5b919050565b600080600080600060a086880312156124e857600080fd5b85359450602086013593506124ff604087016124bb565b925061250d606087016124bb565b9150608086013567ffffffffffffffff81111561252957600080fd5b61253588828901612319565b9150509295509295909350565b6000806040838503121561255557600080fd5b823567ffffffffffffffff81111561256c57600080fd5b61257885828601612220565b925050612587602084016124bb565b90509250929050565b60008060008060008060c087890312156125a957600080fd5b863595506020870135945060408701359350606087013592506080870135915060a087013567ffffffffffffffff8111156125e357600080fd5b6125ef89828a01612319565b9150509295509295509295565b6000806000806080858703121561261257600080fd5b843567ffffffffffffffff8082111561262a57600080fd5b61263688838901612220565b9550602087013591508082111561264c57600080fd5b61265888838901612220565b945060408701359350606087013591508082111561267557600080fd5b506123e987828801612319565b60006020828403121561269457600080fd5b813567ffffffffffffffff8111156126ab57600080fd5b6126b784828501612319565b949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156126ff576126ff6126d5565b5060010190565b600081518084526020808501945080840160005b838110156127365781518752958201959082019060010161271a565b509495945050505050565b6001600160a01b038516815260806020820181905260009061276590830186612706565b82810360408401526127778186612706565b91505082606083015295945050505050565b60005b838110156127a457818101518382015260200161278c565b83811115611c645750506000910152565b600082516127c7818460208701612789565b9190910192915050565b600082198211156127e4576127e46126d5565b500190565b60008151808452612801816020860160208601612789565b601f01601f19169290920160200192915050565b60018060a01b038516815283602082015260806040820152600061283c60808301856127e9565b905082606083015295945050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60006020828403121561288057600080fd5b81516124b481612304565b6000835161289d818460208801612789565b61125160f21b90830190815283516128bc816002840160208801612789565b01600201949350505050565b600083516128da818460208801612789565b604160f81b90830190815283516128f8816001840160208801612789565b01600101949350505050565b6001600160a01b0384168152606060208201819052600090612928908301856127e9565b9050826040830152949350505050565b600060ff821660ff84168060ff03821115612955576129556126d5565b01939250505056fea2646970667358221220590d3574b11bd8b4f419c04eea34c915a83436ef086db3d1f8c0161fc536c56564736f6c634300080c0033000000000000000000000000d8162d9703d1c13476fee3f20adf2c6468683f0e0000000000000000000000002cf6be9aac1c7630d5a23af88c28275c70eb8819000000000000000000000000cf099445347f0f006c19b90f1c1933eb9413682b0000000000000000000000002923c3e5a0f10bc02d8c90287b2af45cd579dec4
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637bebe4cb11610104578063b6b465ed116100a2578063e949580e11610071578063e949580e146103ec578063f2fde38b1461041a578063f62694f71461042d578063f77452e61461045057600080fd5b8063b6b465ed146103ab578063c5577ff7146103be578063cd446e22146103c6578063d1efd30d146103d957600080fd5b80638da5cb5b116100de5780638da5cb5b146103615780639dbe5a8214610372578063b09c2a3d14610385578063b1811df81461039857600080fd5b80637bebe4cb146103285780637f154deb1461033b578063850f700e1461034e57600080fd5b806346e27cdd116101715780636c19e7831161014b5780636c19e783146102f15780636f02d3d1146103045780636f55094f1461030d578063715018a61461032057600080fd5b806346e27cdd14610295578063535c33ef1461029e578063624d7b72146102d157600080fd5b8063214e24ea116101ad578063214e24ea1461023157806323ec522e1461025c578063243309821461026f57806338783d731461028257600080fd5b806301d81608146101d45780630610f570146101f0578063150b7a0214610205575b600080fd5b6101dd60075481565b6040519081526020015b60405180910390f35b6102036101fe3660046122a0565b610458565b005b610218610213366004612389565b6105c0565b6040516001600160e01b031990911681526020016101e7565b600454610244906001600160a01b031681565b6040516001600160a01b0390911681526020016101e7565b61020361026a3660046123f5565b61068e565b61020361027d366004612445565b6109d0565b600254610244906001600160a01b031681565b6101dd60065481565b6102c16102ac36600461247e565b600b6020526000908152604090205460ff1681565b60405190151581526020016101e7565b6101dd6102df366004612497565b600a6020526000908152604090205481565b6102036102ff366004612497565b610a37565b6101dd6105d281565b61020361031b3660046124d0565b610aa9565b610203610e59565b610203610336366004612542565b610e6d565b610203610349366004612590565b610edd565b600354610244906001600160a01b031681565b6000546001600160a01b0316610244565b61020361038036600461247e565b611360565b6102036103933660046123f5565b6114e4565b6102036103a63660046125fc565b6117b5565b6102036103b936600461247e565b611b2b565b610203611b38565b600154610244906001600160a01b031681565b600554610244906001600160a01b031681565b6102c16103fa366004612682565b8051602081830181018051600d8252928201919093012091525460ff1681565b610203610428366004612497565b611c6a565b6102c161043b36600461247e565b600c6020526000908152604090205460ff1681565b6101dd600281565b80518251146104bc5760405162461bcd60e51b815260206004820152602560248201527f6275726e5574696c69746965733a20417272617973206c656e677468206d69736044820152640dac2e8c6d60db1b60648201526084015b60405180910390fd5b60005b825181101561057e5760015483516001600160a01b039091169063b390c0ab908590849081106104f1576104f16126bf565b602002602001015184848151811061050b5761050b6126bf565b60200260200101516040518363ffffffff1660e01b8152600401610539929190918252602082015260400190565b600060405180830381600087803b15801561055357600080fd5b505af1158015610567573d6000803e3d6000fd5b505050508080610576906126eb565b9150506104bf565b507fb3a4973397b8540c4da7f6046fc4e8727fe984bfba50234d608978c9eb0f43af338383426040516105b49493929190612741565b60405180910390a15050565b6003546000906001600160a01b0316331461061d5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920726563656976652066726f6d20424150205465656e73000000000060448201526064016104b3565b60095460ff1661067b5760405162461bcd60e51b8152602060048201526024808201527f4f6e6c7920616363657074207472616e7366657273207768696c65207265766960448201526376696e6760e01b60648201526084016104b3565b505060085550630a85bd0160e11b919050565b4282116106ec5760405162461bcd60e51b815260206004820152602660248201527f776974686472617746726f6d42616e6b3a205369676e617475726520697320656044820152651e1c1a5c995960d21b60648201526084016104b3565b600d816040516106fc91906127b5565b9081526040519081900360200190205460ff161561076d5760405162461bcd60e51b815260206004820152602860248201527f776974686472617746726f6d42616e6b3a205369676e617475726520616c726560448201526718591e481d5cd95960c21b60648201526084016104b3565b600083116107d55760405162461bcd60e51b815260206004820152602f60248201527f776974686472617746726f6d42616e6b3a20416d6f756e74206d75737420626560448201526e02067726561746572207468616e203608c1b60648201526084016104b3565b600654336000908152600a602052604090205442916107f3916127d1565b106108515760405162461bcd60e51b815260206004820152602860248201527f776974686472617746726f6d42616e6b3a205769746864726177616c206973206044820152673a37b79039b7b7b760c11b60648201526084016104b3565b604080516020810185905233918101919091526060810183905261088f906080015b6040516020818303038152906040528051906020012082611ce3565b6108ea5760405162461bcd60e51b815260206004820152602660248201527f776974686472617746726f6d42616e6b3a205369676e617475726520697320696044820152651b9d985b1a5960d21b60648201526084016104b3565b6001600d826040516108fc91906127b5565b9081526040805160209281900383018120805460ff191694151594909417909355336000818152600a9093529120429055600154635569f64b60e11b83526004830191909152602482018590526001600160a01b03169063aad3ec9690604401600060405180830381600087803b15801561097657600080fd5b505af115801561098a573d6000803e3d6000fd5b505050507f575b71ce435e3c8ecd25df4d01d1897ae48b3a3d50dc0f2e543b9f5f434ff25a338483426040516109c39493929190612815565b60405180910390a1505050565b6109d8611e14565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b90602401600060405180830381600087803b158015610a1b57600080fd5b505af1158015610a2f573d6000803e3d6000fd5b505050505050565b610a3f611e14565b6001600160a01b038116610a875760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016104b3565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6105d260075410610b0b5760405162461bcd60e51b815260206004820152602660248201527f6f6666436861696e4d657267654f72623a204d6572676572204f72627320736f6044820152651b19081bdd5d60d21b60648201526084016104b3565b428411610b695760405162461bcd60e51b815260206004820152602660248201527f6f6666436861696e4d657267654f72623a205369676e617475726520697320656044820152651e1c1a5c995960d21b60648201526084016104b3565b600d81604051610b7991906127b5565b9081526040519081900360200190205460ff1615610bea5760405162461bcd60e51b815260206004820152602860248201527f6f6666436861696e4d657267654f72623a205369676e617475726520616c726560448201526718591e481d5cd95960c21b60648201526084016104b3565b6040805133602082015290810186905283151560608201528215156080820152610c169060a001610873565b610c715760405162461bcd60e51b815260206004820152602660248201527f6f6666436861696e4d657267654f72623a205369676e617475726520697320696044820152651b9d985b1a5960d21b60648201526084016104b3565b6001600d82604051610c8391906127b5565b908152604051908190036020019020805491151560ff1990921691909117905582610d14576001546040516377a4777360e11b815261096060048201526104b060248201526001600160a01b039091169063ef48eee690604401600060405180830381600087803b158015610cf757600080fd5b505af1158015610d0b573d6000803e3d6000fd5b50505050610d52565b7fd01cf9c3d290b1060b5b2d6a8d0cfa927a6056446a89830555f9e3ea5d5d26c63361096042604051610d499392919061284d565b60405180910390a15b610d5b85611e6e565b81610e04576001805460405163e1bc296760e01b81526001600160a01b039091169163e1bc296791610d9491339160029060040161284d565b600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b5050604080513381524260208201527f10d241ea439c0d02215e1e0241a6e212a04bbbb35068a767dfb330b371164c2d935001905060405180910390a1610e3d565b604080513381524260208201527f257defe2ab394543d8bd8fcbc103654db56d5e58ae10abf03dc496d1692a1bc3910160405180910390a15b60078054906000610e4d836126eb565b91905055505050505050565b610e61611e14565b610e6b6000611ff1565b565b610e75611e14565b60005b8251811015610ed85781600b6000858481518110610e9857610e986126bf565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ed0906126eb565b915050610e78565b505050565b601e8610158015610eee5750602286105b610f445760405162461bcd60e51b815260206004820152602160248201527f7465656e5265737572726563743a2057726f6e67207574696c697479496420696044820152601960fa1b60648201526084016104b3565b428311610f9f5760405162461bcd60e51b815260206004820152602360248201527f7465656e5265737572726563743a205369676e617475726520697320657870696044820152621c995960ea1b60648201526084016104b3565b60408051336020820152908101879052606081018690526080810185905260a0810184905260c08101839052610fd79060e001610873565b61102f5760405162461bcd60e51b815260206004820152602360248201527f7465656e5265737572726563743a205369676e617475726520697320696e76616044820152621b1a5960ea1b60648201526084016104b3565b6000858152600b602052604090205460ff16156110ad5760405162461bcd60e51b815260206004820152603660248201527f7465656e5265737572726563743a2043616e2774207361637269666963652061604482015275081c995cdd5c9c9958dd1959081519595b88109d5b1b60521b60648201526084016104b3565b6000848152600b602052604090205460ff16156111325760405162461bcd60e51b815260206004820152603f60248201527f7465656e5265737572726563743a2043616e277420726573757272656374206160448201527f6e20616c7265616479207265737572726563746564205465656e2042756c6c0060648201526084016104b3565b816111a1576001805460405163b390c0ab60e01b81526004810189905260248101929092526001600160a01b03169063b390c0ab90604401600060405180830381600087803b15801561118457600080fd5b505af1158015611198573d6000803e3d6000fd5b505050506111dd565b7fbf348d57f40d5e718c36e92188472e18417442d08bda9ea3dc50a291418eea433387426040516111d49392919061284d565b60405180910390a15b6111e685611e6e565b6009805460ff191660019081179091556003546040516322e9330f60e21b815230600482015260248101929092526001600160a01b031690638ba4cc3c90604401600060405180830381600087803b15801561124157600080fd5b505af1158015611255573d6000803e3d6000fd5b50506009805460ff19908116909155600880546000908152600b60205260408082208054851660019081179091558a835291819020805490941690911790925560035490549151632142170760e11b815230600482015233602482015260448101929092526001600160a01b031692506342842e0e9150606401600060405180830381600087803b1580156112e957600080fd5b505af11580156112fd573d6000803e3d6000fd5b505060085460408051338152602081018a9052808201899052606081019290925260808201869052517f772a3dfb63f8a4904bc5c5c5881e63083f06959f0cd784079eb92583712fcaa793509081900360a0019150a15050600060085550505050565b6105d2600754106113bd5760405162461bcd60e51b815260206004820152602160248201527f6275794d657267654f72623a204d6572676572204f72627320736f6c64206f756044820152601d60fa1b60648201526084016104b3565b6001546040516377a4777360e11b815261096060048201526104b060248201526001600160a01b039091169063ef48eee690604401600060405180830381600087803b15801561140c57600080fd5b505af1158015611420573d6000803e3d6000fd5b5050505061142d81611e6e565b6001805460405163e1bc296760e01b81526001600160a01b039091169163e1bc29679161146191339160029060040161284d565b600060405180830381600087803b15801561147b57600080fd5b505af115801561148f573d6000803e3d6000fd5b5050600780549250905060006114a4836126eb565b9091555050604080513381524260208201527f10d241ea439c0d02215e1e0241a6e212a04bbbb35068a767dfb330b371164c2d910160405180910390a150565b602883101580156114f55750602d83105b6115505760405162461bcd60e51b815260206004820152602660248201527f7265706c656e6973684272656564696e67733a2057726f6e67207574696c69746044820152651e5259081a5960d21b60648201526084016104b3565b6115683384846040516020016108739392919061284d565b6115c55760405162461bcd60e51b815260206004820152602860248201527f7265706c656e6973684272656564696e67733a205369676e6174757265206973604482015267081a5b9d985b1a5960c21b60648201526084016104b3565b6002546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e90602401602060405180830381865afa15801561160e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611632919061286e565b6001600160a01b0316146116a15760405162461bcd60e51b815260206004820152603060248201527f7265706c656e6973684272656564696e67733a204f6e6c7920746865206f776e60448201526f0cae440c6c2dc40e4cae0d8cadcd2e6d60831b60648201526084016104b3565b6116aa82612041565b1561171d5760405162461bcd60e51b815260206004820152603960248201527f7265706c656e6973684272656564696e67733a20476f642062756c6c7320636160448201527f6e6e6f7420636c61696d206578747261206272656564696e670000000000000060648201526084016104b3565b6001805460405163b390c0ab60e01b81526004810186905260248101929092526001600160a01b03169063b390c0ab90604401600060405180830381600087803b15801561176a57600080fd5b505af115801561177e573d6000803e3d6000fd5b505050507f8169d5944e992090f148f4a81dab1fc0a5fe35393ae06022464eafc709b8e0dc3383426040516109c39392919061284d565b4282116118105760405162461bcd60e51b815260206004820152602360248201527f6d696e745574696c69746965733a205369676e617475726520697320657870696044820152621c995960ea1b60648201526084016104b3565b600d8160405161182091906127b5565b9081526040519081900360200190205460ff161561188e5760405162461bcd60e51b815260206004820152602560248201527f6d696e745574696c69746965733a205369676e617475726520616c7265616479604482015264081d5cd95960da1b60648201526084016104b3565b82518451146118ed5760405162461bcd60e51b815260206004820152602560248201527f6d696e745574696c69746965733a20417272617973206c656e677468206d69736044820152640dac2e8c6d60db1b60648201526084016104b3565b6001600d826040516118ff91906127b5565b908152604051908190036020019020805491151560ff19909216919091179055606060005b8551811015611a5a5781611950878381518110611943576119436126bf565b6020026020010151612064565b60405160200161196192919061288b565b604051602081830303815290604052915081611988868381518110611943576119436126bf565b6040516020016119999291906128c8565b60408051601f1981840301815291905260015486519193506001600160a01b03169063e1bc29679033908890859081106119d5576119d56126bf565b60200260200101518985815181106119ef576119ef6126bf565b60200260200101516040518463ffffffff1660e01b8152600401611a159392919061284d565b600060405180830381600087803b158015611a2f57600080fd5b505af1158015611a43573d6000803e3d6000fd5b505050508080611a52906126eb565b915050611924565b50611a8f338285604051602001611a7393929190612904565b6040516020818303038152906040528051906020012083611ce3565b611ae75760405162461bcd60e51b815260206004820152602360248201527f6d696e745574696c69746965733a205369676e617475726520697320696e76616044820152621b1a5960ea1b60648201526084016104b3565b7fa51ab24ef8636add05ce7cdc8088bccdbbd533f2f757f2c1e9d4adc1c544e96533868642604051611b1c9493929190612741565b60405180910390a15050505050565b611b33611e14565b600655565b6001546040516377a4777360e11b8152610258600482015261012c60248201526001600160a01b039091169063ef48eee690604401600060405180830381600087803b158015611b8757600080fd5b505af1158015611b9b573d6000803e3d6000fd5b50506001805460405163b390c0ab60e01b81526004810183905260248101929092526001600160a01b0316925063b390c0ab9150604401600060405180830381600087803b158015611bec57600080fd5b505af1158015611c00573d6000803e3d6000fd5b5050600180546040516322e9330f60e21b815233600482015260248101929092526001600160a01b03169250638ba4cc3c9150604401600060405180830381600087803b158015611c5057600080fd5b505af1158015611c64573d6000803e3d6000fd5b50505050565b611c72611e14565b6001600160a01b038116611cd75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104b3565b611ce081611ff1565b50565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390526000908190605c0160405160208183030381529060405280519060200120905060008060008551604114611d4e576000945050505050611e0e565b50505060208301516040840151606085015160001a601b811015611d7a57611d77601b82612938565b90505b60008160ff16601b1480611d9157508160ff16601c145b15611df65760408051600081526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611de9573d6000803e3d6000fd5b5050506020604051035190505b6005546001600160a01b039081169116149450505050505b92915050565b6000546001600160a01b03163314610e6b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b3565b6003546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e90602401602060405180830381865afa158015611eb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611edb919061286e565b6001600160a01b031614611f315760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920746865206f776e65722063616e206275726e00000000000000000060448201526064016104b3565b6000818152600b602052604090205460ff1615611f905760405162461bcd60e51b815260206004820152601c60248201527f43616e2774206275726e207265737572726563746564207465656e730000000060448201526064016104b3565b60035460405163299f537360e01b8152600481018390526001600160a01b039091169063299f537390602401600060405180830381600087803b158015611fd657600080fd5b505af1158015611fea573d6000803e3d6000fd5b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061271a821180611e0e5750506000908152600c602052604090205460ff1690565b6060600061207183612101565b600101905060008167ffffffffffffffff811115612091576120916121d9565b6040519080825280601f01601f1916602001820160405280156120bb576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846120f4576120f9565b6120c5565b509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106121405772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061216c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061218a57662386f26fc10000830492506010015b6305f5e10083106121a2576305f5e100830492506008015b61271083106121b657612710830492506004015b606483106121c8576064830492506002015b600a8310611e0e5760010192915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612218576122186121d9565b604052919050565b600082601f83011261223157600080fd5b8135602067ffffffffffffffff82111561224d5761224d6121d9565b8160051b61225c8282016121ef565b928352848101820192828101908785111561227657600080fd5b83870192505b848310156122955782358252918301919083019061227c565b979650505050505050565b600080604083850312156122b357600080fd5b823567ffffffffffffffff808211156122cb57600080fd5b6122d786838701612220565b935060208501359150808211156122ed57600080fd5b506122fa85828601612220565b9150509250929050565b6001600160a01b0381168114611ce057600080fd5b600082601f83011261232a57600080fd5b813567ffffffffffffffff811115612344576123446121d9565b612357601f8201601f19166020016121ef565b81815284602083860101111561236c57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561239f57600080fd5b84356123aa81612304565b935060208501356123ba81612304565b925060408501359150606085013567ffffffffffffffff8111156123dd57600080fd5b6123e987828801612319565b91505092959194509250565b60008060006060848603121561240a57600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561242f57600080fd5b61243b86828701612319565b9150509250925092565b6000806040838503121561245857600080fd5b823561246381612304565b9150602083013561247381612304565b809150509250929050565b60006020828403121561249057600080fd5b5035919050565b6000602082840312156124a957600080fd5b81356124b481612304565b9392505050565b803580151581146124cb57600080fd5b919050565b600080600080600060a086880312156124e857600080fd5b85359450602086013593506124ff604087016124bb565b925061250d606087016124bb565b9150608086013567ffffffffffffffff81111561252957600080fd5b61253588828901612319565b9150509295509295909350565b6000806040838503121561255557600080fd5b823567ffffffffffffffff81111561256c57600080fd5b61257885828601612220565b925050612587602084016124bb565b90509250929050565b60008060008060008060c087890312156125a957600080fd5b863595506020870135945060408701359350606087013592506080870135915060a087013567ffffffffffffffff8111156125e357600080fd5b6125ef89828a01612319565b9150509295509295509295565b6000806000806080858703121561261257600080fd5b843567ffffffffffffffff8082111561262a57600080fd5b61263688838901612220565b9550602087013591508082111561264c57600080fd5b61265888838901612220565b945060408701359350606087013591508082111561267557600080fd5b506123e987828801612319565b60006020828403121561269457600080fd5b813567ffffffffffffffff8111156126ab57600080fd5b6126b784828501612319565b949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156126ff576126ff6126d5565b5060010190565b600081518084526020808501945080840160005b838110156127365781518752958201959082019060010161271a565b509495945050505050565b6001600160a01b038516815260806020820181905260009061276590830186612706565b82810360408401526127778186612706565b91505082606083015295945050505050565b60005b838110156127a457818101518382015260200161278c565b83811115611c645750506000910152565b600082516127c7818460208701612789565b9190910192915050565b600082198211156127e4576127e46126d5565b500190565b60008151808452612801816020860160208601612789565b601f01601f19169290920160200192915050565b60018060a01b038516815283602082015260806040820152600061283c60808301856127e9565b905082606083015295945050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b60006020828403121561288057600080fd5b81516124b481612304565b6000835161289d818460208801612789565b61125160f21b90830190815283516128bc816002840160208801612789565b01600201949350505050565b600083516128da818460208801612789565b604160f81b90830190815283516128f8816001840160208801612789565b01600101949350505050565b6001600160a01b0384168152606060208201819052600090612928908301856127e9565b9050826040830152949350505050565b600060ff821660ff84168060ff03821115612955576129556126d5565b01939250505056fea2646970667358221220590d3574b11bd8b4f419c04eea34c915a83436ef086db3d1f8c0161fc536c56564736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d8162d9703d1c13476fee3f20adf2c6468683f0e0000000000000000000000002cf6be9aac1c7630d5a23af88c28275c70eb8819000000000000000000000000cf099445347f0f006c19b90f1c1933eb9413682b0000000000000000000000002923c3e5a0f10bc02d8c90287b2af45cd579dec4
-----Decoded View---------------
Arg [0] : masterContractAddress (address): 0xD8162D9703d1c13476FEE3f20ADF2c6468683F0e
Arg [1] : genesisAddress (address): 0x2Cf6BE9AaC1c7630d5A23af88c28275C70eb8819
Arg [2] : teensAddress (address): 0xcf099445347F0F006c19B90F1c1933eb9413682B
Arg [3] : utilitiesAddress (address): 0x2923c3e5A0F10bc02d8c90287b2Af45Cd579dEc4
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000d8162d9703d1c13476fee3f20adf2c6468683f0e
Arg [1] : 0000000000000000000000002cf6be9aac1c7630d5a23af88c28275c70eb8819
Arg [2] : 000000000000000000000000cf099445347f0f006c19b90f1c1933eb9413682b
Arg [3] : 0000000000000000000000002923c3e5a0f10bc02d8c90287b2af45cd579dec4
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.