ETH Price: $3,257.02 (-3.52%)

Contract

0x19FDd6EECcdF4BC30F363f63Af44981C1F6A75C4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Setup64969962018-10-11 20:15:282224 days ago1539288928IN
BC: Buy Energy
0 ETH0.00036187
0x6080604064969592018-10-11 20:06:332224 days ago1539288393IN
 Create: BuyEnergy
0 ETH0.003640617

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
81360402019-07-12 11:31:041950 days ago1562931064
BC: Buy Energy
17.42449999 ETH
77787882019-05-17 16:22:082006 days ago1558110128
BC: Buy Energy
0.005 ETH
77649282019-05-15 12:30:102008 days ago1557923410
BC: Buy Energy
0.0095 ETH
77256312019-05-09 9:36:002014 days ago1557394560
BC: Buy Energy
0.005 ETH
77050122019-05-06 3:49:382017 days ago1557114578
BC: Buy Energy
0.005 ETH
76976532019-05-05 0:05:572018 days ago1557014757
BC: Buy Energy
0.0095 ETH
76937772019-05-04 9:44:052019 days ago1556963045
BC: Buy Energy
0.005 ETH
76847862019-05-03 0:08:302020 days ago1556842110
BC: Buy Energy
0.0095 ETH
76812932019-05-02 11:17:302021 days ago1556795850
BC: Buy Energy
0.005 ETH
76748292019-05-01 11:15:002022 days ago1556709300
BC: Buy Energy
0.0095 ETH
76721812019-05-01 1:10:062022 days ago1556673006
BC: Buy Energy
0.0095 ETH
76706222019-04-30 19:23:492023 days ago1556652229
BC: Buy Energy
0.0095 ETH
76701272019-04-30 17:31:162023 days ago1556645476
BC: Buy Energy
0.005 ETH
76316482019-04-24 18:22:282029 days ago1556130148
BC: Buy Energy
0.0095 ETH
76274442019-04-24 2:18:102029 days ago1556072290
BC: Buy Energy
0.005 ETH
76206322019-04-23 0:28:312030 days ago1555979311
BC: Buy Energy
0.0095 ETH
76145782019-04-22 1:59:582031 days ago1555898398
BC: Buy Energy
0.0095 ETH
76014442019-04-20 0:48:592033 days ago1555721339
BC: Buy Energy
0.0095 ETH
75892382019-04-18 3:03:402035 days ago1555556620
BC: Buy Energy
0.0095 ETH
75583632019-04-13 7:47:552040 days ago1555141675
BC: Buy Energy
0.0095 ETH
75551202019-04-12 19:49:572041 days ago1555098597
BC: Buy Energy
0.0095 ETH
75543822019-04-12 17:07:172041 days ago1555088837
BC: Buy Energy
0.0095 ETH
75536912019-04-12 14:29:282041 days ago1555079368
BC: Buy Energy
0.0095 ETH
75431592019-04-10 22:56:332043 days ago1554936993
BC: Buy Energy
0.0095 ETH
75355492019-04-09 18:35:302044 days ago1554834930
BC: Buy Energy
0.005 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BuyEnergy

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-10-11
*/

pragma solidity ^0.4.24;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


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


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() public {
    owner = msg.sender;
  }

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

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}



/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

pragma solidity ^0.4.24;

/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract PluginInterface
{
    /// @dev simply a boolean to indicate this is the contract we expect to be
    function isPluginInterface() public pure returns (bool);

    function onRemove() public;

    /// @dev Begins new feature.
    /// @param _cutieId - ID of token to auction, sender must be owner.
    /// @param _parameter - arbitrary parameter
    /// @param _seller - Old owner, if not the message sender
    function run(
        uint40 _cutieId,
        uint256 _parameter,
        address _seller
    ) 
    public
    payable;

    /// @dev Begins new feature, approved and signed by COO.
    /// @param _cutieId - ID of token to auction, sender must be owner.
    /// @param _parameter - arbitrary parameter
    function runSigned(
        uint40 _cutieId,
        uint256 _parameter,
        address _owner
    )
    external
    payable;

    function withdraw() public;
}

pragma solidity ^0.4.24;

