Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 149 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Random | 8360721 | 2401 days ago | IN | 0 ETH | 0.00171756 | ||||
| Random | 8360717 | 2401 days ago | IN | 0 ETH | 0.00171756 | ||||
| Random | 8360711 | 2401 days ago | IN | 0 ETH | 0.00171756 | ||||
| Random | 8360707 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360702 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360697 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360694 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360690 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360685 | 2401 days ago | IN | 0 ETH | 0.00154522 | ||||
| Random | 8360679 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360669 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360665 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360662 | 2401 days ago | IN | 0 ETH | 0.0015458 | ||||
| Random | 8360655 | 2401 days ago | IN | 0 ETH | 0.00120229 | ||||
| Random | 8360645 | 2401 days ago | IN | 0 ETH | 0.00120229 | ||||
| Random | 8265088 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265075 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265070 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265069 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265059 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265055 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265049 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265040 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265032 | 2416 days ago | IN | 0 ETH | 0.00085878 | ||||
| Random | 8265030 | 2416 days ago | IN | 0 ETH | 0.00085878 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ZmineRandom
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*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
- No Contract Security Audit Submitted- Submit Audit Here
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"}]Contract Creation Code
6080604052600060028190558054600160a060020a0319163390811790915561003090640100000000610035810204565b6100d0565b600054600160a060020a0316331461004c57600080fd5b600160a060020a03811660009081526001602052604090205460ff161561007257600080fd5b604051600190600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f473290600090a3600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b61085f806100df6000396000f3006080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166327c97fa581146100a85780633d76b7a3146100cb57806361bc221a146100f55780637299054c1461010a5780638da5cb5b14610128578063b6a5d7de14610159578063b9035c171461017a578063b918161114610192578063f2fde38b146101c7578063f65a74dc146101e8575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610203565b005b3480156100d757600080fd5b506100e3600435610298565b60408051918252519081900360200190f35b34801561010157600080fd5b506100e361031b565b34801561011657600080fd5b506100c9600435602435604435610321565b34801561013457600080fd5b5061013d610636565b60408051600160a060020a039092168252519081900360200190f35b34801561016557600080fd5b506100c9600160a060020a0360043516610645565b34801561018657600080fd5b506100e36004356106e0565b34801561019e57600080fd5b506101b3600160a060020a03600435166106f2565b604080519115158252519081900360200190f35b3480156101d357600080fd5b506100c9600160a060020a0360043516610707565b3480156101f457600080fd5b506100e360043560243561079b565b600054600160a060020a0316331461021a57600080fd5b600160a060020a03811660009081526001602052604090205460ff16151561024157600080fd5b604051600090600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f4732908390a3600160a060020a03166000908152600160205260409020805460ff19169055565b600081604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106102e95780518252601f1990920191602091820191016102ca565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b60025481565b3360009081526001602052604081205460609060ff16151561034257600080fd5b6000851161034f57600080fd5b84841161035b57600080fd5b6002805460019081019091556040805160001943016020808301919091528251808303820181529183019283905281518994858a030193918291908401908083835b602083106103bc5780518252601f19909201916020918201910161039d565b51815160209384036101000a60001901801990921691161790526040805192909401829003822044838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104295780518252601f19909201916020918201910161040a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600254838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104985780518252601f199092019160209182019101610479565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282018e90528451808403830181529285019485905282519096509194508392508401908083835b602083106105065780518252601f1990920191602091820191016104e7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900401010181151561054357fe5b060391506005604051908082528060200260200182016040528015610572578160200160208202803883390190505b5090508481600081518110151561058557fe5b6020908102909101015280518490829060019081106105a057fe5b6020908102909101015280518390829060029081106105bb57fe5b6020908102909101015280514490829060039081106105d657fe5b6020908102909101015280514390829060049081106105f157fe5b602090810290910181019190915260025460009081526004825260409020825161061d928401906107cb565b5050600254600090815260036020526040902055505050565b600054600160a060020a031681565b600054600160a060020a0316331461065c57600080fd5b600160a060020a03811660009081526001602052604090205460ff161561068257600080fd5b604051600190600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f473290600090a3600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b60036020526000908152604090205481565b60016020526000908152604090205460ff1681565b600054600160a060020a0316331461071e57600080fd5b600160a060020a038116151561073357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6004602052816000526040600020818154811015156107b657fe5b90600052602060002001600091509150505481565b828054828255906000526020600020908101928215610806579160200282015b828111156108065782518255916020019190600101906107eb565b50610812929150610816565b5090565b61083091905b80821115610812576000815560010161081c565b905600a165627a7a72305820472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe20029
Deployed Bytecode
0x6080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166327c97fa581146100a85780633d76b7a3146100cb57806361bc221a146100f55780637299054c1461010a5780638da5cb5b14610128578063b6a5d7de14610159578063b9035c171461017a578063b918161114610192578063f2fde38b146101c7578063f65a74dc146101e8575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a0360043516610203565b005b3480156100d757600080fd5b506100e3600435610298565b60408051918252519081900360200190f35b34801561010157600080fd5b506100e361031b565b34801561011657600080fd5b506100c9600435602435604435610321565b34801561013457600080fd5b5061013d610636565b60408051600160a060020a039092168252519081900360200190f35b34801561016557600080fd5b506100c9600160a060020a0360043516610645565b34801561018657600080fd5b506100e36004356106e0565b34801561019e57600080fd5b506101b3600160a060020a03600435166106f2565b604080519115158252519081900360200190f35b3480156101d357600080fd5b506100c9600160a060020a0360043516610707565b3480156101f457600080fd5b506100e360043560243561079b565b600054600160a060020a0316331461021a57600080fd5b600160a060020a03811660009081526001602052604090205460ff16151561024157600080fd5b604051600090600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f4732908390a3600160a060020a03166000908152600160205260409020805460ff19169055565b600081604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106102e95780518252601f1990920191602091820191016102ca565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b60025481565b3360009081526001602052604081205460609060ff16151561034257600080fd5b6000851161034f57600080fd5b84841161035b57600080fd5b6002805460019081019091556040805160001943016020808301919091528251808303820181529183019283905281518994858a030193918291908401908083835b602083106103bc5780518252601f19909201916020918201910161039d565b51815160209384036101000a60001901801990921691161790526040805192909401829003822044838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104295780518252601f19909201916020918201910161040a565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600254838301528451808403830181529285019485905282519096509194508392508401908083835b602083106104985780518252601f199092019160209182019101610479565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282018e90528451808403830181529285019485905282519096509194508392508401908083835b602083106105065780518252601f1990920191602091820191016104e7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900401010181151561054357fe5b060391506005604051908082528060200260200182016040528015610572578160200160208202803883390190505b5090508481600081518110151561058557fe5b6020908102909101015280518490829060019081106105a057fe5b6020908102909101015280518390829060029081106105bb57fe5b6020908102909101015280514490829060039081106105d657fe5b6020908102909101015280514390829060049081106105f157fe5b602090810290910181019190915260025460009081526004825260409020825161061d928401906107cb565b5050600254600090815260036020526040902055505050565b600054600160a060020a031681565b600054600160a060020a0316331461065c57600080fd5b600160a060020a03811660009081526001602052604090205460ff161561068257600080fd5b604051600190600160a060020a038316907f5056a36abc1db1625034fdf114a164a0345b3ccf992fc1d51055e017375f473290600090a3600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b60036020526000908152604090205481565b60016020526000908152604090205460ff1681565b600054600160a060020a0316331461071e57600080fd5b600160a060020a038116151561073357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6004602052816000526040600020818154811015156107b657fe5b90600052602060002001600091509150505481565b828054828255906000526020600020908101928215610806579160200282015b828111156108065782518255916020019190600101906107eb565b50610812929150610816565b5090565b61083091905b80821115610812576000815560010161081c565b905600a165627a7a72305820472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe20029
Swarm Source
bzzr://472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe2
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.