Contract Overview
Balance: 0 Ether
Transactions: 109409 txns
 Latest 25 txns From a total of 109409 Transactions

TxHash Age From To Value [TxFee]
0x9e55dbc7fa9c3b5c5bc1a5c8dd83bdc93c73ed91074cbfc34e505b85179a2916 43 secs ago0xb8c228a842390595751b1a09a2c4ffaccf12c44b  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000876567
0x5f90a271dc2b761fdfc0fc1442d32b56013129bf8dfd01d35a23f0c4fb37bbf3 43 secs ago0xc98a4df797f0b8155ef38c4701588cbed21a1b26  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x3e85bd833772d3cb423554220d950ed08a5022ba26d5d95db54a760640291f81 58 secs ago0xb8c228a842390595751b1a09a2c4ffaccf12c44b  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x81dc4fe2b6b295f71bdf46694795a6cf455c4e036d05c9a9b0ba77f640798cc51 min ago0xb8c228a842390595751b1a09a2c4ffaccf12c44b  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0xc8840adfef0aa3abae53a83ff188b30b3bb50efab70c6302a0d3d1047847289e1 min ago0x6ca3ee1386f7c05d886211a6378f49bdf9c7ee88  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000881238
0xb1d8c7079ecefbd36905970c08556a9cbe4348aa537f76c0cd5cfcc55fc61c8d1 min ago0x6ca3ee1386f7c05d886211a6378f49bdf9c7ee88  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0xf998faa19867815df573023114326258688fb9ae0f1a7eb58f4411937be228d21 min ago0x6ca3ee1386f7c05d886211a6378f49bdf9c7ee88  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000877335
0x84378be581015432b6dbf36e6416070557a67ccba9c5656a11d7f4ac4d422c651 min ago0x96272c390ae674d3a3e3f1d636f3ae4128afd688  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x1dddacd74138f43c24740daa124eb1ea2dfbfcc7f7630400902b9b473d83cf892 mins ago0x96272c390ae674d3a3e3f1d636f3ae4128afd688  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x86f1319ce0a9349d85c69231f9949a5666be491aec01d6eab2f75b081b4f13292 mins ago0xe610c52cbeb14dc722a9668e59bad46c5e464e55  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000881814
0x8af8458194b17f44bac5faa319d8431aa9ef483ee13092b34307a1647ebe20da2 mins ago0xe610c52cbeb14dc722a9668e59bad46c5e464e55  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x50909f9fb4ac19a1026e4104991dbc40a08302dd65a6b179d7a004bee0342b202 mins ago0xc96c0f2d346a3f0f4bbcfbefe70a75c710d23369  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136337
0x68538db303e75a4dd89d6b0a65f0f50e609474eb3f01b0288548c5cb4ea0b6fc2 mins ago0x69ba6867602d650fc433fd62eabaf17f11fd5132  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000877335
0xf33fd35b9360dcb35cf53c3ccbc00785ce10057062f0f20f6b8dca12057eef6a2 mins ago0xaec1f213677de24842a96e72fe6efbcbc2b77ca5  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0xecc6191359d800454c26e03b8c590b60692b82c6399a868d5d4ecb293560aa803 mins ago0x69ba6867602d650fc433fd62eabaf17f11fd5132  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x735d1e86fc0ac9e519cc5596113907790193fd4f36160114853428807417628c3 mins ago0x0a65d5dccc87ecb21bc4b24c16a3c01e0cdd42ac  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000808113
0x3d7a65a5fb125b5e80a2f35be83aae3aed74070ce52ee89fad38c11448bf4b343 mins ago0x69ba6867602d650fc433fd62eabaf17f11fd5132  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x67677f773f9bc8bff777e2531f136db05763be75a45ee982e38cde92d2438d733 mins ago0x0a65d5dccc87ecb21bc4b24c16a3c01e0cdd42ac  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x83272161f56f817202275365948faa6172fe60145f4af1f6701295ded319e5753 mins ago0x3ebe227e9fd42bb97b9a950e4a731d8975263812  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136337
0xd08de3af60d669bd5c7cccbd9d8c12a2e7694190329fe576c08d4212f24c525f4 mins ago0x96272c390ae674d3a3e3f1d636f3ae4128afd688  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x8194468234ee624201d248cb73ccc3134b18d06ea11d60de464b455bb294ccc34 mins ago0x34d950db8e9345a638ba0bee9945d56c9f7728ee  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.000877143
0x800c42c606b1ffb86f8a55cae4caa5d520a2fc84fa951e787c4281a59102ca3b4 mins ago0x34d950db8e9345a638ba0bee9945d56c9f7728ee  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136337
0xd3f2f22bf0e7cb8045fd746e890963331414b5b1fd091f3fac52a037e0d29c884 mins ago0xcb04aae925218094863809ec0289a8fdccfd68cf  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136529
0x6260ec3360013108d37337bb8b34c19277b610479f631318f54bb904bd6ade4e4 mins ago0x4ed2814cd63e83504221424215d0655c6db0b674  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001002321
0x74556ac15bcf4a6db1b4bbc2f231d3bec40f8d2e3303a0651924d87b2bd9fced4 mins ago0x4ed2814cd63e83504221424215d0655c6db0b674  IN   0x1882d681b01e13f2cb3a5b1f8c05496ec02ea0350 Ether0.001136337
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

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



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;
// Not enabled for production yet.
//pragma experimental ABIEncoderV2;

