Latest 2 txns

TxHash Age From To Value [TxFee]
0xccbdc6e4ef1b4e13753ea8180d9015fe71dd1b51a59f14dfe2e064ac63689dae133 days 9 hrs ago0x49d8621f8862c423abba0dfae4916f838cd264f6  IN   0x67c2e24f0ea4314cc7d2a85e7809dc2b43e6440a0 Ether0.00004292717
0x17e9d64d96b8c82199a7baf21d91ba0f643894fa64f29516216a2818d5c5d7ee137 days 18 hrs ago0x49d8621f8862c423abba0dfae4916f838cd264f6  IN    Contract Creation0 Ether0.00742876118


[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x6fe7a0d1060b1531a173dbe9fcc9e3c3b1dbe601f47dcbe54706cb8266b5180a4218478133 days 9 hrs ago0x24cfa0bfc7c7e4892ca2ecd308b61ac7d3c762760x67c2e24f0ea4314cc7d2a85e7809dc2b43e6440a0 Ether
0x3c890743d3f2521efdb03e1b20b134255a9ebf13b13da91c85eab3f69981a9444187857137 days 17 hrs ago0x24cfa0bfc7c7e4892ca2ecd308b61ac7d3c762760x67c2e24f0ea4314cc7d2a85e7809dc2b43e6440a0 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Verified Source Code for Contract 0x37b58f998f5d00b195410a9db37f95035ed97788
Contract Name: PriceFeed
Compiler Version: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.25;

// ----------------------------------------------------------------------------
// BokkyPooBah's Pricefeed from a single source
//
// Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018. The MIT Licence.
// ----------------------------------------------------------------------------



// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
    address public owner;
    address public newOwner;
    bool private initialised;

    event OwnershipTransferred(address indexed _from, address indexed _to);

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    function initOwned(address _owner) internal {
        require(!initialised);
        owner = _owner;
        initialised = true;
    }
    function transferOwnership(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
    function transferOwnershipImmediately(address _newOwner) public onlyOwner {
        emit OwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }
}


// ----------------------------------------------------------------------------
// Maintain a list of operators that are permissioned to execute certain
// functions
// ----------------------------------------------------------------------------
contract Operated is Owned {
    mapping(address => bool) public operators;

    event OperatorAdded(address _operator);
    event OperatorRemoved(address _operator);

    modifier onlyOperator() {
        require(operators[msg.sender] || owner == msg.sender);
        _;
    }

    function initOperated(address _owner) internal {
        initOwned(_owner);
    }
    function addOperator(address _operator) public onlyOwner {
        require(!operators[_operator]);
        operators[_operator] = true;
        emit OperatorAdded(_operator);
    }
    function removeOperator(address _operator) public onlyOwner {
        require(operators[_operator]);
        delete operators[_operator];
        emit OperatorRemoved(_operator);
    }
}

// ----------------------------------------------------------------------------
// PriceFeed Interface - _live is true if the rate is valid, false if invalid
// ----------------------------------------------------------------------------
contract PriceFeedInterface {
    function name() public view returns (string);
    function getRate() public view returns (uint _rate, bool _live);
}


// ----------------------------------------------------------------------------
// Pricefeed from a single source
// ----------------------------------------------------------------------------
contract PriceFeed is PriceFeedInterface, Operated {
    string private _name;
    uint private _rate;
    bool private _live;

    event SetRate(uint oldRate, bool oldLive, uint newRate, bool newLive);

    constructor(string name, uint rate, bool live) public {
        initOperated(msg.sender);
        _name = name;
        _rate = rate;
        _live = live;
        emit SetRate(0, false, _rate, _live);
    }
    function name() public view returns (string) {
        return _name;
    }
    function setRate(uint rate, bool live) public onlyOperator {
        emit SetRate(_rate, _live, rate, live);
        _rate = rate;
        _live = live;
    }
    function getRate() public view returns (uint rate, bool live) {
        return (_rate, _live);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"operators","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRate","outputs":[{"name":"rate","type":"uint256"},{"name":"live","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"rate","type":"uint256"},{"name":"live","type":"bool"}],"name":"setRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnershipImmediately","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":"_operator","type":"address"}],"name":"addOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_operator","type":"address"}],"name":"removeOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","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"},{"inputs":[{"name":"name","type":"string"},{"name":"rate","type":"uint256"},{"name":"live","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldRate","type":"uint256"},{"indexed":false,"name":"oldLive","type":"bool"},{"indexed":false,"name":"newRate","type":"uint256"},{"indexed":false,"name":"newLive","type":"bool"}],"name":"SetRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_operator","type":"address"}],"name":"OperatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_operator","type":"address"}],"name":"OperatorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b506040516108ad3803806108ad8339810160409081528151602083015191830151920191610046336401000000006100c3810204565b825161005990600390602086019061014a565b5060048290556005805460ff19168215151790819055604080516000808252602082015280820185905260ff90921615156060830152517f2961758c91244536639293a6f7319f53454007c4063328daed3fb879e82d2446916080908290030190a15050506101e5565b6100d5816401000000006100d8810204565b50565b60015474010000000000000000000000000000000000000000900460ff161561010057600080fd5b60008054600160a060020a03909216600160a060020a03199092169190911790556001805460a060020a60ff02191674010000000000000000000000000000000000000000179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061018b57805160ff19168380011785556101b8565b828001600101855582156101b8579182015b828111156101b857825182559160200191906001019061019d565b506101c49291506101c8565b5090565b6101e291905b808211156101c457600081556001016101ce565b90565b6106b9806101f46000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b357806313e7c9d81461013d578063679aefce146101725780636f81bdd8146101a057806379ba5097146101bf5780637e71fb09146101d45780638da5cb5b146101f55780639870d7fe14610226578063ac8a584a14610247578063d4ee1d9014610268578063f2fde38b1461027d575b600080fd5b3480156100bf57600080fd5b506100c861029e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101025781810151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014957600080fd5b5061015e600160a060020a0360043516610334565b604080519115158252519081900360200190f35b34801561017e57600080fd5b50610187610349565b6040805192835290151560208301528051918290030190f35b3480156101ac57600080fd5b506101bd6004356024351515610356565b005b3480156101cb57600080fd5b506101bd6103f4565b3480156101e057600080fd5b506101bd600160a060020a036004351661047c565b34801561020157600080fd5b5061020a6104fb565b60408051600160a060020a039092168252519081900360200190f35b34801561023257600080fd5b506101bd600160a060020a036004351661050a565b34801561025357600080fd5b506101bd600160a060020a03600435166105a2565b34801561027457600080fd5b5061020a610638565b34801561028957600080fd5b506101bd600160a060020a0360043516610647565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561032a5780601f106102ff5761010080835404028352916020019161032a565b820191906000526020600020905b81548152906001019060200180831161030d57829003601f168201915b5050505050905090565b60026020526000908152604090205460ff1681565b60045460055460ff169091565b3360009081526002602052604090205460ff168061037e5750600054600160a060020a031633145b151561038957600080fd5b6004546005546040805192835260ff909116151560208301528181018490528215156060830152517f2961758c91244536639293a6f7319f53454007c4063328daed3fb879e82d24469181900360800190a16004919091556005805460ff1916911515919091179055565b600154600160a060020a0316331461040b57600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a0316331461049357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031681565b600054600160a060020a0316331461052157600080fd5b600160a060020a03811660009081526002602052604090205460ff161561054757600080fd5b600160a060020a038116600081815260026020908152604091829020805460ff19166001179055815192835290517fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d9281900390910190a150565b600054600160a060020a031633146105b957600080fd5b600160a060020a03811660009081526002602052604090205460ff1615156105e057600080fd5b600160a060020a038116600081815260026020908152604091829020805460ff19169055815192835290517f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d9281900390910190a150565b600154600160a060020a031681565b600054600160a060020a0316331461065e57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058209d9ea731056e27af3c5b9049e0fd1f48279350eb085b4d0de407b3e70a4dde800029000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000c1fe7f0ff9fde000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000011475a452f45544820507269636546656564000000000000000000000000000000

   Swarm Source:
bzzr://9d9ea731056e27af3c5b9049e0fd1f48279350eb085b4d0de407b3e70a4dde80

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward