ETH Price: $2,188.22 (+6.98%)
Gas: 1.02 Gwei

Contract

0xF912eFb4E59Cd2910D90a78b1c1491a870c54b12
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Random83607212019-08-16 9:42:102401 days ago1565948530IN
0xF912eFb4...870c54b12
0 ETH0.0017175610
Random83607172019-08-16 9:41:402401 days ago1565948500IN
0xF912eFb4...870c54b12
0 ETH0.0017175610
Random83607112019-08-16 9:40:052401 days ago1565948405IN
0xF912eFb4...870c54b12
0 ETH0.0017175610
Random83607072019-08-16 9:39:312401 days ago1565948371IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83607022019-08-16 9:38:032401 days ago1565948283IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606972019-08-16 9:37:052401 days ago1565948225IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606942019-08-16 9:36:402401 days ago1565948200IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606902019-08-16 9:35:302401 days ago1565948130IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606852019-08-16 9:34:152401 days ago1565948055IN
0xF912eFb4...870c54b12
0 ETH0.001545229
Random83606792019-08-16 9:33:432401 days ago1565948023IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606692019-08-16 9:31:532401 days ago1565947913IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606652019-08-16 9:30:362401 days ago1565947836IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606622019-08-16 9:29:592401 days ago1565947799IN
0xF912eFb4...870c54b12
0 ETH0.00154589
Random83606552019-08-16 9:29:172401 days ago1565947757IN
0xF912eFb4...870c54b12
0 ETH0.001202297
Random83606452019-08-16 9:26:022401 days ago1565947562IN
0xF912eFb4...870c54b12
0 ETH0.001202297
Random82650882019-08-01 13:31:182416 days ago1564666278IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650752019-08-01 13:28:202416 days ago1564666100IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650702019-08-01 13:27:282416 days ago1564666048IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650692019-08-01 13:27:232416 days ago1564666043IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650592019-08-01 13:24:232416 days ago1564665863IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650552019-08-01 13:23:282416 days ago1564665808IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650492019-08-01 13:22:272416 days ago1564665747IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650402019-08-01 13:20:172416 days ago1564665617IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650322019-08-01 13:18:412416 days ago1564665521IN
0xF912eFb4...870c54b12
0 ETH0.000858785
Random82650302019-08-01 13:17:482416 days ago1564665468IN
0xF912eFb4...870c54b12
0 ETH0.000858785
View all transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ZmineRandom

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-10-01
*/

pragma solidity 0.4.25;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
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.
     */
    constructor() 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));
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
}

/**
 * @title Authorizable
 * @dev The Authorizable contract has authorized addresses, and provides basic authorization control
 * functions, this simplifies the implementation of "multiple user permissions".
 */
contract Authorizable is Ownable {
    
    mapping(address => bool) public authorized;
    event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);

    /**
     * @dev The Authorizable constructor sets the first `authorized` of the contract to the sender
     * account.
     */
    constructor() public {
        authorize(msg.sender);
    }

    /**
     * @dev Throws if called by any account other than the authorized.
     */
    modifier onlyAuthorized() {
        require(authorized[msg.sender]);
        _;
    }

    /**
     * @dev Allows 
     * @param _address The address to change authorization.
     */
    function authorize(address _address) public onlyOwner {
        require(!authorized[_address]);
        emit AuthorizationSet(_address, true);
        authorized[_address] = true;
    }
    /**
     * @dev Disallows
     * @param _address The address to change authorization.
     */
    function deauthorize(address _address) public onlyOwner {
        require(authorized[_address]);
        emit AuthorizationSet(_address, false);
        authorized[_address] = false;
    }
}

contract ZmineRandom is Authorizable {
    
    uint256 public counter = 0;
    mapping(uint256 => uint256) public randomResultMap;
    mapping(uint256 => uint256[]) public randomInputMap;
    
 
    function random(uint256 min, uint256 max, uint256 lotto) public onlyAuthorized  {
        
		require(min > 0);
        require(max > min);
         
        counter++;
        uint256 result = ((uint256(keccak256(abi.encodePacked(lotto))) 
                        + uint256(keccak256(abi.encodePacked(counter))) 
                        + uint256(keccak256(abi.encodePacked(block.difficulty)))
                        + uint256(keccak256(abi.encodePacked(block.number - 1)))
                    ) % (max-min+1)) - min;
        
        uint256[] memory array = new uint256[](5);
        array[0] = min;
        array[1] = max;
        array[2] = lotto;
        array[3] = block.difficulty;
        array[4] = block.number;
        randomInputMap[counter] = array;
         
        randomResultMap[counter] = result;
    }

    function checkHash(uint256 n) public pure returns (uint256){
        return uint256(keccak256(abi.encodePacked(n)));
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"deauthorize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"n","type":"uint256"}],"name":"checkHash","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"counter","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"min","type":"uint256"},{"name":"max","type":"uint256"},{"name":"lotto","type":"uint256"}],"name":"random","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"authorize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"randomResultMap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"authorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"randomInputMap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"addressAuthorized","type":"address"},{"indexed":true,"name":"authorization","type":"bool"}],"name":"AuthorizationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

6080604052600060028190558054600160a060020a0319163390811790915561003090640100000000610035810204565b6100d0565b600054600160a060020a0316331461004c57600080fd5b600160a060020a03811660009081526001602052604090205460ff161561007257600080fd5b604051600190600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f473290600090a3600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b61085f806100df6000396000f3006080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166327c97fa581146100a85780633d76b7a3146100cb57806361bc221a146100f55780637299054c1461010a5780638da5cb5b14610128578063b6a5d7de14610159578063b9035c171461017a578063b918161114610192578063f2fde38b146101c7578063f65a74dc146101e8575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610203565b005b3480156100d757600080fd5b506100e3600435610298565b60408051918252519081900360200190f35b34801561010157600080fd5b506100e361031b565b34801561011657600080fd5b506100c9600435602435604435610321565b34801561013457600080fd5b5061013d610636565b60408051600160a060020a039092168252519081900360200190f35b34801561016557600080fd5b506100c9600160a060020a0360043516610645565b34801561018657600080fd5b506100e36004356106e0565b34801561019e57600080fd5b506101b3600160a060020a03600435166106f2565b604080519115158252519081900360200190f35b3480156101d357600080fd5b506100c9600160a060020a0360043516610707565b3480156101f457600080fd5b506100e360043560243561079b565b600054600160a060020a0316331461021a57600080fd5b600160a060020a03811660009081526001602052604090205460ff16151561024157600080fd5b604051600090600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f4732908390a3600160a060020a03166000908152600160205260409020805460ff19169055565b600081604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106102e95780518252601f1990920191602091820191016102ca565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b60025481565b3360009081526001602052604081205460609060ff16151561034257600080fd5b6000851161034f57600080fd5b84841161035b57600080fd5b6002805460019081019091556040805160001943016020808301919091528251808303820181529183019283905281518994858a030193918291908401908083835b602083106103bc5780518252601f19909201916020918201910161039d565b51815160209384036101000a60001901801990921691161790526040805192909401829003822044838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104295780518252601f19909201916020918201910161040a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600254838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104985780518252601f199092019160209182019101610479565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282018e90528451808403830181529285019485905282519096509194508392508401908083835b602083106105065780518252601f1990920191602091820191016104e7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900401010181151561054357fe5b060391506005604051908082528060200260200182016040528015610572578160200160208202803883390190505b5090508481600081518110151561058557fe5b6020908102909101015280518490829060019081106105a057fe5b6020908102909101015280518390829060029081106105bb57fe5b6020908102909101015280514490829060039081106105d657fe5b6020908102909101015280514390829060049081106105f157fe5b602090810290910181019190915260025460009081526004825260409020825161061d928401906107cb565b5050600254600090815260036020526040902055505050565b600054600160a060020a031681565b600054600160a060020a0316331461065c57600080fd5b600160a060020a03811660009081526001602052604090205460ff161561068257600080fd5b604051600190600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f473290600090a3600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b60036020526000908152604090205481565b60016020526000908152604090205460ff1681565b600054600160a060020a0316331461071e57600080fd5b600160a060020a038116151561073357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6004602052816000526040600020818154811015156107b657fe5b90600052602060002001600091509150505481565b828054828255906000526020600020908101928215610806579160200282015b828111156108065782518255916020019190600101906107eb565b50610812929150610816565b5090565b61083091905b80821115610812576000815560010161081c565b905600a165627a7a72305820472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe20029