library BN256 {
    struct G1Point {
        uint x;
        uint y;
    }

    struct G2Point {
        uint[2] x;
        uint[2] y;
    }

    function P1() internal pure returns (G1Point) {
        return G1Point(1, 2);
    }

    function P2() internal pure returns (G2Point) {
        return G2Point(
            [11559732032986387107991004021392285783925812861821192530917403151452391805634,
            10857046999023057135944570762232829481370756359578518086990519993285655852781],

            [4082367875863433681332203403145435568316851327593401208105741076214120093531,
            8495653923123431417604973247489272438418190587263600148770280649306958101930]
        );
    }

    function pointAdd(G1Point p1, G1Point p2) internal returns (G1Point r) {
        uint[4] memory input;
        input[0] = p1.x;
        input[1] = p1.y;
        input[2] = p2.x;
        input[3] = p2.y;
        assembly {
            if iszero(call(sub(gas, 2000), 0x6, 0, input, 0x80, r, 0x40)) {
                revert(0, 0)
            }
        }
    }

    function scalarMul(G1Point p, uint s) internal returns (G1Point r) {
        uint[3] memory input;
        input[0] = p.x;
        input[1] = p.y;
        input[2] = s;
        assembly {
            if iszero(call(sub(gas, 2000), 0x7, 0, input, 0x60, r, 0x40)) {
                revert(0, 0)
            }
        }
    }

    function hashToG1(bytes data) internal returns (G1Point) {
        uint256 h = uint256(keccak256(data));
        return scalarMul(P1(), h);
    }

    // @return the result of computing the pairing check
    // check passes if e(p1[0], p2[0]) *  .... * e(p1[n], p2[n]) == 1
    function pairingCheck(G1Point[] p1, G2Point[] p2) internal returns (bool) {
        require(p1.length == p2.length);
        uint elements = p1.length;
        uint inputSize = elements * 6;
        uint[] memory input = new uint[](inputSize);

        for (uint i = 0; i < elements; i++)
        {
            input[i * 6 + 0] = p1[i].x;
            input[i * 6 + 1] = p1[i].y;
            input[i * 6 + 2] = p2[i].x[0];
            input[i * 6 + 3] = p2[i].x[1];
            input[i * 6 + 4] = p2[i].y[0];
            input[i * 6 + 5] = p2[i].y[1];
        }

        uint[1] memory out;
        bool success;
        assembly {
            success := call(
                sub(gas, 2000),
                0x8,
                0,
                add(input, 0x20),
                mul(inputSize, 0x20),
                out, 0x20
            )
        }
        return success && (out[0] != 0);
    }
}

interface UserContractInterface {
    // Query callback.
    function __callback__(uint, bytes) external;
    // Random number callback.
    function __callback__(uint, uint) external;
}

