ETH Price: $2,477.36 (-0.08%)

Contract

0xA82422731D00d935ED29C719f2f41f1794665043
 

Overview

ETH Balance

0.01 ETH

Eth Value

$24.77 (@ $2,477.36/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...58049562018-06-17 12:36:282324 days ago1529238988IN
0xA8242273...794665043
0 ETH0.001196150
Transfer Ownersh...58047092018-06-17 11:38:372324 days ago1529235517IN
0xA8242273...794665043
0 ETH0.0015574550
Set Dth58047042018-06-17 11:37:352324 days ago1529235455IN
0xA8242273...794665043
0 ETH0.0021939550
0x6080604058046382018-06-17 11:22:292324 days ago1529234549IN
 Create: DetherBank
0 ETH0.0525092435

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
61795862018-08-20 5:05:232261 days ago1534741523
0xA8242273...794665043
0.01 ETH
61044362018-08-07 12:10:232273 days ago1533643823
0xA8242273...794665043
0.03 ETH
61044272018-08-07 12:06:102273 days ago1533643570
0xA8242273...794665043
0.11 ETH
61044262018-08-07 12:06:052273 days ago1533643565
0xA8242273...794665043
0.08 ETH
61044242018-08-07 12:05:512273 days ago1533643551
0xA8242273...794665043
0.01664 ETH
61044202018-08-07 12:04:442273 days ago1533643484
0xA8242273...794665043
0.1 ETH
61044182018-08-07 12:04:332273 days ago1533643473
0xA8242273...794665043
0.03 ETH
61044172018-08-07 12:04:262273 days ago1533643466
0xA8242273...794665043
0.0444 ETH
61044122018-08-07 12:03:162273 days ago1533643396
0xA8242273...794665043
0.01 ETH
60987192018-08-06 12:49:352274 days ago1533559775
0xA8242273...794665043
0.00123 ETH
60986822018-08-06 12:40:052274 days ago1533559205
0xA8242273...794665043
0.00557 ETH
60986802018-08-06 12:39:192274 days ago1533559159
0xA8242273...794665043
0.11 ETH
60622762018-07-31 9:14:292280 days ago1533028469
0xA8242273...794665043
0.0057 ETH
60341762018-07-26 15:49:422285 days ago1532620182
0xA8242273...794665043
0.03 ETH
60341592018-07-26 15:46:162285 days ago1532619976
0xA8242273...794665043
0.11 ETH
60341492018-07-26 15:43:582285 days ago1532619838
0xA8242273...794665043
0.1 ETH
60340982018-07-26 15:32:032285 days ago1532619123
0xA8242273...794665043
0.01 ETH
60340932018-07-26 15:30:582285 days ago1532619058
0xA8242273...794665043
0.03 ETH
60340822018-07-26 15:28:322285 days ago1532618912
0xA8242273...794665043
0.01 ETH
60340822018-07-26 15:28:322285 days ago1532618912
0xA8242273...794665043
0.03 ETH
60340412018-07-26 15:18:152285 days ago1532618295
0xA8242273...794665043
0.006 ETH
60282682018-07-25 15:46:202286 days ago1532533580
0xA8242273...794665043
0.01376 ETH
60282482018-07-25 15:40:162286 days ago1532533216
0xA8242273...794665043
0.00413 ETH
60282332018-07-25 15:37:042286 days ago1532533024
0xA8242273...794665043
0.02066 ETH
60280122018-07-25 14:42:302286 days ago1532529750
0xA8242273...794665043
0.01025 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DetherBank

Compiler Version
v0.4.23+commit.124ca40d

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-06-17
*/

/// @title Contract that supports the receival of ERC223 tokens.
contract ERC223ReceivingContract {

    /// @dev Standard ERC223 function that will handle incoming token transfers.
    /// @param _from  Token sender address.
    /// @param _value Amount of tokens.
    /// @param _data  Transaction metadata.
    function tokenFallback(address _from, uint _value, bytes _data) public;

}


contract SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}


contract ERC223Basic is ERC20Basic {

    /**
      * @dev Transfer the specified amount of tokens to the specified address.
      *      Now with a new parameter _data.
      *
      * @param _to    Receiver address.
      * @param _value Amount of tokens that will be transferred.
      * @param _data  Transaction metadata.
      */
    function transfer(address _to, uint _value, bytes _data) public returns (bool);

    /**
      * @dev triggered when transfer is successfully called.
      *
      * @param _from  Sender address.
      * @param _to    Receiver address.
      * @param _value Amount of tokens that will be transferred.
      * @param _data  Transaction metadata.
      */
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _value, bytes _data);
}

