Contract Overview
Balance: 0.030281375658674329 Ether
Ether Value: $2.55 (@ $84.13/ETH)
Transactions: 2600 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x406fffca2a6d1997b9ef573d67efe74ba786dff1at txn 0xddcc9e6114bc7ea46ecb7b13cde4ca2144401b79da96cb6a50dd1b1feb2f2aca
 Latest 25 transactions from a total of 2600 transactions

TxHash Age From To Value [TxFee]
0x9b3a7ca63ccd2892a49fb4856f4d3496d2eb942a32038deba42fae52411cdb1263 days 22 hrs ago0xf2fb58c0c2d4c628d0e9d31d0620e5a7265940d2  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70.004207176 Ether0.00100058
0xeb527ef6bea2015d7f448153fbc4fb30c0c9c6d067fcf6e3b58ba8d3561d191b64 days 20 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0037534827
0xf8de634896284808f1c4492286a0657cdf92c2decb19f689a83121733b1b968164 days 22 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x57e279c0fa06bc63d54ba5ee6451a341399bfbcc5969e9ebe83a9af5278c050564 days 22 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0038299827
0xfc08fbde8b19c825bb483b6abca836c176754a6e3b22107f107765ec7f38b9ff64 days 24 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x750a2f2a382372bff76cf864a21a287c66e23e981161455f130d4f0d5689d23264 days 24 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0009641652
0xfbcc84032b4992d1f78b743611a44a67e4c34201e85adb1cbe8f12b415ef7f3d64 days 27 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0x3abe50a6dd9232b0b457e298399336af2a95c5d472ef8805018f937572269ca764 days 27 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x4b1e31680528680b92565be3a195855f613fd9b88fde01d5d75189edecfe521264 days 27 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0xb7cf77a695ba6c21adb6dfad8b5c9bf956983a80d6ed23f4d01ec3bdacd1665864 days 29 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x6c7898dbbcca494c1fc7d7437ff41789be3bb83dacf4d4bda986d44361b95d2264 days 29 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0x6eb4379a32d309db85517ae996a37062e8e13e6ec29bec95754e1b6efc2c1df664 days 30 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x0e4e23ebe09b784056614f8083c491c5b325709ec85c3b185a054fb4173be1d764 days 30 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0xba6e93587e771a6cbc2e763799ff7b6b5515ad74c26870a7a4b3e3d7c803ebe664 days 31 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x10471ea58c934189598c1b95b2f1d69c496c1e7da43ff61b3c815da38b85d57264 days 31 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0x5f478390370cd68e09b933b201781442643d68aae21a39d9beaab1fb9501a1cc64 days 32 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0xe149332874cd1073c9d1718357894f9933414748d11578e4862cb1fdfe50df1864 days 32 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0xeb28d19b4253d90bbd16ef1493e7a05d94934ce0c3be93b5747a410c0964143564 days 32 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0x71d744b1a4df7ccefa13b2ca435238cbfefb240165442b84d9bac2dce4f1bf7264 days 34 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039068703
0x7559df99b09c94464b97d49ffef10f15128cfd1a1818387fefdd5476019eb2d164 days 35 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0xdfb1c35763c8fc7d4a45fd2373c4e0473d76e942c1d9e3b1fba6bcd098fe0df564 days 36 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0039833703
0x9b7c02b69459c515f56ef82d0a876342751122aea30d26c5a455555ebc04368964 days 36 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003183675
0xdc8b6886e6d21a065622f832af9ffe85368db275ad218b577c524f080a2bbc9c64 days 37 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0008870124
0xfb14e8e6df1b86675e8caa4e8dde03b6cd2f074de92c415e4a06d38cca21978864 days 39 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0046327853
0xb5c79fc509d41c87041f6cd9eb77b9e7ba617576ab9cc27dd641cf9d1341c66264 days 39 mins ago0xd26268339cb83b9d03d19939bf9389574b29ee6d  IN   0xf91546835f756da0c10cfa0cda95b15577b84aa70 Ether0.0003807925
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x4a2c74957c8f3f7adb20684cd76b9deed8f5774e3013cb42abd3adf634e8def2647393867 days 22 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x2b479428bd007acfbbf298f00135ee65eced95e00.000526141 Ether
0x8c5ed361ce789d3e19230d5ebd61e9fa23c67cb78e498402448e1d363bcbcac4647380467 days 22 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x89e754f4f4ebffb7cb733885ef896277ef23122c0.035813029425218156 Ether
0xd8d5a14f57925db1b745e2b4427c4fc1d5a59587a6c9288c3b772d7533a68876647282668 days 2 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xaaad8d7ae50d5dd6ffa9d29a2531ab2a67803a1f0.296583126463213179 Ether
0xd8d5a14f57925db1b745e2b4427c4fc1d5a59587a6c9288c3b772d7533a68876647282668 days 2 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xaaad8d7ae50d5dd6ffa9d29a2531ab2a67803a1f0.296583126463213179 Ether
0xd8d5a14f57925db1b745e2b4427c4fc1d5a59587a6c9288c3b772d7533a68876647282668 days 2 hrs ago0xaaad8d7ae50d5dd6ffa9d29a2531ab2a67803a1f0xf91546835f756da0c10cfa0cda95b15577b84aa70.296583126463213179 Ether
0xed300a1c93708f03e41c315496244b570f1e22e44246a0f47557a0c3c98fbbb2647251868 days 3 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x4bb59ff70dede46694f238a24a4b47e16e557eb20.03833211 Ether
0xf6594f29102c378f7bf36ca4b7782346342e9ff85f8bb037f9e96d0dafe4da4d647212568 days 5 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xbd5123cef1b49955f9a2242dc9ba1a12c4c0db880.005 Ether
0xf120b79aa0af659d23b9824f6a68c8ccfb63cfd63b5e45f8658cee558935b45d647126168 days 8 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xaaad8d7ae50d5dd6ffa9d29a2531ab2a67803a1f1.320078595324127602 Ether
0xf120b79aa0af659d23b9824f6a68c8ccfb63cfd63b5e45f8658cee558935b45d647126168 days 8 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xaaad8d7ae50d5dd6ffa9d29a2531ab2a67803a1f1.320078595324127602 Ether
0xf120b79aa0af659d23b9824f6a68c8ccfb63cfd63b5e45f8658cee558935b45d647126168 days 8 hrs ago0xaaad8d7ae50d5dd6ffa9d29a2531ab2a67803a1f0xf91546835f756da0c10cfa0cda95b15577b84aa71.320078595324127602 Ether
0x0753690451c0b8ba056c4d93dec7a52be75c0858a3faf95d2ba0f19b2b43d4bc647094768 days 9 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xf36cb9c2984838eb2bbda4fcdb3f9cb2ac05d1fa0.001 Ether
0x0753690451c0b8ba056c4d93dec7a52be75c0858a3faf95d2ba0f19b2b43d4bc647094768 days 9 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x208798057b4d5335c63a67ca1e792ce538b9784f0.00286892 Ether
0x5ebe31321e4540fee92348f0b89cae819e2ca015bd03891cc1209197a2e23c4d646918168 days 16 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x0323e6ba7b5c303bc29174981c34da4dedd8342d0.0055 Ether
0xaab6ade7a4211a08bf624135cfe2761f7cf97a9cd5eead1a6779b9f1918bc0d5646834168 days 19 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xde059f3a257f1b1f31ad287e723b997f12f357880.0010388 Ether
0x147a5b072879673acdabe3f95b9a3f8fc217d4f01c3b25eb7bb218df04a51d91646830368 days 20 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x1213c5a141b5bfa14e388f9b7122028ff449efbf0.000928733 Ether
0x41af661b529967c83dd61e489a0a0728378fb74a961f15b2c800637fe332c6bc646820868 days 20 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xc5918a927c4fb83fe99e30d6f66707f4b396900e0.761572791078387201 Ether
0x41af661b529967c83dd61e489a0a0728378fb74a961f15b2c800637fe332c6bc646820868 days 20 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xc5918a927c4fb83fe99e30d6f66707f4b396900e0.761572791078387201 Ether
0x41af661b529967c83dd61e489a0a0728378fb74a961f15b2c800637fe332c6bc646820868 days 20 hrs ago0xc5918a927c4fb83fe99e30d6f66707f4b396900e0xf91546835f756da0c10cfa0cda95b15577b84aa70.761572791078387201 Ether
0x60c1680e331f485e2c9714cba6b4f071bd43dfb7b574f4da893cc59f9f6e2e88646796068 days 21 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xb9576f7cbe88d00950dd35488e132e2632e641ba0.012307273236823952 Ether
0x40ec4e4e5b6243eb98de718b1e1bb196fdb589f194cc527262fe11b0c85bdc14646781068 days 22 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xbe55236d1d5deec1e45b84473a166c49953db80c0.082876310813436388 Ether
0x5dc26a17b275f995abb5fb795b4c903c3d519818732d78bbeb99e364a0d8bfeb646777868 days 22 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xc73709713f040a21baf56a79b1d9009006fdc3160.004274457880977522 Ether
0xe601185463080703277da881f1241f6bf88bd48c7ddd9e254f24f762b8580596646772268 days 22 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xf36cb9c2984838eb2bbda4fcdb3f9cb2ac05d1fa0.044626625 Ether
0xe760489b08aa90c85f8950a3bff97e1046d4afe61f2f0791ab4823b3da9f6ba3646759968 days 22 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xa627f9b4a192f59aa634736cefb4e079310c2aef0.07461752638548832 Ether
0xd3c9d759aa7a1f0b8d21a6790985ad6a582f85b4cc47a507554d591ee40e4dba646753868 days 23 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70xf36cb9c2984838eb2bbda4fcdb3f9cb2ac05d1fa0.006 Ether
0xd3c9d759aa7a1f0b8d21a6790985ad6a582f85b4cc47a507554d591ee40e4dba646753868 days 23 hrs ago0xf91546835f756da0c10cfa0cda95b15577b84aa70x3e8f73d0177d7fd6f696823c9fac2330885472420.004 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: LedgerChannel
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  500



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.23;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
contract Token {
    /* This is a slight change to the ERC20 base standard.
    function totalSupply() constant returns (uint256 supply);
    is replaced with:
    uint256 public totalSupply;
    This automatically creates a getter function for the totalSupply.
    This is moved to the base contract since public getter functions are not
    currently recognised as an implementation of the matching abstract
    function by the compiler.
    */
    /// total amount of tokens
    uint256 public totalSupply;

    /// @param _owner The address from which the balance will be retrieved
    /// @return The balance
    function balanceOf(address _owner) public constant returns (uint256 balance);

    /// @notice send `_value` token to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint256 _value) public returns (bool success);

    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);

    /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @param _value The amount of tokens to be approved for transfer
    /// @return Whether the approval was successful or not
    function approve(address _spender, uint256 _value) public returns (bool success);

    /// @param _owner The address of the account owning tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens allowed to spent
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining);

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

