Latest 25 txns From a total of 1822 Transactions

TxHash Age From To Value [TxFee]
0xe91b9dfc221566274b762f13d57e30a6c3cb33dc52e86a2a5ebbe885d21bb4ce54 days 8 hrs ago0x904aceb95f681665768f1464f36903068730fd42  IN   Chainy.info0 Ether0.0004
0x02efff62a4cdff2bed75a31b031bf5edc34ab3a8c8b10d923bf0e3c105a88fbd75 days 23 hrs ago0x6842d2f238368799c7bf711609126d3ebd611d1c  IN   Chainy.info0 Ether0.0041
0x3f230366fda3643fe0e2bbe5c2e61b3df45fce308ce52be3cc34baf19b48a9be75 days 23 hrs ago0x6842d2f238368799c7bf711609126d3ebd611d1c  IN   Chainy.info0 Ether0.00205
0x6f21e57e13e2eebb2323191bf09bc532cd96e9592f71ce903b67f7b1296e3b8279 days 14 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.01804
0xeba0509a3d2dac8f1bda052db09aa271e1405d46f1dd3756f434532ca9d38cdb84 days 23 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.0205
0x4de553afdc722047e616c87d3e5b892871449883f8b65a24edddbabc959e597585 days 18 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.0205
0x4b3727d7d30f7b98106464dfc58084677cb922d28ab6efa236aad490a77fe09b85 days 18 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.0164
0xba63c62aabf0082dfef6f055912c8ac30225b3319e1e2cddd54d4d99152f111985 days 18 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.00205
0x29ce54527456d845a2c0c94ef74dd027272c35acb548da13494cef0e7f7e58b185 days 18 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.001804
0x49fdd517d9514a5f20cba1d96e69e9320313fd93b11b46e5cba2d4863eae41fe85 days 18 hrs ago0xc1cd7af661d03137ff79e61d23efac07647a6c83  IN   Chainy.info0 Ether0.00164
0x44d6fd3c9a77a4e00ad84be7fe03af47ff3a0b48c4dd9175539d2b9f5bc83f9a90 days 4 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.007105878
0xa0a2e2cd16b1005e626ea06e206ca2b3093993535c2abc5dcc038dbab7eec7b691 days 2 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.005927272
0x0f29606f933c4bf8c198a3a8092260447021e1bc896f83d329d251405348f57c91 days 5 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.007118254
0x69e98ac58ffd4ed4a4c28c06280966087aac8736bc1f6e98cd1771860b47426991 days 5 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.005925504
0x408206546b6869a0c71c75a083c57776c364c0a093ae5a63e16aed0c389b93c291 days 6 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.005355662
0x3a9f2942bb31c2364d1211acd8087468944e854dfe694f69ac698fdf1082f13f91 days 7 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.005916664
0x4cf135bbbc292f91ecaf2ba439527cb004ebb42d5d841cd3f8d8bae1abdb9c6891 days 12 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.00650598
0x711cae8c0bed7d71f1e7f99c88eee7ddb70ab2ec9ffd258c8a16f61a2d058a0d92 days 19 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.007111182
0x48da737d3a9ff89ed329fab4539940223eb456a95a7e5258c95aa2b3def9ecea95 days 52 mins ago0x904aceb95f681665768f1464f36903068730fd42  IN   Chainy.info0 Ether0.00042
0xc2a6a28a3582cfa084b54155bea104eeae70e61f2f051eda74f1d3f07aebcffa95 days 58 mins ago0x904aceb95f681665768f1464f36903068730fd42  IN   Chainy.info0 Ether0.00046
0x97898e99d5fdc78ec77c9614c6513fa74a0fe2f8f361cf2ab30d1da83b12f10495 days 1 hr ago0x904aceb95f681665768f1464f36903068730fd42  IN   Chainy.info0 Ether0.001
0x40049cd03df0dcaa59ef558ed84d3cea1ad325ee01ee025b60aa081f4807ec2895 days 2 hrs ago0x904aceb95f681665768f1464f36903068730fd42  IN   Chainy.info0 Ether0.002
0x87501f0bd9bd62e65f62f518cd93da7949289046b952aec4da4de1c48f08cad596 days 15 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.01113541
0xf162d5607d3bcbb167358427b366c4bfbf85fd82678dd53466b3802721ef97bf96 days 15 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.005355662
0x5a664d523a7894cb564f5baf7b6a3b51dd1fd5be26822c272555161c2bd67a8796 days 16 hrs ago0x1b475a34e99bd556a742f9a3b6f7ac3b4468d4fa  IN   Chainy.info0 Ether0.008259628
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x9d0f227ad53ca11411e8d5160918e696fe3b8f0d23f1c31b9178e3f7bcd942b12721000692 days 11 hrs ago0xf3763c30dd6986b53402d41a8552b8f7f6a6089b0xc2be1c765d622bcfa3ab30bedb508b633ab792171 Ether
[ Download CSV Export  ] 



  Contract Source Code   Find Similiar Contracts