Deployed Bytecode

0x6080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166327c97fa581146100a85780633d76b7a3146100cb57806361bc221a146100f55780637299054c1461010a5780638da5cb5b14610128578063b6a5d7de14610159578063b9035c171461017a578063b918161114610192578063f2fde38b146101c7578063f65a74dc146101e8575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610203565b005b3480156100d757600080fd5b506100e3600435610298565b60408051918252519081900360200190f35b34801561010157600080fd5b506100e361031b565b34801561011657600080fd5b506100c9600435602435604435610321565b34801561013457600080fd5b5061013d610636565b60408051600160a060020a039092168252519081900360200190f35b34801561016557600080fd5b506100c9600160a060020a0360043516610645565b34801561018657600080fd5b506100e36004356106e0565b34801561019e57600080fd5b506101b3600160a060020a03600435166106f2565b604080519115158252519081900360200190f35b3480156101d357600080fd5b506100c9600160a060020a0360043516610707565b3480156101f457600080fd5b506100e360043560243561079b565b600054600160a060020a0316331461021a57600080fd5b600160a060020a03811660009081526001602052604090205460ff16151561024157600080fd5b604051600090600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f4732908390a3600160a060020a03166000908152600160205260409020805460ff19169055565b600081604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106102e95780518252601f1990920191602091820191016102ca565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b60025481565b3360009081526001602052604081205460609060ff16151561034257600080fd5b6000851161034f57600080fd5b84841161035b57600080fd5b6002805460019081019091556040805160001943016020808301919091528251808303820181529183019283905281518994858a030193918291908401908083835b602083106103bc5780518252601f19909201916020918201910161039d565b51815160209384036101000a60001901801990921691161790526040805192909401829003822044838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104295780518252601f19909201916020918201910161040a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600254838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104985780518252601f199092019160209182019101610479565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282018e90528451808403830181529285019485905282519096509194508392508401908083835b602083106105065780518252601f1990920191602091820191016104e7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900401010181151561054357fe5b060391506005604051908082528060200260200182016040528015610572578160200160208202803883390190505b5090508481600081518110151561058557fe5b6020908102909101015280518490829060019081106105a057fe5b6020908102909101015280518390829060029081106105bb57fe5b6020908102909101015280514490829060039081106105d657fe5b6020908102909101015280514390829060049081106105f157fe5b602090810290910181019190915260025460009081526004825260409020825161061d928401906107cb565b5050600254600090815260036020526040902055505050565b600054600160a060020a031681565b600054600160a060020a0316331461065c57600080fd5b600160a060020a03811660009081526001602052604090205460ff161561068257600080fd5b604051600190600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f473290600090a3600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b60036020526000908152604090205481565b60016020526000908152604090205460ff1681565b600054600160a060020a0316331461071e57600080fd5b600160a060020a038116151561073357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6004602052816000526040600020818154811015156107b657fe5b90600052602060002001600091509150505481565b828054828255906000526020600020908101928215610806579160200282015b828111156108065782518255916020019190600101906107eb565b50610812929150610816565b5090565b61083091905b80821115610812576000815560010161081c565b905600a165627a7a72305820472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe20029

Swarm Source

bzzr://472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe2

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.