S Price: $0.067708 (-3.02%)
Gas: 55 Gwei

Contract

0x253ed21958764ec3F7705511f98ca8CFf71E26F3

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Update Treasury348615482025-06-19 16:39:02220 days ago1750351142IN
0x253ed219...Ff71E26F3
0 S0.0015184550
Perform Care Act...348585632025-06-19 16:10:48220 days ago1750349448IN
0x253ed219...Ff71E26F3
2 S0.0075371150.0001
Update Contract ...348543602025-06-19 15:34:08220 days ago1750347248IN
0x253ed219...Ff71E26F3
0 S0.0018724550

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
348585632025-06-19 16:10:48220 days ago1750349448
0x253ed219...Ff71E26F3
2 S
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PixlDogsSimpleBoostV7

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./PixlDogsInterfaces.sol";

// ==================== ADDITIONAL INTERFACES ====================

interface IPixlDogsTraitRegistry {
    function getTraitModifier(uint256 tokenId, string memory statName) external view returns (int8);
}

// ==================== MAIN CONTRACT ====================

/**
 * @title PixlDogsSimpleBoostV7
 * @dev Simplified boost system with core functionality only
 * Features:
 * - Simple flat pricing (admin configurable)
 * - Basic trait effects
 * - Bulk boost functionality
 * - No complex maintenance/decay systems
 */