/**
 * Copyright 2016 Everex https://everex.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


/* String utility library */
library strUtils {
    string constant CHAINY_JSON_ID = '"id":"CHAINY"';
    uint8 constant CHAINY_JSON_MIN_LEN = 32;

    /* Converts given number to base58, limited by _maxLength symbols */
    function toBase58(uint256 _value, uint8 _maxLength) internal returns (string) {
        string memory letters = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
        bytes memory alphabet = bytes(letters);
        uint8 base = 58;
        uint8 len = 0;
        uint256 remainder = 0;
        bool needBreak = false;
        bytes memory bytesReversed = bytes(new string(_maxLength));

        for (uint8 i = 0; i < _maxLength; i++) {
            if(_value < base){
                needBreak = true;
            }
            remainder = _value % base;
            _value = uint256(_value / base);
            bytesReversed[i] = alphabet[remainder];
            len++;
            if(needBreak){
                break;
            }
        }

        // Reverse
        bytes memory result = bytes(new string(len));
        for (i = 0; i < len; i++) {
            result[i] = bytesReversed[len - i - 1];
        }
        return string(result);
    }

    /* Concatenates two strings */
    function concat(string _s1, string _s2) internal returns (string) {
        bytes memory bs1 = bytes(_s1);
        bytes memory bs2 = bytes(_s2);
        string memory s3 = new string(bs1.length + bs2.length);
        bytes memory bs3 = bytes(s3);

        uint256 j = 0;
        for (uint256 i = 0; i < bs1.length; i++) {
            bs3[j++] = bs1[i];
        }
        for (i = 0; i < bs2.length; i++) {
            bs3[j++] = bs2[i];
        }

        return string(bs3);
    }

    /* Checks if provided JSON string has valid Chainy format */
    function isValidChainyJson(string _json) internal returns (bool) {
        bytes memory json = bytes(_json);
        bytes memory id = bytes(CHAINY_JSON_ID);

        if (json.length < CHAINY_JSON_MIN_LEN) {
            return false;
        } else {
            uint len = 0;
            if (json[1] == id[0]) {
                len = 1;
                while (len < id.length && (1 + len) < json.length && json[1 + len] == id[len]) {
                    len++;
                }
                if (len == id.length) {
                    return true;
                }
            }
        }

        return false;
    }
}


// Ownership
contract owned {
    address public owner;

    function owned() {
        owner = msg.sender;
    }

    modifier onlyOwner {
        if (msg.sender != owner) throw;
        _
    }

    function transferOwnership(address newOwner) onlyOwner {
        owner = newOwner;
    }
}