library ECTools {

    // @dev Recovers the address which has signed a message
    // @thanks https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d
    function recoverSigner(bytes32 _hashedMsg, string _sig) public pure returns (address) {
        require(_hashedMsg != 0x00);

        // need this for test RPC
        bytes memory prefix = "\x19Ethereum Signed Message:\n32";
        bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, _hashedMsg));

        if (bytes(_sig).length != 132) {
            return 0x0;
        }
        bytes32 r;
        bytes32 s;
        uint8 v;
        bytes memory sig = hexstrToBytes(substring(_sig, 2, 132));
        assembly {
            r := mload(add(sig, 32))
            s := mload(add(sig, 64))
            v := byte(0, mload(add(sig, 96)))
        }
        if (v < 27) {
            v += 27;
        }
        if (v < 27 || v > 28) {
            return 0x0;
        }
        return ecrecover(prefixedHash, v, r, s);
    }

    // @dev Verifies if the message is signed by an address
    function isSignedBy(bytes32 _hashedMsg, string _sig, address _addr) public pure returns (bool) {
        require(_addr != 0x0);

        return _addr == recoverSigner(_hashedMsg, _sig);
    }

    // @dev Converts an hexstring to bytes
    function hexstrToBytes(string _hexstr) public pure returns (bytes) {
        uint len = bytes(_hexstr).length;
        require(len % 2 == 0);

        bytes memory bstr = bytes(new string(len / 2));
        uint k = 0;
        string memory s;
        string memory r;
        for (uint i = 0; i < len; i += 2) {
            s = substring(_hexstr, i, i + 1);
            r = substring(_hexstr, i + 1, i + 2);
            uint p = parseInt16Char(s) * 16 + parseInt16Char(r);
            bstr[k++] = uintToBytes32(p)[31];
        }
        return bstr;
    }

    // @dev Parses a hexchar, like 'a', and returns its hex value, in this case 10
    function parseInt16Char(string _char) public pure returns (uint) {
        bytes memory bresult = bytes(_char);
        // bool decimals = false;
        if ((bresult[0] >= 48) && (bresult[0] <= 57)) {
            return uint(bresult[0]) - 48;
        } else if ((bresult[0] >= 65) && (bresult[0] <= 70)) {
            return uint(bresult[0]) - 55;
        } else if ((bresult[0] >= 97) && (bresult[0] <= 102)) {
            return uint(bresult[0]) - 87;
        } else {
            revert();
        }
    }

    // @dev Converts a uint to a bytes32
    // @thanks https://ethereum.stackexchange.com/questions/4170/how-to-convert-a-uint-to-bytes-in-solidity
    function uintToBytes32(uint _uint) public pure returns (bytes b) {
        b = new bytes(32);
        assembly {mstore(add(b, 32), _uint)}
    }

    // @dev Hashes the signed message
    // @ref https://github.com/ethereum/go-ethereum/issues/3731#issuecomment-293866868
    function toEthereumSignedMessage(string _msg) public pure returns (bytes32) {
        uint len = bytes(_msg).length;
        require(len > 0);
        bytes memory prefix = "\x19Ethereum Signed Message:\n";
        return keccak256(abi.encodePacked(prefix, uintToString(len), _msg));
    }

    // @dev Converts a uint in a string
    function uintToString(uint _uint) public pure returns (string str) {
        uint len = 0;
        uint m = _uint + 0;
        while (m != 0) {
            len++;
            m /= 10;
        }
        bytes memory b = new bytes(len);
        uint i = len - 1;
        while (_uint != 0) {
            uint remainder = _uint % 10;
            _uint = _uint / 10;
            b[i--] = byte(48 + remainder);
        }
        str = string(b);
    }


    // @dev extract a substring
    // @thanks https://ethereum.stackexchange.com/questions/31457/substring-in-solidity
    function substring(string _str, uint _startIndex, uint _endIndex) public pure returns (string) {
        bytes memory strBytes = bytes(_str);
        require(_startIndex <= _endIndex);
        require(_startIndex >= 0);
        require(_endIndex <= strBytes.length);

        bytes memory result = new bytes(_endIndex - _startIndex);
        for (uint i = _startIndex; i < _endIndex; i++) {
            result[i - _startIndex] = strBytes[i];
        }
        return string(result);
    }
}
contract StandardToken is Token {

    function transfer(address _to, uint256 _value) public returns (bool success) {
        //Default assumes totalSupply can't be over max (2^256 - 1).
        //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
        //Replace the if with this one instead.
        //require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
        require(balances[msg.sender] >= _value);
        balances[msg.sender] -= _value;
        balances[_to] += _value;
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        //same as above. Replace this line with the following if you want to protect against wrapping uints.
        //require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]);
        require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value);
        balances[_to] += _value;
        balances[_from] -= _value;
        allowed[_from][msg.sender] -= _value;
        emit Transfer(_from, _to, _value);
        return true;
    }

    function balanceOf(address _owner) public constant returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) public returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
      return allowed[_owner][_spender];
    }

    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
}

contract HumanStandardToken is StandardToken {

    /* Public variables of the token */

    /*
    NOTE:
    The following variables are OPTIONAL vanities. One does not have to include them.
    They allow one to customise the token contract & in no way influences the core functionality.
    Some wallets/interfaces might not even bother to look at this information.
    */
    string public name;                   //fancy name: eg Simon Bucks
    uint8 public decimals;                //How many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ether.
    string public symbol;                 //An identifier: eg SBX
    string public version = 'H0.1';       //human 0.1 standard. Just an arbitrary versioning scheme.

    constructor(
        uint256 _initialAmount,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol
        ) public {
        balances[msg.sender] = _initialAmount;               // Give the creator all initial tokens
        totalSupply = _initialAmount;                        // Update total supply
        name = _tokenName;                                   // Set the name for display purposes
        decimals = _decimalUnits;                            // Amount of decimals for display purposes
        symbol = _tokenSymbol;                               // Set the symbol for display purposes
    }

    /* Approves and then calls the receiving contract */
    function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);

        //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this.
        //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData)
        //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead.
        require(_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData));
        return true;
    }
}