contract PixlDogsSimpleBoostV7 is Ownable, ReentrancyGuard, IPixlDogsGame {
    
    // ==================== CONSTANTS ====================
    
    uint256 public constant TEMP_BOOST_DURATION = 6 hours;
    uint16 public constant MIN_STAT_VALUE = 1;
    uint16 public constant MAX_STAT_VALUE = 999;
    uint8 public constant MAX_TEMP_BOOST = 100;
    uint8 public constant MAX_PERMANENT_BOOST_PER_STAT = 50;
    
    // ==================== STATE VARIABLES ====================
    
    // Core contracts
    IPixlDogsNFT public pixlDogsNFT;
    IPixlDogsGameplayMechanics public gameplayMechanics;
    IPixlDogsTraitRegistry public traitRegistry;
    IPixlDogsToken public pixlDogsToken; // PIXLD Token for activity rewards
    
    address public treasury;
    
    // Valid stat names
    string[] public validStats = [
        "endurance", "agility", "healthScore", "fetchSkill", 
        "baseSpeed", "luck", "happinessScore", "treasureSense"
    ];
    
    // ==================== PRICING (Admin Configurable) ====================
    
    uint256 public careActionCost = 2 ether;        // Feed, play, clean, walk - 2 SONIC
    uint256 public statTrainingCost = 5 ether;      // Permanent stat training - 5 SONIC
    uint256 public tempBoostCost = 10 ether;        // Temporary stat boost - 10 SONIC
    uint256 public bulkBoostCost = 60 ether;        // Boost all stats (25% discount: 80→60) - 60 SONIC
    
    bool public traitSystemEnabled = true;
    
    // ==================== STRUCTS ====================
    
    struct StatBoost {
        uint16 tempAmount;          // Current temporary boost amount
        uint256 tempTimestamp;      // When temporary boost was applied
        uint8 permanentAmount;      // Total permanent boost accumulated
        uint8 trainingCount;        // Number of training sessions for this stat
        int8 traitModifier;         // Modifier from dog traits (-5 to +5)
    }
    
    // ==================== MAPPINGS ====================
    
    // tokenId => statName => boost data
    mapping(uint256 => mapping(string => StatBoost)) public statBoosts;
    
    // tokenId => total training sessions
    mapping(uint256 => uint256) public totalTrainingSessions;
    
    // ==================== EVENTS ====================
    
    event CareActionPerformed(uint256 indexed tokenId, string actionName, uint256 cost);
    event StatTrained(uint256 indexed tokenId, string statName, uint8 boostAmount, uint256 cost);
    event TempBoostApplied(uint256 indexed tokenId, string statName, uint16 amount, uint256 duration);
    event BulkBoostApplied(uint256 indexed tokenId, uint8 numStats, uint256 totalCost);
    event TraitEffectApplied(uint256 indexed tokenId, string statName, int8 traitModifier, uint16 finalAmount);
    event PricesUpdated(uint256 careActionCost, uint256 trainingCost, uint256 boostCost, uint256 bulkBoostCost);
    event ContractAddressesUpdated(address pixlDogsNFT, address gameplayMechanics, address traitRegistry);
    
    // ==================== TRAIT EFFECTS MAPPING ====================
    
    mapping(string => mapping(string => int8)) public traitEffects;
    
    // ==================== CONSTRUCTOR ====================
    
    constructor(
        address _pixlDogsNFT,
        address _gameplayMechanics,
        address _traitRegistry,
        address _treasury,
        address _pixlDogsToken
    ) Ownable(msg.sender) {
        pixlDogsNFT = IPixlDogsNFT(_pixlDogsNFT);
        gameplayMechanics = IPixlDogsGameplayMechanics(_gameplayMechanics);
        traitRegistry = IPixlDogsTraitRegistry(_traitRegistry);
        treasury = _treasury;
        pixlDogsToken = IPixlDogsToken(_pixlDogsToken);
        
        _initializeTraitEffects();
    }
    
    // ==================== CORE FUNCTIONS ====================
    
    /**
     * @dev Perform care action (feed, play, clean, walk)
     */
    function performCareAction(uint256 tokenId, string memory actionName) external payable nonReentrant {
        require(pixlDogsNFT.ownerOf(tokenId) == msg.sender, "Not the dog owner");
        require(msg.value >= careActionCost, "Insufficient payment");
        
        // Determine target stat and boost amount based on action
        string memory targetStat = "happinessScore"; // Default
        uint16 baseBoostAmount = 10; // Default
        
        if (keccak256(bytes(actionName)) == keccak256(bytes("feed"))) {
            targetStat = "endurance";
            baseBoostAmount = 15;
        } else if (keccak256(bytes(actionName)) == keccak256(bytes("play"))) {
            targetStat = "happinessScore";
            baseBoostAmount = 12;
        } else if (keccak256(bytes(actionName)) == keccak256(bytes("clean"))) {
            targetStat = "healthScore";
            baseBoostAmount = 15;
        } else if (keccak256(bytes(actionName)) == keccak256(bytes("walk"))) {
            targetStat = "baseSpeed";
            baseBoostAmount = 12;
        }
        
        // Apply trait modifier
        int8 traitModifier = _getStatTraitModifier(tokenId, targetStat);
        uint16 finalAmount = _applyTraitModifier(baseBoostAmount, traitModifier);
        
        // Apply temporary boost
        _applyTemporaryBoost(tokenId, targetStat, finalAmount, traitModifier);
        
        // Send payment to treasury
        _sendToTreasury(msg.value);
        
        // Award PIXLD activity points
        _awardActivityPoints(tokenId, actionName, 5); // 5 points for care actions
        
        emit CareActionPerformed(tokenId, actionName, msg.value);
        
        if (traitModifier != 0) {
            emit TraitEffectApplied(tokenId, targetStat, traitModifier, finalAmount);
        }
    }
    
    /**
     * @dev Train a specific stat for permanent improvement
     */
    function trainStat(uint256 tokenId, string memory statName) external payable nonReentrant {
        require(pixlDogsNFT.ownerOf(tokenId) == msg.sender, "Not the dog owner");
        require(isValidStat(statName), "Invalid stat name");
        require(msg.value >= statTrainingCost, "Insufficient payment");
        
        StatBoost storage boost = statBoosts[tokenId][statName];
        require(boost.permanentAmount < MAX_PERMANENT_BOOST_PER_STAT, "Max permanent boost reached");
        
        // Get trait modifier
        int8 traitModifier = _getStatTraitModifier(tokenId, statName);
        
        // Calculate training boost (1-5 based on training count)
        uint8 baseBoostAmount = _calculateTrainingBoost(boost.trainingCount);
        uint8 finalBoostAmount = uint8(_applyTraitModifier(baseBoostAmount, traitModifier));
        
        // Ensure minimum 1 boost
        if (finalBoostAmount == 0) finalBoostAmount = 1;
        if (finalBoostAmount > 5) finalBoostAmount = 5;
        
        // Apply permanent boost
        boost.permanentAmount += finalBoostAmount;
        boost.trainingCount += 1;
        boost.traitModifier = traitModifier;
        totalTrainingSessions[tokenId] += 1;
        
        // Send payment to treasury
        _sendToTreasury(msg.value);
        
        // Award PIXLD activity points (more for training)
        _awardActivityPoints(tokenId, "stat_training", 10); // 10 points for training
        
        emit StatTrained(tokenId, statName, finalBoostAmount, msg.value);
        
        if (traitModifier != 0) {
            emit TraitEffectApplied(tokenId, statName, traitModifier, finalBoostAmount);
        }
    }
    
    /**
     * @dev Apply temporary boost to a specific stat
     */
    function boostStat(uint256 tokenId, string memory statName) external payable nonReentrant {
        require(pixlDogsNFT.ownerOf(tokenId) == msg.sender, "Not the dog owner");
        require(isValidStat(statName), "Invalid stat name");
        require(msg.value >= tempBoostCost, "Insufficient payment");
        
        // Get trait modifier
        int8 traitModifier = _getStatTraitModifier(tokenId, statName);
        
        // Calculate boost amount
        uint16 baseBoostAmount = 20;
        uint16 finalAmount = _applyTraitModifier(baseBoostAmount, traitModifier);
        
        _applyTemporaryBoost(tokenId, statName, finalAmount, traitModifier);
        
        // Send payment to treasury
        _sendToTreasury(msg.value);
        
        // Award PIXLD activity points
        _awardActivityPoints(tokenId, "temp_boost", 8); // 8 points for temporary boosts
        
        emit TempBoostApplied(tokenId, statName, finalAmount, TEMP_BOOST_DURATION);
        
        if (traitModifier != 0) {
            emit TraitEffectApplied(tokenId, statName, traitModifier, finalAmount);
        }
    }
    
    /**
     * @dev Boost all stats at once with a discount
     */
    function boostAllStats(uint256 tokenId) external payable nonReentrant {
        require(pixlDogsNFT.ownerOf(tokenId) == msg.sender, "Not the dog owner");
        require(msg.value >= bulkBoostCost, "Insufficient payment");
        
        uint8 statsApplied = 0;
        
        // Apply boost to all valid stats
        for (uint256 i = 0; i < validStats.length; i++) {
            string memory statName = validStats[i];
            
            // Get trait modifier
            int8 traitModifier = _getStatTraitModifier(tokenId, statName);
            
            // Calculate boost amount (slightly lower for bulk)
            uint16 baseBoostAmount = 15; // 25% less than individual boost
            uint16 finalAmount = _applyTraitModifier(baseBoostAmount, traitModifier);
            
            _applyTemporaryBoost(tokenId, statName, finalAmount, traitModifier);
            statsApplied++;
        }
        
        // Send payment to treasury
        _sendToTreasury(msg.value);
        
        // Award PIXLD activity points (premium reward for bulk boost)
        _awardActivityPoints(tokenId, "bulk_boost", 25); // 25 points for bulk boosts
        
        emit BulkBoostApplied(tokenId, statsApplied, msg.value);
    }
    
    // ==================== VIEW FUNCTIONS ====================
    
    /**
     * @dev Get comprehensive boost stats for a dog
     */
    function getBoostStats(uint256 tokenId) external view returns (IPixlDogsGameplayMechanics.GameplayStats memory) {
        IPixlDogsGameplayMechanics.GameplayStats memory baseStats = gameplayMechanics.getDogStats(tokenId);
        
        // Apply boosts to all stats
        baseStats.endurance = _getEffectiveStatValue(tokenId, "endurance", baseStats.endurance);
        baseStats.agility = _getEffectiveStatValue(tokenId, "agility", baseStats.agility);
        baseStats.healthScore = _getEffectiveStatValue(tokenId, "healthScore", baseStats.healthScore);
        baseStats.fetchSkill = _getEffectiveStatValue(tokenId, "fetchSkill", baseStats.fetchSkill);
        baseStats.baseSpeed = _getEffectiveStatValue(tokenId, "baseSpeed", baseStats.baseSpeed);
        baseStats.luck = _getEffectiveStatValue(tokenId, "luck", baseStats.luck);
        baseStats.happinessScore = _getEffectiveStatValue(tokenId, "happinessScore", baseStats.happinessScore);
        baseStats.treasureSense = _getEffectiveStatValue(tokenId, "treasureSense", baseStats.treasureSense);
        
        return baseStats;
    }
    
    /**
     * @dev Get all trait modifiers for a dog's stats
     */
    function getAllTraitModifiers(uint256 tokenId) external view returns (
        string[] memory statNames,
        int8[] memory modifiers
    ) {
        statNames = validStats;
        modifiers = new int8[](statNames.length);
        
        for (uint256 i = 0; i < statNames.length; i++) {
            modifiers[i] = _getStatTraitModifier(tokenId, statNames[i]);
        }
        
        return (statNames, modifiers);
    }
    
    /**
     * @dev Get current pricing information
     */
    function getPricing() external view returns (
        uint256 careAction,
        uint256 training,
        uint256 tempBoost,
        uint256 bulkBoost,
        uint256 bulkDiscount
    ) {
        careAction = careActionCost;
        training = statTrainingCost;
        tempBoost = tempBoostCost;
        bulkBoost = bulkBoostCost;
        
        // Calculate bulk discount percentage
        uint256 individualCostForAll = tempBoostCost * validStats.length;
        bulkDiscount = individualCostForAll > bulkBoostCost 
            ? ((individualCostForAll - bulkBoostCost) * 100) / individualCostForAll 
            : 0;
    }
    
    // ==================== ADMIN FUNCTIONS ====================
    
    /**
     * @dev Update all pricing (admin only)
     */
    function updatePricing(
        uint256 _careActionCost,
        uint256 _statTrainingCost,
        uint256 _tempBoostCost,
        uint256 _bulkBoostCost
    ) external onlyOwner {
        careActionCost = _careActionCost;
        statTrainingCost = _statTrainingCost;
        tempBoostCost = _tempBoostCost;
        bulkBoostCost = _bulkBoostCost;
        
        emit PricesUpdated(_careActionCost, _statTrainingCost, _tempBoostCost, _bulkBoostCost);
    }
    
    /**
     * @dev Update contract addresses (admin only)
     */
    function updateContractAddresses(
        address _pixlDogsNFT,
        address _gameplayMechanics,
        address _traitRegistry,
        address _pixlDogsToken
    ) external onlyOwner {
        pixlDogsNFT = IPixlDogsNFT(_pixlDogsNFT);
        gameplayMechanics = IPixlDogsGameplayMechanics(_gameplayMechanics);
        traitRegistry = IPixlDogsTraitRegistry(_traitRegistry);
        pixlDogsToken = IPixlDogsToken(_pixlDogsToken);
        
        emit ContractAddressesUpdated(_pixlDogsNFT, _gameplayMechanics, _traitRegistry);
    }
    
    /**
     * @dev Update treasury address (admin only)
     */
    function updateTreasury(address _treasury) external onlyOwner {
        treasury = _treasury;
    }
    
    /**
     * @dev Enable/disable trait system (admin only)
     */
    function setTraitSystemEnabled(bool _enabled) external onlyOwner {
        traitSystemEnabled = _enabled;
    }
    
    /**
     * @dev Emergency withdraw (admin only)
     */
    function emergencyWithdraw() external onlyOwner {
        uint256 balance = address(this).balance;
        require(balance > 0, "No balance to withdraw");
        payable(owner()).transfer(balance);
    }
    
    // ==================== INTERNAL FUNCTIONS ====================
    
    function _applyTemporaryBoost(uint256 tokenId, string memory statName, uint16 amount, int8 traitModifier) internal {
        StatBoost storage boost = statBoosts[tokenId][statName];
        
        // Handle stacking with existing temporary boosts
        if (boost.tempTimestamp > 0 && 
            block.timestamp < boost.tempTimestamp + TEMP_BOOST_DURATION && 
            boost.tempAmount > 0) {
            
            // Add to existing boost
            uint16 newAmount = boost.tempAmount + amount;
            if (newAmount > MAX_TEMP_BOOST) newAmount = MAX_TEMP_BOOST;
            boost.tempAmount = newAmount;
        } else {
            // Apply new boost
            boost.tempAmount = amount > MAX_TEMP_BOOST ? MAX_TEMP_BOOST : amount;
        }
        
        boost.tempTimestamp = block.timestamp;
        boost.traitModifier = traitModifier;
    }
    
    function _getEffectiveStatValue(uint256 tokenId, string memory statName, uint16 baseValue) internal view returns (uint16) {
        StatBoost memory boost = statBoosts[tokenId][statName];
        uint16 effectiveValue = baseValue;
        
        // Add permanent boost
        effectiveValue += boost.permanentAmount;
        
        // Add temporary boost if active
        if (boost.tempTimestamp + TEMP_BOOST_DURATION > block.timestamp && boost.tempAmount > 0) {
            effectiveValue += boost.tempAmount;
        }
        
        return effectiveValue > MAX_STAT_VALUE ? MAX_STAT_VALUE : effectiveValue;
    }
    
    function _getStatTraitModifier(uint256 tokenId, string memory statName) internal view returns (int8) {
        if (!traitSystemEnabled) return 0;
        
        // Try to get real NFT traits first
        try pixlDogsNFT.dogTraits(tokenId) returns (
            string memory temperament,
            string memory activityLevel,
            string memory packRank,
            string memory loyaltyRank
        ) {
            // Calculate trait effects from real NFT traits
            int8 totalModifier = 0;
            totalModifier += traitEffects[temperament][statName];
            totalModifier += traitEffects[activityLevel][statName];
            totalModifier += traitEffects[packRank][statName];
            totalModifier += traitEffects[loyaltyRank][statName];
            
            // Cap modifiers at reasonable limits
            if (totalModifier > 5) totalModifier = 5;
            if (totalModifier < -5) totalModifier = -5;
            
            return totalModifier;
        } catch {
            // Fallback to trait registry
            try traitRegistry.getTraitModifier(tokenId, statName) returns (int8 traitModifier) {
                return traitModifier;
            } catch {
                return 0;
            }
        }
    }
    
    function _applyTraitModifier(uint16 baseAmount, int8 traitModifier) internal pure returns (uint16) {
        if (traitModifier > 0) {
            // Positive traits increase effectiveness by 1:1 ratio
            return baseAmount + uint16(int16(traitModifier));
        } else if (traitModifier < 0) {
            // Negative traits reduce effectiveness (minimum 1)
            int16 reduction = int16(traitModifier) * -1; // Make positive for subtraction
            if (reduction >= int16(baseAmount)) {
                return 1; // Minimum 1
            } else {
                return baseAmount - uint16(reduction);
            }
        }
        return baseAmount;
    }
    
    function _calculateTrainingBoost(uint8 trainingCount) internal pure returns (uint8) {
        // Diminishing returns based on training count
        if (trainingCount < 3) {
            return 3; // Early training is more effective
        } else if (trainingCount < 8) {
            return 2;
        } else {
            return 1; // Later training is less effective
        }
    }
    
    function _sendToTreasury(uint256 amount) internal {
        if (treasury != address(0)) {
            (bool success, ) = treasury.call{value: amount}("");
            require(success, "Payment transfer failed");
        }
    }
    
    /**
     * @dev Award PIXLD activity points for boost activities
     */
    function _awardActivityPoints(uint256 tokenId, string memory activityType, uint256 points) internal {
        if (address(pixlDogsToken) != address(0)) {
            try pixlDogsToken.recordGameActivity(tokenId, activityType, points) {
                // Activity points awarded successfully
            } catch {
                // Fail silently - boost still works without token rewards
            }
        }
    }
    
    function _initializeTraitEffects() internal {
        // Temperament effects
        traitEffects["Aggressive"]["agility"] = 2;
        traitEffects["Aggressive"]["happinessScore"] = -1;
        traitEffects["Calm"]["healthScore"] = 1;
        traitEffects["Calm"]["treasureSense"] = 1;
        traitEffects["Loyal"]["endurance"] = 1;
        traitEffects["Loyal"]["luck"] = 1;
        traitEffects["Independent"]["baseSpeed"] = 1;
        traitEffects["Independent"]["agility"] = 1;
        traitEffects["Playful"]["happinessScore"] = 2;
        traitEffects["Playful"]["agility"] = 1;
        traitEffects["Friendly"]["happinessScore"] = 1;
        traitEffects["Friendly"]["luck"] = 1;
        
        // Activity Level effects
        traitEffects["Very High"]["endurance"] = 2;
        traitEffects["Very High"]["baseSpeed"] = 2;
        traitEffects["Very High"]["healthScore"] = -1;
        traitEffects["High"]["endurance"] = 1;
        traitEffects["High"]["baseSpeed"] = 1;
        traitEffects["Medium"]["luck"] = 1;
        traitEffects["Low"]["healthScore"] = 1;
        traitEffects["Low"]["treasureSense"] = 1;
        traitEffects["Very Low"]["healthScore"] = 2;
        traitEffects["Very Low"]["endurance"] = -1;
        
        // Pack Rank effects
        traitEffects["Alpha"]["agility"] = 2;
        traitEffects["Alpha"]["baseSpeed"] = 1;
        traitEffects["Beta"]["endurance"] = 1;
        traitEffects["Beta"]["luck"] = 1;
        traitEffects["Omega"]["treasureSense"] = 1;
        traitEffects["Omega"]["healthScore"] = 1;
        
        // Loyalty Rank effects
        traitEffects["Faithful"]["happinessScore"] = 1;
        traitEffects["Faithful"]["luck"] = 1;
        traitEffects["Devoted"]["endurance"] = 1;
        traitEffects["Devoted"]["healthScore"] = 1;
        traitEffects["Rebellious"]["agility"] = 1;
        traitEffects["Rebellious"]["baseSpeed"] = 1;
        traitEffects["Rebellious"]["happinessScore"] = -1;
    }
    
    // ==================== UTILITY FUNCTIONS ====================
    
    function isValidStat(string memory statName) public view returns (bool) {
        for (uint256 i = 0; i < validStats.length; i++) {
            if (keccak256(bytes(validStats[i])) == keccak256(bytes(statName))) {
                return true;
            }
        }
        return false;
    }
    
    // IPixlDogsGame interface implementation
    function getGameInfo() external view returns (
        string memory name, 
        string memory version, 
        bool isActive
    ) {
        return ("PixlDogsSimpleBoostV7", "1.0.0", true);
    }
    
    receive() external payable {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 4 of 5 : PixlDogsInterfaces.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IPixlDogsNFT {
    function ownerOf(uint256 tokenId) external view returns (address);
    function dogTraits(uint256 tokenId) external view returns (
        string memory temperament,
        string memory activityLevel,
        string memory packRank,
        string memory loyaltyRank
    );
}

interface IPixlDogsGameplayMechanics {
    struct GameplayStats {
        uint16 endurance;
        uint16 agility;
        uint16 healthScore;
        uint16 fetchSkill;
        uint16 baseSpeed;
        uint16 luck;
        uint16 happinessScore;
        uint16 treasureSense;
        uint16 potential;
        uint16 eckkoTraining;
        uint16 pixldPower;
        uint256 lastTrainedAt;
        bool statsGenerated;
    }
    function getDogStats(uint256 tokenId) external view returns (GameplayStats memory);
    function areStatsUnlocked(uint256 tokenId) external view returns (bool);
}

interface IPixlDogsSimpleBoostV7 {
    function getBoostStats(uint256 tokenId) external view returns (IPixlDogsGameplayMechanics.GameplayStats memory);
}

interface IPixlDogsBattleScenarios {
    function generateBattleScenario(uint256 battleId, bytes32 randomSeed) external returns (uint256);
    function calculateTraitBonus(uint256 battleId, uint256 tokenId) external view returns (uint16);
}

interface IPixlDogsBattleSecurity {
    function lockStatsForBattle(uint256 tokenId1, uint256 tokenId2, uint256 battleId) external;
    function unlockStatsAfterBattle(uint256 tokenId1, uint256 tokenId2, uint256 battleId) external;
    function areStatsLocked(uint256 tokenId) external view returns (bool);
    function recordBattleResult(address winner, address loser, bool wasForfeit) external;
    function recordBetActivity(address bettor, bool won, uint256 amount) external;
    function isAccountFlagged(address account) external view returns (bool);
    function checkBettingPattern(address bettor, address fighter) external returns (bool suspicious);
}

interface IPixlDogsBattleBetting {
    function initializeBettingPool(uint256 battleId) external;
}

interface IPixlDogsToken {
    function recordGameActivity(uint256 tokenId, string calldata activityType, uint256 achievementPoints) external;
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function transfer(address to, uint256 amount) external returns (bool);
    function burn(uint256 amount) external;
    function balanceOf(address account) external view returns (uint256);
}

interface IPixlDogsWarzoneV5FundManager {
    function depositChallengeFunds(uint256 challengeId,address challenger,uint256 sonicWager,uint256 pixldWager,uint8 battleType) external payable;
    function depositBattleFunds(uint256 battleId,uint256 challengeId,address opponent,uint256 sonicWager,uint256 pixldWager,uint8 battleType) external payable;
    function distributeBattlePrizes(uint256 battleId) external;
    function processBattleForfeit(uint256 battleId, address forfeiter, bool updateStats) external;
    function refundChallenge(uint256 challengeId) external;
    function emergencyRefundBattle(uint256 battleId) external;
    function emergencyRefundMultipleBattles(uint256[] calldata battleIds) external;
    function autoProgressBattlePhases(uint256 battleId) external returns (bool);
}

interface IPixlDogsGameStatsTracker {
    function recordUserGameResult(address user, string calldata gameType, bool won, uint256 gameValue, uint256 gameId) external;
    function recordPixlDogBattleResult(uint256 tokenId, string calldata gameType, bool won, uint256 rewardsEarned, uint256 gameId) external;
    function recordChallengeActivity(address user, uint256 challengeId, uint256 battleId, string calldata activityType) external;
    function recordExpiredChallenge(address user) external;
}

// Add IPixlDogsGame interface for PixlDogTokenV2 compatibility
interface IPixlDogsGame {
    function getGameInfo() external view returns (
        string memory name, 
        string memory version, 
        bool isActive
    );
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_pixlDogsNFT","type":"address"},{"internalType":"address","name":"_gameplayMechanics","type":"address"},{"internalType":"address","name":"_traitRegistry","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_pixlDogsToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"numStats","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"totalCost","type":"uint256"}],"name":"BulkBoostApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"actionName","type":"string"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"}],"name":"CareActionPerformed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pixlDogsNFT","type":"address"},{"indexed":false,"internalType":"address","name":"gameplayMechanics","type":"address"},{"indexed":false,"internalType":"address","name":"traitRegistry","type":"address"}],"name":"ContractAddressesUpdated","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":"uint256","name":"careActionCost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"trainingCost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"boostCost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bulkBoostCost","type":"uint256"}],"name":"PricesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"statName","type":"string"},{"indexed":false,"internalType":"uint8","name":"boostAmount","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"}],"name":"StatTrained","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"statName","type":"string"},{"indexed":false,"internalType":"uint16","name":"amount","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"TempBoostApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"statName","type":"string"},{"indexed":false,"internalType":"int8","name":"traitModifier","type":"int8"},{"indexed":false,"internalType":"uint16","name":"finalAmount","type":"uint16"}],"name":"TraitEffectApplied","type":"event"},{"inputs":[],"name":"MAX_PERMANENT_BOOST_PER_STAT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_STAT_VALUE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TEMP_BOOST","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_STAT_VALUE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEMP_BOOST_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"boostAllStats","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"statName","type":"string"}],"name":"boostStat","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bulkBoostCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"careActionCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gameplayMechanics","outputs":[{"internalType":"contract IPixlDogsGameplayMechanics","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAllTraitModifiers","outputs":[{"internalType":"string[]","name":"statNames","type":"string[]"},{"internalType":"int8[]","name":"modifiers","type":"int8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBoostStats","outputs":[{"components":[{"internalType":"uint16","name":"endurance","type":"uint16"},{"internalType":"uint16","name":"agility","type":"uint16"},{"internalType":"uint16","name":"healthScore","type":"uint16"},{"internalType":"uint16","name":"fetchSkill","type":"uint16"},{"internalType":"uint16","name":"baseSpeed","type":"uint16"},{"internalType":"uint16","name":"luck","type":"uint16"},{"internalType":"uint16","name":"happinessScore","type":"uint16"},{"internalType":"uint16","name":"treasureSense","type":"uint16"},{"internalType":"uint16","name":"potential","type":"uint16"},{"internalType":"uint16","name":"eckkoTraining","type":"uint16"},{"internalType":"uint16","name":"pixldPower","type":"uint16"},{"internalType":"uint256","name":"lastTrainedAt","type":"uint256"},{"internalType":"bool","name":"statsGenerated","type":"bool"}],"internalType":"struct IPixlDogsGameplayMechanics.GameplayStats","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGameInfo","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPricing","outputs":[{"internalType":"uint256","name":"careAction","type":"uint256"},{"internalType":"uint256","name":"training","type":"uint256"},{"internalType":"uint256","name":"tempBoost","type":"uint256"},{"internalType":"uint256","name":"bulkBoost","type":"uint256"},{"internalType":"uint256","name":"bulkDiscount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"statName","type":"string"}],"name":"isValidStat","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"actionName","type":"string"}],"name":"performCareAction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pixlDogsNFT","outputs":[{"internalType":"contract IPixlDogsNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pixlDogsToken","outputs":[{"internalType":"contract IPixlDogsToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setTraitSystemEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"name":"statBoosts","outputs":[{"internalType":"uint16","name":"tempAmount","type":"uint16"},{"internalType":"uint256","name":"tempTimestamp","type":"uint256"},{"internalType":"uint8","name":"permanentAmount","type":"uint8"},{"internalType":"uint8","name":"trainingCount","type":"uint8"},{"internalType":"int8","name":"traitModifier","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"statTrainingCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tempBoostCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalTrainingSessions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"statName","type":"string"}],"name":"trainStat","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"name":"traitEffects","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitRegistry","outputs":[{"internalType":"contract IPixlDogsTraitRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitSystemEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pixlDogsNFT","type":"address"},{"internalType":"address","name":"_gameplayMechanics","type":"address"},{"internalType":"address","name":"_traitRegistry","type":"address"},{"internalType":"address","name":"_pixlDogsToken","type":"address"}],"name":"updateContractAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_careActionCost","type":"uint256"},{"internalType":"uint256","name":"_statTrainingCost","type":"uint256"},{"internalType":"uint256","name":"_tempBoostCost","type":"uint256"},{"internalType":"uint256","name":"_bulkBoostCost","type":"uint256"}],"name":"updatePricing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"updateTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"validStats","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234610d8e576132bc60a0813803918261001c81610d92565b938492833981010312610d8e5761003281610db7565b9061003f60208201610db7565b61004b60408301610db7565b90610064608061005d60608601610db7565b9401610db7565b933315610d7b575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001805560405161010081016001600160401b03811182821017610cc9576040526100da6040610d92565b6009815268656e647572616e636560b81b602082015281526100fc6040610d92565b60078152666167696c69747960c81b6020820152602082015261011f6040610d92565b600b81526a6865616c746853636f726560a81b602082015260408201526101466040610d92565b600a81526919995d18da14dada5b1b60b21b6020820152606082015261016c6040610d92565b600981526818985cd954dc19595960ba1b602082015260808201526101916040610d92565b60048152636c75636b60e01b602082015260a08201526101b16040610d92565b600e81526d68617070696e65737353636f726560901b602082015260c08201526101db6040610d92565b600d81526c747265617375726553656e736560981b602082015260e0820152600754600860075580600810610cdd575b5060075f9081525f51602061329c5f395f51905f52915b60088210610bb457505050671bc16d674ec80000600855674563918244f40000600955678ac7230489e80000600a55680340aad21b3b700000600b55600160ff19600c541617600c5560018060a01b031660018060a01b0319600254161760025560018060a01b031660018060a01b0319600354161760035560018060a01b031660018060a01b0319600454161760045560018060a01b031660018060a01b0319600654161760065560018060a01b031660018060a01b031960055416176005556027602a604051694167677265737369766560b01b8152600f600a8201522060405190666167696c69747960c81b8252600782015220600260ff19825416179055602e602a604051694167677265737369766560b01b8152600f600a82015220604051906d68617070696e65737353636f726560901b8252600e8201522060ff8019825416179055602b60246040516343616c6d60e01b8152600f600482015220604051906a6865616c746853636f726560a81b8252600b82015220600160ff19825416179055602d60246040516343616c6d60e01b8152600f600482015220604051906c747265617375726553656e736560981b8252600d82015220600160ff198254161790556029602560405164131bde585b60da1b8152600f6005820152206040519068656e647572616e636560b81b8252600982015220600160ff198254161790556024602560405164131bde585b60da1b8152600f60058201522060405190636c75636b60e01b8252600482015220600160ff198254161790556029602b6040516a125b99195c195b99195b9d60aa1b8152600f600b82015220604051906818985cd954dc19595960ba1b8252600982015220600160ff198254161790556027602b6040516a125b99195c195b99195b9d60aa1b8152600f600b8201522060405190666167696c69747960c81b8252600782015220600160ff19825416179055602e602760405166141b185e599d5b60ca1b8152600f600782015220604051906d68617070696e65737353636f726560901b8252600e82015220600260ff1982541617905560278060405166141b185e599d5b60ca1b8152600f60078201522060405190666167696c69747960c81b8252600782015220600160ff19825416179055602e602860405167467269656e646c7960c01b8152600f600882015220604051906d68617070696e65737353636f726560901b8252600e82015220600160ff198254161790556024602860405167467269656e646c7960c01b8152600f60088201522060405190636c75636b60e01b8252600482015220600160ff19825416179055602980604051680accae4f24090d2ced60bb1b8152600f6009820152206040519068656e647572616e636560b81b8252600982015220600260ff19825416179055602980604051680accae4f24090d2ced60bb1b8152600f600982015220604051906818985cd954dc19595960ba1b8252600982015220600260ff19825416179055602b6029604051680accae4f24090d2ced60bb1b8152600f600982015220604051906a6865616c746853636f726560a81b8252600b8201522060ff80198254161790556029602460405163090d2ced60e31b8152600f6004820152206040519068656e647572616e636560b81b8252600982015220600160ff198254161790556029602460405163090d2ced60e31b8152600f600482015220604051906818985cd954dc19595960ba1b8252600982015220600160ff1982541617905560246026604051654d656469756d60d01b8152600f60068201522060405190636c75636b60e01b8252600482015220600160ff19825416179055602b6023604051624c6f7760e81b8152600f600382015220604051906a6865616c746853636f726560a81b8252600b82015220600160ff19825416179055602d6023604051624c6f7760e81b8152600f600382015220604051906c747265617375726553656e736560981b8252600d82015220600160ff19825416179055602b60286040516756657279204c6f7760c01b8152600f600882015220604051906a6865616c746853636f726560a81b8252600b82015220600260ff19825416179055602960286040516756657279204c6f7760c01b8152600f6008820152206040519068656e647572616e636560b81b825260098201522060ff80198254161790556027602560405164416c70686160d81b8152600f60058201522060405190666167696c69747960c81b8252600782015220600260ff198254161790556029602560405164416c70686160d81b8152600f600582015220604051906818985cd954dc19595960ba1b8252600982015220600160ff1982541617905560296024604051634265746160e01b8152600f6004820152206040519068656e647572616e636560b81b8252600982015220600160ff19825416179055602480604051634265746160e01b8152600f60048201522060405190636c75636b60e01b8252600482015220600160ff19825416179055602d6025604051644f6d65676160d81b8152600f600582015220604051906c747265617375726553656e736560981b8252600d82015220600160ff19825416179055602b6025604051644f6d65676160d81b8152600f600582015220604051906a6865616c746853636f726560a81b8252600b82015220600160ff19825416179055602e60286040516711985a5d1a199d5b60c21b8152600f600882015220604051906d68617070696e65737353636f726560901b8252600e82015220600160ff19825416179055602460286040516711985a5d1a199d5b60c21b8152600f60088201522060405190636c75636b60e01b8252600482015220600160ff19825416179055602960276040516611195d9bdd195960ca1b8152600f6007820152206040519068656e647572616e636560b81b8252600982015220600160ff19825416179055602b60276040516611195d9bdd195960ca1b8152600f600782015220604051906a6865616c746853636f726560a81b8252600b82015220600160ff198254161790556027602a60405169526562656c6c696f757360b01b8152600f600a8201522060405190666167696c69747960c81b8252600782015220600160ff198254161790556029602a60405169526562656c6c696f757360b01b8152600f600a82015220604051906818985cd954dc19595960ba1b8252600982015220600160ff19825416179055602e602a60405169526562656c6c696f757360b01b8152600f600a82015220604051906d68617070696e65737353636f726560901b8252600e8201522060ff80198254161790556040516124829081610e1a8239f35b80518051906001600160401b038211610cc957610bd18554610dcb565b601f8111610c8e575b50602090601f8311600114610c255792826001949360209386955f92610c1a575b50505f19600383901b1c191690841b1786555b01930191019091610222565b015190505f80610bfb565b90601f19831691865f52815f20925f5b818110610c765750936020936001969387969383889510610c5e575b505050811b018655610c0e565b01515f1960f88460031b161c191690555f8080610c51565b92936020600181928786015181550195019301610c35565b610cb990865f5260205f20601f850160051c81019160208610610cbf575b601f0160051c0190610e03565b5f610bda565b9091508190610cac565b634e487b7160e01b5f52604160045260245ffd5b60075f525f51602061329c5f395f51905f52017fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6905b818110610d1f575061020b565b80610d2c60019254610dcb565b80610d39575b5001610d12565b601f81118314610d4e57505f81555b5f610d32565b610d6a90825f5283601f60205f20920160051c82019101610e03565b805f525f6020812081835555610d48565b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b6040519190601f01601f191682016001600160401b03811183821017610cc957604052565b51906001600160a01b0382168203610d8e57565b90600182811c92168015610df9575b6020831014610de557565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610dda565b818110610e0e575050565b5f8155600101610e0356fe608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c9081630e2cc27a146119425750806312a5c4bc146118c15780631454e0a4146116355780631746bd1b146115a357806329853c6f1461157a57806332ccfd571461126457806338b4e3381461119f5780634cc94c26146111765780634ccd87bd14610fd35780635882ad7714610fb5578063606b26e714610f4f57806360e6256e14610f3257806361d027b314610f0957806361ea767f14610b2457806369355c7814610b06578063715018a614610aac57806375fd528914610a3a5780637d76082714610a1d5780637f51bb1f146109dd5780638a61809c146108e55780638da5cb5b146108be57806397c48275146108a0578063a6b7ea1e14610884578063b107576e14610699578063b4336e311461048e578063b646740e1461046b578063c26e1d04146103f4578063c628fc8f146103cb578063c7591e03146103af578063cac099581461036a578063cc117b7114610341578063d7a8b83914610325578063d97d28a8146102e9578063db2e21bc14610262578063def98734146102385763f2fde38b0361000f5734610235576020366003190112610235576101c9611a83565b6101d1612426565b6001600160a01b031680156102215781546001600160a01b03198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b50346102355760203660031901126102355760406020916004358152600e83522054604051908152f35b503461023557806003193601126102355761027b612426565b4780156102ab57815482918291829182916001600160a01b031682f11561029f5780f35b604051903d90823e3d90fd5b60405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606490fd5b50346102355760203660031901126102355760043580151580910361032157610310612426565b60ff8019600c5416911617600c5580f35b5080fd5b5034610235578060031936011261023557602060405160018152f35b50346102355780600319360112610235576004546040516001600160a01b039091168152602090f35b503461023557602036600319011261023557600435906001600160401b0382116102355760206103a56103a036600486016119c8565b611d58565b6040519015158152f35b5034610235578060031936011261023557602060405160648152f35b50346102355780600319360112610235576003546040516001600160a01b039091168152602090f35b5034610235576020366003190112610235576004356007548110156103215761041c90611a99565b919091610457576040516104539061043f816104388187611ac5565b038261198c565b604051918291602083526020830190611a5f565b0390f35b634e487b7160e01b81526004819052602490fd5b5034610235578060031936011261023557602060ff600c54166040519015158152f35b506020366003190112610235576004356104a6611d9e565b6002546040516331a9108f60e11b81526004810183905290602090829060249082906001600160a01b03165afa801561068e576104f591849161065f575b506001600160a01b03163314611b8f565b610503600b54341015611bcf565b81805b6007548210156105765760ff9061054d61043861053261052586611a99565b5060405192838092611ac5565b61053c8187611e30565b9061054682612108565b90876121b8565b1660ff81146105625760019182019101610506565b634e487b7160e01b84526011600452602484fd5b90506105813461229e565b6040838151610590838261198c565b600a815269189d5b1ad7d89bdbdcdd60b21b60208201526005546001600160a01b0316806105f4575b5050507f9187d6afaf3c0da76bda31f12f0b53f89365e2a50c901e1dd79750f9f02351d59160ff825191168152346020820152a26001805580f35b803b1561065b5761062c8392918392865194858094819363069aa65560e41b83528c6004840152606060248401526064830190611a5f565b6019604483015203925af1610642575b806105b9565b8161064c9161198c565b61065757835f61063c565b8380fd5b8280fd5b610681915060203d602011610687575b610679818361198c565b810190611b70565b5f6104e4565b503d61066f565b6040513d85823e3d90fd5b506106a336611a2d565b6106ab611d9e565b6002546040516331a9108f60e11b81526004810184905290602090829060249082906001600160a01b03165afa8015610879576106f991859161065f57506001600160a01b03163314611b8f565b61070a61070582611d58565b611cde565b610718600a54341015611bcf565b6107228183611e30565b61072b816120b4565b91610738828483876121b8565b6107413461229e565b6040858151610750838261198c565b600a8152691d195b5c17d89bdbdcdd60b21b60208201526005546001600160a01b031680610813575b505050847f1255ca7527624868aa02f8f97cc217d189e3d3195306d9c3b21c510fbdf4e18a825160608152806107b26060820187611a5f565b61ffff89166020830152615460868301520390a282860b6107d6575b856001805580f35b7fc0e80e97af518dbb528f9740041375b1ef263cebb216e347c06862cf298905fb93610806915193849384611cb5565b0390a25f808080806107ce565b803b1561065b5761084a9183918983875180968195829463069aa65560e41b84526004840152606060248401526064830190611a5f565b6008604483015203925af1610860575b80610779565b8161086a9161198c565b61087557855f61085a565b8580fd5b6040513d86823e3d90fd5b5034610235578060031936011261023557602060405160328152f35b50346102355780600319360112610235576020600954604051908152f35b5034610235578060031936011261023557546040516001600160a01b039091168152602090f35b5034610235576080366003190112610235576108ff611a83565b6024356001600160a01b038116919082900361065b576044356001600160a01b03811690819003610657576064356001600160a01b03811691908290036109d9577f7e2c0d8beb1685de4b90e5d612dc3e1fcb8147b9dd5d8f5573eb699055a32db99360609361096d612426565b60018060a01b031692836001600160601b0360a01b6002541617600255816001600160601b0360a01b6003541617600355826001600160601b0360a01b60045416176004556001600160601b0360a01b600554161760055560405192835260208301526040820152a180f35b8480fd5b5034610235576020366003190112610235576109f7611a83565b6109ff612426565b60018060a01b03166001600160601b0360a01b600654161760065580f35b503461023557806003193601126102355760206040516154608152f35b5034610235576080366003190112610235577f6ef2ff813efc9efc76792366c4aca2677b755a5a13affc54d96ef35dc8e9bb736080600435606435604435602435610a83612426565b836008558060095581600a5582600b55604051938452602084015260408301526060820152a180f35b5034610235578060031936011261023557610ac5612426565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102355780600319360112610235576020600b54604051908152f35b503461023557602036600319011261023557602460043582610180604051610b4b8161195c565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015201526101a060018060a01b03600354166040519384809263342770bf60e01b82528560048301525afa91821561068e578392610ded575b50815161ffff16610bda611c8e565b90610be59183612358565b61ffff1682526020820192835161ffff169050604090815190610c08838361198c565b60078252666167696c69747960c81b6020830152610c269184612358565b61ffff16845280830190815161ffff16610c3e611c65565b90610c499185612358565b61ffff16825260608401805161ffff16825190610c66848361198c565b600a82526919995d18da14dada5b1b60b21b6020830152610c879186612358565b61ffff1681526080850190815161ffff16610ca0611c3e565b90610cab9187612358565b61ffff16825260a0860192835161ffff16815190610cc9838361198c565b60048252636c75636b60e01b6020830152610ce49188612358565b61ffff16845260c0870194855161ffff16610cfd611c12565b90610d089189612358565b61ffff16865260e0880196875161ffff168351610d25858261198c565b600d81526c747265617375726553656e736560981b6020820152610d4892612358565b61ffff168752815198885161ffff168a525161ffff1660208a01525161ffff16908801525161ffff1660608701525161ffff1660808601525161ffff1660a08501525161ffff1660c08401525161ffff1660e083015261010081015161ffff1661010083015261012081015161ffff1661012083015261014081015161ffff16610140830152610160810151610160830152610180015115156101808201526101a090f35b9091506101a0813d8211610f01575b81610e0a6101a0938361198c565b8101031261065b5761018060405191610e228361195c565b610e2b81611d49565b8352610e3960208201611d49565b6020840152610e4a60408201611d49565b6040840152610e5b60608201611d49565b6060840152610e6c60808201611d49565b6080840152610e7d60a08201611d49565b60a0840152610e8e60c08201611d49565b60c0840152610e9f60e08201611d49565b60e0840152610eb16101008201611d49565b610100840152610ec46101208201611d49565b610120840152610ed76101408201611d49565b6101408401526101608101516101608401520151801515810361065757610180820152905f610bcb565b3d9150610dfc565b50346102355780600319360112610235576006546040516001600160a01b039091168152602090f35b503461023557806003193601126102355760206040516103e78152f35b50346102355760a090610f76610f6436611a2d565b908352600d6020526040832090611a0e565b9061ffff825416916002600182015491015490604051938452602084015260ff8116604084015260ff8160081c16606084015260101c900b6080820152f35b50346102355780600319360112610235576020600a54604051908152f35b50346102355760203660031901126102355760075460043591610ff582611d1e565b92611003604051948561198c565b828452600782526020840192827fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688855b838310611151575050505083519061106361104d83611d1e565b9261105b604051948561198c565b808452611d1e565b6020830190601f1901368237835b86518110156110a6578061109161108a6001938a611d35565b5185611e30565b61109b8287611d35565b90870b905201611071565b838783878960405194859460408601906040875251809152606086019060608160051b880101939185905b82821061111e5750505050602090858303828701525191828152019291805b8282106110ff57505050500390f35b8351810b855286955060209485019490930192600191909101906110f0565b91939460019193979850602061113f8192605f198d82030186528a51611a5f565b980192019201889796949391926110d1565b600160208192604051611168816104388189611ac5565b815201920192019190611033565b50346102355780600319360112610235576002546040516001600160a01b039091168152602090f35b5034610235578060031936011261023557600854600954600a54600b54906007548082029082820414821517156112505782811115611246578281038181116112325760648102908104606414848314171561123257811561121e5760a0965004925b6040519485526020850152604084015260608301526080820152f35b634e487b7160e01b87526012600452602487fd5b634e487b7160e01b87526011600452602487fd5b5060a09492611202565b634e487b7160e01b86526011600452602486fd5b5061126e36611a2d565b611276611d9e565b6002546040516331a9108f60e11b81526004810184905290602090829060249082906001600160a01b03165afa8015610879576112c491859161065f57506001600160a01b03163314611b8f565b6112d061070582611d58565b6112de600954341015611bcf565b818352600d60205260026112f56040852083611a0e565b019081549060ff8216926032841015611535576113128286611e30565b9260ff61132e8582611328818660081c16612334565b1661215c565b16801561152d575b600560ff821611611525575b60ff1680950160ff81116115115760ff16600160ff82811985161760081c160160ff81116114fd5762ff00001990911662ffffff199092169190911760089190911b61ff00161762ff0000601085901b16179055838552600e602052604085208054906001820180921161123257556113ba3461229e565b6040918583516113ca858261198c565b600d81526c737461745f747261696e696e6760981b60208201526005546001600160a01b03168061149b575b505050847f4440e7b4dd5aaab0a2adf79ef2fbf00731df48b45a06bd2385602ddb163cc1128451606081528061142f6060820187611a5f565b88602083015234888301520390a2850b8061144c57856001805580f35b7fc0e80e97af518dbb528f9740041375b1ef263cebb216e347c06862cf298905fb93836114859451948594606086526060860190611a5f565b9260208501528301520390a25f808080806107ce565b803b1561065b576114d29183918983895180968195829463069aa65560e41b84526004840152606060248401526064830190611a5f565b600a604483015203925af16114e8575b806113f6565b816114f29161198c565b61087557855f6114e2565b634e487b7160e01b89526011600452602489fd5b634e487b7160e01b88526011600452602488fd5b506005611342565b506001611336565b60405162461bcd60e51b815260206004820152601b60248201527f4d6178207065726d616e656e7420626f6f7374207265616368656400000000006044820152606490fd5b50346102355780600319360112610235576005546040516001600160a01b039091168152602090f35b50346102355780600319360112610235575061161f60408051906115c7818361198c565b60158252745069786c446f677353696d706c65426f6f7374563760581b6020830152600161162d82516115fa848261198c565b60058152640312e302e360dc1b60208201528351958695606087526060870190611a5f565b908582036020870152611a5f565b918301520390f35b5061163f36611a2d565b611647611d9e565b6002546040516331a9108f60e11b81526004810184905290602090829060249082906001600160a01b03165afa80156118b657611695915f9161065f57506001600160a01b03163314611b8f565b6116a3600854341015611bcf565b6116ab611c12565b600a82519160208401928320926040936004602086516116cb888261198c565b82815201631999595960e21b815220145f14611803575050506116ec611c8e565b600f915b846117056116fe8483611e30565b809561215c565b94611712858786856121b8565b61171b3461229e565b6005546001600160a01b03168061177c575b506117647f659e33a964e80d8ed2487838e71e516c4af772fef0aea5bf5c01478b38a4c64591845191829186835286830190611a5f565b3460208301520390a282860b6107d657856001805580f35b809192503b156117ff575f8351809263069aa65560e41b8252896004830152606060248301528183816117b26064820189611a5f565b6005604483015203925af16117ca575b90869161172d565b6117d79197505f9061198c565b5f957f659e33a964e80d8ed2487838e71e516c4af772fef0aea5bf5c01478b38a4c6456117c2565b5f80fd5b84518120600460208651611817888261198c565b8281520163706c617960e01b815220145f1461184157505050611838611c12565b600c915b6116f0565b84518120600560208651611855888261198c565b828152016431b632b0b760d91b815220145f1461187f57505050611877611c65565b600f916116f0565b8493919293519020600460208351611897858261198c565b828152016377616c6b60e01b8152200361183c57915050611838611c3e565b6040513d5f823e3d90fd5b346117ff5760403660031901126117ff576004356001600160401b0381116117ff576118f19036906004016119c8565b6024356001600160401b0381116117ff5760209182806119186119379436906004016119c8565b92604051928184925191829101835e8101600f81520301902090611a0e565b545f0b604051908152f35b346117ff575f3660031901126117ff576020906008548152f35b6101a081019081106001600160401b0382111761197857604052565b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b0382111761197857604052565b6001600160401b03811161197857601f01601f191660200190565b81601f820112156117ff578035906119df826119ad565b926119ed604051948561198c565b828452602083830101116117ff57815f926020809301838601378301015290565b6040518151909260209284929081908501845e82019081520301902090565b9060406003198301126117ff5760043591602435906001600160401b0382116117ff57611a5c916004016119c8565b90565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036117ff57565b600754811015611ab15760075f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b5f92918154918260011c92600181168015611b66575b602085108114611b5257848452908115611b355750600114611afc57505050565b5f9081526020812093945091925b838310611b1b575060209250010190565b600181602092949394548385870101520191019190611b0a565b915050602093945060ff929192191683830152151560051b010190565b634e487b7160e01b5f52602260045260245ffd5b93607f1693611adb565b908160209103126117ff57516001600160a01b03811681036117ff5790565b15611b9657565b60405162461bcd60e51b81526020600482015260116024820152702737ba103a3432903237b39037bbb732b960791b6044820152606490fd5b15611bd657565b60405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b60405190611c2160408361198c565b600e82526d68617070696e65737353636f726560901b6020830152565b60405190611c4d60408361198c565b600982526818985cd954dc19595960ba1b6020830152565b60405190611c7460408361198c565b600b82526a6865616c746853636f726560a81b6020830152565b60405190611c9d60408361198c565b6009825268656e647572616e636560b81b6020830152565b91939261ffff90611cd0604093606086526060860190611a5f565b955f0b602085015216910152565b15611ce557565b60405162461bcd60e51b8152602060048201526011602482015270496e76616c69642073746174206e616d6560781b6044820152606490fd5b6001600160401b0381116119785760051b60200190565b8051821015611ab15760209160051b010190565b519061ffff821682036117ff57565b600754905f5b828110611d6c575050505f90565b610438611d7b61052583611a99565b602081519101208251602084012014611d9657600101611d5e565b505050600190565b600260015414611daf576002600155565b633ee5aeb560e01b5f5260045ffd5b81601f820112156117ff57805190611dd5826119ad565b92611de3604051948561198c565b828452602083830101116117ff57815f9260208093018386015e8301015290565b905f0b905f0b0190607f198212607f831317611e1c57565b634e487b7160e01b5f52601160045260245ffd5b60ff600c54161561209857600254604051632cb06b3b60e01b815260048101839052905f90829060249082906001600160a01b03165afa5f5f90825f945f94611ff2575b50611f0c5750505050611eb99160209160018060a01b036004541690604051809581948293631b3a0f9f60e21b84526004840152604060248401526044830190611a5f565b03915afa5f9181611ecf575b50611a5c57505f90565b9091506020813d602011611f04575b81611eeb6020938361198c565b810103126117ff5751805f0b81036117ff57905f611ec5565b3d9150611ede565b611f3791939592945060208091604051928184925191829101835e8101600f81520301902082611a0e565b545f0b93607f8513607f19861217611e1c576020611fab8192611f838380611f8c611fca9b611f838380611f839d604051928184925191829101835e8101600f8152030190208b611a0e565b545f0b90611e04565b93604051928184925191829101835e8101600f81520301902086611a0e565b94604051928184925191829101835e8101600f81520301902090611a0e565b6005815f0b13611fea575b600419815f0b12611fe35790565b5060041990565b506005611fd5565b9450925050503d805f843e612007818461198c565b82016080838203126117ff5782516001600160401b0381116117ff578161202f918501611dbe565b9260208101516001600160401b0381116117ff578261204f918301611dbe565b9060408101516001600160401b0381116117ff578361206f918301611dbe565b9260608201516001600160401b0381116117ff5761208d9201611dbe565b93909193925f611e74565b50505f90565b9061ffff8091169116019061ffff8211611e1c57565b5f0b5f81135f146120ce5761ffff611a5c9116601461209e565b5f81126120db5750601490565b5f038060010b818103611e1c576014136120f55750600190565b61ffff1660140361ffff8111611e1c5790565b5f0b5f81135f146121225761ffff611a5c9116600f61209e565b5f811261212f5750600f90565b5f038060010b818103611e1c57600f136121495750600190565b61ffff16600f0361ffff8111611e1c5790565b905f0b5f81135f14612177579061ffff611a5c92169061209e565b5f8112612182575090565b5f038060010b91818303611e1c5761ffff1691600183900b136121a6575050600190565b61ffff16900361ffff8111611e1c5790565b906121d1919392935f52600d60205260405f2090611a0e565b6001810180548015159081612282575b5061223d94600293929180612274575b15612247576122059061ffff84541661209e565b606461ffff82161161223f575b61ffff1661ffff198354161782555b429055019081549060101b62ff0000169062ff00001916179055565b565b506064612212565b606461ffff8216111561226b575061ffff60645b1661ffff19835416178255612221565b61ffff9061225b565b5061ffff83541615156121f1565b929190506154608301809311611e1c579091421061223d6121e1565b6006546001600160a01b0316806122b3575050565b5f80809381935af13d1561232f573d6122cb816119ad565b906122d9604051928361198c565b81525f60203d92013e5b156122ea57565b60405162461bcd60e51b815260206004820152601760248201527f5061796d656e74207472616e73666572206661696c65640000000000000000006044820152606490fd5b6122e3565b60ff1660038110156123465750600390565b6008111561235357600290565b600190565b9061236e915f52600d60205260405f2090611a0e565b906040519060a08201908282106001600160401b03831117611978576123d19160405261ffff845416835260026001850154946020850195865201549060ff82169182604086015260ff8160081c16606086015260101c5f0b608085015261209e565b91516154608101809111611e1c57421080612418575b612402575b506103e761ffff82161115611a5c57506103e790565b9061ffff6124129251169061209e565b5f6123ec565b5061ffff81511615156123e7565b5f546001600160a01b0316330361243957565b63118cdaa760e01b5f523360045260245ffdfea2646970667358221220f40de2383d8edd6b6340396549b3ad160ea421fc56b27e5fd9e8f095b52050a364736f6c634300081e0033a66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688000000000000000000000000b202d84c760862dadfafbfbf39939dd75c794dff00000000000000000000000075cb5d3dfe1db6dd7ba203ed9c10c0c99d350628000000000000000000000000a0ac8091cf2f1920928f5d3db180f25ee583228200000000000000000000000042c4230ba46683977e5085f390a2c743399911e60000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c9081630e2cc27a146119425750806312a5c4bc146118c15780631454e0a4146116355780631746bd1b146115a357806329853c6f1461157a57806332ccfd571461126457806338b4e3381461119f5780634cc94c26146111765780634ccd87bd14610fd35780635882ad7714610fb5578063606b26e714610f4f57806360e6256e14610f3257806361d027b314610f0957806361ea767f14610b2457806369355c7814610b06578063715018a614610aac57806375fd528914610a3a5780637d76082714610a1d5780637f51bb1f146109dd5780638a61809c146108e55780638da5cb5b146108be57806397c48275146108a0578063a6b7ea1e14610884578063b107576e14610699578063b4336e311461048e578063b646740e1461046b578063c26e1d04146103f4578063c628fc8f146103cb578063c7591e03146103af578063cac099581461036a578063cc117b7114610341578063d7a8b83914610325578063d97d28a8146102e9578063db2e21bc14610262578063def98734146102385763f2fde38b0361000f5734610235576020366003190112610235576101c9611a83565b6101d1612426565b6001600160a01b031680156102215781546001600160a01b03198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b50346102355760203660031901126102355760406020916004358152600e83522054604051908152f35b503461023557806003193601126102355761027b612426565b4780156102ab57815482918291829182916001600160a01b031682f11561029f5780f35b604051903d90823e3d90fd5b60405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606490fd5b50346102355760203660031901126102355760043580151580910361032157610310612426565b60ff8019600c5416911617600c5580f35b5080fd5b5034610235578060031936011261023557602060405160018152f35b50346102355780600319360112610235576004546040516001600160a01b039091168152602090f35b503461023557602036600319011261023557600435906001600160401b0382116102355760206103a56103a036600486016119c8565b611d58565b6040519015158152f35b5034610235578060031936011261023557602060405160648152f35b50346102355780600319360112610235576003546040516001600160a01b039091168152602090f35b5034610235576020366003190112610235576004356007548110156103215761041c90611a99565b919091610457576040516104539061043f816104388187611ac5565b038261198c565b604051918291602083526020830190611a5f565b0390f35b634e487b7160e01b81526004819052602490fd5b5034610235578060031936011261023557602060ff600c54166040519015158152f35b506020366003190112610235576004356104a6611d9e565b6002546040516331a9108f60e11b81526004810183905290602090829060249082906001600160a01b03165afa801561068e576104f591849161065f575b506001600160a01b03163314611b8f565b610503600b54341015611bcf565b81805b6007548210156105765760ff9061054d61043861053261052586611a99565b5060405192838092611ac5565b61053c8187611e30565b9061054682612108565b90876121b8565b1660ff81146105625760019182019101610506565b634e487b7160e01b84526011600452602484fd5b90506105813461229e565b6040838151610590838261198c565b600a815269189d5b1ad7d89bdbdcdd60b21b60208201526005546001600160a01b0316806105f4575b5050507f9187d6afaf3c0da76bda31f12f0b53f89365e2a50c901e1dd79750f9f02351d59160ff825191168152346020820152a26001805580f35b803b1561065b5761062c8392918392865194858094819363069aa65560e41b83528c6004840152606060248401526064830190611a5f565b6019604483015203925af1610642575b806105b9565b8161064c9161198c565b61065757835f61063c565b8380fd5b8280fd5b610681915060203d602011610687575b610679818361198c565b810190611b70565b5f6104e4565b503d61066f565b6040513d85823e3d90fd5b506106a336611a2d565b6106ab611d9e565b6002546040516331a9108f60e11b81526004810184905290602090829060249082906001600160a01b03165afa8015610879576106f991859161065f57506001600160a01b03163314611b8f565b61070a61070582611d58565b611cde565b610718600a54341015611bcf565b6107228183611e30565b61072b816120b4565b91610738828483876121b8565b6107413461229e565b6040858151610750838261198c565b600a8152691d195b5c17d89bdbdcdd60b21b60208201526005546001600160a01b031680610813575b505050847f1255ca7527624868aa02f8f97cc217d189e3d3195306d9c3b21c510fbdf4e18a825160608152806107b26060820187611a5f565b61ffff89166020830152615460868301520390a282860b6107d6575b856001805580f35b7fc0e80e97af518dbb528f9740041375b1ef263cebb216e347c06862cf298905fb93610806915193849384611cb5565b0390a25f808080806107ce565b803b1561065b5761084a9183918983875180968195829463069aa65560e41b84526004840152606060248401526064830190611a5f565b6008604483015203925af1610860575b80610779565b8161086a9161198c565b61087557855f61085a565b8580fd5b6040513d86823e3d90fd5b5034610235578060031936011261023557602060405160328152f35b50346102355780600319360112610235576020600954604051908152f35b5034610235578060031936011261023557546040516001600160a01b039091168152602090f35b5034610235576080366003190112610235576108ff611a83565b6024356001600160a01b038116919082900361065b576044356001600160a01b03811690819003610657576064356001600160a01b03811691908290036109d9577f7e2c0d8beb1685de4b90e5d612dc3e1fcb8147b9dd5d8f5573eb699055a32db99360609361096d612426565b60018060a01b031692836001600160601b0360a01b6002541617600255816001600160601b0360a01b6003541617600355826001600160601b0360a01b60045416176004556001600160601b0360a01b600554161760055560405192835260208301526040820152a180f35b8480fd5b5034610235576020366003190112610235576109f7611a83565b6109ff612426565b60018060a01b03166001600160601b0360a01b600654161760065580f35b503461023557806003193601126102355760206040516154608152f35b5034610235576080366003190112610235577f6ef2ff813efc9efc76792366c4aca2677b755a5a13affc54d96ef35dc8e9bb736080600435606435604435602435610a83612426565b836008558060095581600a5582600b55604051938452602084015260408301526060820152a180f35b5034610235578060031936011261023557610ac5612426565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102355780600319360112610235576020600b54604051908152f35b503461023557602036600319011261023557602460043582610180604051610b4b8161195c565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015201526101a060018060a01b03600354166040519384809263342770bf60e01b82528560048301525afa91821561068e578392610ded575b50815161ffff16610bda611c8e565b90610be59183612358565b61ffff1682526020820192835161ffff169050604090815190610c08838361198c565b60078252666167696c69747960c81b6020830152610c269184612358565b61ffff16845280830190815161ffff16610c3e611c65565b90610c499185612358565b61ffff16825260608401805161ffff16825190610c66848361198c565b600a82526919995d18da14dada5b1b60b21b6020830152610c879186612358565b61ffff1681526080850190815161ffff16610ca0611c3e565b90610cab9187612358565b61ffff16825260a0860192835161ffff16815190610cc9838361198c565b60048252636c75636b60e01b6020830152610ce49188612358565b61ffff16845260c0870194855161ffff16610cfd611c12565b90610d089189612358565b61ffff16865260e0880196875161ffff168351610d25858261198c565b600d81526c747265617375726553656e736560981b6020820152610d4892612358565b61ffff168752815198885161ffff168a525161ffff1660208a01525161ffff16908801525161ffff1660608701525161ffff1660808601525161ffff1660a08501525161ffff1660c08401525161ffff1660e083015261010081015161ffff1661010083015261012081015161ffff1661012083015261014081015161ffff16610140830152610160810151610160830152610180015115156101808201526101a090f35b9091506101a0813d8211610f01575b81610e0a6101a0938361198c565b8101031261065b5761018060405191610e228361195c565b610e2b81611d49565b8352610e3960208201611d49565b6020840152610e4a60408201611d49565b6040840152610e5b60608201611d49565b6060840152610e6c60808201611d49565b6080840152610e7d60a08201611d49565b60a0840152610e8e60c08201611d49565b60c0840152610e9f60e08201611d49565b60e0840152610eb16101008201611d49565b610100840152610ec46101208201611d49565b610120840152610ed76101408201611d49565b6101408401526101608101516101608401520151801515810361065757610180820152905f610bcb565b3d9150610dfc565b50346102355780600319360112610235576006546040516001600160a01b039091168152602090f35b503461023557806003193601126102355760206040516103e78152f35b50346102355760a090610f76610f6436611a2d565b908352600d6020526040832090611a0e565b9061ffff825416916002600182015491015490604051938452602084015260ff8116604084015260ff8160081c16606084015260101c900b6080820152f35b50346102355780600319360112610235576020600a54604051908152f35b50346102355760203660031901126102355760075460043591610ff582611d1e565b92611003604051948561198c565b828452600782526020840192827fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688855b838310611151575050505083519061106361104d83611d1e565b9261105b604051948561198c565b808452611d1e565b6020830190601f1901368237835b86518110156110a6578061109161108a6001938a611d35565b5185611e30565b61109b8287611d35565b90870b905201611071565b838783878960405194859460408601906040875251809152606086019060608160051b880101939185905b82821061111e5750505050602090858303828701525191828152019291805b8282106110ff57505050500390f35b8351810b855286955060209485019490930192600191909101906110f0565b91939460019193979850602061113f8192605f198d82030186528a51611a5f565b980192019201889796949391926110d1565b600160208192604051611168816104388189611ac5565b815201920192019190611033565b50346102355780600319360112610235576002546040516001600160a01b039091168152602090f35b5034610235578060031936011261023557600854600954600a54600b54906007548082029082820414821517156112505782811115611246578281038181116112325760648102908104606414848314171561123257811561121e5760a0965004925b6040519485526020850152604084015260608301526080820152f35b634e487b7160e01b87526012600452602487fd5b634e487b7160e01b87526011600452602487fd5b5060a09492611202565b634e487b7160e01b86526011600452602486fd5b5061126e36611a2d565b611276611d9e565b6002546040516331a9108f60e11b81526004810184905290602090829060249082906001600160a01b03165afa8015610879576112c491859161065f57506001600160a01b03163314611b8f565b6112d061070582611d58565b6112de600954341015611bcf565b818352600d60205260026112f56040852083611a0e565b019081549060ff8216926032841015611535576113128286611e30565b9260ff61132e8582611328818660081c16612334565b1661215c565b16801561152d575b600560ff821611611525575b60ff1680950160ff81116115115760ff16600160ff82811985161760081c160160ff81116114fd5762ff00001990911662ffffff199092169190911760089190911b61ff00161762ff0000601085901b16179055838552600e602052604085208054906001820180921161123257556113ba3461229e565b6040918583516113ca858261198c565b600d81526c737461745f747261696e696e6760981b60208201526005546001600160a01b03168061149b575b505050847f4440e7b4dd5aaab0a2adf79ef2fbf00731df48b45a06bd2385602ddb163cc1128451606081528061142f6060820187611a5f565b88602083015234888301520390a2850b8061144c57856001805580f35b7fc0e80e97af518dbb528f9740041375b1ef263cebb216e347c06862cf298905fb93836114859451948594606086526060860190611a5f565b9260208501528301520390a25f808080806107ce565b803b1561065b576114d29183918983895180968195829463069aa65560e41b84526004840152606060248401526064830190611a5f565b600a604483015203925af16114e8575b806113f6565b816114f29161198c565b61087557855f6114e2565b634e487b7160e01b89526011600452602489fd5b634e487b7160e01b88526011600452602488fd5b506005611342565b506001611336565b60405162461bcd60e51b815260206004820152601b60248201527f4d6178207065726d616e656e7420626f6f7374207265616368656400000000006044820152606490fd5b50346102355780600319360112610235576005546040516001600160a01b039091168152602090f35b50346102355780600319360112610235575061161f60408051906115c7818361198c565b60158252745069786c446f677353696d706c65426f6f7374563760581b6020830152600161162d82516115fa848261198c565b60058152640312e302e360dc1b60208201528351958695606087526060870190611a5f565b908582036020870152611a5f565b918301520390f35b5061163f36611a2d565b611647611d9e565b6002546040516331a9108f60e11b81526004810184905290602090829060249082906001600160a01b03165afa80156118b657611695915f9161065f57506001600160a01b03163314611b8f565b6116a3600854341015611bcf565b6116ab611c12565b600a82519160208401928320926040936004602086516116cb888261198c565b82815201631999595960e21b815220145f14611803575050506116ec611c8e565b600f915b846117056116fe8483611e30565b809561215c565b94611712858786856121b8565b61171b3461229e565b6005546001600160a01b03168061177c575b506117647f659e33a964e80d8ed2487838e71e516c4af772fef0aea5bf5c01478b38a4c64591845191829186835286830190611a5f565b3460208301520390a282860b6107d657856001805580f35b809192503b156117ff575f8351809263069aa65560e41b8252896004830152606060248301528183816117b26064820189611a5f565b6005604483015203925af16117ca575b90869161172d565b6117d79197505f9061198c565b5f957f659e33a964e80d8ed2487838e71e516c4af772fef0aea5bf5c01478b38a4c6456117c2565b5f80fd5b84518120600460208651611817888261198c565b8281520163706c617960e01b815220145f1461184157505050611838611c12565b600c915b6116f0565b84518120600560208651611855888261198c565b828152016431b632b0b760d91b815220145f1461187f57505050611877611c65565b600f916116f0565b8493919293519020600460208351611897858261198c565b828152016377616c6b60e01b8152200361183c57915050611838611c3e565b6040513d5f823e3d90fd5b346117ff5760403660031901126117ff576004356001600160401b0381116117ff576118f19036906004016119c8565b6024356001600160401b0381116117ff5760209182806119186119379436906004016119c8565b92604051928184925191829101835e8101600f81520301902090611a0e565b545f0b604051908152f35b346117ff575f3660031901126117ff576020906008548152f35b6101a081019081106001600160401b0382111761197857604052565b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b0382111761197857604052565b6001600160401b03811161197857601f01601f191660200190565b81601f820112156117ff578035906119df826119ad565b926119ed604051948561198c565b828452602083830101116117ff57815f926020809301838601378301015290565b6040518151909260209284929081908501845e82019081520301902090565b9060406003198301126117ff5760043591602435906001600160401b0382116117ff57611a5c916004016119c8565b90565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036117ff57565b600754811015611ab15760075f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b5f92918154918260011c92600181168015611b66575b602085108114611b5257848452908115611b355750600114611afc57505050565b5f9081526020812093945091925b838310611b1b575060209250010190565b600181602092949394548385870101520191019190611b0a565b915050602093945060ff929192191683830152151560051b010190565b634e487b7160e01b5f52602260045260245ffd5b93607f1693611adb565b908160209103126117ff57516001600160a01b03811681036117ff5790565b15611b9657565b60405162461bcd60e51b81526020600482015260116024820152702737ba103a3432903237b39037bbb732b960791b6044820152606490fd5b15611bd657565b60405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b60405190611c2160408361198c565b600e82526d68617070696e65737353636f726560901b6020830152565b60405190611c4d60408361198c565b600982526818985cd954dc19595960ba1b6020830152565b60405190611c7460408361198c565b600b82526a6865616c746853636f726560a81b6020830152565b60405190611c9d60408361198c565b6009825268656e647572616e636560b81b6020830152565b91939261ffff90611cd0604093606086526060860190611a5f565b955f0b602085015216910152565b15611ce557565b60405162461bcd60e51b8152602060048201526011602482015270496e76616c69642073746174206e616d6560781b6044820152606490fd5b6001600160401b0381116119785760051b60200190565b8051821015611ab15760209160051b010190565b519061ffff821682036117ff57565b600754905f5b828110611d6c575050505f90565b610438611d7b61052583611a99565b602081519101208251602084012014611d9657600101611d5e565b505050600190565b600260015414611daf576002600155565b633ee5aeb560e01b5f5260045ffd5b81601f820112156117ff57805190611dd5826119ad565b92611de3604051948561198c565b828452602083830101116117ff57815f9260208093018386015e8301015290565b905f0b905f0b0190607f198212607f831317611e1c57565b634e487b7160e01b5f52601160045260245ffd5b60ff600c54161561209857600254604051632cb06b3b60e01b815260048101839052905f90829060249082906001600160a01b03165afa5f5f90825f945f94611ff2575b50611f0c5750505050611eb99160209160018060a01b036004541690604051809581948293631b3a0f9f60e21b84526004840152604060248401526044830190611a5f565b03915afa5f9181611ecf575b50611a5c57505f90565b9091506020813d602011611f04575b81611eeb6020938361198c565b810103126117ff5751805f0b81036117ff57905f611ec5565b3d9150611ede565b611f3791939592945060208091604051928184925191829101835e8101600f81520301902082611a0e565b545f0b93607f8513607f19861217611e1c576020611fab8192611f838380611f8c611fca9b611f838380611f839d604051928184925191829101835e8101600f8152030190208b611a0e565b545f0b90611e04565b93604051928184925191829101835e8101600f81520301902086611a0e565b94604051928184925191829101835e8101600f81520301902090611a0e565b6005815f0b13611fea575b600419815f0b12611fe35790565b5060041990565b506005611fd5565b9450925050503d805f843e612007818461198c565b82016080838203126117ff5782516001600160401b0381116117ff578161202f918501611dbe565b9260208101516001600160401b0381116117ff578261204f918301611dbe565b9060408101516001600160401b0381116117ff578361206f918301611dbe565b9260608201516001600160401b0381116117ff5761208d9201611dbe565b93909193925f611e74565b50505f90565b9061ffff8091169116019061ffff8211611e1c57565b5f0b5f81135f146120ce5761ffff611a5c9116601461209e565b5f81126120db5750601490565b5f038060010b818103611e1c576014136120f55750600190565b61ffff1660140361ffff8111611e1c5790565b5f0b5f81135f146121225761ffff611a5c9116600f61209e565b5f811261212f5750600f90565b5f038060010b818103611e1c57600f136121495750600190565b61ffff16600f0361ffff8111611e1c5790565b905f0b5f81135f14612177579061ffff611a5c92169061209e565b5f8112612182575090565b5f038060010b91818303611e1c5761ffff1691600183900b136121a6575050600190565b61ffff16900361ffff8111611e1c5790565b906121d1919392935f52600d60205260405f2090611a0e565b6001810180548015159081612282575b5061223d94600293929180612274575b15612247576122059061ffff84541661209e565b606461ffff82161161223f575b61ffff1661ffff198354161782555b429055019081549060101b62ff0000169062ff00001916179055565b565b506064612212565b606461ffff8216111561226b575061ffff60645b1661ffff19835416178255612221565b61ffff9061225b565b5061ffff83541615156121f1565b929190506154608301809311611e1c579091421061223d6121e1565b6006546001600160a01b0316806122b3575050565b5f80809381935af13d1561232f573d6122cb816119ad565b906122d9604051928361198c565b81525f60203d92013e5b156122ea57565b60405162461bcd60e51b815260206004820152601760248201527f5061796d656e74207472616e73666572206661696c65640000000000000000006044820152606490fd5b6122e3565b60ff1660038110156123465750600390565b6008111561235357600290565b600190565b9061236e915f52600d60205260405f2090611a0e565b906040519060a08201908282106001600160401b03831117611978576123d19160405261ffff845416835260026001850154946020850195865201549060ff82169182604086015260ff8160081c16606086015260101c5f0b608085015261209e565b91516154608101809111611e1c57421080612418575b612402575b506103e761ffff82161115611a5c57506103e790565b9061ffff6124129251169061209e565b5f6123ec565b5061ffff81511615156123e7565b5f546001600160a01b0316330361243957565b63118cdaa760e01b5f523360045260245ffdfea2646970667358221220f40de2383d8edd6b6340396549b3ad160ea421fc56b27e5fd9e8f095b52050a364736f6c634300081e0033

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

000000000000000000000000b202d84c760862dadfafbfbf39939dd75c794dff00000000000000000000000075cb5d3dfe1db6dd7ba203ed9c10c0c99d350628000000000000000000000000a0ac8091cf2f1920928f5d3db180f25ee583228200000000000000000000000042c4230ba46683977e5085f390a2c743399911e60000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _pixlDogsNFT (address): 0xB202d84c760862DAdFAFbFbf39939DD75c794dfF
Arg [1] : _gameplayMechanics (address): 0x75CB5D3dfe1dB6dD7ba203Ed9C10C0C99d350628
Arg [2] : _traitRegistry (address): 0xA0AC8091cF2F1920928F5D3db180f25Ee5832282
Arg [3] : _treasury (address): 0x42c4230bA46683977E5085F390A2C743399911e6
Arg [4] : _pixlDogsToken (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000b202d84c760862dadfafbfbf39939dd75c794dff
Arg [1] : 00000000000000000000000075cb5d3dfe1db6dd7ba203ed9c10c0c99d350628
Arg [2] : 000000000000000000000000a0ac8091cf2f1920928f5d3db180f25ee5832282
Arg [3] : 00000000000000000000000042c4230ba46683977e5085f390a2c743399911e6
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.