contract Chainy is owned {
    // Chainy viewer url
    string CHAINY_URL;

    // Configuration
    mapping(string => uint256) private chainyConfig;

    // Service accounts
    mapping (address => bool) private srvAccount;

    // Fee receiver
    address private receiverAddress;

    struct data {uint256 timestamp; string json; address sender;}
    mapping (string => data) private chainy;

    event chainyShortLink(uint256 timestamp, string code);

    // Constructor
    function Chainy(){
        setConfig("fee", 0);
        // change the block offset to 1000000 to use contract in testnet
        setConfig("blockoffset", 2000000);
        setChainyURL("https://txn.me/");
    }

    // Sets new Chainy viewer URL
    function setChainyURL(string _url) onlyOwner {
        CHAINY_URL = _url;
    }

    // Returns current Chainy viewer URL
    function getChainyURL() constant returns(string){
        return CHAINY_URL;
    }

    // Sets configuration option
    function setConfig(string _key, uint256 _value) onlyOwner {
        chainyConfig[_key] = _value;
    }

    // Returns configuration option
    function getConfig(string _key) constant returns (uint256 _value) {
        return chainyConfig[_key];
    }

    // Add/Remove service account
    function setServiceAccount(address _address, bool _value) onlyOwner {
        srvAccount[_address] = _value;
    }

    // Set receiver address
    function setReceiverAddress(address _address) onlyOwner {
        receiverAddress = _address;
    }

    // Send all ether back to owner
    function releaseFunds() onlyOwner {
        if(!owner.send(this.balance)) throw;
    }

    // Add record
    function addChainyData(string json) {
        checkFormat(json);

        var code = generateShortLink();
        // Checks if the record exist
        if (getChainyTimestamp(code) > 0) throw;

        processFee();
        chainy[code] = data({
            timestamp: block.timestamp,
            json: json,
            sender: tx.origin
        });

        // Fire event
        var link = strUtils.concat(CHAINY_URL, code);
        chainyShortLink(block.timestamp, link);
    }

    // Get record timestamp
    function getChainyTimestamp(string code) constant returns (uint256) {
        return chainy[code].timestamp;
    }

    // Get record JSON
    function getChainyData(string code) constant returns (string) {
        return chainy[code].json;
    }

    // Get record sender
    function getChainySender(string code) constant returns (address) {
        return chainy[code].sender;
    }

    // Checks if enough fee provided
    function processFee() internal {
        var fee = getConfig("fee");
        if (srvAccount[msg.sender] || (fee == 0)) return;

        if (msg.value < fee)
            throw;
        else
            if (!receiverAddress.send(fee)) throw;
    }

    // Checks if provided string has valid format
    function checkFormat(string json) internal {
        if (!strUtils.isValidChainyJson(json)) throw;
    }

    // Generates a shortlink code for this transaction
    function generateShortLink() internal returns (string) {
        var s1 = strUtils.toBase58(block.number - getConfig("blockoffset"), 11);
        var s2 = strUtils.toBase58(uint256(tx.origin), 2);

        var s = strUtils.concat(s1, s2);
        return s;
    }

}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"code","type":"string"}],"name":"getChainyData","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_value","type":"bool"}],"name":"setServiceAccount","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"getChainyURL","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_key","type":"string"},{"name":"_value","type":"uint256"}],"name":"setConfig","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"releaseFunds","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setReceiverAddress","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[{"name":"code","type":"string"}],"name":"getChainySender","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"json","type":"string"}],"name":"addChainyData","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_key","type":"string"}],"name":"getConfig","outputs":[{"name":"_value","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"code","type":"string"}],"name":"getChainyTimestamp","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_url","type":"string"}],"name":"setChainyURL","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"timestamp","type":"uint256"},{"indexed":false,"name":"code","type":"string"}],"name":"chainyShortLink","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60008054600160a060020a0319163317815560a0604052600360609081527f6665650000000000000000000000000000000000000000000000000000000000608052610063915b600054600160a060020a0390811633919091161461010757610002565b60408051808201909152600b81527f626c6f636b6f666673657400000000000000000000000000000000000000000060208201526100a490621e8480610046565b60408051808201909152600f81527f68747470733a2f2f74786e2e6d652f000000000000000000000000000000000060208201526100f990600054600160a060020a0390811633919091161461015157610002565b611094806101e56000396000f35b80600260005083604051808280519060200190808383829060006004602084601f0104600f02600301f1509050019150509081526020016040518091039020600050819055505050565b8060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101b657805160ff1916601e1785555b506101dc9291505b808211156101e1576000815583016101a3565b601f85559182015b8281111561019b5782518260005055916020019190600101906101be565b505050565b509056606060405236156100a35760e060020a6000350463045236b481146100a557806309d2d0b9146101b3578063233120aa146101d85780633e8f5b901461024057806369d89575146102a85780638279c7db146102c75780638da5cb5b146102e9578063919edc7c146102fb578063ac3e7d24146103a7578063b44bd51d14610476578063e8b13c441461050c578063eef8e35f146105a8578063f2fde38b1461060e575b005b61062f6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496505050505050506020604051908101604052806000815260200150600560005082604051808280519060200190808383829060006004602084601f0104600f02600301f15090500191505090815260200160405180910390206000506001016000508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106f75780601f106106cc576101008083540402835291602001916106f7565b6100a3600435602435600054600160a060020a03908116339091161461070357610002565b61062f604080516020818101835260008252825160018054600281831615610100026000190190911604601f810184900484028301840190955284825292939092918301828280156107545780601f1061072957610100808354040283529160200191610754565b6100a36004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496505093359350505050600054600160a060020a03908116339091161461075e57610002565b6100a3600054600160a060020a0390811633909116146107a857610002565b6100a3600435600054600160a060020a0390811633909116146107db57610002565b61069d600054600160a060020a031681565b61069d6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496505050505050506000600560005082604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060005060020160009054906101000a9004600160a060020a031690505b919050565b6100a36004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496505050505050506040805160208181018352600080835283519182019093529182529061089083610c82816040805160208181018352600091829052825180820184528290528251808401909352600d83527f226964223a22434841494e59220000000000000000000000000000000000000083820152835191928492909184911015610f7757610f6f565b6106ba6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496505050505050505b6000600260005082604051808280519060200190808383829060006004602084601f0104600f02600301f15090500191505090815260200160405180910390206000505490506103a2565b6106ba6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437509496505050505050505b6000600560005082604051808280519060200190808383829060006004602084601f0104600f02600301f15090500191505090815260200160405180910390206000506000016000505490506103a2565b6100a36004808035906020019082018035906020019191908080601f01602080910402602001604051908101604052809392919081815260200183838082843750949650505050505050600054600160a060020a039081163390911614610be657610002565b6100a360043560005433600160a060020a03908116911614610c6d57610002565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561068f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b60408051918252519081900360200190f35b820191906000526020600020905b8154815290600101906020018083116106da57829003601f168201915b505050505090506103a2565b600160a060020a0382166000908152600360205260409020805460ff1916821790555050565b820191906000526020600020905b81548152906001019060200180831161073757829003601f168201915b5050505050905090565b80600260005083604051808280519060200190808383829060006004602084601f0104600f02600301f1509050019150509081526020016040518091039020600050819055505050565b60405160008054600160a060020a039081169230909116319082818181858883f1935050505015156107d957610002565b565b60048054600160a060020a031916821790555b50565b90507fdad5c3eecfdb62dd69e6e72053b88029e1d6277d4bc773c00fef243982adcb7d428260405180838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561087c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15b505050565b610904604080516020818101835260008083528351808301855281815284518084018652828152855180850187529283528551808701909652600b86527f626c6f636b6f6666736574000000000000000000000000000000000000000000938601939093529293610c8d90610e73906104c1565b9150600061091183610557565b111561091c57610002565b61095f60408051808201909152600381527f66656500000000000000000000000000000000000000000000000000000000006020820152600090610e90906104c1565b60606040519081016040528042815260200184815260200132815260200150600560005083604051808280519060200190808383829060006004602084601f0104600f02600301f1509050019150509081526020016040518091039020600050600082015181600001600050556020820151816001016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610a3957805160ff19168380011785555b50610a699291505b80821115610ae05760008155600101610a25565b82800160010185558215610a1d579182015b82811115610a1d578251826000505591602001919060010190610a4b565b505060409182015160029182018054600160a060020a0319169091179055600180548351602082841615610100026000190190921693909304601f81018290048202840182019094528383526107f19390830182828015610b0f5780601f10610ae457610100808354040283529160200191610b0f565b5090565b820191906000526020600020905b815481529060010190602001808311610af257829003601f168201915b5050505050835b60408051602081810183526000808352835180830185528190528351808301855281905283518083018552818152845192830185528183529351855187519495889588959194919391928392910190805910610b6f5750595b9080825280602002602001820160405250935083925060009150600090505b8551811015610f0157858181518110156100025790602001015160f860020a900460f860020a028383806001019450815181101561000257906020010190600160f860020a031916908160001a905350600101610b8e565b8060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c3d57805160ff19168380011785555b5061088b929150610a25565b82800160010185558215610c31579182015b82811115610c31578251826000505591602001919060010190610c4f565b60008054600160a060020a0319168217905550565b15156107ee57610002565b9250610e7c32600160a060020a031660025b60408051602081810183526000808352835180830185528190528351808301855281905283518083018552818152845180840186528281528551606081018752603a8082527f3132333435363738396162636465666768696a6b6d6e6f707172737475767778958201959095527f797a41424344454647484a4b4c4d4e505152535455565758595a000000000000818801529551949594859493928392839283919060ff8c1690805910610d505750595b90808252806020026020018201604052509250600091505b8a60ff168260ff161015610de5578660ff168c1015610d8657600193505b875160ff8816808e049d069550889086908110156100025790602001015160f860020a900460f860020a02838360ff16815181101561000257906020010190600160f860020a031916908160001a905350600195909501948315611079575b8560ff16604051805910610df65750595b818152602091820281019091016040526000925090505b8560ff168260ff161015611085578260018388030360ff1681518110156100025790602001015160f860020a900460f860020a02818360ff16815181101561000257906020010190600160f860020a031916908160001a90535060019190910190610e0d565b4303600b610c9f565b9150610e888383610b16565b949350505050565b33600160a060020a031660009081526003602052604090205490915060ff1680610eba5750806000145b15610ec4576107ee565b80341015610ed157610002565b600454604051600160a060020a039190911690600090839082818181858883f1935050505015156107ee57610002565b5060005b8451811015610f5d57848181518110156100025790602001015160f860020a900460f860020a028383806001019450815181101561000257906020010190600160f860020a031916908160001a905350600101610f05565b5090979650505050505050565b600093505b505050919050565b6000905081600081518110156100025790602001015160f860020a900460f860020a02600160f860020a03191683600181518110156100025790602001015160f860020a900460f860020a02600160f860020a0319161415610f6a575060015b815181108015610fea5750825181600101105b801561105a5750818181518110156100025790602001015160f860020a900460f860020a02600160f860020a0319168382600101815181101561000257016020015160f860020a90819004027fff0000000000000000000000000000000000000000000000000000000000000016145b1561106757600101610fd7565b8151811415610f6a5760019350610f6f565b60019190910190610d68565b9b9a505050505050505050505056

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.