contract DOSProxy {
    using BN256 for *;

    struct PendingRequest {
        uint requestId;
        BN256.G2Point handledGroup;
        // User contract issued the query.
        address callbackAddr;
    }

    uint requestIdSeed;
    uint groupSize;
    uint[] nodeId;
    // calling requestId => PendingQuery metadata
    mapping(uint => PendingRequest) PendingRequests;
    // Note: Make atomic changes to group metadata below.
    BN256.G2Point[] groupPubKeys;
    // groupIdentifier => isExisted
    mapping(bytes32 => bool) groups;
    //publicKey => publicKey appearance
    mapping(bytes32 => uint) pubKeyCounter;
    // Note: Make atomic changes to randomness metadata below.
    uint public lastUpdatedBlock;
    uint public lastRandomness;
    BN256.G2Point lastHandledGroup;
    uint8 constant TrafficSystemRandom = 0;
    uint8 constant TrafficUserRandom = 1;
    uint8 constant TrafficUserQuery = 2;

    event LogUrl(
        uint queryId,
        uint timeout,
        string dataSource,
        string selector,
        uint randomness,
        // Log G2Point struct directly is an experimental feature, use with care.
        uint[4] dispatchedGroup
    );
    event LogRequestUserRandom(
        uint requestId,
        uint lastSystemRandomness,
        uint userSeed,
        uint[4] dispatchedGroup
    );
    event LogNonSupportedType(string invalidSelector);
    event LogNonContractCall(address from);
    event LogCallbackTriggeredFor(address callbackAddr);
    event LogRequestFromNonExistentUC();
    event LogUpdateRandom(uint lastRandomness, uint[4] dispatchedGroup);
    event LogValidationResult(
        uint8 trafficType,
        uint trafficId,
        bytes message,
        uint[2] signature,
        uint[4] pubKey,
        bool pass
    );
    event LogInsufficientGroupNumber();
    event LogGrouping(uint[] NodeId);
    event LogPublicKeyAccepted(uint x1, uint x2, uint y1, uint y2);

    // whitelist state variables used only for alpha release.
    // Index starting from 1.
    address[22] whitelists;
    // whitelisted address => index in whitelists.
    mapping(address => uint) isWhitelisted;
    bool public whitelistInitialized = false;
    event WhitelistAddressTransferred(address previous, address curr);

    modifier onlyWhitelisted {
        uint idx = isWhitelisted[msg.sender];
        require(idx != 0 && whitelists[idx] == msg.sender, "Not whitelisted!");
        _;
    }

    function initWhitelist(address[21] addresses) public {
        require(!whitelistInitialized, "Whitelist already initialized!");

        for (uint idx = 0; idx < 21; idx++) {
            whitelists[idx+1] = addresses[idx];
            isWhitelisted[addresses[idx]] = idx+1;
        }
        whitelistInitialized = true;
    }

    function getWhitelistAddress(uint idx) public view returns (address) {
        require(idx > 0 && idx <= 21, "Index out of range");
        return whitelists[idx];
    }

    function transferWhitelistAddress(address newWhitelistedAddr)
        public
        onlyWhitelisted
    {
        require(newWhitelistedAddr != 0x0 && newWhitelistedAddr != msg.sender);

        emit WhitelistAddressTransferred(msg.sender, newWhitelistedAddr);
        whitelists[isWhitelisted[msg.sender]] = newWhitelistedAddr;
    }

    function getCodeSize(address addr) internal constant returns (uint size) {
        assembly {
            size := extcodesize(addr)
        }
    }

    // Returns query id.
    // TODO: restrict query from subscribed/paid calling contracts.
    function query(
        address from,
        uint timeout,
        string dataSource,
        string selector
    )
        external
        returns (uint)
    {
        if (getCodeSize(from) > 0) {
            bytes memory bs = bytes(selector);
            // '': Return whole raw response;
            // Starts with '$': response format is parsed as json.
            // Starts with '/': response format is parsed as xml/html.
            if (bs.length == 0 || bs[0] == '$' || bs[0] == '/') {
                uint queryId = uint(keccak256(abi.encodePacked(
                    ++requestIdSeed, from, timeout, dataSource, selector)));
                uint idx = lastRandomness % groupPubKeys.length;
                PendingRequests[queryId] =
                    PendingRequest(queryId, groupPubKeys[idx], from);
                emit LogUrl(
                    queryId,
                    timeout,
                    dataSource,
                    selector,
                    lastRandomness,
                    getGroupPubKey(idx)
                );
                return queryId;
            } else {
                emit LogNonSupportedType(selector);
                return 0x0;
            }
        } else {
            // Skip if @from is not contract address.
            emit LogNonContractCall(from);
            return 0x0;
        }
    }

    // Request a new user-level random number.
    function requestRandom(address from, uint8 mode, uint userSeed)
        external
        returns (uint)
    {
        // fast mode
        if (mode == 0) {
            return uint(keccak256(abi.encodePacked(
                ++requestIdSeed,lastRandomness, userSeed)));
        } else if (mode == 1) {
            // safe mode
            // TODO: restrict request from paid calling contract address.
            uint requestId = uint(keccak256(abi.encodePacked(
                ++requestIdSeed, from, userSeed)));
            uint idx = lastRandomness % groupPubKeys.length;
            PendingRequests[requestId] =
                PendingRequest(requestId, groupPubKeys[idx], from);
            // sign(requestId ||lastSystemRandomness || userSeed) with
            // selected group
            emit LogRequestUserRandom(
                requestId,
                lastRandomness,
                userSeed,
                getGroupPubKey(idx)
            );
            return requestId;
        } else {
            revert("Non-supported random request");
        }
    }

    // Random submitter validation + group signature verification.
    function validateAndVerify(
        uint8 trafficType,
        uint trafficId,
        bytes data,
        BN256.G1Point signature,
        BN256.G2Point grpPubKey
    )
        internal
        onlyWhitelisted
        returns (bool)
    {
        // Validation
        // TODO
        // 1. Check msg.sender from registered and staked node operator.
        // 2. Check msg.sender is a member in Group(grpPubKey).
        // Clients actually signs (data || addr(selected_submitter)).
        // TODO: Sync and change to sign ( sha256(data) || address )
        bytes memory message = abi.encodePacked(data, msg.sender);

        // Verification
        BN256.G1Point[] memory p1 = new BN256.G1Point[](2);
        BN256.G2Point[] memory p2 = new BN256.G2Point[](2);
        // The signature has already been applied neg() function offchainly to
        // fit requirement of pairingCheck function
        p1[0] = signature;
        p1[1] = BN256.hashToG1(message);
        p2[0] = BN256.P2();
        p2[1] = grpPubKey;
        bool passVerify = BN256.pairingCheck(p1, p2);
        emit LogValidationResult(
            trafficType,
            trafficId,
            message,
            [signature.x, signature.y],
            [grpPubKey.x[0], grpPubKey.x[1], grpPubKey.y[0], grpPubKey.y[1]],
            passVerify
        );
        return passVerify;
    }

    function triggerCallback(
        uint requestId,
        uint8 trafficType,
        bytes result,
        uint[2] sig
    )
        external
    {
        if (!validateAndVerify(
                trafficType,
                requestId,
                result,
                BN256.G1Point(sig[0], sig[1]),
                PendingRequests[requestId].handledGroup))
        {
            return;
        }

        address ucAddr = PendingRequests[requestId].callbackAddr;
        if (ucAddr == 0x0) {
            emit LogRequestFromNonExistentUC();
            return;
        }

        emit LogCallbackTriggeredFor(ucAddr);
        delete PendingRequests[requestId];
        if (trafficType == TrafficUserQuery) {
            UserContractInterface(ucAddr).__callback__(requestId, result);
        } else if (trafficType == TrafficUserRandom) {
            // Safe random number is the collectively signed threshold signature
            // of the message (requestId || lastRandomness || userSeed ||
            // selected sender in group).
            UserContractInterface(ucAddr).__callback__(
                requestId, uint(keccak256(abi.encodePacked(sig[0], sig[1]))));
        } else {
            revert("Unsupported traffic type");
        }
    }

    function toBytes(uint x) internal pure returns (bytes b) {
        b = new bytes(32);
        assembly { mstore(add(b, 32), x) }
    }

    // System-level secure distributed random number generator.
    function updateRandomness(uint[2] sig) external {
        if (!validateAndVerify(
                TrafficSystemRandom,
                lastRandomness,
                toBytes(lastRandomness),
                BN256.G1Point(sig[0], sig[1]),
                lastHandledGroup))
        {
            return;
        }
        // Update new randomness = sha3(collectively signed group signature)
        lastRandomness = uint(keccak256(abi.encodePacked(sig[0], sig[1])));
        lastUpdatedBlock = block.number - 1;
        uint idx = lastRandomness % groupPubKeys.length;
        lastHandledGroup = groupPubKeys[idx];
        // Signal selected off-chain clients to collectively generate a new
        // system level random number for next round.
        emit LogUpdateRandom(lastRandomness, getGroupPubKey(idx));
    }

    // For alpha. To trigger first random number after grouping has done
    // or timeout.
    function fireRandom() public onlyWhitelisted {
        lastRandomness = uint(keccak256(abi.encode(blockhash(block.number - 1))));
        lastUpdatedBlock = block.number - 1;
        uint idx = lastRandomness % groupPubKeys.length;
        lastHandledGroup = groupPubKeys[idx];
        // Signal off-chain clients
        emit LogUpdateRandom(lastRandomness, getGroupPubKey(idx));
    }

    function handleTimeout() public onlyWhitelisted {
        uint currentBlockNumber = block.number - 1;
        if (currentBlockNumber - lastUpdatedBlock > 5) {
            fireRandom();
        }
    }

    function setPublicKey(uint x1, uint x2, uint y1, uint y2)
        public
        onlyWhitelisted
    {
        bytes32 groupId = keccak256(abi.encodePacked(x1, x2, y1, y2));
        require(!groups[groupId], "group has already registered");

        pubKeyCounter[groupId] = pubKeyCounter[groupId] + 1;
        if (pubKeyCounter[groupId] > groupSize / 2) {
            groupPubKeys.push(BN256.G2Point([x1, x2], [y1, y2]));
            groups[groupId] = true;
            delete(pubKeyCounter[groupId]);
            emit LogPublicKeyAccepted(x1, x2, y1, y2);
        }
    }

    function getGroupPubKey(uint idx) public constant returns (uint[4]) {
        require(idx < groupPubKeys.length, "group index out of range");

        return [
            groupPubKeys[idx].x[0], groupPubKeys[idx].x[1],
            groupPubKeys[idx].y[0], groupPubKeys[idx].y[1]
        ];
    }

    function uploadNodeId(uint id) public onlyWhitelisted {
        nodeId.push(id);
    }

    function grouping(uint size) public onlyWhitelisted {
        groupSize = size;
        uint[] memory toBeGrouped = new uint[](size);
        if (nodeId.length < size) {
            emit LogInsufficientGroupNumber();
            return;
        }
        for (uint i = 0; i < size; i++) {
            toBeGrouped[i] = nodeId[nodeId.length - 1];
            nodeId.length--;
        }
        emit LogGrouping(toBeGrouped);
    }

    function resetContract() public onlyWhitelisted {
        nodeId.length = 0;
        groupPubKeys.length = 0;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"sig","type":"uint256[2]"}],"name":"updateRandomness","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"mode","type":"uint8"},{"name":"userSeed","type":"uint256"}],"name":"requestRandom","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"idx","type":"uint256"}],"name":"getWhitelistAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"whitelistInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"requestId","type":"uint256"},{"name":"trafficType","type":"uint8"},{"name":"result","type":"bytes"},{"name":"sig","type":"uint256[2]"}],"name":"triggerCallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x1","type":"uint256"},{"name":"x2","type":"uint256"},{"name":"y1","type":"uint256"},{"name":"y2","type":"uint256"}],"name":"setPublicKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"idx","type":"uint256"}],"name":"getGroupPubKey","outputs":[{"name":"","type":"uint256[4]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"resetContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"timeout","type":"uint256"},{"name":"dataSource","type":"string"},{"name":"selector","type":"string"}],"name":"query","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"fireRandom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"size","type":"uint256"}],"name":"grouping","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addresses","type":"address[21]"}],"name":"initWhitelist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastRandomness","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newWhitelistedAddr","type":"address"}],"name":"transferWhitelistAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"uploadNodeId","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastUpdatedBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"handleTimeout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"queryId","type":"uint256"},{"indexed":false,"name":"timeout","type":"uint256"},{"indexed":false,"name":"dataSource","type":"string"},{"indexed":false,"name":"selector","type":"string"},{"indexed":false,"name":"randomness","type":"uint256"},{"indexed":false,"name":"dispatchedGroup","type":"uint256[4]"}],"name":"LogUrl","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"requestId","type":"uint256"},{"indexed":false,"name":"lastSystemRandomness","type":"uint256"},{"indexed":false,"name":"userSeed","type":"uint256"},{"indexed":false,"name":"dispatchedGroup","type":"uint256[4]"}],"name":"LogRequestUserRandom","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"invalidSelector","type":"string"}],"name":"LogNonSupportedType","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"}],"name":"LogNonContractCall","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"callbackAddr","type":"address"}],"name":"LogCallbackTriggeredFor","type":"event"},{"anonymous":false,"inputs":[],"name":"LogRequestFromNonExistentUC","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"lastRandomness","type":"uint256"},{"indexed":false,"name":"dispatchedGroup","type":"uint256[4]"}],"name":"LogUpdateRandom","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trafficType","type":"uint8"},{"indexed":false,"name":"trafficId","type":"uint256"},{"indexed":false,"name":"message","type":"bytes"},{"indexed":false,"name":"signature","type":"uint256[2]"},{"indexed":false,"name":"pubKey","type":"uint256[4]"},{"indexed":false,"name":"pass","type":"bool"}],"name":"LogValidationResult","type":"event"},{"anonymous":false,"inputs":[],"name":"LogInsufficientGroupNumber","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"NodeId","type":"uint256[]"}],"name":"LogGrouping","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"x1","type":"uint256"},{"indexed":false,"name":"x2","type":"uint256"},{"indexed":false,"name":"y1","type":"uint256"},{"indexed":false,"name":"y2","type":"uint256"}],"name":"LogPublicKeyAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previous","type":"address"},{"indexed":false,"name":"curr","type":"address"}],"name":"WhitelistAddressTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60806040526024805460ff1916905534801561001a57600080fd5b506126878061002a6000396000f3006080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166309ac86d381146100f55780631bf820571461010e578063565853af1461014a5780636786ebdb1461017e57806374ad3a06146101a757806379a924c5146101d457806392021653146101f5578063b181a8fc14610245578063b7fb8fd71461025a578063ea5cba1314610297578063eab14fe6146102ac578063f13a9626146102c4578063f2a3072d14610309578063f879d59e1461031e578063f89a15f71461033f578063f90ce5ba14610357578063fcfafeb61461036c575b600080fd5b34801561010157600080fd5b5061010c6004610381565b005b34801561011a57600080fd5b50610138600160a060020a036004351660ff60243516604435610582565b60408051918252519081900360200190f35b34801561015657600080fd5b50610162600435610908565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b5061019361098e565b604080519115158252519081900360200190f35b3480156101b357600080fd5b5061010c60048035906024803560ff16916044359182019101356064610997565b3480156101e057600080fd5b5061010c600435602435604435606435610d66565b34801561020157600080fd5b5061020d600435611009565b6040518082608080838360005b8381101561023257818101518382015260200161021a565b5050505090500191505060405180910390f35b34801561025157600080fd5b5061010c611116565b34801561026657600080fd5b5061013860048035600160a060020a03169060248035916044358083019290820135916064359182019101356111aa565b3480156102a357600080fd5b5061010c611659565b3480156102b857600080fd5b5061010c6004356117de565b3480156102d057600080fd5b50604080516102a081810190925261010c9136916004916102a4919083906015908390839080828437509396506119a295505050505050565b34801561031557600080fd5b50610138611aa9565b34801561032a57600080fd5b5061010c600160a060020a0360043516611aaf565b34801561034b57600080fd5b5061010c600435611be6565b34801561036357600080fd5b50610138611c95565b34801561037857600080fd5b5061010c611c9b565b60006104226000600854610396600854611d2f565b604080518082018252873581526020808901359082015281516080810180845291929091600991839190820190839060029082845b8154815260200190600101908083116103cb57505050918352505060408051808201918290526020909201919060028481019182845b81548152602001906001019080831161040157505050505081525050611d5a565b151561042d5761057e565b6040805183356020828101919091528085013582840152825180830384018152606090920192839052815191929182918401908083835b602083106104835780518252601f199092019160209182019101610464565b5181516000196020949094036101000a84019081169019919091161790526040519390910183900390922060088190554390920160075550600454925090508115156104cb57fe5b0690506004818154811015156104dd57fe5b6000918252602090912060049091020160096104fb8183600261246f565b5061050e6002828101908481019061246f565b509050507f53efa859df0bc08bb5328b1c341f3fd0dfe6bc6032794520dedab0581a8b9d7e60085461053f83611009565b6040518281526020810182608080838360005b8381101561056a578181015183820152602001610552565b505050509050019250505060405180910390a15b5050565b6000808060ff85161515610632576000808154600101919050819055600854856040516020018084815260200183815260200182815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106105fe5780518252601f1990920191602091820191016105df565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095506108ff92505050565b8460ff16600114156108af576000805460010190819055604080516020808201939093526c01000000000000000000000000600160a060020a038a160281830152605480820188905282518083039091018152607490910191829052805190928291908401908083835b602083106106bb5780518252601f19909201916020918201910161069c565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912060045460085491965093509150508115156106fb57fe5b06905060606040519081016040528083815260200160048381548110151561071f57fe5b6000918252602090912060408051608081018083529093600402909201918391820190839060029082845b81548152602001906001019080831161074a57505050918352505060408051808201918290526020909201919060028481019182845b81548152602001906001019080831161078057505050919092525050508152600160a060020a038816602091820152600084815260038252604090208251815590820151805160018301906107d890829060026124aa565b5060208201516107ee90600280840191906124aa565b505050604091909101516005909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790556008547f2360a8896e2f161ae820a150126e008bdb1b69f37460481dfee46a5fd04c0fd09083908661085885611009565b6040518085815260200184815260200183815260200182600460200280838360005b8381101561089257818101518382015260200161087a565b5050505090500194505050505060405180910390a18192506108ff565b6040805160e560020a62461bcd02815260206004820152601c60248201527f4e6f6e2d737570706f727465642072616e646f6d207265717565737400000000604482015290519081900360640190fd5b50509392505050565b6000808211801561091a575060158211155b1515610970576040805160e560020a62461bcd02815260206004820152601260248201527f496e646578206f7574206f662072616e67650000000000000000000000000000604482015290519081900360640190fd5b600d826016811061097d57fe5b0154600160a060020a031692915050565b60245460ff1681565b6000610a7e858786868080601f016020809104026020016040519081016040528093929190818152602001838380828437505060408051808201909152935083925089915060009050602090810291909101358252018760016020908102919091013590915260008c81526003909152604090819020815160808101808452600183018054948301948552919391928492918491600291908201606086018083116103cb5750505091835250506040805180820191829052600284810180548352602094850194929390926003870190850180831161040157505050505081525050611d5a565b1515610a8957610d5e565b50600085815260036020526040902060050154600160a060020a0316801515610ada576040517f40d87958cd48e8b698a94f35390a9020a9127528227647da089cc6bfd7931f4290600090a1610d5e565b60408051600160a060020a038316815290517f065d5d7c942a87321bf774d2780cfd4928766b9f04dc6728ab8b4490ef5edaf09181900360200190a16000868152600360205260408120818155906001820181610b3782826124d8565b610b456002830160006124d8565b505050600501805473ffffffffffffffffffffffffffffffffffffffff1916905560ff851660021415610c1057604080517f6d112977000000000000000000000000000000000000000000000000000000008152600481018881526024820192835260448201869052600160a060020a03841692636d112977928a92899289926064018484808284378201915050945050505050600060405180830381600087803b158015610bf357600080fd5b505af1158015610c07573d6000803e3d6000fd5b50505050610d5e565b60ff851660011415610d0e5760408051833560208281019190915280850135828401528251808303840181526060909201928390528151600160a060020a038516936318a1908d938b93909282918401908083835b60208310610c845780518252601f199092019160209182019101610c65565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600190046040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b158015610bf357600080fd5b6040805160e560020a62461bcd02815260206004820152601860248201527f556e737570706f72746564207472616666696320747970650000000000000000604482015290519081900360640190fd5b505050505050565b336000908152602360205260408120548015801590610d9b575033600d8260168110610d8e57fe5b0154600160a060020a0316145b1515610ddf576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b85858585604051602001808581526020018481526020018381526020018281526020019450505050506040516020818303038152906040526040518082805190602001908083835b60208310610e465780518252601f199092019160209182019101610e27565b51815160209384036101000a6000190180199092169116179052604080519290940182900390912060008181526005909252929020549195505060ff16159150610edc9050576040805160e560020a62461bcd02815260206004820152601c60248201527f67726f75702068617320616c7265616479207265676973746572656400000000604482015290519081900360640190fd5b6000828152600660205260409020805460019081019182905554600290041015610d5e576040805160808101825280820188815260608201889052815281518083019092528582526020828101869052810191909152600480546001810180835560008390528351909392919091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190610f7b90829060026124aa565b506020820151610f9190600280840191906124aa565b5050506000838152600560209081526040808320805460ff19166001179055600682528083209290925581518981529081018890528082018790526060810186905290517f5bf077aca7c3c2ae9ca6ebd7da84490edf523227621a171c3c2656b3d45e92fe92509081900360800190a1505050505050565b6110116124e6565b600454821061106a576040805160e560020a62461bcd02815260206004820152601860248201527f67726f757020696e646578206f7574206f662072616e67650000000000000000604482015290519081900360640190fd5b60806040519081016040528060048481548110151561108557fe5b600091825260208220600490910201015481526020016004848154811015156110aa57fe5b600091825260209091206004909102016001015481526020016004848154811015156110d257fe5b600091825260208220600260049092020101015481526020016004848154811015156110fa57fe5b6000918252602090912060036004909202010154905292915050565b33600090815260236020526040902054801580159061114b575033600d826016811061113e57fe5b0154600160a060020a0316145b151561118f576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b600061119c600282612505565b50600061057e60048261252e565b6000606060008060006111bc8b6120c2565b111561160b5785858080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509250825160001480611269575082600081518110151561121157fe5b90602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f2400000000000000000000000000000000000000000000000000000000000000145b806112d6575082600081518110151561127e57fe5b90602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f2f00000000000000000000000000000000000000000000000000000000000000145b156115b25760008081546001019190508190558a8a8a8a8a8a6040516020018088815260200187600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401868152602001858580828437820191505083838082843782019150509750505050505050506040516020818303038152906040526040518082805190602001908083835b602083106113865780518252601f199092019160209182019101611367565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912060045460085491965093509150508115156113c657fe5b0690506060604051908101604052808381526020016004838154811015156113ea57fe5b6000918252602090912060408051608081018083529093600402909201918391820190839060029082845b81548152602001906001019080831161141557505050918352505060408051808201918290526020909201919060028481019182845b81548152602001906001019080831161144b57505050919092525050508152600160a060020a038c16602091820152600084815260038252604090208251815590820151805160018301906114a390829060026124aa565b5060208201516114b990600280840191906124aa565b50505060408201518160050160006101000a815481600160a060020a030219169083600160a060020a031602179055509050507f46ff2d61a5f6d1003044f504417f20609a6fd05bea36d0c8c33b9412683863ae828a8a8a8a8a60085461151f89611009565b60405180898152602001888152602001806020018060200185815260200184600460200280838360005b83811015611561578181015183820152602001611549565b5050505090500183810383528989828181526020019250808284379091018481038352878152602001905087878082843760405192018290039c50909a5050505050505050505050a181935061164c565b7f70714cf695ae953ee67221716a4b4dc9e944909fd2b66f07e790a49d9ac29b4186866040518080602001828103825284848281815260200192508082843760405192018290039550909350505050a16000935061164c565b60408051600160a060020a038c16815290517f6cea43bb3db7220931a7c8ac633e65cbc8e7ba129f2ed84db2e71bc0adb73bb59181900360200190a1600093505b5050509695505050505050565b33600090815260236020526040812054801580159061168e575033600d826016811061168157fe5b0154600160a060020a0316145b15156116d2576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b6040805160001943014060208083019190915282518083038201815291830192839052815191929182918401908083835b602083106117225780518252601f199092019160209182019101611703565b5181516000196020949094036101000a840190811690199190911617905260405193909101839003909220600881905543909201600755506004549250905081151561176a57fe5b06915060048281548110151561177c57fe5b60009182526020909120600490910201600961179a8183600261246f565b506117ad6002828101908481019061246f565b509050507f53efa859df0bc08bb5328b1c341f3fd0dfe6bc6032794520dedab0581a8b9d7e60085461053f84611009565b33600090815260236020526040812054606091908015801590611817575033600d826016811061180a57fe5b0154600160a060020a0316145b151561185b576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b6001849055604080518581526020808702820101909152848015611889578160200160208202803883390190505b506002549093508411156118c5576040517f08a70ba288e836bee6c9b4aea7482ee5ff8f63c5ad9d2533d9cf0ced64adc26290600090a161199c565b600091505b83821015611926576002805460001981019081106118e457fe5b906000526020600020015483838151811015156118fd57fe5b60209081029091010152600280549061191a906000198301612505565b506001909101906118ca565b7f5f30b698cceb472bcb5a80c4acc8c52ea45ea704f5aeeb2527d2d4c95f793dd7836040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015611988578181015183820152602001611970565b505050509050019250505060405180910390a15b50505050565b60245460009060ff1615611a00576040805160e560020a62461bcd02815260206004820152601e60248201527f57686974656c69737420616c726561647920696e697469616c697a6564210000604482015290519081900360640190fd5b5060005b6015811015611a9857818160158110611a1957fe5b6020020151600d6001830160168110611a2e57fe5b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556001810160236000848460158110611a6e57fe5b60209081029190910151600160a060020a0316825281019190915260400160002055600101611a04565b50506024805460ff19166001179055565b60085481565b336000908152602360205260409020548015801590611ae4575033600d8260168110611ad757fe5b0154600160a060020a0316145b1515611b28576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b600160a060020a03821615801590611b495750600160a060020a0382163314155b1515611b5457600080fd5b60408051338152600160a060020a038416602082015281517ff3aa0b55b04020369096a7510cae47a1845da41a17f491a666da539a4870a8a3929181900390910190a1336000908152602360205260409020548290600d9060168110611bb657fe5b01805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b336000908152602360205260409020548015801590611c1b575033600d8260168110611c0e57fe5b0154600160a060020a0316145b1515611c5f576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b50600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0155565b60075481565b336000908152602360205260408120548015801590611cd0575033600d8260168110611cc357fe5b0154600160a060020a0316145b1515611d14576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b60014303915060056007548303111561057e5761057e611659565b6040805160208082528183019092526060918082016104008038833950505060208101929092525090565b336000908152602360205260408120546060908190819084908015801590611d98575033600d8260168110611d8b57fe5b0154600160a060020a0316145b1515611ddc576040805160e560020a62461bcd028152602060048201526010602482015260008051602061263c833981519152604482015290519081900360640190fd5b88336040516020018083805190602001908083835b60208310611e105780518252601f199092019160209182019101611df1565b5181516020939093036101000a6000190180199091169216919091179052600160a060020a03949094166c01000000000000000000000000029190930190815260408051808303600b1901815260026014840181815260748501909352909a50909450925060340190505b611e8361255a565b815260200190600190039081611e7b57505060408051600280825260608201909252919550602082015b611eb5612571565b815260200190600190039081611ead57905050925087846000815181101515611eda57fe5b60209081029091010152611eed856120c6565b846001815181101515611efc57fe5b60209081029091010152611f0e61214b565b836000815181101515611f1d57fe5b602090810290910101528251879084906001908110611f3857fe5b60209081029091010152611f4c848461220c565b6040805180820182528a5181526020808c01518183015282516080810184528b515181528b5182015181830152908b018051519382019390935291519294507fd33c44f7ce166bcd2616c8f4d811261d4d24e1af815f78614683e0c7682c42a5928e928e928a9290919060608201906001602002015181525087604051808760ff1660ff1681526020018681526020018060200185600260200280838360005b83811015612004578181015183820152602001611fec565b5050505090500184600460200280838360005b8381101561202f578181015183820152602001612017565b5050505090500183151515158152602001828103825286818151815260200191508051906020019080838360005b8381101561207557818101518382015260200161205d565b50505050905090810190601f1680156120a25780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a1509998505050505050505050565b3b90565b6120ce61255a565b6000826040518082805190602001908083835b602083106121005780518252601f1990920191602091820191016120e1565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060019004905061214461213e612408565b82612429565b9392505050565b612153612571565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b82527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa6020838101919091528101919091525b90565b60008060006060600061221d612597565b865188516000911461222e57600080fd5b8851955085600602945084604051908082528060200260200182016040528015612262578160200160208202803883390190505b509350600092505b858310156123d757888381518110151561228057fe5b6020908102909101015151845185906006860290811061229c57fe5b6020908102909101015288518990849081106122b457fe5b906020019060200201516020015184846006026001018151811015156122d657fe5b6020908102909101015287518890849081106122ee57fe5b60209081029190910101515151845185906002600687020190811061230f57fe5b60209081029091010152875188908490811061232757fe5b602090810291909101810151510151845185906003600687020190811061234a57fe5b60209081029091010152875188908490811061236257fe5b602090810291909101810151015151845185906004600687020190811061238557fe5b60209081029091010152875188908490811061239d57fe5b602090810291909101810151810151015184518590600560068702019081106123c257fe5b6020908102909101015260019092019161226a565b6020826020870260208701600060086107d05a03f190508080156123fb5750815115155b9998505050505050505050565b61241061255a565b5060408051808201909152600181526002602082015290565b61243161255a565b6124396125b6565b8351815260208085015190820152604080820184905282606083600060076107d05a03f1151561246857600080fd5b5092915050565b826002810192821561249a579182015b8281111561249a57825482559160010191906001019061247f565b506124a69291506125d5565b5090565b826002810192821561249a579160200282015b8281111561249a5782518255916020019190600101906124bd565b506000815560010160009055565b6080604051908101604052806004906020820280388339509192915050565b815481835581811115612529576000838152602090206125299181019083016125d5565b505050565b8154818355818111156125295760040281600402836000526020600020918201910161252991906125ef565b604080518082019091526000808252602082015290565b608060405190810160405280612585612620565b8152602001612592612620565b905290565b6020604051908101604052806001906020820280388339509192915050565b6060604051908101604052806003906020820280388339509192915050565b61220991905b808211156124a657600081556001016125db565b61220991905b808211156124a657600061260982826124d8565b6126176002830160006124d8565b506004016125f5565b6040805180820182529060029082908038833950919291505056004e6f742077686974656c69737465642100000000000000000000000000000000a165627a7a72305820f26a79a398df92d3a89e3144504cc9d1239bc63073c9bbd757b45e4b5896addc0029

   Swarm Source:
bzzr://f26a79a398df92d3a89e3144504cc9d1239bc63073c9bbd757b45e4b5896addc

 

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