library BytesLib {
    function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes) {
        bytes memory tempBytes;

        assembly {
            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // Store the length of the first bytes array at the beginning of
            // the memory for tempBytes.
            let length := mload(_preBytes)
            mstore(tempBytes, length)

            // Maintain a memory counter for the current write location in the
            // temp bytes array by adding the 32 bytes for the array length to
            // the starting location.
            let mc := add(tempBytes, 0x20)
            // Stop copying when the memory counter reaches the length of the
            // first bytes array.
            let end := add(mc, length)

            for {
                // Initialize a copy counter to the start of the _preBytes data,
                // 32 bytes into its memory.
                let cc := add(_preBytes, 0x20)
            } lt(mc, end) {
                // Increase both counters by 32 bytes each iteration.
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                // Write the _preBytes data into the tempBytes memory 32 bytes
                // at a time.
                mstore(mc, mload(cc))
            }

            // Add the length of _postBytes to the current length of tempBytes
            // and store it as the new length in the first 32 bytes of the
            // tempBytes memory.
            length := mload(_postBytes)
            mstore(tempBytes, add(length, mload(tempBytes)))

            // Move the memory counter back from a multiple of 0x20 to the
            // actual end of the _preBytes data.
            mc := end
            // Stop copying when the memory counter reaches the new combined
            // length of the arrays.
            end := add(mc, length)

            for {
                let cc := add(_postBytes, 0x20)
            } lt(mc, end) {
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                mstore(mc, mload(cc))
            }

            // Update the free-memory pointer by padding our last write location
            // to 32 bytes: add 31 bytes to the end of tempBytes to move to the
            // next 32 byte block, then round down to the nearest multiple of
            // 32. If the sum of the length of the two arrays is zero then add
            // one before rounding down to leave a blank 32 bytes (the length block with 0).
            mstore(0x40, and(
              add(add(end, iszero(add(length, mload(_preBytes)))), 31),
              not(31) // Round down to the nearest 32 bytes.
            ))
        }

        return tempBytes;
    }

    function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {
        assembly {
            // Read the first 32 bytes of _preBytes storage, which is the length
            // of the array. (We don't need to use the offset into the slot
            // because arrays use the entire slot.)
            let fslot := sload(_preBytes_slot)
            // Arrays of 31 bytes or less have an even value in their slot,
            // while longer arrays have an odd value. The actual length is
            // the slot divided by two for odd values, and the lowest order
            // byte divided by two for even values.
            // If the slot is even, bitwise and the slot with 255 and divide by
            // two to get the length. If the slot is odd, bitwise and the slot
            // with -1 and divide by two.
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)
            let newlength := add(slength, mlength)
            // slength can contain both the length and contents of the array
            // if length < 32 bytes so let's prepare for that
            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
            switch add(lt(slength, 32), lt(newlength, 32))
            case 2 {
                // Since the new array still fits in the slot, we just need to
                // update the contents of the slot.
                // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
                sstore(
                    _preBytes_slot,
                    // all the modifications to the slot are inside this
                    // next block
                    add(
                        // we can just add to the slot contents because the
                        // bytes we want to change are the LSBs
                        fslot,
                        add(
                            mul(
                                div(
                                    // load the bytes from memory
                                    mload(add(_postBytes, 0x20)),
                                    // zero all bytes to the right
                                    exp(0x100, sub(32, mlength))
                                ),
                                // and now shift left the number of bytes to
                                // leave space for the length in the slot
                                exp(0x100, sub(32, newlength))
                            ),
                            // increase length by the double of the memory
                            // bytes length
                            mul(mlength, 2)
                        )
                    )
                )
            }
            case 1 {
                // The stored value fits in the slot, but the combined value
                // will exceed it.
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes_slot)
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes_slot, add(mul(newlength, 2), 1))

                // The contents of the _postBytes array start 32 bytes into
                // the structure. Our first read should obtain the `submod`
                // bytes that can fit into the unused space in the last word
                // of the stored array. To get this, we read 32 bytes starting
                // from `submod`, so the data we read overlaps with the array
                // contents by `submod` bytes. Masking the lowest-order
                // `submod` bytes allows us to add that value directly to the
                // stored value.

                let submod := sub(32, slength)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(
                    sc,
                    add(
                        and(
                            fslot,
                            0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
                        ),
                        and(mload(mc), mask)
                    )
                )

                for {
                    mc := add(mc, 0x20)
                    sc := add(sc, 1)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
            default {
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes_slot)
                // Start copying to the last used word of the stored array.
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes_slot, add(mul(newlength, 2), 1))

                // Copy over the first `submod` bytes of the new data as in
                // case 1 above.
                let slengthmod := mod(slength, 32)
                let mlengthmod := mod(mlength, 32)
                let submod := sub(32, slengthmod)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(sc, add(sload(sc), and(mload(mc), mask)))

                for {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
        }
    }

    function slice(bytes _bytes, uint _start, uint _length) internal  pure returns (bytes) {
        require(_bytes.length >= (_start + _length));

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toAddress(bytes _bytes, uint _start) internal  pure returns (address) {
        require(_bytes.length >= (_start + 20));
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint(bytes _bytes, uint _start) internal  pure returns (uint256) {
        require(_bytes.length >= (_start + 32));
        uint256 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x20), _start))
        }

        return tempUint;
    }

    function toBytes32(bytes _bytes, uint _start) internal  pure returns (bytes32) {
        require(_bytes.length >= (_start + 32));
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function toBytes16(bytes _bytes, uint _start) internal  pure returns (bytes16) {
        require(_bytes.length >= (_start + 16));
        bytes16 tempBytes16;

        assembly {
            tempBytes16 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes16;
    }

    function toBytes2(bytes _bytes, uint _start) internal  pure returns (bytes2) {
        require(_bytes.length >= (_start + 2));
        bytes2 tempBytes2;

        assembly {
            tempBytes2 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes2;
    }

    function toBytes4(bytes _bytes, uint _start) internal  pure returns (bytes4) {
        require(_bytes.length >= (_start + 4));
        bytes4 tempBytes4;

        assembly {
            tempBytes4 := mload(add(add(_bytes, 0x20), _start))
        }
        return tempBytes4;
    }

    function toBytes1(bytes _bytes, uint _start) internal  pure returns (bytes1) {
        require(_bytes.length >= (_start + 1));
        bytes1 tempBytes1;

        assembly {
            tempBytes1 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes1;
    }

    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                // the next line is the loop condition:
                // while(uint(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {
        bool success = true;

        assembly {
            // we know _preBytes_offset is 0
            let fslot := sload(_preBytes_slot)
            // Decode the length of the stored array like in concatStorage().
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)

            // if lengths don't match the arrays are not equal
            switch eq(slength, mlength)
            case 1 {
                // slength can contain both the length and contents of the array
                // if length < 32 bytes so let's prepare for that
                // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
                if iszero(iszero(slength)) {
                    switch lt(slength, 32)
                    case 1 {
                        // blank the last byte which is the length
                        fslot := mul(div(fslot, 0x100), 0x100)

                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
                            // unsuccess:
                            success := 0
                        }
                    }
                    default {
                        // cb is a circuit breaker in the for loop since there's
                        //  no said feature for inline assembly loops
                        // cb = 1 - don't breaker
                        // cb = 0 - break
                        let cb := 1

                        // get the keccak hash to get the contents of the array
                        mstore(0x0, _preBytes_slot)
                        let sc := keccak256(0x0, 0x20)

                        let mc := add(_postBytes, 0x20)
                        let end := add(mc, mlength)

                        // the next line is the loop condition:
                        // while(uint(mc < end) + cb == 2)
                        for {} eq(add(lt(mc, end), cb), 2) {
                            sc := add(sc, 1)
                            mc := add(mc, 0x20)
                        } {
                            if iszero(eq(sload(sc), mload(mc))) {
                                // unsuccess:
                                success := 0
                                cb := 0
                            }
                        }
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }
}
contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}


contract DateTime {
        /*
         *  Date and Time utilities for ethereum contracts
         *
         */
        struct _DateTime {
                uint16 year;
                uint8 month;
                uint8 day;
                uint8 hour;
                uint8 minute;
                uint8 second;
                uint8 weekday;
        }

        uint constant DAY_IN_SECONDS = 86400;
        uint constant YEAR_IN_SECONDS = 31536000;
        uint constant LEAP_YEAR_IN_SECONDS = 31622400;

        uint constant HOUR_IN_SECONDS = 3600;
        uint constant MINUTE_IN_SECONDS = 60;

        uint16 constant ORIGIN_YEAR = 1970;

        function isLeapYear(uint16 year) public pure returns (bool) {
                if (year % 4 != 0) {
                        return false;
                }
                if (year % 100 != 0) {
                        return true;
                }
                if (year % 400 != 0) {
                        return false;
                }
                return true;
        }

        function leapYearsBefore(uint year) public pure returns (uint) {
                year -= 1;
                return year / 4 - year / 100 + year / 400;
        }

        function getDaysInMonth(uint8 month, uint16 year) public pure returns (uint8) {
                if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
                        return 31;
                }
                else if (month == 4 || month == 6 || month == 9 || month == 11) {
                        return 30;
                }
                else if (isLeapYear(year)) {
                        return 29;
                }
                else {
                        return 28;
                }
        }

        function parseTimestamp(uint timestamp) internal pure returns (_DateTime dt) {
                uint secondsAccountedFor = 0;
                uint buf;
                uint8 i;

                // Year
                dt.year = getYear(timestamp);
                buf = leapYearsBefore(dt.year) - leapYearsBefore(ORIGIN_YEAR);

                secondsAccountedFor += LEAP_YEAR_IN_SECONDS * buf;
                secondsAccountedFor += YEAR_IN_SECONDS * (dt.year - ORIGIN_YEAR - buf);

                // Month
                uint secondsInMonth;
                for (i = 1; i <= 12; i++) {
                        secondsInMonth = DAY_IN_SECONDS * getDaysInMonth(i, dt.year);
                        if (secondsInMonth + secondsAccountedFor > timestamp) {
                                dt.month = i;
                                break;
                        }
                        secondsAccountedFor += secondsInMonth;
                }

                // Day
                for (i = 1; i <= getDaysInMonth(dt.month, dt.year); i++) {
                        if (DAY_IN_SECONDS + secondsAccountedFor > timestamp) {
                                dt.day = i;
                                break;
                        }
                        secondsAccountedFor += DAY_IN_SECONDS;
                }

                // Hour
                dt.hour = getHour(timestamp);

                // Minute
                dt.minute = getMinute(timestamp);

                // Second
                dt.second = getSecond(timestamp);

                // Day of week.
                dt.weekday = getWeekday(timestamp);
        }

        function getYear(uint timestamp) public pure returns (uint16) {
                uint secondsAccountedFor = 0;
                uint16 year;
                uint numLeapYears;

                // Year
                year = uint16(ORIGIN_YEAR + timestamp / YEAR_IN_SECONDS);
                numLeapYears = leapYearsBefore(year) - leapYearsBefore(ORIGIN_YEAR);

                secondsAccountedFor += LEAP_YEAR_IN_SECONDS * numLeapYears;
                secondsAccountedFor += YEAR_IN_SECONDS * (year - ORIGIN_YEAR - numLeapYears);

                while (secondsAccountedFor > timestamp) {
                        if (isLeapYear(uint16(year - 1))) {
                                secondsAccountedFor -= LEAP_YEAR_IN_SECONDS;
                        }
                        else {
                                secondsAccountedFor -= YEAR_IN_SECONDS;
                        }
                        year -= 1;
                }
                return year;
        }

        function getMonth(uint timestamp) public pure returns (uint8) {
                return parseTimestamp(timestamp).month;
        }

        function getDay(uint timestamp) public pure returns (uint8) {
                return parseTimestamp(timestamp).day;
        }

        function getHour(uint timestamp) public pure returns (uint8) {
                return uint8((timestamp / 60 / 60) % 24);
        }

        function getMinute(uint timestamp) public pure returns (uint8) {
                return uint8((timestamp / 60) % 60);
        }

        function getSecond(uint timestamp) public pure returns (uint8) {
                return uint8(timestamp % 60);
        }

        function getWeekday(uint timestamp) public pure returns (uint8) {
                return uint8((timestamp / DAY_IN_SECONDS + 4) % 7);
        }

        function toTimestamp(uint16 year, uint8 month, uint8 day) public pure returns (uint timestamp) {
                return toTimestamp(year, month, day, 0, 0, 0);
        }

        function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour) public pure returns (uint timestamp) {
                return toTimestamp(year, month, day, hour, 0, 0);
        }

        function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute) public pure returns (uint timestamp) {
                return toTimestamp(year, month, day, hour, minute, 0);
        }

        function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute, uint8 second) public pure returns (uint timestamp) {
                uint16 i;

                // Year
                for (i = ORIGIN_YEAR; i < year; i++) {
                        if (isLeapYear(i)) {
                                timestamp += LEAP_YEAR_IN_SECONDS;
                        }
                        else {
                                timestamp += YEAR_IN_SECONDS;
                        }
                }

                // Month
                uint8[12] memory monthDayCounts;
                monthDayCounts[0] = 31;
                if (isLeapYear(year)) {
                        monthDayCounts[1] = 29;
                }
                else {
                        monthDayCounts[1] = 28;
                }
                monthDayCounts[2] = 31;
                monthDayCounts[3] = 30;
                monthDayCounts[4] = 31;
                monthDayCounts[5] = 30;
                monthDayCounts[6] = 31;
                monthDayCounts[7] = 31;
                monthDayCounts[8] = 30;
                monthDayCounts[9] = 31;
                monthDayCounts[10] = 30;
                monthDayCounts[11] = 31;

                for (i = 1; i < month; i++) {
                        timestamp += DAY_IN_SECONDS * monthDayCounts[i - 1];
                }

                // Day
                timestamp += DAY_IN_SECONDS * (day - 1);

                // Hour
                timestamp += HOUR_IN_SECONDS * (hour);

                // Minute
                timestamp += MINUTE_IN_SECONDS * (minute);

                // Second
                timestamp += second;

                return timestamp;
        }
}