pragma solidity ^0.4.24;

/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
contract ConfigInterface
{
    function isConfig() public pure returns (bool);

    function getCooldownIndexFromGeneration(uint16 _generation) public view returns (uint16);
    
    function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) public view returns (uint40);

    function getCooldownIndexCount() public view returns (uint256);
    
    function getBabyGen(uint16 _momGen, uint16 _dadGen) public pure returns (uint16);

    function getTutorialBabyGen(uint16 _dadGen) public pure returns (uint16);

    function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
}


contract CutieCoreInterface
{
    function isCutieCore() pure public returns (bool);

    ConfigInterface public config;

    function transferFrom(address _from, address _to, uint256 _cutieId) external;
    function transfer(address _to, uint256 _cutieId) external;

    function ownerOf(uint256 _cutieId)
        external
        view
        returns (address owner);

    function getCutie(uint40 _id)
        external
        view
        returns (
        uint256 genes,
        uint40 birthTime,
        uint40 cooldownEndTime,
        uint40 momId,
        uint40 dadId,
        uint16 cooldownIndex,
        uint16 generation
    );

    function getGenes(uint40 _id)
        public
        view
        returns (
        uint256 genes
    );


    function getCooldownEndTime(uint40 _id)
        public
        view
        returns (
        uint40 cooldownEndTime
    );

    function getCooldownIndex(uint40 _id)
        public
        view
        returns (
        uint16 cooldownIndex
    );


    function getGeneration(uint40 _id)
        public
        view
        returns (
        uint16 generation
    );

    function getOptional(uint40 _id)
        public
        view
        returns (
        uint64 optional
    );


    function changeGenes(
        uint40 _cutieId,
        uint256 _genes)
        public;

    function changeCooldownEndTime(
        uint40 _cutieId,
        uint40 _cooldownEndTime)
        public;

    function changeCooldownIndex(
        uint40 _cutieId,
        uint16 _cooldownIndex)
        public;

    function changeOptional(
        uint40 _cutieId,
        uint64 _optional)
        public;

    function changeGeneration(
        uint40 _cutieId,
        uint16 _generation)
        public;

    function createSaleAuction(
        uint40 _cutieId,
        uint128 _startPrice,
        uint128 _endPrice,
        uint40 _duration
    )
    public;

    function getApproved(uint256 _tokenId) external returns (address);
}


/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract CutiePluginBase is PluginInterface, Pausable
{
    function isPluginInterface() public pure returns (bool)
    {
        return true;
    }

    // Reference to contract tracking NFT ownership
    CutieCoreInterface public coreContract;

    // Cut owner takes on each auction, measured in basis points (1/100 of a percent).
    // Values 0-10,000 map to 0%-100%
    uint16 public ownerFee;

    // @dev Throws if called by any account other than the owner.
    modifier onlyCore() {
        require(msg.sender == address(coreContract));
        _;
    }

    /// @dev Constructor creates a reference to the NFT ownership contract
    ///  and verifies the owner cut is in the valid range.
    /// @param _coreAddress - address of a deployed contract implementing
    ///  the Nonfungible Interface.
    /// @param _fee - percent cut the owner takes on each auction, must be
    ///  between 0-10,000.
    function setup(address _coreAddress, uint16 _fee) public {
        require(_fee <= 10000);
        require(msg.sender == owner);
        ownerFee = _fee;
        
        CutieCoreInterface candidateContract = CutieCoreInterface(_coreAddress);
        require(candidateContract.isCutieCore());
        coreContract = candidateContract;
    }

    // @dev Set the owner's fee.
    //  @param fee should be between 0-10,000.
    function setFee(uint16 _fee) public
    {
        require(_fee <= 10000);
        require(msg.sender == owner);

        ownerFee = _fee;
    }

    /// @dev Returns true if the claimant owns the token.
    /// @param _claimant - Address claiming to own the token.
    /// @param _cutieId - ID of token whose ownership to verify.
    function _isOwner(address _claimant, uint40 _cutieId) internal view returns (bool) {
        return (coreContract.ownerOf(_cutieId) == _claimant);
    }

    /// @dev Escrows the NFT, assigning ownership to this contract.
    /// Throws if the escrow fails.
    /// @param _owner - Current owner address of token to escrow.
    /// @param _cutieId - ID of token whose approval to verify.
    function _escrow(address _owner, uint40 _cutieId) internal {
        // it will throw if transfer fails
        coreContract.transferFrom(_owner, this, _cutieId);
    }

    /// @dev Transfers an NFT owned by this contract to another address.
    /// Returns true if the transfer succeeds.
    /// @param _receiver - Address to transfer NFT to.
    /// @param _cutieId - ID of token to transfer.
    function _transfer(address _receiver, uint40 _cutieId) internal {
        // it will throw if transfer fails
        coreContract.transfer(_receiver, _cutieId);
    }

    /// @dev Computes owner's cut of a sale.
    /// @param _price - Sale price of NFT.
    function _computeFee(uint128 _price) internal view returns (uint128) {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our entry functions carefully cap the maximum values for
        //  currency (at 128-bits), and ownerFee <= 10000 (see the require()
        //  statement in the ClockAuction constructor). The result of this
        //  function is always guaranteed to be <= _price.
        return _price * ownerFee / 10000;
    }

    function withdraw() public
    {
        require(
            msg.sender == owner ||
            msg.sender == address(coreContract)
        );
        if (address(this).balance > 0)
        {
            address(coreContract).transfer(address(this).balance);
        }
    }

    function onRemove() public onlyCore
    {
        withdraw();
    }

    function run(
        uint40,
        uint256,
        address
    ) 
        public
        payable
        onlyCore
    {
        revert();
    }
}


