Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
8136040 | 1950 days ago | 17.42449999 ETH | ||||
7778788 | 2006 days ago | 0.005 ETH | ||||
7764928 | 2008 days ago | 0.0095 ETH | ||||
7725631 | 2014 days ago | 0.005 ETH | ||||
7705012 | 2017 days ago | 0.005 ETH | ||||
7697653 | 2018 days ago | 0.0095 ETH | ||||
7693777 | 2019 days ago | 0.005 ETH | ||||
7684786 | 2020 days ago | 0.0095 ETH | ||||
7681293 | 2021 days ago | 0.005 ETH | ||||
7674829 | 2022 days ago | 0.0095 ETH | ||||
7672181 | 2022 days ago | 0.0095 ETH | ||||
7670622 | 2023 days ago | 0.0095 ETH | ||||
7670127 | 2023 days ago | 0.005 ETH | ||||
7631648 | 2029 days ago | 0.0095 ETH | ||||
7627444 | 2029 days ago | 0.005 ETH | ||||
7620632 | 2030 days ago | 0.0095 ETH | ||||
7614578 | 2031 days ago | 0.0095 ETH | ||||
7601444 | 2033 days ago | 0.0095 ETH | ||||
7589238 | 2035 days ago | 0.0095 ETH | ||||
7558363 | 2040 days ago | 0.0095 ETH | ||||
7555120 | 2041 days ago | 0.0095 ETH | ||||
7554382 | 2041 days ago | 0.0095 ETH | ||||
7553691 | 2041 days ago | 0.0095 ETH | ||||
7543159 | 2043 days ago | 0.0095 ETH | ||||
7535549 | 2044 days ago | 0.005 ETH |
Loading...
Loading
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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
608060405260008054600160a860020a031916331790556106a7806100256000396000f3006080604052600436106100cf5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631195236981146100d45780633ccfd60b146100eb5780633f4ba83a146101005780635c975abb146101155780638456cb591461013e5780638da5cb5b146101535780638e0055531461018457806394a89233146101a05780639652713e146101b5578063a055d455146101d6578063d5b2a01a146101f7578063e410a0c614610223578063e80db5db1461024b578063f2fde38b14610260575b600080fd5b3480156100e057600080fd5b506100e9610281565b005b3480156100f757600080fd5b506100e96102a2565b34801561010c57600080fd5b506100e9610317565b34801561012157600080fd5b5061012a61038d565b604080519115158252519081900360200190f35b34801561014a57600080fd5b506100e961039d565b34801561015f57600080fd5b50610168610418565b60408051600160a060020a039092168252519081900360200190f35b34801561019057600080fd5b506100e961ffff60043516610427565b3480156101ac57600080fd5b5061012a610484565b6100e964ffffffffff60043516602435600160a060020a0360443516610489565b6100e964ffffffffff60043516602435600160a060020a03604435166104a5565b34801561020357600080fd5b5061020c6104bc565b6040805161ffff9092168252519081900360200190f35b34801561022f57600080fd5b506100e9600160a060020a036004351661ffff602435166104cd565b34801561025757600080fd5b506101686105d8565b34801561026c57600080fd5b506100e9600160a060020a03600435166105e7565b600154600160a060020a0316331461029857600080fd5b6102a06102a2565b565b600054600160a060020a03163314806102c55750600154600160a060020a031633145b15156102d057600080fd5b6000303111156102a057600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610314573d6000803e3d6000fd5b50565b600054600160a060020a0316331461032e57600080fd5b60005460a060020a900460ff16151561034657600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b600054600160a060020a031633146103b457600080fd5b60005460a060020a900460ff16156103cb57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b61271061ffff8216111561043a57600080fd5b600054600160a060020a0316331461045157600080fd5b6001805461ffff90921660a060020a0275ffff000000000000000000000000000000000000000019909216919091179055565b600190565b600154600160a060020a031633146104a057600080fd5b505050565b600154600160a060020a031633146100cf57600080fd5b60015460a060020a900461ffff1681565b600061271061ffff831611156104e257600080fd5b600054600160a060020a031633146104f957600080fd5b81600160146101000a81548161ffff021916908361ffff16021790555082905080600160a060020a0316634d6a813a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561057057600080fd5b505af1158015610584573d6000803e3d6000fd5b505050506040513d602081101561059a57600080fd5b505115156105a757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600154600160a060020a031681565b600054600160a060020a031633146105fe57600080fd5b600160a060020a038116151561061357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820559bb4a9c430b3864b366ba9d594d3b7b9b3abd959e6caae51e428beb57c35ad0029
Deployed Bytecode
0x6080604052600436106100cf5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631195236981146100d45780633ccfd60b146100eb5780633f4ba83a146101005780635c975abb146101155780638456cb591461013e5780638da5cb5b146101535780638e0055531461018457806394a89233146101a05780639652713e146101b5578063a055d455146101d6578063d5b2a01a146101f7578063e410a0c614610223578063e80db5db1461024b578063f2fde38b14610260575b600080fd5b3480156100e057600080fd5b506100e9610281565b005b3480156100f757600080fd5b506100e96102a2565b34801561010c57600080fd5b506100e9610317565b34801561012157600080fd5b5061012a61038d565b604080519115158252519081900360200190f35b34801561014a57600080fd5b506100e961039d565b34801561015f57600080fd5b50610168610418565b60408051600160a060020a039092168252519081900360200190f35b34801561019057600080fd5b506100e961ffff60043516610427565b3480156101ac57600080fd5b5061012a610484565b6100e964ffffffffff60043516602435600160a060020a0360443516610489565b6100e964ffffffffff60043516602435600160a060020a03604435166104a5565b34801561020357600080fd5b5061020c6104bc565b6040805161ffff9092168252519081900360200190f35b34801561022f57600080fd5b506100e9600160a060020a036004351661ffff602435166104cd565b34801561025757600080fd5b506101686105d8565b34801561026c57600080fd5b506100e9600160a060020a03600435166105e7565b600154600160a060020a0316331461029857600080fd5b6102a06102a2565b565b600054600160a060020a03163314806102c55750600154600160a060020a031633145b15156102d057600080fd5b6000303111156102a057600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610314573d6000803e3d6000fd5b50565b600054600160a060020a0316331461032e57600080fd5b60005460a060020a900460ff16151561034657600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b600054600160a060020a031633146103b457600080fd5b60005460a060020a900460ff16156103cb57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b61271061ffff8216111561043a57600080fd5b600054600160a060020a0316331461045157600080fd5b6001805461ffff90921660a060020a0275ffff000000000000000000000000000000000000000019909216919091179055565b600190565b600154600160a060020a031633146104a057600080fd5b505050565b600154600160a060020a031633146100cf57600080fd5b60015460a060020a900461ffff1681565b600061271061ffff831611156104e257600080fd5b600054600160a060020a031633146104f957600080fd5b81600160146101000a81548161ffff021916908361ffff16021790555082905080600160a060020a0316634d6a813a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561057057600080fd5b505af1158015610584573d6000803e3d6000fd5b505050506040513d602081101561059a57600080fd5b505115156105a757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600154600160a060020a031681565b600054600160a060020a031633146105fe57600080fd5b600160a060020a038116151561061357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820559bb4a9c430b3864b366ba9d594d3b7b9b3abd959e6caae51e428beb57c35ad0029
Swarm Source
bzzr://559bb4a9c430b3864b366ba9d594d3b7b9b3abd959e6caae51e428beb57c35ad
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.