contract DetherBank is ERC223ReceivingContract, Ownable, SafeMath, DateTime {
  using BytesLib for bytes;

  /*
   * Event
   */
  event receiveDth(address _from, uint amount);
  event receiveEth(address _from, uint amount);
  event sendDth(address _from, uint amount);
  event sendEth(address _from, uint amount);

  mapping(address => uint) public dthShopBalance;
  mapping(address => uint) public dthTellerBalance;
  mapping(address => uint) public ethShopBalance;
  mapping(address => uint) public ethTellerBalance;


  // store a mapping with per day/month/year a uint256 containing the wei sold amount on that date
  //
  //      user               day               month             year      weiSold
  mapping(address => mapping(uint16 => mapping(uint16 => mapping(uint16 => uint256)))) ethSellsUserToday;

  ERC223Basic public dth;
  bool public isInit = false;

  /**
   * INIT
   */
  function setDth (address _dth) external onlyOwner {
    require(!isInit);
    dth = ERC223Basic(_dth);
    isInit = true;
  }

  /**
   * Core fonction
   */
  // withdraw DTH when teller delete
  function withdrawDthTeller(address _receiver) external onlyOwner {
    require(dthTellerBalance[_receiver] > 0);
    uint tosend = dthTellerBalance[_receiver];
    dthTellerBalance[_receiver] = 0;
    require(dth.transfer(_receiver, tosend));
  }
  // withdraw DTH when shop delete
  function withdrawDthShop(address _receiver) external onlyOwner  {
    require(dthShopBalance[_receiver] > 0);
    uint tosend = dthShopBalance[_receiver];
    dthShopBalance[_receiver] = 0;
    require(dth.transfer(_receiver, tosend));
  }
  // withdraw DTH when a shop add by admin is delete
  function withdrawDthShopAdmin(address _from, address _receiver) external onlyOwner  {
    require(dthShopBalance[_from]  > 0);
    uint tosend = dthShopBalance[_from];
    dthShopBalance[_from] = 0;
    require(dth.transfer(_receiver, tosend));
  }

  // add DTH when shop register
  function addTokenShop(address _from, uint _value) external onlyOwner {
    dthShopBalance[_from] = SafeMath.add(dthShopBalance[_from], _value);
  }
  // add DTH when token register
  function addTokenTeller(address _from, uint _value) external onlyOwner{
    dthTellerBalance[_from] = SafeMath.add(dthTellerBalance[_from], _value);
  }
  // add ETH for escrow teller
  function addEthTeller(address _from, uint _value) external payable onlyOwner returns (bool) {
    ethTellerBalance[_from] = SafeMath.add(ethTellerBalance[_from] ,_value);
    return true;
  }
  // helper function to extra date info from block.timestamp
  function getDateInfo(uint timestamp) internal view returns(_DateTime) {
    // use DateTime.sol to extract date info from the timestamp
    _DateTime memory date = parseTimestamp(timestamp);
    return date;
  }
  // withdraw ETH for teller escrow + save amount sold today for the _from user
  function withdrawEth(address _from, address _to, uint _amount) external onlyOwner {
    require(ethTellerBalance[_from] >= _amount);
    ethTellerBalance[_from] = SafeMath.sub(ethTellerBalance[_from], _amount);

    uint256 weiSoldToday = getWeiSoldToday(_from);

    _DateTime memory date = getDateInfo(block.timestamp);

    // add the sold amount, should not exceed daily limit (checked in DetherCore)
    ethSellsUserToday[_from][date.day][date.month][date.year] = SafeMath.add(weiSoldToday, _amount);

    _to.transfer(_amount);
  }
  // refund all ETH from teller contract
  function refundEth(address _from) external onlyOwner {
    uint toSend = ethTellerBalance[_from];
    if (toSend > 0) {
      ethTellerBalance[_from] = 0;
      _from.transfer(toSend);
    }
  }

  /**
   * GETTER
   */
  function getDthTeller(address _user) public view returns (uint) {
    return dthTellerBalance[_user];
  }
  function getDthShop(address _user) public view returns (uint) {
    return dthShopBalance[_user];
  }

  function getEthBalTeller(address _user) public view returns (uint) {
    return ethTellerBalance[_user];
  }

  // get amount wei sold today for this user
  function getWeiSoldToday(address _user) public view returns (uint256 weiSoldToday) {
    // use DateTime.sol to extract date info from the timestamp
    _DateTime memory date = getDateInfo(block.timestamp);
    weiSoldToday = ethSellsUserToday[_user][date.day][date.month][date.year];
  }

  /// @dev Standard ERC223 function that will handle incoming token transfers.
  // DO NOTHING but allow to receive token when addToken* function are called
  // by the dethercore contract
  function tokenFallback(address _from, uint _value, bytes _data) {
    require(msg.sender == address(dth));
  }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"dth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"}],"name":"addTokenTeller","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"}],"name":"withdrawDthShop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getWeekday","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_dth","type":"address"}],"name":"setDth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint16"},{"name":"month","type":"uint8"},{"name":"day","type":"uint8"},{"name":"hour","type":"uint8"},{"name":"minute","type":"uint8"}],"name":"toTimestamp","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"dthTellerBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_receiver","type":"address"}],"name":"withdrawDthShopAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"getDthTeller","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ethShopBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint16"},{"name":"month","type":"uint8"},{"name":"day","type":"uint8"},{"name":"hour","type":"uint8"}],"name":"toTimestamp","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint16"},{"name":"month","type":"uint8"},{"name":"day","type":"uint8"}],"name":"toTimestamp","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"getEthBalTeller","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint16"},{"name":"month","type":"uint8"},{"name":"day","type":"uint8"},{"name":"hour","type":"uint8"},{"name":"minute","type":"uint8"},{"name":"second","type":"uint8"}],"name":"toTimestamp","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"dthShopBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint16"}],"name":"isLeapYear","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"getDthShop","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"getWeiSoldToday","outputs":[{"name":"weiSoldToday","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isInit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"leapYearsBefore","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"month","type":"uint8"},{"name":"year","type":"uint16"}],"name":"getDaysInMonth","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"}],"name":"withdrawDthTeller","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"}],"name":"addTokenShop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"}],"name":"refundEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"}],"name":"addEthTeller","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ethTellerBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"receiveDth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"receiveEth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"sendDth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"sendEth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