/// @dev Receives payments for payd features from players for Blockchain Cuties
/// @author https://BlockChainArchitect.io
contract BuyEnergy is CutiePluginBase
{
    function run(
        uint40,
        uint256,
        address
    )
        public
        payable
        onlyCore
    {
        revert();
    }

    function runSigned(uint40, uint256, address)
        external
        payable
        onlyCore
    {
        // just accept payments
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[],"name":"onRemove","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_fee","type":"uint16"}],"name":"setFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isPluginInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"","type":"uint40"},{"name":"","type":"uint256"},{"name":"","type":"address"}],"name":"runSigned","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"","type":"uint40"},{"name":"","type":"uint256"},{"name":"","type":"address"}],"name":"run","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"ownerFee","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_coreAddress","type":"address"},{"name":"_fee","type":"uint16"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"coreContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

608060405260008054600160a860020a031916331790556106a7806100256000396000f3006080604052600436106100cf5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631195236981146100d45780633ccfd60b146100eb5780633f4ba83a146101005780635c975abb146101155780638456cb591461013e5780638da5cb5b146101535780638e0055531461018457806394a89233146101a05780639652713e146101b5578063a055d455146101d6578063d5b2a01a146101f7578063e410a0c614610223578063e80db5db1461024b578063f2fde38b14610260575b600080fd5b3480156100e057600080fd5b506100e9610281565b005b3480156100f757600080fd5b506100e96102a2565b34801561010c57600080fd5b506100e9610317565b34801561012157600080fd5b5061012a61038d565b604080519115158252519081900360200190f35b34801561014a57600080fd5b506100e961039d565b34801561015f57600080fd5b50610168610418565b60408051600160a060020a039092168252519081900360200190f35b34801561019057600080fd5b506100e961ffff60043516610427565b3480156101ac57600080fd5b5061012a610484565b6100e964ffffffffff60043516602435600160a060020a0360443516610489565b6100e964ffffffffff60043516602435600160a060020a03604435166104a5565b34801561020357600080fd5b5061020c6104bc565b6040805161ffff9092168252519081900360200190f35b34801561022f57600080fd5b506100e9600160a060020a036004351661ffff602435166104cd565b34801561025757600080fd5b506101686105d8565b34801561026c57600080fd5b506100e9600160a060020a03600435166105e7565b600154600160a060020a0316331461029857600080fd5b6102a06102a2565b565b600054600160a060020a03163314806102c55750600154600160a060020a031633145b15156102d057600080fd5b6000303111156102a057600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610314573d6000803e3d6000fd5b50565b600054600160a060020a0316331461032e57600080fd5b60005460a060020a900460ff16151561034657600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b600054600160a060020a031633146103b457600080fd5b60005460a060020a900460ff16156103cb57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b61271061ffff8216111561043a57600080fd5b600054600160a060020a0316331461045157600080fd5b6001805461ffff90921660a060020a0275ffff000000000000000000000000000000000000000019909216919091179055565b600190565b600154600160a060020a031633146104a057600080fd5b505050565b600154600160a060020a031633146100cf57600080fd5b60015460a060020a900461ffff1681565b600061271061ffff831611156104e257600080fd5b600054600160a060020a031633146104f957600080fd5b81600160146101000a81548161ffff021916908361ffff16021790555082905080600160a060020a0316634d6a813a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561057057600080fd5b505af1158015610584573d6000803e3d6000fd5b505050506040513d602081101561059a57600080fd5b505115156105a757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600154600160a060020a031681565b600054600160a060020a031633146105fe57600080fd5b600160a060020a038116151561061357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820559bb4a9c430b3864b366ba9d594d3b7b9b3abd959e6caae51e428beb57c35ad0029

