Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
SlammerTime
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-03-04
*/
pragma solidity ^0.4.15;
/*
https://cryptogs.io
--Austin Thomas Griffith for ETHDenver
( this is unaudited )
*/
/**
* @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.
*/
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 SlammerTime is Ownable{
string public constant purpose = "ETHDenver";
string public constant contact = "https://cryptogs.io";
string public constant author = "Austin Thomas Griffith | [email protected]";
address public cryptogs;
function SlammerTime(address _cryptogs) public {
//deploy slammertime with cryptogs address coded in so
// only the cryptogs address can mess with it
cryptogs=_cryptogs;
}
function startSlammerTime(address _player1,uint256[5] _id1,address _player2,uint256[5] _id2) public returns (bool) {
//only the cryptogs contract should be able to hit it
require(msg.sender==cryptogs);
Cryptogs cryptogsContract = Cryptogs(cryptogs);
for(uint8 i=0;i<5;i++){
//make sure player1 owns _id1
require(cryptogsContract.tokenIndexToOwner(_id1[i])==_player1);
//transfer id1 in
cryptogsContract.transferFrom(_player1,address(this),_id1[i]);
//make this contract is the owner
require(cryptogsContract.tokenIndexToOwner(_id1[i])==address(this));
}
for(uint8 j=0;j<5;j++){
//make sure player2 owns _id1
require(cryptogsContract.tokenIndexToOwner(_id2[j])==_player2);
//transfer id1 in
cryptogsContract.transferFrom(_player2,address(this),_id2[j]);
//make this contract is the owner
require(cryptogsContract.tokenIndexToOwner(_id2[j])==address(this));
}
return true;
}
function transferBack(address _toWhom, uint256 _id) public returns (bool) {
//only the cryptogs contract should be able to hit it
require(msg.sender==cryptogs);
Cryptogs cryptogsContract = Cryptogs(cryptogs);
require(cryptogsContract.tokenIndexToOwner(_id)==address(this));
cryptogsContract.transfer(_toWhom,_id);
require(cryptogsContract.tokenIndexToOwner(_id)==_toWhom);
return true;
}
function withdraw(uint256 _amount) public onlyOwner returns (bool) {
require(this.balance >= _amount);
assert(owner.send(_amount));
return true;
}
function withdrawToken(address _token,uint256 _amount) public onlyOwner returns (bool) {
StandardToken token = StandardToken(_token);
token.transfer(msg.sender,_amount);
return true;
}
}
contract StandardToken {
function transfer(address _to, uint256 _value) public returns (bool) { }
}
contract Cryptogs {
mapping (uint256 => address) public tokenIndexToOwner;
function transfer(address _to,uint256 _tokenId) external { }
function transferFrom(address _from,address _to,uint256 _tokenId) external { }
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"cryptogs","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_player1","type":"address"},{"name":"_id1","type":"uint256[5]"},{"name":"_player2","type":"address"},{"name":"_id2","type":"uint256[5]"}],"name":"startSlammerTime","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"contact","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"purpose","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"author","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_toWhom","type":"address"},{"name":"_id","type":"uint256"}],"name":"transferBack","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_cryptogs","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]Contract Creation Code
6060604052341561000f57600080fd5b604051602080610b2b8339810160405280805160008054600160a060020a03338116600160a060020a031992831617909255600180549290931691161790555050610acc8061005f6000396000f30060606040526004361061008a5763ffffffff60e060020a600035041663105d3e0f811461008f578063291cef95146100be5780632e1a7d4d1461014e57806333a8c45a1461016457806370740aab146101ee5780638da5cb5b146102015780639e281a9814610214578063a6c3e6b914610236578063c8f2835f14610249578063f2fde38b1461026b575b600080fd5b341561009a57600080fd5b6100a261028c565b604051600160a060020a03909116815260200160405180910390f35b34156100c957600080fd5b61013a60048035600160a060020a03169060c46024600560a06040519081016040529190828260a080828437509395600160a060020a038635169590945060c08101935060200191506005905060a06040519081016040529190828260a0808284375093955061029b945050505050565b604051901515815260200160405180910390f35b341561015957600080fd5b61013a600435610677565b341561016f57600080fd5b6101776106e3565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101b357808201518382015260200161019b565b50505050905090810190601f1680156101e05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101f957600080fd5b61017761071a565b341561020c57600080fd5b6100a2610751565b341561021f57600080fd5b61013a600160a060020a0360043516602435610760565b341561024157600080fd5b610177610802565b341561025457600080fd5b61013a600160a060020a0360043516602435610862565b341561027657600080fd5b61028a600160a060020a0360043516610a05565b005b600154600160a060020a031681565b60015460009081908190819033600160a060020a039081169116146102bf57600080fd5b600154600160a060020a03169250600091505b60058260ff16101561049d57600160a060020a03808916908416631d36e06c8960ff86166005811061030057fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561034457600080fd5b6102c65a03f1151561035557600080fd5b50505060405180519050600160a060020a031614151561037457600080fd5b600160a060020a0383166323b872dd89308a60ff87166005811061039457fe5b602002015160405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156103e857600080fd5b6102c65a03f115156103f957600080fd5b5050600160a060020a0330811691508416631d36e06c8960ff86166005811061041e57fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561046257600080fd5b6102c65a03f1151561047357600080fd5b50505060405180519050600160a060020a031614151561049257600080fd5b6001909101906102d2565b5060005b60058160ff16101561066957600160a060020a03808716908416631d36e06c8760ff8516600581106104cf57fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561051357600080fd5b6102c65a03f1151561052457600080fd5b50505060405180519050600160a060020a031614151561054357600080fd5b600160a060020a0383166323b872dd87308860ff86166005811061056357fe5b602002015160405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156105b757600080fd5b6102c65a03f115156105c857600080fd5b5050600160a060020a0330811691508416631d36e06c8760ff8516600581106105ed57fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561063157600080fd5b6102c65a03f1151561064257600080fd5b50505060405180519050600160a060020a031614151561066157600080fd5b6001016104a1565b506001979650505050505050565b6000805433600160a060020a0390811691161461069357600080fd5b600160a060020a03301631829010156106ab57600080fd5b600054600160a060020a031682156108fc0283604051600060405180830381858888f1935050505015156106db57fe5b506001919050565b60408051908101604052601381527f68747470733a2f2f63727970746f67732e696f00000000000000000000000000602082015281565b60408051908101604052600981527f45544844656e7665720000000000000000000000000000000000000000000000602082015281565b600054600160a060020a031681565b60008054819033600160a060020a0390811691161461077e57600080fd5b5082600160a060020a03811663a9059cbb338560006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156107dd57600080fd5b6102c65a03f115156107ee57600080fd5b505050604051805150600195945050505050565b606060405190810160405280602e81526020017f41757374696e2054686f6d6173204772696666697468207c2061757374696e4081526020017f636f6e63757272656e63652e696f00000000000000000000000000000000000081525081565b600154600090819033600160a060020a0390811691161461088257600080fd5b50600154600160a060020a0390811690301681631d36e06c8560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156108da57600080fd5b6102c65a03f115156108eb57600080fd5b50505060405180519050600160a060020a031614151561090a57600080fd5b80600160a060020a031663a9059cbb858560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561095e57600080fd5b6102c65a03f1151561096f57600080fd5b50505083600160a060020a031681600160a060020a0316631d36e06c8560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156109cb57600080fd5b6102c65a03f115156109dc57600080fd5b50505060405180519050600160a060020a03161415156109fb57600080fd5b5060019392505050565b60005433600160a060020a03908116911614610a2057600080fd5b600160a060020a0381161515610a3557600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820c39732735aa28c5050212feb1bb1aef4616283de30b47f36b980a022ce17e3350029000000000000000000000000c2e9a923a9bc9db5409d35ae30974c76b6e401f9
Deployed Bytecode
0x60606040526004361061008a5763ffffffff60e060020a600035041663105d3e0f811461008f578063291cef95146100be5780632e1a7d4d1461014e57806333a8c45a1461016457806370740aab146101ee5780638da5cb5b146102015780639e281a9814610214578063a6c3e6b914610236578063c8f2835f14610249578063f2fde38b1461026b575b600080fd5b341561009a57600080fd5b6100a261028c565b604051600160a060020a03909116815260200160405180910390f35b34156100c957600080fd5b61013a60048035600160a060020a03169060c46024600560a06040519081016040529190828260a080828437509395600160a060020a038635169590945060c08101935060200191506005905060a06040519081016040529190828260a0808284375093955061029b945050505050565b604051901515815260200160405180910390f35b341561015957600080fd5b61013a600435610677565b341561016f57600080fd5b6101776106e3565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101b357808201518382015260200161019b565b50505050905090810190601f1680156101e05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101f957600080fd5b61017761071a565b341561020c57600080fd5b6100a2610751565b341561021f57600080fd5b61013a600160a060020a0360043516602435610760565b341561024157600080fd5b610177610802565b341561025457600080fd5b61013a600160a060020a0360043516602435610862565b341561027657600080fd5b61028a600160a060020a0360043516610a05565b005b600154600160a060020a031681565b60015460009081908190819033600160a060020a039081169116146102bf57600080fd5b600154600160a060020a03169250600091505b60058260ff16101561049d57600160a060020a03808916908416631d36e06c8960ff86166005811061030057fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561034457600080fd5b6102c65a03f1151561035557600080fd5b50505060405180519050600160a060020a031614151561037457600080fd5b600160a060020a0383166323b872dd89308a60ff87166005811061039457fe5b602002015160405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156103e857600080fd5b6102c65a03f115156103f957600080fd5b5050600160a060020a0330811691508416631d36e06c8960ff86166005811061041e57fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561046257600080fd5b6102c65a03f1151561047357600080fd5b50505060405180519050600160a060020a031614151561049257600080fd5b6001909101906102d2565b5060005b60058160ff16101561066957600160a060020a03808716908416631d36e06c8760ff8516600581106104cf57fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561051357600080fd5b6102c65a03f1151561052457600080fd5b50505060405180519050600160a060020a031614151561054357600080fd5b600160a060020a0383166323b872dd87308860ff86166005811061056357fe5b602002015160405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156105b757600080fd5b6102c65a03f115156105c857600080fd5b5050600160a060020a0330811691508416631d36e06c8760ff8516600581106105ed57fe5b602002015160006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561063157600080fd5b6102c65a03f1151561064257600080fd5b50505060405180519050600160a060020a031614151561066157600080fd5b6001016104a1565b506001979650505050505050565b6000805433600160a060020a0390811691161461069357600080fd5b600160a060020a03301631829010156106ab57600080fd5b600054600160a060020a031682156108fc0283604051600060405180830381858888f1935050505015156106db57fe5b506001919050565b60408051908101604052601381527f68747470733a2f2f63727970746f67732e696f00000000000000000000000000602082015281565b60408051908101604052600981527f45544844656e7665720000000000000000000000000000000000000000000000602082015281565b600054600160a060020a031681565b60008054819033600160a060020a0390811691161461077e57600080fd5b5082600160a060020a03811663a9059cbb338560006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156107dd57600080fd5b6102c65a03f115156107ee57600080fd5b505050604051805150600195945050505050565b606060405190810160405280602e81526020017f41757374696e2054686f6d6173204772696666697468207c2061757374696e4081526020017f636f6e63757272656e63652e696f00000000000000000000000000000000000081525081565b600154600090819033600160a060020a0390811691161461088257600080fd5b50600154600160a060020a0390811690301681631d36e06c8560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156108da57600080fd5b6102c65a03f115156108eb57600080fd5b50505060405180519050600160a060020a031614151561090a57600080fd5b80600160a060020a031663a9059cbb858560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561095e57600080fd5b6102c65a03f1151561096f57600080fd5b50505083600160a060020a031681600160a060020a0316631d36e06c8560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156109cb57600080fd5b6102c65a03f115156109dc57600080fd5b50505060405180519050600160a060020a03161415156109fb57600080fd5b5060019392505050565b60005433600160a060020a03908116911614610a2057600080fd5b600160a060020a0381161515610a3557600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820c39732735aa28c5050212feb1bb1aef4616283de30b47f36b980a022ce17e3350029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c2e9a923a9bc9db5409d35ae30974c76b6e401f9
-----Decoded View---------------
Arg [0] : _cryptogs (address): 0xC2E9A923A9BC9db5409d35AE30974C76b6E401F9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c2e9a923a9bc9db5409d35ae30974c76b6e401f9
Swarm Source
bzzr://c39732735aa28c5050212feb1bb1aef4616283de30b47f36b980a022ce17e335
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.