60806040526006805460a060020a60ff021916905560008054600160a060020a033316600160a060020a03199091161790556114f8806100406000396000f3006080604052600436106101c15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301e57a3781146101c657806318a6d58b146101f75780633716f65d1461021d5780633e239e1a1461023e5780634ac1ad781461026c5780635f7e71381461028457806362ba9687146102a557806365c72840146102eb5780636b905fb1146103035780637139b5951461032457806378d0a4151461034b5780637bee648d1461036c5780637f7918331461038d5780638aa001fc146103bb5780638c8d98a0146103d35780638d837f38146103fb5780638da5cb5b1461041c5780639054bdec1461043157806392d663131461046b57806395dc00021461049a578063a324ad24146104bb578063a6f0e577146104d3578063a96b3ab814610503578063ad71766e14610524578063b145a5b814610545578063b19999371461055a578063b238ad0e14610572578063b71738f114610594578063c0ee0b8a146105b5578063d4d84da51461061e578063d83edd7014610642578063e465146514610663578063f08ddc031461067a578063f2fde38b1461069b578063f5923a6e146106bc578063fa93f883146106e6575b600080fd5b3480156101d257600080fd5b506101db6106fe565b60408051600160a060020a039092168252519081900360200190f35b34801561020357600080fd5b5061021b600160a060020a036004351660243561070d565b005b34801561022957600080fd5b5061021b600160a060020a036004351661076b565b34801561024a57600080fd5b5061025660043561086c565b6040805160ff9092168252519081900360200190f35b34801561027857600080fd5b50610256600435610889565b34801561029057600080fd5b5061021b600160a060020a036004351661089b565b3480156102b157600080fd5b506102d961ffff6004351660ff6024358116906044358116906064358116906084351661093d565b60408051918252519081900360200190f35b3480156102f757600080fd5b50610256600435610958565b34801561030f57600080fd5b506102d9600160a060020a036004351661096d565b34801561033057600080fd5b5061021b600160a060020a036004358116906024351661097f565b34801561035757600080fd5b506102d9600160a060020a0360043516610a80565b34801561037857600080fd5b506102d9600160a060020a0360043516610a9b565b34801561039957600080fd5b506102d961ffff6004351660ff60243581169060443581169060643516610aad565b3480156103c757600080fd5b50610256600435610ac7565b3480156103df57600080fd5b506102d961ffff6004351660ff60243581169060443516610ad1565b34801561040757600080fd5b506102d9600160a060020a0360043516610aeb565b34801561042857600080fd5b506101db610b06565b34801561043d57600080fd5b506102d961ffff6004351660ff60243581169060443581169060643581169060843581169060a43516610b15565b34801561047757600080fd5b50610483600435610c5b565b6040805161ffff9092168252519081900360200190f35b3480156104a657600080fd5b506102d9600160a060020a0360043516610ceb565b3480156104c757600080fd5b50610256600435610cfd565b3480156104df57600080fd5b506104ef61ffff60043516610d12565b604080519115158252519081900360200190f35b34801561050f57600080fd5b506102d9600160a060020a0360043516610d60565b34801561053057600080fd5b506102d9600160a060020a0360043516610d7b565b34801561055157600080fd5b506104ef610ddf565b34801561056657600080fd5b506102d9600435610e00565b34801561057e57600080fd5b5061025660ff6004351661ffff60243516610e1b565b3480156105a057600080fd5b5061021b600160a060020a0360043516610ee3565b3480156105c157600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261021b948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610fa99650505050505050565b34801561062a57600080fd5b5061021b600160a060020a0360043516602435610fc4565b34801561064e57600080fd5b5061021b600160a060020a0360043516611022565b6104ef600160a060020a03600435166024356110a4565b34801561068657600080fd5b506102d9600160a060020a0360043516611105565b3480156106a757600080fd5b5061021b600160a060020a0360043516611117565b3480156106c857600080fd5b5061021b600160a060020a03600435811690602435166044356111af565b3480156106f257600080fd5b506102566004356112d6565b600654600160a060020a031681565b60005433600160a060020a0390811691161461072857600080fd5b600160a060020a03821660009081526002602052604090205461074b90826112e1565b600160a060020a0390921660009081526002602052604090209190915550565b6000805433600160a060020a0390811691161461078757600080fd5b600160a060020a038216600090815260016020526040812054116107aa57600080fd5b50600160a060020a03808216600081815260016020908152604080832080549084905560065482517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101969096526024860182905291519095919091169363a9059cbb9360448083019493928390030190829087803b15801561083157600080fd5b505af1158015610845573d6000803e3d6000fd5b505050506040513d602081101561085b57600080fd5b5051151561086857600080fd5b5050565b60006018603c8084045b0481151561088057fe5b0690505b919050565b60006007600462015180840401610880565b60005433600160a060020a039081169116146108b657600080fd5b60065474010000000000000000000000000000000000000000900460ff16156108de57600080fd5b6006805474ff000000000000000000000000000000000000000019600160a060020a0390931673ffffffffffffffffffffffffffffffffffffffff19909116179190911674010000000000000000000000000000000000000000179055565b600061094e86868686866000610b15565b9695505050505050565b6000610963826112f7565b6040015192915050565b60026020526000908152604090205481565b6000805433600160a060020a0390811691161461099b57600080fd5b600160a060020a038316600090815260016020526040812054116109be57600080fd5b50600160a060020a03808316600090815260016020908152604080832080549084905560065482517fa9059cbb00000000000000000000000000000000000000000000000000000000815287871660048201526024810183905292519195169363a9059cbb93604480850194919392918390030190829087803b158015610a4457600080fd5b505af1158015610a58573d6000803e3d6000fd5b505050506040513d6020811015610a6e57600080fd5b50511515610a7b57600080fd5b505050565b600160a060020a031660009081526002602052604090205490565b60036020526000908152604090205481565b6000610abe85858585600080610b15565b95945050505050565b6000603c82610880565b6000610ae38484846000806000610b15565b949350505050565b600160a060020a031660009081526004602052604090205490565b600054600160a060020a031681565b600080610b20611470565b6107b291505b8861ffff168261ffff161015610b6757610b3f82610d12565b15610b52576301e2850083019250610b5c565b6301e13380830192505b600190910190610b26565b601f8152610b7489610d12565b15610b8557601d6020820152610b8d565b601c60208201525b601f60408201819052601e606083018190526080830182905260a0830181905260c0830182905260e0830182905261010083018190526101208301829052610140830152610160820152600191505b8760ff168261ffff161015610c1d578061ffff600019840116600c8110610bff57fe5b602002015160ff166201518002830192508180600101925050610bdc565b6001870360ff166201518002830192508560ff16610e1002830192508460ff16603c02830192508360ff168301925082925050509695505050505050565b6000806107b26301e1338084048101908290610c7690610e00565b610c838361ffff16610e00565b039050806301e285000283019250806107b2830361ffff16036301e1338002830192505b84831115610ce357610cbb60018303610d12565b15610cce576301e2850083039250610cd8565b6301e13380830392505b600182039150610ca7565b509392505050565b60016020526000908152604090205481565b6000610d08826112f7565b6020015192915050565b60006003821615610d2557506000610884565b606461ffff83160661ffff1615610d3e57506001610884565b61019061ffff83160661ffff1615610d5857506000610884565b506001919050565b600160a060020a031660009081526001602052604090205490565b6000610d85611490565b610d8e42611445565b600160a060020a0390931660009081526005602090815260408083208187015160ff90811685529083528184208388015190911684528252808320955161ffff168352949052929092205492915050565b60065474010000000000000000000000000000000000000000900460ff1681565b60001901600061019082046064830460048404030192915050565b60008260ff1660011480610e3257508260ff166003145b80610e4057508260ff166005145b80610e4e57508260ff166007145b80610e5c57508260ff166008145b80610e6a57508260ff16600a145b80610e7857508260ff16600c145b15610e855750601f610edd565b8260ff1660041480610e9a57508260ff166006145b80610ea857508260ff166009145b80610eb657508260ff16600b145b15610ec35750601e610edd565b610ecc82610d12565b15610ed95750601d610edd565b50601c5b92915050565b6000805433600160a060020a03908116911614610eff57600080fd5b600160a060020a03821660009081526002602052604081205411610f2257600080fd5b50600160a060020a03808216600081815260026020908152604080832080549084905560065482517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101969096526024860182905291519095919091169363a9059cbb9360448083019493928390030190829087803b15801561083157600080fd5b60065433600160a060020a03908116911614610a7b57600080fd5b60005433600160a060020a03908116911614610fdf57600080fd5b600160a060020a03821660009081526001602052604090205461100290826112e1565b600160a060020a0390921660009081526001602052604090209190915550565b6000805433600160a060020a0390811691161461103e57600080fd5b50600160a060020a0381166000908152600460205260408120549081111561086857600160a060020a0382166000818152600460205260408082208290555183156108fc0291849190818181858888f19350505050158015610a7b573d6000803e3d6000fd5b6000805433600160a060020a039081169116146110c057600080fd5b600160a060020a0383166000908152600460205260409020546110e390836112e1565b600160a060020a03841660009081526004602052604090205550600192915050565b60046020526000908152604090205481565b60005433600160a060020a0390811691161461113257600080fd5b600160a060020a038116151561114757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006111b9611490565b60005433600160a060020a039081169116146111d457600080fd5b600160a060020a0385166000908152600460205260409020548311156111f957600080fd5b600160a060020a03851660009081526004602052604090205461121c908461145e565b600160a060020a03861660009081526004602052604090205561123e85610d7b565b915061124942611445565b905061125582846112e1565b600160a060020a0380871660009081526005602090815260408083208682015160ff90811685529083528184208784015190911684528252808320865161ffff1684529091528082209390935591519086169185156108fc02918691818181858888f193505050501580156112ce573d6000803e3d6000fd5b505050505050565b6000603c8083610876565b6000828201838110156112f057fe5b9392505050565b6112ff611490565b600080808061130d86610c5b565b61ffff16855261131e6107b2610e00565b855161132d9061ffff16610e00565b039250826301e285000284019350826107b286600001510361ffff16036301e133800284019350600191505b600c60ff8316116113a357611372828660000151610e1b565b60ff16620151800290508584820111156113945760ff821660208601526113a3565b92830192600190910190611359565b600191505b6113ba85602001518660000151610e1b565b60ff168260ff161115156113f7578584620151800111156113e35760ff821660408601526113f7565b6201518093909301926001909101906113a8565b6114008661086c565b60ff166060860152611411866112d6565b60ff16608086015261142286610ac7565b60ff1660a086015261143386610889565b60ff1660c08601525092949350505050565b61144d611490565b611455611490565b6112f0836112f7565b60008282111561146a57fe5b50900390565b61018060405190810160405280600c906020820280388339509192915050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152905600a165627a7a72305820acf1f8a9685163bab45634d65d260f525cb898c4455280466e4a0d8b1e55332d0029