Deployed Bytecode

0x6080604052600436106100cf5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631195236981146100d45780633ccfd60b146100eb5780633f4ba83a146101005780635c975abb146101155780638456cb591461013e5780638da5cb5b146101535780638e0055531461018457806394a89233146101a05780639652713e146101b5578063a055d455146101d6578063d5b2a01a146101f7578063e410a0c614610223578063e80db5db1461024b578063f2fde38b14610260575b600080fd5b3480156100e057600080fd5b506100e9610281565b005b3480156100f757600080fd5b506100e96102a2565b34801561010c57600080fd5b506100e9610317565b34801561012157600080fd5b5061012a61038d565b604080519115158252519081900360200190f35b34801561014a57600080fd5b506100e961039d565b34801561015f57600080fd5b50610168610418565b60408051600160a060020a039092168252519081900360200190f35b34801561019057600080fd5b506100e961ffff60043516610427565b3480156101ac57600080fd5b5061012a610484565b6100e964ffffffffff60043516602435600160a060020a0360443516610489565b6100e964ffffffffff60043516602435600160a060020a03604435166104a5565b34801561020357600080fd5b5061020c6104bc565b6040805161ffff9092168252519081900360200190f35b34801561022f57600080fd5b506100e9600160a060020a036004351661ffff602435166104cd565b34801561025757600080fd5b506101686105d8565b34801561026c57600080fd5b506100e9600160a060020a03600435166105e7565b600154600160a060020a0316331461029857600080fd5b6102a06102a2565b565b600054600160a060020a03163314806102c55750600154600160a060020a031633145b15156102d057600080fd5b6000303111156102a057600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610314573d6000803e3d6000fd5b50565b600054600160a060020a0316331461032e57600080fd5b60005460a060020a900460ff16151561034657600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b600054600160a060020a031633146103b457600080fd5b60005460a060020a900460ff16156103cb57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b61271061ffff8216111561043a57600080fd5b600054600160a060020a0316331461045157600080fd5b6001805461ffff90921660a060020a0275ffff000000000000000000000000000000000000000019909216919091179055565b600190565b600154600160a060020a031633146104a057600080fd5b505050565b600154600160a060020a031633146100cf57600080fd5b60015460a060020a900461ffff1681565b600061271061ffff831611156104e257600080fd5b600054600160a060020a031633146104f957600080fd5b81600160146101000a81548161ffff021916908361ffff16021790555082905080600160a060020a0316634d6a813a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561057057600080fd5b505af1158015610584573d6000803e3d6000fd5b505050506040513d602081101561059a57600080fd5b505115156105a757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600154600160a060020a031681565b600054600160a060020a031633146105fe57600080fd5b600160a060020a038116151561061357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820559bb4a9c430b3864b366ba9d594d3b7b9b3abd959e6caae51e428beb57c35ad0029

Swarm Source

bzzr://559bb4a9c430b3864b366ba9d594d3b7b9b3abd959e6caae51e428beb57c35ad

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.