Contract Overview
ETH Balance: 0 Ether
No Of Transactions: 1739 txns
  Latest 25 txns from a total Of 1739 transactions View All

TxHash Age From To Value [TxFee]
0x76505e518265cad52e87edc9be471dd4df3386ad6b4619cb92ea1b5a7f875a6d8 days 22 hrs ago0xdc5fdc6d0c24573c7e2ac3896ab10e376be6da86  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.00032647
0xbc91b206e19a18d671eb1faf11d4433223d15c21078999996d7eff5cd23664f28 days 22 hrs ago0xdc5fdc6d0c24573c7e2ac3896ab10e376be6da86  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.00032647
0x1f4b7dadd5bd8b0376791e26139fe8e24cb4b46af331c39451b97fcc675ccb638 days 22 hrs ago0xdc5fdc6d0c24573c7e2ac3896ab10e376be6da86  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.00032647
0x85a772cac0e375bc4a36297e1671eacc1c7d8f2819133a26dd4e7f68edf8bd1e9 days 11 hrs ago0xdc5fdc6d0c24573c7e2ac3896ab10e376be6da86  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000130588
0xdd088e7e593fe59ba5fb11615dc70111f39d4181cac2e165a1fe4b7cb8abe9649 days 13 hrs ago0x95f3ef1956a961e1263124124070574634822441  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.00173712
0xa2d28712a8f5beebdfde358582e13c0f6d5c20180d1468e4dd8340dca3c9387e9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0xd2181ced97455b2a268cb5e38c6abc9494d5439183966f068d59bcdafeeb2c1a9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x5ecaa00a869718da7496d8a0cec62fab7564bf23c9cbf61b446c24a110603f4e9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0xeaad3c359f1c4459b2c9d0db073e3668f3b1a8cb09fb402b88b9b3b105800cce9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x2a5cfaec40e24465cd5ec9331451e741042e88184e511e3d87c4ae0cfd1db8ee9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x00d4d6c45bbb820bae6394e413f847f67b60c180222cf986229ab0880f0f46809 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0xa88d67b39f45d99cd6b14db54d0f598220fef2fa42143deea855f7304f5ca47b9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x8804fe73803bc7299cb2e65e299eb25f6cdd630ee1be6bfe3f159b8ee0be32ee9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x2fc21122220fa0cf8a326ace6fb3cb395e0c98db0c2d842bedcc253a8dc2cdfa9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x5d2a29590f03393621e4073e74a019d79f4d585cde0a072fedf44e8ded32b4269 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x8f84e7ba8cce505063e1552ab9a9348e744b0c24713143429fd76a807a8033da9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x964d3f3a540963beff6ac98ea339ab978d180aabeabc739b91257a6e4ff85f6b9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x1288fa04a9f30e6c7457bcb1483b5bc861805fc0eadf4282f54b56788bc3e6a99 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0xb61ac40c404e172eb1c1b02bd290f43dfb4afe8c2f42ece93c07d9c28dedff1a9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0xadebacbc77d083162432c4579c0acc3642cfdac1cfd498ae9653a47179cec1d49 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x80b53afde8dec35b31c4792cb9ca024041083a63cb05cb2205beafedf78a7f0d9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x0454a282be1776275ec763a0b0836bf4edc03e10e1ec563719604378585530ef9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x29cd3afaa9637cf4f70346f1233abd5242b9f1aea18d95ae73b20f93b33f002f9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x906dd2ccb9c30251616977de9fa1c98a5253c673ce468ee379e0b5a608cf8a139 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
0x393333fd51169df37a77e80d4ffd39e44db358eb0c3b5d41e845ba126f39ea4a9 days 13 hrs ago0x32cf98aec4a8c0717dbe091654ff52dea64017f5  IN   0xecd5ff31440a4858f907e1491f161f344b2d0e0b0 Ether0.000016323497
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: LightOracle
Compiler Version: v0.4.15+commit.bbb8e64f
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.15;

contract Oracle {
    event NewSymbol(string _symbol, uint8 _decimals);
    function getTimestamp(string symbol) constant returns(uint256);
    function getRateFor(string symbol) returns (uint256);
    function getCost(string symbol) constant returns (uint256);
    function getDecimals(string symbol) constant returns (uint256);
}

contract Token {
    function transfer(address _to, uint _value) returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
    function allowance(address _owner, address _spender) constant returns (uint256 remaining);
    function approve(address _spender, uint256 _value) returns (bool success);
    function increaseApproval (address _spender, uint _addedValue) public returns (bool success);
}