Deployed Bytecode

0x6080604052600436106101c15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301e57a3781146101c657806318a6d58b146101f75780633716f65d1461021d5780633e239e1a1461023e5780634ac1ad781461026c5780635f7e71381461028457806362ba9687146102a557806365c72840146102eb5780636b905fb1146103035780637139b5951461032457806378d0a4151461034b5780637bee648d1461036c5780637f7918331461038d5780638aa001fc146103bb5780638c8d98a0146103d35780638d837f38146103fb5780638da5cb5b1461041c5780639054bdec1461043157806392d663131461046b57806395dc00021461049a578063a324ad24146104bb578063a6f0e577146104d3578063a96b3ab814610503578063ad71766e14610524578063b145a5b814610545578063b19999371461055a578063b238ad0e14610572578063b71738f114610594578063c0ee0b8a146105b5578063d4d84da51461061e578063d83edd7014610642578063e465146514610663578063f08ddc031461067a578063f2fde38b1461069b578063f5923a6e146106bc578063fa93f883146106e6575b600080fd5b3480156101d257600080fd5b506101db6106fe565b60408051600160a060020a039092168252519081900360200190f35b34801561020357600080fd5b5061021b600160a060020a036004351660243561070d565b005b34801561022957600080fd5b5061021b600160a060020a036004351661076b565b34801561024a57600080fd5b5061025660043561086c565b6040805160ff9092168252519081900360200190f35b34801561027857600080fd5b50610256600435610889565b34801561029057600080fd5b5061021b600160a060020a036004351661089b565b3480156102b157600080fd5b506102d961ffff6004351660ff6024358116906044358116906064358116906084351661093d565b60408051918252519081900360200190f35b3480156102f757600080fd5b50610256600435610958565b34801561030f57600080fd5b506102d9600160a060020a036004351661096d565b34801561033057600080fd5b5061021b600160a060020a036004358116906024351661097f565b34801561035757600080fd5b506102d9600160a060020a0360043516610a80565b34801561037857600080fd5b506102d9600160a060020a0360043516610a9b565b34801561039957600080fd5b506102d961ffff6004351660ff60243581169060443581169060643516610aad565b3480156103c757600080fd5b50610256600435610ac7565b3480156103df57600080fd5b506102d961ffff6004351660ff60243581169060443516610ad1565b34801561040757600080fd5b506102d9600160a060020a0360043516610aeb565b34801561042857600080fd5b506101db610b06565b34801561043d57600080fd5b506102d961ffff6004351660ff60243581169060443581169060643581169060843581169060a43516610b15565b34801561047757600080fd5b50610483600435610c5b565b6040805161ffff9092168252519081900360200190f35b3480156104a657600080fd5b506102d9600160a060020a0360043516610ceb565b3480156104c757600080fd5b50610256600435610cfd565b3480156104df57600080fd5b506104ef61ffff60043516610d12565b604080519115158252519081900360200190f35b34801561050f57600080fd5b506102d9600160a060020a0360043516610d60565b34801561053057600080fd5b506102d9600160a060020a0360043516610d7b565b34801561055157600080fd5b506104ef610ddf565b34801561056657600080fd5b506102d9600435610e00565b34801561057e57600080fd5b5061025660ff6004351661ffff60243516610e1b565b3480156105a057600080fd5b5061021b600160a060020a0360043516610ee3565b3480156105c157600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261021b948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610fa99650505050505050565b34801561062a57600080fd5b5061021b600160a060020a0360043516602435610fc4565b34801561064e57600080fd5b5061021b600160a060020a0360043516611022565b6104ef600160a060020a03600435166024356110a4565b34801561068657600080fd5b506102d9600160a060020a0360043516611105565b3480156106a757600080fd5b5061021b600160a060020a0360043516611117565b3480156106c857600080fd5b5061021b600160a060020a03600435811690602435166044356111af565b3480156106f257600080fd5b506102566004356112d6565b600654600160a060020a031681565b60005433600160a060020a0390811691161461072857600080fd5b600160a060020a03821660009081526002602052604090205461074b90826112e1565b600160a060020a0390921660009081526002602052604090209190915550565b6000805433600160a060020a0390811691161461078757600080fd5b600160a060020a038216600090815260016020526040812054116107aa57600080fd5b50600160a060020a03808216600081815260016020908152604080832080549084905560065482517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101969096526024860182905291519095919091169363a9059cbb9360448083019493928390030190829087803b15801561083157600080fd5b505af1158015610845573d6000803e3d6000fd5b505050506040513d602081101561085b57600080fd5b5051151561086857600080fd5b5050565b60006018603c8084045b0481151561088057fe5b0690505b919050565b60006007600462015180840401610880565b60005433600160a060020a039081169116146108b657600080fd5b60065474010000000000000000000000000000000000000000900460ff16156108de57600080fd5b6006805474ff000000000000000000000000000000000000000019600160a060020a0390931673ffffffffffffffffffffffffffffffffffffffff19909116179190911674010000000000000000000000000000000000000000179055565b600061094e86868686866000610b15565b9695505050505050565b6000610963826112f7565b6040015192915050565b60026020526000908152604090205481565b6000805433600160a060020a0390811691161461099b57600080fd5b600160a060020a038316600090815260016020526040812054116109be57600080fd5b50600160a060020a03808316600090815260016020908152604080832080549084905560065482517fa9059cbb00000000000000000000000000000000000000000000000000000000815287871660048201526024810183905292519195169363a9059cbb93604480850194919392918390030190829087803b158015610a4457600080fd5b505af1158015610a58573d6000803e3d6000fd5b505050506040513d6020811015610a6e57600080fd5b50511515610a7b57600080fd5b505050565b600160a060020a031660009081526002602052604090205490565b60036020526000908152604090205481565b6000610abe85858585600080610b15565b95945050505050565b6000603c82610880565b6000610ae38484846000806000610b15565b949350505050565b600160a060020a031660009081526004602052604090205490565b600054600160a060020a031681565b600080610b20611470565b6107b291505b8861ffff168261ffff161015610b6757610b3f82610d12565b15610b52576301e2850083019250610b5c565b6301e13380830192505b600190910190610b26565b601f8152610b7489610d12565b15610b8557601d6020820152610b8d565b601c60208201525b601f60408201819052601e606083018190526080830182905260a0830181905260c0830182905260e0830182905261010083018190526101208301829052610140830152610160820152600191505b8760ff168261ffff161015610c1d578061ffff600019840116600c8110610bff57fe5b602002015160ff166201518002830192508180600101925050610bdc565b6001870360ff166201518002830192508560ff16610e1002830192508460ff16603c02830192508360ff168301925082925050509695505050505050565b6000806107b26301e1338084048101908290610c7690610e00565b610c838361ffff16610e00565b039050806301e285000283019250806107b2830361ffff16036301e1338002830192505b84831115610ce357610cbb60018303610d12565b15610cce576301e2850083039250610cd8565b6301e13380830392505b600182039150610ca7565b509392505050565b60016020526000908152604090205481565b6000610d08826112f7565b6020015192915050565b60006003821615610d2557506000610884565b606461ffff83160661ffff1615610d3e57506001610884565b61019061ffff83160661ffff1615610d5857506000610884565b506001919050565b600160a060020a031660009081526001602052604090205490565b6000610d85611490565b610d8e42611445565b600160a060020a0390931660009081526005602090815260408083208187015160ff90811685529083528184208388015190911684528252808320955161ffff168352949052929092205492915050565b60065474010000000000000000000000000000000000000000900460ff1681565b60001901600061019082046064830460048404030192915050565b60008260ff1660011480610e3257508260ff166003145b80610e4057508260ff166005145b80610e4e57508260ff166007145b80610e5c57508260ff166008145b80610e6a57508260ff16600a145b80610e7857508260ff16600c145b15610e855750601f610edd565b8260ff1660041480610e9a57508260ff166006145b80610ea857508260ff166009145b80610eb657508260ff16600b145b15610ec35750601e610edd565b610ecc82610d12565b15610ed95750601d610edd565b50601c5b92915050565b6000805433600160a060020a03908116911614610eff57600080fd5b600160a060020a03821660009081526002602052604081205411610f2257600080fd5b50600160a060020a03808216600081815260026020908152604080832080549084905560065482517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101969096526024860182905291519095919091169363a9059cbb9360448083019493928390030190829087803b15801561083157600080fd5b60065433600160a060020a03908116911614610a7b57600080fd5b60005433600160a060020a03908116911614610fdf57600080fd5b600160a060020a03821660009081526001602052604090205461100290826112e1565b600160a060020a0390921660009081526001602052604090209190915550565b6000805433600160a060020a0390811691161461103e57600080fd5b50600160a060020a0381166000908152600460205260408120549081111561086857600160a060020a0382166000818152600460205260408082208290555183156108fc0291849190818181858888f19350505050158015610a7b573d6000803e3d6000fd5b6000805433600160a060020a039081169116146110c057600080fd5b600160a060020a0383166000908152600460205260409020546110e390836112e1565b600160a060020a03841660009081526004602052604090205550600192915050565b60046020526000908152604090205481565b60005433600160a060020a0390811691161461113257600080fd5b600160a060020a038116151561114757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006111b9611490565b60005433600160a060020a039081169116146111d457600080fd5b600160a060020a0385166000908152600460205260409020548311156111f957600080fd5b600160a060020a03851660009081526004602052604090205461121c908461145e565b600160a060020a03861660009081526004602052604090205561123e85610d7b565b915061124942611445565b905061125582846112e1565b600160a060020a0380871660009081526005602090815260408083208682015160ff90811685529083528184208784015190911684528252808320865161ffff1684529091528082209390935591519086169185156108fc02918691818181858888f193505050501580156112ce573d6000803e3d6000fd5b505050505050565b6000603c8083610876565b6000828201838110156112f057fe5b9392505050565b6112ff611490565b600080808061130d86610c5b565b61ffff16855261131e6107b2610e00565b855161132d9061ffff16610e00565b039250826301e285000284019350826107b286600001510361ffff16036301e133800284019350600191505b600c60ff8316116113a357611372828660000151610e1b565b60ff16620151800290508584820111156113945760ff821660208601526113a3565b92830192600190910190611359565b600191505b6113ba85602001518660000151610e1b565b60ff168260ff161115156113f7578584620151800111156113e35760ff821660408601526113f7565b6201518093909301926001909101906113a8565b6114008661086c565b60ff166060860152611411866112d6565b60ff16608086015261142286610ac7565b60ff1660a086015261143386610889565b60ff1660c08601525092949350505050565b61144d611490565b611455611490565b6112f0836112f7565b60008282111561146a57fe5b50900390565b61018060405190810160405280600c906020820280388339509192915050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152905600a165627a7a72305820acf1f8a9685163bab45634d65d260f525cb898c4455280466e4a0d8b1e55332d0029

Swarm Source

bzzr://acf1f8a9685163bab45634d65d260f525cb898c4455280466e4a0d8b1e55332d

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.