contract LedgerChannel {

    string public constant NAME = "Ledger Channel";
    string public constant VERSION = "0.0.1";

    uint256 public numChannels = 0;

    event DidLCOpen (
        bytes32 indexed channelId,
        address indexed partyA,
        address indexed partyI,
        uint256 ethBalanceA,
        address token,
        uint256 tokenBalanceA,
        uint256 LCopenTimeout
    );

    event DidLCJoin (
        bytes32 indexed channelId,
        uint256 ethBalanceI,
        uint256 tokenBalanceI
    );

    event DidLCDeposit (
        bytes32 indexed channelId,
        address indexed recipient,
        uint256 deposit,
        bool isToken
    );

    event DidLCUpdateState (
        bytes32 indexed channelId, 
        uint256 sequence, 
        uint256 numOpenVc, 
        uint256 ethBalanceA,
        uint256 tokenBalanceA,
        uint256 ethBalanceI,
        uint256 tokenBalanceI,
        bytes32 vcRoot,
        uint256 updateLCtimeout
    );

    event DidLCClose (
        bytes32 indexed channelId,
        uint256 sequence,
        uint256 ethBalanceA,
        uint256 tokenBalanceA,
        uint256 ethBalanceI,
        uint256 tokenBalanceI
    );

    event DidVCInit (
        bytes32 indexed lcId, 
        bytes32 indexed vcId, 
        bytes proof, 
        uint256 sequence, 
        address partyA, 
        address partyB, 
        uint256 balanceA, 
        uint256 balanceB 
    );

    event DidVCSettle (
        bytes32 indexed lcId, 
        bytes32 indexed vcId,
        uint256 updateSeq, 
        uint256 updateBalA, 
        uint256 updateBalB,
        address challenger,
        uint256 updateVCtimeout
    );

    event DidVCClose(
        bytes32 indexed lcId, 
        bytes32 indexed vcId, 
        uint256 balanceA, 
        uint256 balanceB
    );

    struct Channel {
        //TODO: figure out if it's better just to split arrays by balances/deposits instead of eth/erc20
        address[2] partyAddresses; // 0: partyA 1: partyI
        uint256[4] ethBalances; // 0: balanceA 1:balanceI 2:depositedA 3:depositedI
        uint256[4] erc20Balances; // 0: balanceA 1:balanceI 2:depositedA 3:depositedI
        uint256[2] initialDeposit; // 0: eth 1: tokens
        uint256 sequence;
        uint256 confirmTime;
        bytes32 VCrootHash;
        uint256 LCopenTimeout;
        uint256 updateLCtimeout; // when update LC times out
        bool isOpen; // true when both parties have joined
        bool isUpdateLCSettling;
        uint256 numOpenVC;
        HumanStandardToken token;
    }

    // virtual-channel state
    struct VirtualChannel {
        bool isClose;
        bool isInSettlementState;
        uint256 sequence;
        address challenger; // Initiator of challenge
        uint256 updateVCtimeout; // when update VC times out
        // channel state
        address partyA; // VC participant A
        address partyB; // VC participant B
        address partyI; // LC hub
        uint256[2] ethBalances;
        uint256[2] erc20Balances;
        uint256[2] bond;
        HumanStandardToken token;
    }

    mapping(bytes32 => VirtualChannel) public virtualChannels;
    mapping(bytes32 => Channel) public Channels;

    function createChannel(
        bytes32 _lcID,
        address _partyI,
        uint256 _confirmTime,
        address _token,
        uint256[2] _balances // [eth, token]
    ) 
        public
        payable 
    {
        require(Channels[_lcID].partyAddresses[0] == address(0), "Channel has already been created.");
        require(_partyI != 0x0, "No partyI address provided to LC creation");
        require(_balances[0] >= 0 && _balances[1] >= 0, "Balances cannot be negative");
        // Set initial ledger channel state
        // Alice must execute this and we assume the initial state 
        // to be signed from this requirement
        // Alternative is to check a sig as in joinChannel
        Channels[_lcID].partyAddresses[0] = msg.sender;
        Channels[_lcID].partyAddresses[1] = _partyI;

        if(_balances[0] != 0) {
            require(msg.value == _balances[0], "Eth balance does not match sent value");
            Channels[_lcID].ethBalances[0] = msg.value;
        } 
        if(_balances[1] != 0) {
            Channels[_lcID].token = HumanStandardToken(_token);
            require(Channels[_lcID].token.transferFrom(msg.sender, this, _balances[1]),"CreateChannel: token transfer failure");
            Channels[_lcID].erc20Balances[0] = _balances[1];
        }

        Channels[_lcID].sequence = 0;
        Channels[_lcID].confirmTime = _confirmTime;
        // is close flag, lc state sequence, number open vc, vc root hash, partyA... 
        //Channels[_lcID].stateHash = keccak256(uint256(0), uint256(0), uint256(0), bytes32(0x0), bytes32(msg.sender), bytes32(_partyI), balanceA, balanceI);
        Channels[_lcID].LCopenTimeout = now + _confirmTime;
        Channels[_lcID].initialDeposit = _balances;

        emit DidLCOpen(_lcID, msg.sender, _partyI, _balances[0], _token, _balances[1], Channels[_lcID].LCopenTimeout);
    }

    function LCOpenTimeout(bytes32 _lcID) public {
        require(msg.sender == Channels[_lcID].partyAddresses[0] && Channels[_lcID].isOpen == false);
        require(now > Channels[_lcID].LCopenTimeout);

        if(Channels[_lcID].initialDeposit[0] != 0) {
            Channels[_lcID].partyAddresses[0].transfer(Channels[_lcID].ethBalances[0]);
        } 
        if(Channels[_lcID].initialDeposit[1] != 0) {
            require(Channels[_lcID].token.transfer(Channels[_lcID].partyAddresses[0], Channels[_lcID].erc20Balances[0]),"CreateChannel: token transfer failure");
        }

        emit DidLCClose(_lcID, 0, Channels[_lcID].ethBalances[0], Channels[_lcID].erc20Balances[0], 0, 0);

        // only safe to delete since no action was taken on this channel
        delete Channels[_lcID];
    }

    function joinChannel(bytes32 _lcID, uint256[2] _balances) public payable {
        // require the channel is not open yet
        require(Channels[_lcID].isOpen == false);
        require(msg.sender == Channels[_lcID].partyAddresses[1]);

        if(_balances[0] != 0) {
            require(msg.value == _balances[0], "state balance does not match sent value");
            Channels[_lcID].ethBalances[1] = msg.value;
        } 
        if(_balances[1] != 0) {
            require(Channels[_lcID].token.transferFrom(msg.sender, this, _balances[1]),"joinChannel: token transfer failure");
            Channels[_lcID].erc20Balances[1] = _balances[1];          
        }

        Channels[_lcID].initialDeposit[0]+=_balances[0];
        Channels[_lcID].initialDeposit[1]+=_balances[1];
        // no longer allow joining functions to be called
        Channels[_lcID].isOpen = true;
        numChannels++;

        emit DidLCJoin(_lcID, _balances[0], _balances[1]);
    }


    // additive updates of monetary state
    // TODO check this for attack vectors
    function deposit(bytes32 _lcID, address recipient, uint256 _balance, bool isToken) public payable {
        require(Channels[_lcID].isOpen == true, "Tried adding funds to a closed channel");
        require(recipient == Channels[_lcID].partyAddresses[0] || recipient == Channels[_lcID].partyAddresses[1]);

        //if(Channels[_lcID].token)

        if (Channels[_lcID].partyAddresses[0] == recipient) {
            if(isToken) {
                require(Channels[_lcID].token.transferFrom(msg.sender, this, _balance),"deposit: token transfer failure");
                Channels[_lcID].erc20Balances[2] += _balance;
            } else {
                require(msg.value == _balance, "state balance does not match sent value");
                Channels[_lcID].ethBalances[2] += msg.value;
            }
        }

        if (Channels[_lcID].partyAddresses[1] == recipient) {
            if(isToken) {
                require(Channels[_lcID].token.transferFrom(msg.sender, this, _balance),"deposit: token transfer failure");
                Channels[_lcID].erc20Balances[3] += _balance;
            } else {
                require(msg.value == _balance, "state balance does not match sent value");
                Channels[_lcID].ethBalances[3] += msg.value; 
            }
        }
        
        emit DidLCDeposit(_lcID, recipient, _balance, isToken);
    }

    // TODO: Check there are no open virtual channels, the client should have cought this before signing a close LC state update
    function consensusCloseChannel(
        bytes32 _lcID, 
        uint256 _sequence, 
        uint256[4] _balances, // 0: ethBalanceA 1:ethBalanceI 2:tokenBalanceA 3:tokenBalanceI
        string _sigA, 
        string _sigI
    ) 
        public 
    {
        // assume num open vc is 0 and root hash is 0x0
        //require(Channels[_lcID].sequence < _sequence);
        require(Channels[_lcID].isOpen == true);
        uint256 totalEthDeposit = Channels[_lcID].initialDeposit[0] + Channels[_lcID].ethBalances[2] + Channels[_lcID].ethBalances[3];
        uint256 totalTokenDeposit = Channels[_lcID].initialDeposit[1] + Channels[_lcID].erc20Balances[2] + Channels[_lcID].erc20Balances[3];
        require(totalEthDeposit == _balances[0] + _balances[1]);
        require(totalTokenDeposit == _balances[2] + _balances[3]);

        bytes32 _state = keccak256(
            abi.encodePacked(
                _lcID,
                true,
                _sequence,
                uint256(0),
                bytes32(0x0),
                Channels[_lcID].partyAddresses[0], 
                Channels[_lcID].partyAddresses[1], 
                _balances[0], 
                _balances[1],
                _balances[2],
                _balances[3]
            )
        );

        require(Channels[_lcID].partyAddresses[0] == ECTools.recoverSigner(_state, _sigA));
        require(Channels[_lcID].partyAddresses[1] == ECTools.recoverSigner(_state, _sigI));

        Channels[_lcID].isOpen = false;

        if(_balances[0] != 0 || _balances[1] != 0) {
            Channels[_lcID].partyAddresses[0].transfer(_balances[0]);
            Channels[_lcID].partyAddresses[1].transfer(_balances[1]);
        }

        if(_balances[2] != 0 || _balances[3] != 0) {
            require(Channels[_lcID].token.transfer(Channels[_lcID].partyAddresses[0], _balances[2]),"happyCloseChannel: token transfer failure");
            require(Channels[_lcID].token.transfer(Channels[_lcID].partyAddresses[1], _balances[3]),"happyCloseChannel: token transfer failure");          
        }

        numChannels--;

        emit DidLCClose(_lcID, _sequence, _balances[0], _balances[1], _balances[2], _balances[3]);
    }

    // Byzantine functions

    function updateLCstate(
        bytes32 _lcID, 
        uint256[6] updateParams, // [sequence, numOpenVc, ethbalanceA, ethbalanceI, tokenbalanceA, tokenbalanceI]
        bytes32 _VCroot, 
        string _sigA, 
        string _sigI
    ) 
        public 
    {
        Channel storage channel = Channels[_lcID];
        require(channel.isOpen);
        require(channel.sequence < updateParams[0]); // do same as vc sequence check
        require(channel.ethBalances[0] + channel.ethBalances[1] >= updateParams[2] + updateParams[3]);
        require(channel.erc20Balances[0] + channel.erc20Balances[1] >= updateParams[4] + updateParams[5]);

        if(channel.isUpdateLCSettling == true) { 
            require(channel.updateLCtimeout > now);
        }
      
        bytes32 _state = keccak256(
            abi.encodePacked(
                _lcID,
                false, 
                updateParams[0], 
                updateParams[1], 
                _VCroot, 
                channel.partyAddresses[0], 
                channel.partyAddresses[1], 
                updateParams[2], 
                updateParams[3],
                updateParams[4], 
                updateParams[5]
            )
        );

        require(channel.partyAddresses[0] == ECTools.recoverSigner(_state, _sigA));
        require(channel.partyAddresses[1] == ECTools.recoverSigner(_state, _sigI));

        // update LC state
        channel.sequence = updateParams[0];
        channel.numOpenVC = updateParams[1];
        channel.ethBalances[0] = updateParams[2];
        channel.ethBalances[1] = updateParams[3];
        channel.erc20Balances[0] = updateParams[4];
        channel.erc20Balances[1] = updateParams[5];
        channel.VCrootHash = _VCroot;
        channel.isUpdateLCSettling = true;
        channel.updateLCtimeout = now + channel.confirmTime;

        // make settlement flag

        emit DidLCUpdateState (
            _lcID, 
            updateParams[0], 
            updateParams[1], 
            updateParams[2], 
            updateParams[3],
            updateParams[4],
            updateParams[5], 
            _VCroot,
            channel.updateLCtimeout
        );
    }

    // supply initial state of VC to "prime" the force push game  
    function initVCstate(
        bytes32 _lcID, 
        bytes32 _vcID, 
        bytes _proof, 
        address _partyA, 
        address _partyB, 
        uint256[2] _bond,
        uint256[4] _balances, // 0: ethBalanceA 1:ethBalanceI 2:tokenBalanceA 3:tokenBalanceI
        string sigA
    ) 
        public 
    {
        require(Channels[_lcID].isOpen, "LC is closed.");
        // sub-channel must be open
        require(!virtualChannels[_vcID].isClose, "VC is closed.");
        // Check time has passed on updateLCtimeout and has not passed the time to store a vc state
        require(Channels[_lcID].updateLCtimeout < now, "LC timeout not over.");
        // prevent rentry of initializing vc state
        require(virtualChannels[_vcID].updateVCtimeout == 0);
        // partyB is now Ingrid
        bytes32 _initState = keccak256(
            abi.encodePacked(_vcID, uint256(0), _partyA, _partyB, _bond[0], _bond[1], _balances[0], _balances[1], _balances[2], _balances[3])
        );

        // Make sure Alice has signed initial vc state (A/B in oldState)
        require(_partyA == ECTools.recoverSigner(_initState, sigA));

        // Check the oldState is in the root hash
        require(_isContained(_initState, _proof, Channels[_lcID].VCrootHash) == true);

        virtualChannels[_vcID].partyA = _partyA; // VC participant A
        virtualChannels[_vcID].partyB = _partyB; // VC participant B
        virtualChannels[_vcID].sequence = uint256(0);
        virtualChannels[_vcID].ethBalances[0] = _balances[0];
        virtualChannels[_vcID].ethBalances[1] = _balances[1];
        virtualChannels[_vcID].erc20Balances[0] = _balances[2];
        virtualChannels[_vcID].erc20Balances[1] = _balances[3];
        virtualChannels[_vcID].bond = _bond;
        virtualChannels[_vcID].updateVCtimeout = now + Channels[_lcID].confirmTime;
        virtualChannels[_vcID].isInSettlementState = true;

        emit DidVCInit(_lcID, _vcID, _proof, uint256(0), _partyA, _partyB, _balances[0], _balances[1]);
    }

    //TODO: verify state transition since the hub did not agree to this state
    // make sure the A/B balances are not beyond ingrids bonds  
    // Params: vc init state, vc final balance, vcID
    function settleVC(
        bytes32 _lcID, 
        bytes32 _vcID, 
        uint256 updateSeq, 
        address _partyA, 
        address _partyB,
        uint256[4] updateBal, // [ethupdateBalA, ethupdateBalB, tokenupdateBalA, tokenupdateBalB]
        string sigA
    ) 
        public 
    {
        require(Channels[_lcID].isOpen, "LC is closed.");
        // sub-channel must be open
        require(!virtualChannels[_vcID].isClose, "VC is closed.");
        require(virtualChannels[_vcID].sequence < updateSeq, "VC sequence is higher than update sequence.");
        require(
            virtualChannels[_vcID].ethBalances[1] < updateBal[1] && virtualChannels[_vcID].erc20Balances[1] < updateBal[3],
            "State updates may only increase recipient balance."
        );
        require(
            virtualChannels[_vcID].bond[0] == updateBal[0] + updateBal[1] &&
            virtualChannels[_vcID].bond[1] == updateBal[2] + updateBal[3], 
            "Incorrect balances for bonded amount");
        // Check time has passed on updateLCtimeout and has not passed the time to store a vc state
        // virtualChannels[_vcID].updateVCtimeout should be 0 on uninitialized vc state, and this should
        // fail if initVC() isn't called first
        // require(Channels[_lcID].updateLCtimeout < now && now < virtualChannels[_vcID].updateVCtimeout);
        require(Channels[_lcID].updateLCtimeout < now); // for testing!

        bytes32 _updateState = keccak256(
            abi.encodePacked(
                _vcID, 
                updateSeq, 
                _partyA, 
                _partyB, 
                virtualChannels[_vcID].bond[0], 
                virtualChannels[_vcID].bond[1], 
                updateBal[0], 
                updateBal[1], 
                updateBal[2], 
                updateBal[3]
            )
        );

        // Make sure Alice has signed a higher sequence new state
        require(virtualChannels[_vcID].partyA == ECTools.recoverSigner(_updateState, sigA));

        // store VC data
        // we may want to record who is initiating on-chain settles
        virtualChannels[_vcID].challenger = msg.sender;
        virtualChannels[_vcID].sequence = updateSeq;

        // channel state
        virtualChannels[_vcID].ethBalances[0] = updateBal[0];
        virtualChannels[_vcID].ethBalances[1] = updateBal[1];
        virtualChannels[_vcID].erc20Balances[0] = updateBal[2];
        virtualChannels[_vcID].erc20Balances[1] = updateBal[3];

        virtualChannels[_vcID].updateVCtimeout = now + Channels[_lcID].confirmTime;

        emit DidVCSettle(_lcID, _vcID, updateSeq, updateBal[0], updateBal[1], msg.sender, virtualChannels[_vcID].updateVCtimeout);
    }

    function closeVirtualChannel(bytes32 _lcID, bytes32 _vcID) public {
        // require(updateLCtimeout > now)
        require(Channels[_lcID].isOpen, "LC is closed.");
        require(virtualChannels[_vcID].isInSettlementState, "VC is not in settlement state.");
        require(virtualChannels[_vcID].updateVCtimeout < now, "Update vc timeout has not elapsed.");
        require(!virtualChannels[_vcID].isClose, "VC is already closed");
        // reduce the number of open virtual channels stored on LC
        Channels[_lcID].numOpenVC--;
        // close vc flags
        virtualChannels[_vcID].isClose = true;
        // re-introduce the balances back into the LC state from the settled VC
        // decide if this lc is alice or bob in the vc
        if(virtualChannels[_vcID].partyA == Channels[_lcID].partyAddresses[0]) {
            Channels[_lcID].ethBalances[0] += virtualChannels[_vcID].ethBalances[0];
            Channels[_lcID].ethBalances[1] += virtualChannels[_vcID].ethBalances[1];

            Channels[_lcID].erc20Balances[0] += virtualChannels[_vcID].erc20Balances[0];
            Channels[_lcID].erc20Balances[1] += virtualChannels[_vcID].erc20Balances[1];
        } else if (virtualChannels[_vcID].partyB == Channels[_lcID].partyAddresses[0]) {
            Channels[_lcID].ethBalances[0] += virtualChannels[_vcID].ethBalances[1];
            Channels[_lcID].ethBalances[1] += virtualChannels[_vcID].ethBalances[0];

            Channels[_lcID].erc20Balances[0] += virtualChannels[_vcID].erc20Balances[1];
            Channels[_lcID].erc20Balances[1] += virtualChannels[_vcID].erc20Balances[0];
        }

        emit DidVCClose(_lcID, _vcID, virtualChannels[_vcID].erc20Balances[0], virtualChannels[_vcID].erc20Balances[1]);
    }


    // todo: allow ethier lc.end-user to nullify the settled LC state and return to off-chain
    function byzantineCloseChannel(bytes32 _lcID) public {
        Channel storage channel = Channels[_lcID];

        // check settlement flag
        require(channel.isOpen, "Channel is not open");
        require(channel.isUpdateLCSettling == true);
        require(channel.numOpenVC == 0);
        require(channel.updateLCtimeout < now, "LC timeout over.");

        // if off chain state update didnt reblance deposits, just return to deposit owner
        uint256 totalEthDeposit = channel.initialDeposit[0] + channel.ethBalances[2] + channel.ethBalances[3];
        uint256 totalTokenDeposit = channel.initialDeposit[1] + channel.erc20Balances[2] + channel.erc20Balances[3];

        uint256 possibleTotalEthBeforeDeposit = channel.ethBalances[0] + channel.ethBalances[1]; 
        uint256 possibleTotalTokenBeforeDeposit = channel.erc20Balances[0] + channel.erc20Balances[1];

        if(possibleTotalEthBeforeDeposit < totalEthDeposit) {
            channel.ethBalances[0]+=channel.ethBalances[2];
            channel.ethBalances[1]+=channel.ethBalances[3];
        } else {
            require(possibleTotalEthBeforeDeposit == totalEthDeposit);
        }

        if(possibleTotalTokenBeforeDeposit < totalTokenDeposit) {
            channel.erc20Balances[0]+=channel.erc20Balances[2];
            channel.erc20Balances[1]+=channel.erc20Balances[3];
        } else {
            require(possibleTotalTokenBeforeDeposit == totalTokenDeposit);
        }

        // reentrancy
        uint256 ethbalanceA = channel.ethBalances[0];
        uint256 ethbalanceI = channel.ethBalances[1];
        uint256 tokenbalanceA = channel.erc20Balances[0];
        uint256 tokenbalanceI = channel.erc20Balances[1];

        channel.ethBalances[0] = 0;
        channel.ethBalances[1] = 0;
        channel.erc20Balances[0] = 0;
        channel.erc20Balances[1] = 0;

        if(ethbalanceA != 0 || ethbalanceI != 0) {
            channel.partyAddresses[0].transfer(ethbalanceA);
            channel.partyAddresses[1].transfer(ethbalanceI);
        }

        if(tokenbalanceA != 0 || tokenbalanceI != 0) {
            require(
                channel.token.transfer(channel.partyAddresses[0], tokenbalanceA),
                "byzantineCloseChannel: token transfer failure"
            );
            require(
                channel.token.transfer(channel.partyAddresses[1], tokenbalanceI),
                "byzantineCloseChannel: token transfer failure"
            );          
        }

        channel.isOpen = false;
        numChannels--;

        emit DidLCClose(_lcID, channel.sequence, ethbalanceA, ethbalanceI, tokenbalanceA, tokenbalanceI);
    }

    function _isContained(bytes32 _hash, bytes _proof, bytes32 _root) internal pure returns (bool) {
        bytes32 cursor = _hash;
        bytes32 proofElem;

        for (uint256 i = 64; i <= _proof.length; i += 32) {
            assembly { proofElem := mload(add(_proof, i)) }

            if (cursor < proofElem) {
                cursor = keccak256(abi.encodePacked(cursor, proofElem));
            } else {
                cursor = keccak256(abi.encodePacked(proofElem, cursor));
            }
        }

        return cursor == _root;
    }

    //Struct Getters
    function getChannel(bytes32 id) public view returns (
        address[2],
        uint256[4],
        uint256[4],
        uint256[2],
        uint256,
        uint256,
        bytes32,
        uint256,
        uint256,
        bool,
        bool,
        uint256
    ) {
        Channel memory channel = Channels[id];
        return (
            channel.partyAddresses,
            channel.ethBalances,
            channel.erc20Balances,
            channel.initialDeposit,
            channel.sequence,
            channel.confirmTime,
            channel.VCrootHash,
            channel.LCopenTimeout,
            channel.updateLCtimeout,
            channel.isOpen,
            channel.isUpdateLCSettling,
            channel.numOpenVC
        );
    }

    function getVirtualChannel(bytes32 id) public view returns(
        bool,
        bool,
        uint256,
        address,
        uint256,
        address,
        address,
        address,
        uint256[2],
        uint256[2],
        uint256[2]
    ) {
        VirtualChannel memory virtualChannel = virtualChannels[id];
        return(
            virtualChannel.isClose,
            virtualChannel.isInSettlementState,
            virtualChannel.sequence,
            virtualChannel.challenger,
            virtualChannel.updateVCtimeout,
            virtualChannel.partyA,
            virtualChannel.partyB,
            virtualChannel.partyI,
            virtualChannel.ethBalances,
            virtualChannel.erc20Balances,
            virtualChannel.bond
        );
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"}],"name":"LCOpenTimeout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"virtualChannels","outputs":[{"name":"isClose","type":"bool"},{"name":"isInSettlementState","type":"bool"},{"name":"sequence","type":"uint256"},{"name":"challenger","type":"address"},{"name":"updateVCtimeout","type":"uint256"},{"name":"partyA","type":"address"},{"name":"partyB","type":"address"},{"name":"partyI","type":"address"},{"name":"token","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"_balances","type":"uint256[2]"}],"name":"joinChannel","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"_sequence","type":"uint256"},{"name":"_balances","type":"uint256[4]"},{"name":"_sigA","type":"string"},{"name":"_sigI","type":"string"}],"name":"consensusCloseChannel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"numChannels","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getChannel","outputs":[{"name":"","type":"address[2]"},{"name":"","type":"uint256[4]"},{"name":"","type":"uint256[4]"},{"name":"","type":"uint256[2]"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bytes32"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bool"},{"name":"","type":"bool"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NAME","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"_partyI","type":"address"},{"name":"_confirmTime","type":"uint256"},{"name":"_token","type":"address"},{"name":"_balances","type":"uint256[2]"}],"name":"createChannel","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"_vcID","type":"bytes32"},{"name":"_proof","type":"bytes"},{"name":"_partyA","type":"address"},{"name":"_partyB","type":"address"},{"name":"_bond","type":"uint256[2]"},{"name":"_balances","type":"uint256[4]"},{"name":"sigA","type":"string"}],"name":"initVCstate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"recipient","type":"address"},{"name":"_balance","type":"uint256"},{"name":"isToken","type":"bool"}],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"}],"name":"byzantineCloseChannel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"Channels","outputs":[{"name":"sequence","type":"uint256"},{"name":"confirmTime","type":"uint256"},{"name":"VCrootHash","type":"bytes32"},{"name":"LCopenTimeout","type":"uint256"},{"name":"updateLCtimeout","type":"uint256"},{"name":"isOpen","type":"bool"},{"name":"isUpdateLCSettling","type":"bool"},{"name":"numOpenVC","type":"uint256"},{"name":"token","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"_vcID","type":"bytes32"},{"name":"updateSeq","type":"uint256"},{"name":"_partyA","type":"address"},{"name":"_partyB","type":"address"},{"name":"updateBal","type":"uint256[4]"},{"name":"sigA","type":"string"}],"name":"settleVC","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"updateParams","type":"uint256[6]"},{"name":"_VCroot","type":"bytes32"},{"name":"_sigA","type":"string"},{"name":"_sigI","type":"string"}],"name":"updateLCstate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getVirtualChannel","outputs":[{"name":"","type":"bool"},{"name":"","type":"bool"},{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"address"},{"name":"","type":"address"},{"name":"","type":"uint256[2]"},{"name":"","type":"uint256[2]"},{"name":"","type":"uint256[2]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lcID","type":"bytes32"},{"name":"_vcID","type":"bytes32"}],"name":"closeVirtualChannel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"bytes32"},{"indexed":true,"name":"partyA","type":"address"},{"indexed":true,"name":"partyI","type":"address"},{"indexed":false,"name":"ethBalanceA","type":"uint256"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"tokenBalanceA","type":"uint256"},{"indexed":false,"name":"LCopenTimeout","type":"uint256"}],"name":"DidLCOpen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"bytes32"},{"indexed":false,"name":"ethBalanceI","type":"uint256"},{"indexed":false,"name":"tokenBalanceI","type":"uint256"}],"name":"DidLCJoin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"bytes32"},{"indexed":true,"name":"recipient","type":"address"},{"indexed":false,"name":"deposit","type":"uint256"},{"indexed":false,"name":"isToken","type":"bool"}],"name":"DidLCDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"bytes32"},{"indexed":false,"name":"sequence","type":"uint256"},{"indexed":false,"name":"numOpenVc","type":"uint256"},{"indexed":false,"name":"ethBalanceA","type":"uint256"},{"indexed":false,"name":"tokenBalanceA","type":"uint256"},{"indexed":false,"name":"ethBalanceI","type":"uint256"},{"indexed":false,"name":"tokenBalanceI","type":"uint256"},{"indexed":false,"name":"vcRoot","type":"bytes32"},{"indexed":false,"name":"updateLCtimeout","type":"uint256"}],"name":"DidLCUpdateState","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"bytes32"},{"indexed":false,"name":"sequence","type":"uint256"},{"indexed":false,"name":"ethBalanceA","type":"uint256"},{"indexed":false,"name":"tokenBalanceA","type":"uint256"},{"indexed":false,"name":"ethBalanceI","type":"uint256"},{"indexed":false,"name":"tokenBalanceI","type":"uint256"}],"name":"DidLCClose","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lcId","type":"bytes32"},{"indexed":true,"name":"vcId","type":"bytes32"},{"indexed":false,"name":"proof","type":"bytes"},{"indexed":false,"name":"sequence","type":"uint256"},{"indexed":false,"name":"partyA","type":"address"},{"indexed":false,"name":"partyB","type":"address"},{"indexed":false,"name":"balanceA","type":"uint256"},{"indexed":false,"name":"balanceB","type":"uint256"}],"name":"DidVCInit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lcId","type":"bytes32"},{"indexed":true,"name":"vcId","type":"bytes32"},{"indexed":false,"name":"updateSeq","type":"uint256"},{"indexed":false,"name":"updateBalA","type":"uint256"},{"indexed":false,"name":"updateBalB","type":"uint256"},{"indexed":false,"name":"challenger","type":"address"},{"indexed":false,"name":"updateVCtimeout","type":"uint256"}],"name":"DidVCSettle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lcId","type":"bytes32"},{"indexed":true,"name":"vcId","type":"bytes32"},{"indexed":false,"name":"balanceA","type":"uint256"},{"indexed":false,"name":"balanceB","type":"uint256"}],"name":"DidVCClose","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60806040526000805534801561001457600080fd5b506142ed806100246000396000f3006080604052600436106100ef5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416622e1d7e81146100f4578063169401251461010e578063238664381461017f5780634247a0ba146101b557806365dd43eb1461027a578063831c2b82146102a1578063a3f4df7e146103b7578063aeba142c14610441578063aeeec12f14610491578063cb2ec89514610593578063ce329570146105b2578063d32fc05a146105ca578063d83866e914610636578063e07d39bd146106d7578063f87c77c01461079d578063fdb0402314610894578063ffa1ad74146108af575b600080fd5b34801561010057600080fd5b5061010c6004356108c4565b005b34801561011a57600080fd5b50610126600435610bd3565b604080519915158a5297151560208a015288880196909652600160a060020a039485166060890152608088019390935290831660a0870152821660c0860152811660e08501521661010083015251908190036101200190f35b60408051808201825261010c916004803592369260649190602490600290839083908082843750939650610c3295505050505050565b3480156101c157600080fd5b5060408051608081810190925261010c9160048035926024359236929160c491604490849083908390808284375050604080516020601f88358a0180359182018390048302840183019094528083529699989781019691955091820193509150819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610ee99650505050505050565b34801561028657600080fd5b5061028f6116fc565b60408051918252519081900360200190f35b3480156102ad57600080fd5b506102b9600435611702565b604051808d600260200280838360005b838110156102e15781810151838201526020016102c9565b505050509050018c600460200280838360005b8381101561030c5781810151838201526020016102f4565b505050509050018b600460200280838360005b8381101561033757818101518382015260200161031f565b505050509050018a600260200280838360005b8381101561036257818101518382015260200161034a565b5050505091909101998a525050602088019690965260408088019590955260608701939093526080860191909152151560a0850152151560c084015260e0830191909152519081900361010001945092505050f35b3480156103c357600080fd5b506103cc611952565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104065781810151838201526020016103ee565b50505050905090810190601f1680156104335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051808201825261010c916004803592600160a060020a03602435811693604435936064359092169236929160c4919060849060029083908390808284375093965061198995505050505050565b34801561049d57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261010c948235946024803595369594606494920191908190840183828082843750506040805180820182529598600160a060020a03883581169960208a0135909116989197909650608082019550935081019150600290839083908082843750506040805160808181019092529497969581810195945092506004915083908390808284375050604080516020601f88358a01803591820183900483028401830190945280835296999897810196919550918201935091508190840183828082843750949750611e159650505050505050565b61010c600435600160a060020a0360243516604435606435151561237d565b3480156105be57600080fd5b5061010c60043561287a565b3480156105d657600080fd5b506105e2600435612dcf565b60408051998a5260208a01989098528888019690965260608801949094526080870192909252151560a0860152151560c085015260e0840152600160a060020a031661010083015251908190036101200190f35b34801561064257600080fd5b5060408051608081810190925261010c9160048035926024359260443592600160a060020a03606435811693608435909116923692916101249160a490849083908390808284375050604080516020601f88358a01803591820183900483028401830190945280835296999897810196919550918201935091508190840183828082843750949750612e2a9650505050505050565b3480156106e357600080fd5b506040805160c081810190925261010c916004803592369260e49190602490600690839083908082843750506040805160208781013589018035601f81018390048302840183018552808452979a89359a90999098940196509194509081019250819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506134de9650505050505050565b3480156107a957600080fd5b506107b5600435613a3f565b604080518c151581528b151560208201528082018b9052600160a060020a03808b166060830152608082018a905288811660a083015287811660c0830152861660e082015290610100820190859080838360005b83811015610821578181015183820152602001610809565b5050505090500183600260200280838360005b8381101561084c578181015183820152602001610834565b5050505090500182600260200280838360005b8381101561087757818101518382015260200161085f565b505050509050019b50505050505050505050505060405180910390f35b3480156108a057600080fd5b5061010c600435602435613c2e565b3480156108bb57600080fd5b506103cc613f9b565b60008181526002602052604081200154600160a060020a0316331480156108fd575060008181526002602052604090206011015460ff16155b151561090857600080fd5b6000818152600260205260409020600f0154421161092557600080fd5b6000818152600260205260409020600a01541561098757600081815260026020819052604080832080549201549051600160a060020a039092169281156108fc029290818181858888f19350505050158015610985573d6000803e3d6000fd5b505b6000818152600260205260409020600b015415610acc5760008181526002602090815260408083206013810154815460069092015483517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0393841660048201526024810191909152925191169363a9059cbb93604480850194919392918390030190829087803b158015610a2457600080fd5b505af1158015610a38573d6000803e3d6000fd5b505050506040513d6020811015610a4e57600080fd5b50511515610acc576040805160e560020a62461bcd02815260206004820152602560248201527f4372656174654368616e6e656c3a20746f6b656e207472616e7366657220666160448201527f696c757265000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600081815260026020818152604080842092830154600690930154815185815292830193909352818101929092526060810183905260808101929092525182917f3adff1604df08a519c7848023123530b0c9a05bf082395a43c09e02406deea1a919081900360a00190a2600081815260026020526040812090610b50828261410a565b610b5e600283016000614118565b610b6c600683016000614118565b610b7a600a8301600061410a565b506000600c8201819055600d8201819055600e8201819055600f82018190556010820181905560118201805461ffff191690556012820155601301805473ffffffffffffffffffffffffffffffffffffffff1916905550565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600d9096015460ff8089169861010090041696600160a060020a03958616959384169392831692908116911689565b60008281526002602052604090206011015460ff1615610c5157600080fd5b600082815260026020526040902060010154600160a060020a03163314610c7757600080fd5b805115610d125780513414610cfc576040805160e560020a62461bcd02815260206004820152602760248201527f73746174652062616c616e636520646f6573206e6f74206d617463682073656e60448201527f742076616c756500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000828152600260205260409020346003909101555b602081015115610e64576000828152600260209081526040808320601301548483015182517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101919091529151600160a060020a03909116936323b872dd93606480850194919392918390030190829087803b158015610da257600080fd5b505af1158015610db6573d6000803e3d6000fd5b505050506040513d6020811015610dcc57600080fd5b50511515610e4a576040805160e560020a62461bcd02815260206004820152602360248201527f6a6f696e4368616e6e656c3a20746f6b656e207472616e73666572206661696c60448201527f7572650000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b602080820151600084815260029092526040909120600701555b80516000838152600260209081526040808320600a8101805490950190945581850151600b85018054820190556011909401805460ff191660019081179091558354019092558351825190815290810192909252805184927f594ae021f7ce477644648fbf16215189f3d80a93a772c52f7d6fa9e2050013cb92908290030190a25050565b6000858152600260205260408120601101548190819060ff161515600114610f1057600080fd5b600088815260026020908152604090912060058101546004820154600a83015460098401546008850154600b90950154958c01518c5192909301909301975093909201019350018314610f6257600080fd5b60608601516040870151018214610f7857600080fd5b600088815260026020526040812089916001918a9190819081015460008e8152600260205260409020600160a060020a039091169060010154600160a060020a03168c600060200201518d600160200201518e600260200201518f600360209081029190910151604080518084019d909d529a15157f0100000000000000000000000000000000000000000000000000000000000000028c8c015260418c019990995260618b019790975260818a0195909552600160a060020a039384166c0100000000000000000000000090810260a18b01529290931690910260b588015260c987015260e9860152610109850152610129808501929092528251808503909201825261014990930191829052805190928291908401908083835b602083106110b35780518252601f199092019160209182019101611094565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207fdca9541900000000000000000000000000000000000000000000000000000000835260048301818152602484019586528c5160448501528c5191985073cb107c7d2a93e638b20342f46b10b9b6d81377bf975063dca95419965088958d9550909390926064909101919085019080838360005b8381101561116657818101518382015260200161114e565b50505050905090810190601f1680156111935780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156111b157600080fd5b505af41580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b5051600089815260026020526040902054600160a060020a0390811691161461120357600080fd5b604080517fdca95419000000000000000000000000000000000000000000000000000000008152600481018381526024820192835286516044830152865173cb107c7d2a93e638b20342f46b10b9b6d81377bf9363dca954199386938a9390929160640190602085019080838360005b8381101561128b578181015183820152602001611273565b50505050905090810190601f1680156112b85780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156112d657600080fd5b505af41580156112ea573d6000803e3d6000fd5b505050506040513d602081101561130057600080fd5b5051600089815260026020526040902060010154600160a060020a0390811691161461132b57600080fd5b6000888152600260205260409020601101805460ff1916905585511515806113565750602086015115155b156113f2576000888152600260205260408082205488519151600160a060020a039091169282156108fc02929190818181858888f193505050501580156113a1573d6000803e3d6000fd5b50600088815260026020526040902060010154600160a060020a03166108fc87600160200201516040518115909202916000818181858888f193505050501580156113f0573d6000803e3d6000fd5b505b60408601511515806114075750606086015115155b15611683576000888152600260209081526040808320601381015490548a83015183517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810191909152925191169363a9059cbb93604480850194919392918390030190829087803b15801561149057600080fd5b505af11580156114a4573d6000803e3d6000fd5b505050506040513d60208110156114ba57600080fd5b50511515611538576040805160e560020a62461bcd02815260206004820152602960248201527f6861707079436c6f73654368616e6e656c3a20746f6b656e207472616e73666560448201527f72206661696c7572650000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008881526002602052604090206013810154600160a060020a03169063a9059cbb9060010154600160a060020a031688600360200201516040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156115db57600080fd5b505af11580156115ef573d6000803e3d6000fd5b505050506040513d602081101561160557600080fd5b50511515611683576040805160e560020a62461bcd02815260206004820152602960248201527f6861707079436c6f73654368616e6e656c3a20746f6b656e207472616e73666560448201527f72206661696c7572650000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000805460001901905585516020808801516040808a01516060808c015183518e81529586019690965284830193909352918301919091526080820192909252905189917f3adff1604df08a519c7848023123530b0c9a05bf082395a43c09e02406deea1a919081900360a00190a25050505050505050565b60005481565b61170a614134565b61171261414f565b61171a61414f565b611722614134565b60008060008060008060008061173661416e565b60008e81526002602081905260409182902082516101e081019384905292909183916101a0830191849182845b8154600160a060020a0316815260019091019060200180831161176357505050918352505060408051608081019182905260209092019190600284019060049082845b8154815260200190600101908083116117a657505050918352505060408051608081019182905260209092019190600684019060049082845b8154815260200190600101908083116117df575050509183525050604080518082019182905260209092019190600a84019060029082845b8154815260200190600101908083116118175750505050508152602001600c8201548152602001600d8201548152602001600e82015460001916600019168152602001600f8201548152602001601082015481526020016011820160009054906101000a900460ff161515151581526020016011820160019054906101000a900460ff16151515158152602001601282015481526020016013820160009054906101000a9004600160a060020a0316600160a060020a0316600160a060020a0316815250509050806000015181602001518260400151836060015184608001518560a001518660c001518760e001518861010001518961012001518a61014001518b61016001518b9b508a9a508999508898509c509c509c509c509c509c509c509c509c509c509c509c505091939597999b5091939597999b565b60408051808201909152600e81527f4c6564676572204368616e6e656c000000000000000000000000000000000000602082015281565b600085815260026020526040902054600160a060020a031615611a1c576040805160e560020a62461bcd02815260206004820152602160248201527f4368616e6e656c2068617320616c7265616479206265656e206372656174656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0384161515611aa2576040805160e560020a62461bcd02815260206004820152602960248201527f4e6f2070617274794920616464726573732070726f766964656420746f204c4360448201527f206372656174696f6e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8051600011801590611ab957506020810151600011155b1515611b0f576040805160e560020a62461bcd02815260206004820152601b60248201527f42616c616e6365732063616e6e6f74206265206e656761746976650000000000604482015290519081900360640190fd5b600085815260026020526040902080543373ffffffffffffffffffffffffffffffffffffffff1991821617825560019091018054909116600160a060020a038616179055805115611bee5780513414611bd8576040805160e560020a62461bcd02815260206004820152602560248201527f4574682062616c616e636520646f6573206e6f74206d617463682073656e742060448201527f76616c7565000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000858152600260208190526040909120349101555b602081015115611d62576000858152600260209081526040808320601301805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691909117918290558584015183517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019190915292519116936323b872dd93606480850194919392918390030190829087803b158015611ca057600080fd5b505af1158015611cb4573d6000803e3d6000fd5b505050506040513d6020811015611cca57600080fd5b50511515611d48576040805160e560020a62461bcd02815260206004820152602560248201527f4372656174654368616e6e656c3a20746f6b656e207472616e7366657220666160448201527f696c757265000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b602080820151600087815260029092526040909120600601555b60008581526002602081905260408220600c810192909255600d8201859055428501600f830155611d9891600a019083906141f1565b508051602080830151600088815260028352604090819020600f01548151948552600160a060020a03878116948601949094528482019290925260608401919091525190861691339188917f8b2098c2098f06a2c213a9f1bca2306b53ebee7e6c0db45275683b087e94db1c919081900360800190a45050505050565b60008881526002602052604081206011015460ff161515611e80576040805160e560020a62461bcd02815260206004820152600d60248201527f4c4320697320636c6f7365642e00000000000000000000000000000000000000604482015290519081900360640190fd5b60008881526001602052604090205460ff1615611ee7576040805160e560020a62461bcd02815260206004820152600d60248201527f564320697320636c6f7365642e00000000000000000000000000000000000000604482015290519081900360640190fd5b6000898152600260205260409020601001544211611f4f576040805160e560020a62461bcd02815260206004820152601460248201527f4c432074696d656f7574206e6f74206f7665722e000000000000000000000000604482015290519081900360640190fd5b60008881526001602052604090206003015415611f6b57600080fd5b8760008787878360200201518860016020020151886000602002015189600160200201518a600260200201518b600360209081029190910151604080518084019c909c528b81019a909a526c01000000000000000000000000600160a060020a03998a16810260608d01529790981690960260748a0152608889019490945260a888019290925260c887015260e8860152610108850152610128808501929092528251808503909201825261014890930191829052805190928291908401908083835b6020831061204d5780518252601f19909201916020918201910161202e565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207fdca95419000000000000000000000000000000000000000000000000000000008352600483018181526024840195865289516044850152895191985073cb107c7d2a93e638b20342f46b10b9b6d81377bf975063dca95419965088958a9550909390926064909101919085019080838360005b838110156121005781810151838201526020016120e8565b50505050905090810190601f16801561212d5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561214b57600080fd5b505af415801561215f573d6000803e3d6000fd5b505050506040513d602081101561217557600080fd5b5051600160a060020a0387811691161461218e57600080fd5b6000898152600260205260409020600e01546121ad9082908990613fd2565b15156001146121bb57600080fd5b6000888152600160208181526040808420600481018054600160a060020a038d811673ffffffffffffffffffffffffffffffffffffffff1992831617909255600583018054928d1692909116919091179055928301939093558551600783015585015160088201559084015160098201556060840151600a82015561224590600b018560026141f1565b506000898152600260209081526040808320600d01548b845260019092528220429091016003820155805461ff00191661010017905588908a907fcffb5a92cc488e2eed0a946d6ec257262e6d235c83295ebfbf4f11712330ca9a908a908a8a898360200201518a60016020020151604051808060200187815260200186600160a060020a0316600160a060020a0316815260200185600160a060020a0316600160a060020a03168152602001848152602001838152602001828103825288818151815260200191508051906020019080838360005b8381101561233357818101518382015260200161231b565b50505050905090810190601f1680156123605780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a3505050505050505050565b60008481526002602052604090206011015460ff161515600114612411576040805160e560020a62461bcd02815260206004820152602660248201527f547269656420616464696e672066756e647320746f206120636c6f736564206360448201527f68616e6e656c0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526002602052604081200154600160a060020a03848116911614806124565750600084815260026020526040902060010154600160a060020a038481169116145b151561246157600080fd5b6000848152600260205260408120600160a060020a038516910154600160a060020a031614156126455780156125b05760008481526002602090815260408083206013015481517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790529151600160a060020a03909116936323b872dd93606480850194919392918390030190829087803b15801561251257600080fd5b505af1158015612526573d6000803e3d6000fd5b505050506040513d602081101561253c57600080fd5b50511515612594576040805160e560020a62461bcd02815260206004820152601f60248201527f6465706f7369743a20746f6b656e207472616e73666572206661696c75726500604482015290519081900360640190fd5b6000848152600260205260409020600801805483019055612645565b34821461262d576040805160e560020a62461bcd02815260206004820152602760248201527f73746174652062616c616e636520646f6573206e6f74206d617463682073656e60448201527f742076616c756500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526002602052604090206004018054340190555b6000848152600260205260409020600160a060020a0384169060010154600160a060020a0316141561282b5780156127965760008481526002602090815260408083206013015481517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790529151600160a060020a03909116936323b872dd93606480850194919392918390030190829087803b1580156126f857600080fd5b505af115801561270c573d6000803e3d6000fd5b505050506040513d602081101561272257600080fd5b5051151561277a576040805160e560020a62461bcd02815260206004820152601f60248201527f6465706f7369743a20746f6b656e207472616e73666572206661696c75726500604482015290519081900360640190fd5b600084815260026020526040902060090180548301905561282b565b348214612813576040805160e560020a62461bcd02815260206004820152602760248201527f73746174652062616c616e636520646f6573206e6f74206d617463682073656e60448201527f742076616c756500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008481526002602052604090206005018054340190555b6040805183815282151560208201528151600160a060020a0386169287927febe34657eba3f58b3e63b3fa61ba9bc369f2a7bfe3f8769afa92dd6839908c3a929081900390910190a350505050565b60008181526002602052604081206011810154909190819081908190819081908190819060ff1615156128f7576040805160e560020a62461bcd02815260206004820152601360248201527f4368616e6e656c206973206e6f74206f70656e00000000000000000000000000604482015290519081900360640190fd5b601189015460ff61010090910416151560011461291357600080fd5b60128901541561292257600080fd5b6010890154421161297d576040805160e560020a62461bcd02815260206004820152601060248201527f4c432074696d656f7574206f7665722e00000000000000000000000000000000604482015290519081900360640190fd5b60028901600301546002808b010154600a8b016000015401019750600689016003015460068a0160020154600a8b016001015401019650600289016001015460028a0160000154019550600689016001015460068a016000015401945087861015612a0757600489015460028a0180549091019055600589015460038a0180549091019055612a13565b858814612a1357600080fd5b86851015612a4057600889015460068a0180549091019055600989015460078a0180549091019055612a4c565b848714612a4c57600080fd5b5050505060028501805460038701805460068901805460078b018054600097889055948790559186905594905591929083151580612a8957508215155b15612b06578854604051600160a060020a03909116906108fc8615029086906000818181858888f19350505050158015612ac7573d6000803e3d6000fd5b508860010154604051600160a060020a039091169084156108fc029085906000818181858888f19350505050158015612b04573d6000803e3d6000fd5b505b81151580612b1357508015155b15612d585760138901548954604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018690529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015612b8b57600080fd5b505af1158015612b9f573d6000803e3d6000fd5b505050506040513d6020811015612bb557600080fd5b50511515612c33576040805160e560020a62461bcd02815260206004820152602d60248201527f62797a616e74696e65436c6f73654368616e6e656c3a20746f6b656e2074726160448201527f6e73666572206661696c75726500000000000000000000000000000000000000606482015290519081900360840190fd5b6013890154600160a060020a031663a9059cbb8a60010154604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a039092166004830152602482018590525160448083019260209291908290030181600087803b158015612cb057600080fd5b505af1158015612cc4573d6000803e3d6000fd5b505050506040513d6020811015612cda57600080fd5b50511515612d58576040805160e560020a62461bcd02815260206004820152602d60248201527f62797a616e74696e65436c6f73654368616e6e656c3a20746f6b656e2074726160448201527f6e73666572206661696c75726500000000000000000000000000000000000000606482015290519081900360840190fd5b60118901805460ff1916905560008054600019019055600c89015460408051918252602082018690528181018590526060820184905260808201839052518b917f3adff1604df08a519c7848023123530b0c9a05bf082395a43c09e02406deea1a919081900360a00190a250505050505050505050565b6002602052600090815260409020600c810154600d820154600e830154600f8401546010850154601186015460128701546013909701549596949593949293919260ff808316936101009093041691600160a060020a031689565b60008781526002602052604081206011015460ff161515612e95576040805160e560020a62461bcd02815260206004820152600d60248201527f4c4320697320636c6f7365642e00000000000000000000000000000000000000604482015290519081900360640190fd5b60008781526001602052604090205460ff1615612efc576040805160e560020a62461bcd02815260206004820152600d60248201527f564320697320636c6f7365642e00000000000000000000000000000000000000604482015290519081900360640190fd5b600087815260016020819052604090912001548611612f8b576040805160e560020a62461bcd02815260206004820152602b60248201527f56432073657175656e636520697320686967686572207468616e20757064617460448201527f652073657175656e63652e000000000000000000000000000000000000000000606482015290519081900360840190fd5b60208084015160008981526001909252604090912060080154108015612fc5575060608301516000888152600160205260409020600a0154105b1515613041576040805160e560020a62461bcd02815260206004820152603260248201527f53746174652075706461746573206d6179206f6e6c7920696e6372656173652060448201527f726563697069656e742062616c616e63652e0000000000000000000000000000606482015290519081900360840190fd5b602080840151845160008a815260019093526040909220600b015491011480156130875750606083015160408085015160008a8152600160205291909120600c01549101145b1515613102576040805160e560020a62461bcd028152602060048201526024808201527f496e636f72726563742062616c616e63657320666f7220626f6e64656420616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600088815260026020526040902060100154421161311f57600080fd5b60008781526001602052604081208891889188918891600b01015460008c8152600160208190526040909120600b010154886000602002015189600160200201518a600260200201518b600360209081029190910151604080518084019c909c528b81019a909a526c01000000000000000000000000600160a060020a03998a16810260608d01529790981690960260748a0152608889019490945260a888019290925260c887015260e8860152610108850152610128808501929092528251808503909201825261014890930191829052805190928291908401908083835b6020831061321e5780518252601f1990920191602091820191016131ff565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207fdca95419000000000000000000000000000000000000000000000000000000008352600483018181526024840195865289516044850152895191985073cb107c7d2a93e638b20342f46b10b9b6d81377bf975063dca95419965088958a9550909390926064909101919085019080838360005b838110156132d15781810151838201526020016132b9565b50505050905090810190601f1680156132fe5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561331c57600080fd5b505af4158015613330573d6000803e3d6000fd5b505050506040513d602081101561334657600080fd5b5051600088815260016020526040902060040154600160a060020a0390811691161461337157600080fd5b6000878152600160208190526040822060028101805473ffffffffffffffffffffffffffffffffffffffff19163317905501879055839060209081029190910151600089815260019092526040822090916007909101015582600160209081029190910151600089815260019283905260409020909160079091010155826002602090810291909101516000898152600190925260408220909160099091010155826003602090810291909101516000898152600192839052604090209091600990910101556000888152600260209081526040808320600d01548a84526001909252822042909101600390910155879089907f1bfe1ed988e2858b674914f8271b4e1d1175facec158ae6deaf2de8845a4777d908990879060200201518760016020908102919091015160008e81526001835260409081902060030154815195865292850193909352838301523360608401526080830152519081900360a00190a35050505050505050565b6000858152600260205260408120601181015490919060ff16151561350257600080fd5b8551600c8301541061351357600080fd5b6060860151604087015160038401546002850154919092019101101561353857600080fd5b60a0860151608087015160078401546006850154919092019101101561355d57600080fd5b601182015460ff61010090910416151560011415613585576010820154421061358557600080fd5b866000878160200201518860016020020151888660000154600160a060020a03168760010154600160a060020a03168c600260200201518d600360200201518e600460200201518f600560209081029190910151604080518084019d909d529a15157f0100000000000000000000000000000000000000000000000000000000000000028c8c015260418c019990995260618b019790975260818a0195909552600160a060020a039384166c0100000000000000000000000090810260a18b01529290931690910260b588015260c987015260e9860152610109850152610129808501929092528251808503909201825261014990930191829052805190928291908401908083835b602083106136ad5780518252601f19909201916020918201910161368e565b51815160209384036101000a6000190180199092169116179052604080519290940182900382207fdca9541900000000000000000000000000000000000000000000000000000000835260048301818152602484019586528b5160448501528b5191985073cb107c7d2a93e638b20342f46b10b9b6d81377bf975063dca95419965088958c9550909390926064909101919085019080838360005b83811015613760578181015183820152602001613748565b50505050905090810190601f16801561378d5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156137ab57600080fd5b505af41580156137bf573d6000803e3d6000fd5b505050506040513d60208110156137d557600080fd5b5051600160a060020a03168260000154600160a060020a0316146137f857600080fd5b604080517fdca95419000000000000000000000000000000000000000000000000000000008152600481018381526024820192835285516044830152855173cb107c7d2a93e638b20342f46b10b9b6d81377bf9363dca95419938693899390929160640190602085019080838360005b83811015613880578181015183820152602001613868565b50505050905090810190601f1680156138ad5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156138cb57600080fd5b505af41580156138df573d6000803e3d6000fd5b505050506040513d60208110156138f557600080fd5b5051600160a060020a03168260010154600160a060020a03161461391857600080fd5b8560006020020151600c8301558560016020020151601283015585600260200201516002830160000155856003602002015160028301600101558560046020020151600683016000015585600560200201516006830160010155600e820185905560118201805461ff001916610100179055600d82015442016010830155867f73cea087c6e027c6aa279ce9ec540d1c2e359a3dda4aaf0a8d28577bb26af2c38760006020020151886001602002015189600260200201518a600360200201518b600460200201518c60056020908102919091015160108b01546040805198895292880196909652868201949094526060860192909252608085015260a084019190915260c083018a905260e083019190915251908190036101000190a250505050505050565b600080600080600080600080613a53614134565b613a5b614134565b613a63614134565b613a6b61422f565b60008d815260016020818152604092839020835161018081018552815460ff8082161515835261010091829004161515938201939093529281015483850152600280820154600160a060020a039081166060860152600383015460808601526004830154811660a08601526005830154811660c086015260068301541660e085015284518086019586905293949193928501929160078501919082845b815481526020019060010190808311613b08575050509183525050604080518082019182905260209092019190600984019060029082845b815481526020019060010190808311613b40575050509183525050604080518082019182905260209092019190600b84019060029082845b815481526020019060010190808311613b785750505050508152602001600d820160009054906101000a9004600160a060020a0316600160a060020a0316600160a060020a0316815250509050806000015181602001518260400151836060015184608001518560a001518660c001518760e001518861010001518961012001518a61014001518292508191508090509b509b509b509b509b509b509b509b509b509b509b505091939597999b90929496989a50565b60008281526002602052604090206011015460ff161515613c99576040805160e560020a62461bcd02815260206004820152600d60248201527f4c4320697320636c6f7365642e00000000000000000000000000000000000000604482015290519081900360640190fd5b600081815260016020526040902054610100900460ff161515613d06576040805160e560020a62461bcd02815260206004820152601e60248201527f5643206973206e6f7420696e20736574746c656d656e742073746174652e0000604482015290519081900360640190fd5b6000818152600160205260409020600301544211613d94576040805160e560020a62461bcd02815260206004820152602260248201527f5570646174652076632074696d656f757420686173206e6f7420656c6170736560448201527f642e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008181526001602052604090205460ff1615613dfb576040805160e560020a62461bcd02815260206004820152601460248201527f564320697320616c726561647920636c6f736564000000000000000000000000604482015290519081900360640190fd5b60008281526002602090815260408083206012810180546000190190558484526001928390529220805460ff191690911781559054600490910154600160a060020a0390811691161415613eaa5760008181526001602090815260408083206007808201548786526002948590529290942092830180549092019091556008810154600383018054909101905560098101546006830180549091019055600a0154910180549091019055613f3d565b60008281526002602052604081200154600082815260016020526040902060050154600160a060020a0390811691161415613f3d576000818152600160209081526040808320600881015486855260029384905291909320918201805490910190556007808301546003830180549091019055600a83015460068301805490910190556009909201549101805490910190555b6000818152600160209081526040918290206009810154600a909101548351918252918101919091528151839285927f6ffd15c8707cc55ead84f4bd6e1a07360d2a825d7dacb1456403604948e7ebbf929081900390910190a35050565b60408051808201909152600581527f302e302e31000000000000000000000000000000000000000000000000000000602082015281565b6000838160405b855181116140fd578581015191508183101561407457604080516020808201869052818301859052825180830384018152606090920192839052815191929182918401908083835b602083106140405780518252601f199092019160209182019101614021565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902092506140f5565b604080516020808201859052818301869052825180830384018152606090920192839052815191929182918401908083835b602083106140c55780518252601f1990920191602091820191016140a6565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902092505b602001613fd9565b5050919091149392505050565b506000815560010160009055565b5060008155600101600081556001016000815560010160009055565b60408051808201825290600290829080388339509192915050565b6080604051908101604052806004906020820280388339509192915050565b6102a060405190810160405280614183614134565b815260200161419061414f565b815260200161419d61414f565b81526020016141aa614134565b815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082018190526101209091015290565b826002810192821561421f579160200282015b8281111561421f578251825591602001919060010190614204565b5061422b9291506142a4565b5090565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810191909152610100810161427d614134565b815260200161428a614134565b8152602001614297614134565b8152600060209091015290565b6142be91905b8082111561422b57600081556001016142aa565b905600a165627a7a72305820c900bbae06e8b8c3799258d98d455e0acbe265a056ae08a44a3db6cf92a369e20029

   Library Used
ECTools : 0xcb107c7d2a93e638b20342f46b10b9b6d81377bf

   Swarm Source:
bzzr://c900bbae06e8b8c3799258d98d455e0acbe265a056ae08a44a3db6cf92a369e2

 

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.