contract LightOracle is Oracle {
    Token public token = Token(0x2f45b6Fb2F28A73f110400386da31044b2e953D4);

    address public owner;
    address public provider1;
    address public provider2;

    string public currency = "ARS";
    uint8 public decimals = 2;

    uint256 private rate;
    uint256 public cost;
    uint256 public updateTimestamp;

    mapping(address => bool) public blacklist;

    event RateDelivered(uint256 _rate, uint256 _cost, uint256 _timestamp);

    function LightOracle() {
        owner = msg.sender;
        NewSymbol(currency, decimals);
    }

    function updateRate(uint256 _rate) {
        require(msg.sender == provider1 || msg.sender == provider2 || msg.sender == owner);
        rate = _rate;
        updateTimestamp = block.timestamp;
    }
    
    function updateCost(uint256 _cost) {
        require(msg.sender == provider1 || msg.sender == provider2 || msg.sender == owner);
        cost = _cost;
    }

    function getTimestamp(string symbol) constant returns (uint256) {
        require(isCurrency(symbol));
        return updateTimestamp;
    }
    
    function getRateFor(string symbol) returns (uint256) {
        require(isCurrency(symbol));
        require(!blacklist[msg.sender]);
        uint256 costRcn = cost * rate;
        require(token.transferFrom(msg.sender, this, costRcn));
        RateDelivered(rate, costRcn, updateTimestamp);
        return rate;
    }

    function isContract(address addr) internal returns (bool) {
        uint size;
        assembly { size := extcodesize(addr) }
        return size > 0;
    }

    function getCost(string symbol) constant returns (uint256) {
        require(isCurrency(symbol));
        return cost * rate;
    }

    function getDecimals(string symbol) constant returns (uint256) {
        require(isCurrency(symbol));
        return decimals;
    }

    function getRateForExternal(string symbol) constant returns (uint256) {
        require(isCurrency(symbol));
        require(!blacklist[msg.sender]);
        require(!isContract(msg.sender));
        return rate;
    }

    function transfer(address to) returns (bool) {
        require(msg.sender == owner);
        require(to != address(0));
        owner = to;
        return true;
    }

    function setProvider1(address _provider) returns (bool) {
        require(msg.sender == owner);
        provider1 = _provider;
        return true;
    }

    function setProvider2(address _provider) returns (bool) {
        require(msg.sender == owner);
        provider2 = _provider;
        return true;
    }

    function withdrawal(Token _token, address to, uint256 amount) returns (bool) {
        return _token.transfer(to, amount);
    }

    function isCurrency(string target) internal returns (bool) {
        bytes memory t = bytes(target);
        bytes memory c = bytes(currency);
        if (t.length != c.length) return false;
        if (t[0] != c[0]) return false;
        if (t[1] != c[1]) return false;
        if (t[2] != c[2]) return false;
        return true;
    } 
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"withdrawal","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"cost","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"updateTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_cost","type":"uint256"}],"name":"updateCost","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"provider1","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"symbol","type":"string"}],"name":"getTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_provider","type":"address"}],"name":"setProvider2","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"symbol","type":"string"}],"name":"getRateFor","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"symbol","type":"string"}],"name":"getRateForExternal","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_rate","type":"uint256"}],"name":"updateRate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"symbol","type":"string"}],"name":"getCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"symbol","type":"string"}],"name":"getDecimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_provider","type":"address"}],"name":"setProvider1","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"provider2","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"currency","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"blacklist","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_rate","type":"uint256"},{"indexed":false,"name":"_cost","type":"uint256"},{"indexed":false,"name":"_timestamp","type":"uint256"}],"name":"RateDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_symbol","type":"string"},{"indexed":false,"name":"_decimals","type":"uint8"}],"name":"NewSymbol","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604090815260008054600160a060020a031916732f45b6fb2f28a73f110400386da31044b2e953d41790558051908101604052600381527f415253000000000000000000000000000000000000000000000000000000000060208201526004908051610071929160200190610168565b506005805460ff19166002179055341561008a57600080fd5b5b60018054600160a060020a03191633600160a060020a03161790556005547fe4a7f3637643844a78d93d8ff43590203f1075a9f1377e120bc43ae7cc91408e9060049060ff1660405160ff82166020820152604080825283546002600019610100600184161502019091160490820181905281906060820190859080156101535780601f1061012857610100808354040283529160200191610153565b820191906000526020600020905b81548152906001019060200180831161013657829003601f168201915b5050935050505060405180910390a15b610208565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101a957805160ff19168380011785556101d6565b828001600101855582156101d6579182015b828111156101d65782518255916020019190600101906101bb565b5b506101e39291506101e7565b5090565b61020591905b808211156101e357600081556001016101ed565b5090565b90565b610d5a80620002186000396000f300606060405236156100f55763ffffffff60e060020a60003504166229c0b481146100fa57806313faede6146101365780631a6952301461015b5780631c5be3d71461018e57806323c5a088146101b35780632ba7910a146101cb578063313ce567146101fa57806332e5e5951461022357806345eada10146102865780634a2ff078146102b9578063523c02f51461031c57806369ea17711461037f5780638da5cb5b146103975780639ca3c29c146103c6578063afd0fd1d14610429578063b01a71d81461048c578063c2d4489f146104bf578063e5a6b10f146104ee578063f9f92be414610579578063fc0c546a146105ac575b600080fd5b341561010557600080fd5b610122600160a060020a03600435811690602435166044356105db565b604051901515815260200160405180910390f35b341561014157600080fd5b61014961065e565b60405190815260200160405180910390f35b341561016657600080fd5b610122600160a060020a0360043516610664565b604051901515815260200160405180910390f35b341561019957600080fd5b6101496106c6565b60405190815260200160405180910390f35b34156101be57600080fd5b6101c96004356106cc565b005b34156101d657600080fd5b6101de610724565b604051600160a060020a03909116815260200160405180910390f35b341561020557600080fd5b61020d610733565b60405160ff909116815260200160405180910390f35b341561022e57600080fd5b61014960046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061073c95505050505050565b60405190815260200160405180910390f35b341561029157600080fd5b610122600160a060020a036004351661075c565b604051901515815260200160405180910390f35b34156102c457600080fd5b61014960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506107ab95505050505050565b60405190815260200160405180910390f35b341561032757600080fd5b61014960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506108ec95505050505050565b60405190815260200160405180910390f35b341561038a57600080fd5b6101c9600435610945565b005b34156103a257600080fd5b6101de6109a1565b604051600160a060020a03909116815260200160405180910390f35b34156103d157600080fd5b61014960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506109b095505050505050565b60405190815260200160405180910390f35b341561043457600080fd5b61014960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506109d495505050505050565b60405190815260200160405180910390f35b341561049757600080fd5b610122600160a060020a03600435166109f7565b604051901515815260200160405180910390f35b34156104ca57600080fd5b6101de610a46565b604051600160a060020a03909116815260200160405180910390f35b34156104f957600080fd5b610501610a55565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561053e5780820151818401525b602001610525565b50505050905090810190601f16801561056b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561058457600080fd5b610122600160a060020a0360043516610af3565b604051901515815260200160405180910390f35b34156105b757600080fd5b6101de610b08565b604051600160a060020a03909116815260200160405180910390f35b600083600160a060020a031663a9059cbb848460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561063a57600080fd5b6102c65a03f1151561064b57600080fd5b50505060405180519150505b9392505050565b60075481565b60015460009033600160a060020a0390811691161461068257600080fd5b600160a060020a038216151561069757600080fd5b506001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161781555b919050565b60085481565b60025433600160a060020a03908116911614806106f7575060035433600160a060020a039081169116145b80610710575060015433600160a060020a039081169116145b151561071b57600080fd5b60078190555b50565b600254600160a060020a031681565b60055460ff1681565b600061074782610b17565b151561075257600080fd5b506008545b919050565b60015460009033600160a060020a0390811691161461077a57600080fd5b506003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905560015b919050565b6000806107b783610b17565b15156107c257600080fd5b600160a060020a03331660009081526009602052604090205460ff16156107e857600080fd5b6006546007540290506000809054906101000a9004600160a060020a0316600160a060020a03166323b872dd33308460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561086f57600080fd5b6102c65a03f1151561088057600080fd5b50505060405180519050151561089557600080fd5b7f16205a7cc1b2b433ea32ac592b4aeb07a3821072b3603df723bad8ce3abde4d96006548260085460405180848152602001838152602001828152602001935050505060405180910390a160065491505b50919050565b60006108f782610b17565b151561090257600080fd5b600160a060020a03331660009081526009602052604090205460ff161561092857600080fd5b61093133610d0d565b1561093b57600080fd5b506006545b919050565b60025433600160a060020a0390811691161480610970575060035433600160a060020a039081169116145b80610989575060015433600160a060020a039081169116145b151561099457600080fd5b6006819055426008555b50565b600154600160a060020a031681565b60006109bb82610b17565b15156109c657600080fd5b50600654600754025b919050565b60006109df82610b17565b15156109ea57600080fd5b5060055460ff165b919050565b60015460009033600160a060020a03908116911614610a1557600080fd5b506002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905560015b919050565b600354600160a060020a031681565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aeb5780601f10610ac057610100808354040283529160200191610aeb565b820191906000526020600020905b815481529060010190602001808311610ace57829003601f168201915b505050505081565b60096020526000908152604090205460ff1681565b600054600160a060020a031681565b6000610b21610d1c565b610b29610d1c565b83915060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bc25780601f10610b9757610100808354040283529160200191610bc2565b820191906000526020600020905b815481529060010190602001808311610ba557829003601f168201915b505050505090508051825114610bdb5760009250610d06565b80600081518110610be857fe5b016020015160f860020a900460f860020a02600160f860020a03191682600081518110610c1157fe5b016020015160f860020a900460f860020a02600160f860020a031916141515610c3d5760009250610d06565b80600181518110610c4a57fe5b016020015160f860020a900460f860020a02600160f860020a03191682600181518110610c7357fe5b016020015160f860020a900460f860020a02600160f860020a031916141515610c9f5760009250610d06565b80600281518110610cac57fe5b016020015160f860020a900460f860020a02600160f860020a03191682600281518110610cd557fe5b016020015160f860020a900460f860020a02600160f860020a031916141515610d015760009250610d06565b600192505b5050919050565b6000813b908111905b50919050565b602060405190810160405260008152905600a165627a7a7230582083f02752409073849f726758b9d8d57055e8421590c2a8cfd13b05fbfc8864230029

   Swarm Source:
bzzr://83f02752409073849f726758b9d8d57055e8421590c2a8cfd13b05fbfc886423
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward