contract_name
stringlengths
1
61
file_path
stringlengths
5
50.4k
contract_address
stringlengths
42
42
language
stringclasses
1 value
class_name
stringlengths
1
61
class_code
stringlengths
4
330k
class_documentation
stringlengths
0
29.1k
class_documentation_type
stringclasses
6 values
func_name
stringlengths
0
62
func_code
stringlengths
1
303k
func_documentation
stringlengths
2
14.9k
func_documentation_type
stringclasses
4 values
compiler_version
stringlengths
15
42
license_type
stringclasses
14 values
swarm_source
stringlengths
0
71
meta
dict
__index_level_0__
int64
0
60.4k
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 4774, 5095 ] }
26,400
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 557, 641 ] }
26,401
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 1200, 1353 ] }
26,402
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 1503, 1752 ] }
26,403
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
lock
function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = block.timestamp + time; emit OwnershipTransferred(_owner, address(0)); }
//Locks the contract for owner for the amount of time provided
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 1920, 2151 ] }
26,404
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
unlock
function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(block.timestamp > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; }
//Unlocks the contract for owner when _lockTime is exceeds
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 2222, 2532 ] }
26,405
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
PokeMongoose
contract PokeMongoose is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 10237, 10271 ] }
26,406
PokeMongoose
PokeMongoose.sol
0xe923b0fea32c2c97c6cf8923228fd6aed6281dd5
Solidity
PokeMongoose
contract PokeMongoose is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!canTrade){ require(sender == owner()); // only owner allowed to trade or add liquidity } if(botWallets[sender] || botWallets[recipient]){ require(botscantrade, "bots arent all...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://8aa25944ea1f40e3e7397d386ff455d07d4212a0af70517469c1b51ac6970392
{ "func_code_index": [ 18159, 19278 ] }
26,407
Fulcrum
Fulcrum.sol
0x9ca5bf963ec0f9d314b68e9bc17bba57f7053331
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://98fd65f5b8592e19ac367492e36a29d0adaf3e776fbcc9744d31c72d8878db87
{ "func_code_index": [ 179, 240 ] }
26,408
Fulcrum
Fulcrum.sol
0x9ca5bf963ec0f9d314b68e9bc17bba57f7053331
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner { require(newOwner != address(0)); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://98fd65f5b8592e19ac367492e36a29d0adaf3e776fbcc9744d31c72d8878db87
{ "func_code_index": [ 589, 726 ] }
26,409
Fulcrum
Fulcrum.sol
0x9ca5bf963ec0f9d314b68e9bc17bba57f7053331
Solidity
Fulcrum
contract Fulcrum is ERC20, PoSTokenStandard, Ownable { using SafeMath for uint256; string public name = "Fulcrum"; string public symbol = "FLC"; uint public decimals = 18; uint public chainStartTime; // chain start time uint public chainStartBlockNumber; // chain start block number ...
batchTransfer
function batchTransfer(address[] _recipients, uint[] _values) onlyOwner returns (bool) { require( _recipients.length > 0 && _recipients.length == _values.length); uint total = 0; for(uint i = 0; i < _values.length; i++){ total = total.add(_values[i]); } require(total <= balances[msg....
/* Batch token transfer. Used by contract creator to distribute initial tokens to holders */
Comment
v0.4.19+commit.c4cbbb05
bzzr://98fd65f5b8592e19ac367492e36a29d0adaf3e776fbcc9744d31c72d8878db87
{ "func_code_index": [ 6344, 7342 ] }
26,410
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
massHarvest
function massHarvest() external returns (uint){ uint totalDistributedValue; uint epochId = _getEpochId().sub(1); // fails in epoch 0 // force max number of epochs if (epochId > NR_OF_EPOCHS) { epochId = NR_OF_EPOCHS; } for (uint128 i = lastEpochIdHarvested[msg.sender] + 1; i <= epochId;...
// public methods // public method to harvest all the unharvested epochs until current epoch - 1
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1667, 2480 ] }
26,411
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
getPoolSize
function getPoolSize(uint128 epochId) external view returns (uint) { return _getPoolSize(epochId); }
// views // calls to the staking smart contract to retrieve the epoch total pool size
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 3165, 3281 ] }
26,412
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
getEpochStake
function getEpochStake(address userAddress, uint128 epochId) external view returns (uint) { return _getUserBalancePerEpoch(userAddress, epochId); }
// calls to the staking smart contract to retrieve user balance for an epoch
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 3463, 3626 ] }
26,413
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
_initEpoch
function _initEpoch(uint128 epochId) internal { require(lastInitializedEpoch.add(1) == epochId, "Epoch can be init only in order"); lastInitializedEpoch = epochId; // call the staking smart contract to init the epoch epochs[epochId] = _getPoolSize(epochId); }
// internal methods
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 3779, 4078 ] }
26,414
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
_getPoolSize
function _getPoolSize(uint128 epochId) internal view returns (uint) { return _staking.getEpochPoolSize(_poolTokenAddress, _stakingEpochId(epochId)); }
// retrieve _poolTokenAddress token balance
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 4951, 5117 ] }
26,415
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
_getUserBalancePerEpoch
function _getUserBalancePerEpoch(address userAddress, uint128 epochId) internal view returns (uint){ return _staking.getEpochUserBalance(userAddress, _poolTokenAddress, _stakingEpochId(epochId)); }
// retrieve _poolTokenAddress token balance per user per epoch
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 5186, 5399 ] }
26,416
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
_getEpochId
function _getEpochId() internal view returns (uint128 epochId) { if (block.timestamp < epochStart) { return 0; } epochId = uint128(block.timestamp.sub(epochStart).div(epochDuration).add(1)); }
// compute epoch id from block.timestamp and epochStart date
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 5466, 5702 ] }
26,417
YieldFarmXfund
contracts/YieldFarmXfund.sol
0x76d03d983494cf6087e9e0f330b7c5872e24da65
Solidity
YieldFarmXfund
contract YieldFarmXfund { // lib using SafeMath for uint; using SafeMath for uint128; // constants uint public constant TOTAL_DISTRIBUTED_AMOUNT = 250; uint public constant NR_OF_EPOCHS = 10; uint128 public constant EPOCHS_DELAYED_FROM_STAKING_CONTRACT = 0; // state variables // ...
_stakingEpochId
function _stakingEpochId(uint128 epochId) pure internal returns (uint128) { return epochId + EPOCHS_DELAYED_FROM_STAKING_CONTRACT; }
// get the staking epoch
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 5733, 5881 ] }
26,418
LootPortal
contracts/LootPortal.sol
0xec2075a71c208f9a9219bd73d4b40053f0c84dd3
Solidity
LootPortal
contract LootPortal is Ownable { address public l2Target; IERC721 public loot; IInbox public inbox; // Loot ID to Ticket ID mapping(uint256 => uint256) public lootsToTickets; constructor( address lootAddress, address l2TargetAddress, address inboxAddress ) public { ...
warpLoot
function warpLoot( uint256 lootId, uint256 maxSubmissionCost, uint256 maxGas, uint256 gasPriceBid ) external payable returns (uint256) { require(msg.value > 0, "MSG_VALUE_IS_REQUIRED"); require( loot.ownerOf(lootId) == msg.sender, "SENDER_ISNT_LOOT_ID_OWNER" ); bytes mem...
/* @notice This claims your deevy bag in L2. */
Comment
v0.6.12+commit.27d51765
{ "func_code_index": [ 710, 1677 ] }
26,419
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
Ownable
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; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 261, 321 ] }
26,420
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
Ownable
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; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 640, 821 ] }
26,421
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersMetadata
contract StrikersMetadata { /// @dev The base url for the API where we fetch the metadata. /// ex: https://us-central1-cryptostrikers-api.cloudfunctions.net/cards/ string public apiUrl; constructor(string _apiUrl) public { apiUrl = _apiUrl; } /// @dev Returns the API URL for a given token...
/// @title An optional contract that allows us to associate metadata to our cards. /// @author The CryptoStrikers Team
NatSpecSingleLine
tokenURI
function tokenURI(uint256 _tokenId) external view returns (string) { string memory _id = uint2str(_tokenId); return strConcat(apiUrl, _id); }
/// @dev Returns the API URL for a given token Id. /// ex: https://us-central1-cryptostrikers-api.cloudfunctions.net/cards/22 /// Right now, this endpoint returns a JSON blob conforming to OpenSea's spec. /// see: https://docs.opensea.io/docs/2-adding-metadata
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 551, 708 ] }
26,422
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersMetadata
contract StrikersMetadata { /// @dev The base url for the API where we fetch the metadata. /// ex: https://us-central1-cryptostrikers-api.cloudfunctions.net/cards/ string public apiUrl; constructor(string _apiUrl) public { apiUrl = _apiUrl; } /// @dev Returns the API URL for a given token...
/// @title An optional contract that allows us to associate metadata to our cards. /// @author The CryptoStrikers Team
NatSpecSingleLine
strConcat
function strConcat(string _a, string _b) internal pure returns (string) { bytes memory _ba = bytes(_a); bytes memory _bb = bytes(_b); string memory ab = new string(_ba.length + _bb.length); bytes memory bab = bytes(ab); uint k = 0; for (uint i = 0; i < _ba.length; i++) bab[k++] = _ba[i]; for (i = 0...
// String helpers below were taken from Oraclize. // https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.sol
LineComment
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 845, 1253 ] }
26,423
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Receiver
contract ERC721Receiver { /** * @dev Magic value to be returned upon successful reception of an NFT * Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`, * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` */ bytes4 constant ERC721_RECEIVED = 0xf0b...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4);
/** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safetransfer`. This function MAY throw to revert and reject the * transfer. This function MUST use 50,000 gas or less. Return of other * than the magic value MUST result in the transa...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 999, 1097 ] }
26,424
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 89, 266 ] }
26,425
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 350, 630 ] }
26,426
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 744, 860 ] }
26,427
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 924, 1054 ] }
26,428
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
AddressUtils
library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the...
/** * Utility library of inline functions on addresses */
NatSpecMultiLine
isContract
function isContract(address addr) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how...
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 358, 939 ] }
26,429
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { require(_owner != address(0)); return ownedTokensCount[_owner]; }
/** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1504, 1652 ] }
26,430
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 _tokenId) public view returns (address) { address owner = tokenOwner[_tokenId]; require(owner != address(0)); return owner; }
/** * @dev Gets the owner of the specified token ID * @param _tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1869, 2040 ] }
26,431
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
exists
function exists(uint256 _tokenId) public view returns (bool) { address owner = tokenOwner[_tokenId]; return owner != address(0); }
/** * @dev Returns whether the specified token exists * @param _tokenId uint256 ID of the token to query the existance of * @return whether the token exists */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 2222, 2368 ] }
26,432
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
approve
function approve(address _to, uint256 _tokenId) public { address owner = ownerOf(_tokenId); require(_to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); if (getApproved(_tokenId) != address(0) || _to != address(0)) { tokenApprovals[_tokenId] = _to; emit Approval(ow...
/** * @dev Approves another address to transfer the given token ID * @dev The zero address indicates there is no approved address. * @dev There can only be one approved address per token at a given time. * @dev Can only be called by the token owner or an approved operator. * @param _to address to be approved ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 2795, 3162 ] }
26,433
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
getApproved
function getApproved(uint256 _tokenId) public view returns (address) { return tokenApprovals[_tokenId]; }
/** * @dev Gets the approved address for a token ID, or zero if no address set * @param _tokenId uint256 ID of the token to query the approval of * @return address currently approved for a the given token ID */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 3395, 3511 ] }
26,434
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address _to, bool _approved) public { require(_to != msg.sender); operatorApprovals[msg.sender][_to] = _approved; emit ApprovalForAll(msg.sender, _to, _approved); }
/** * @dev Sets or unsets the approval of a given operator * @dev An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 3801, 4013 ] }
26,435
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address _owner, address _operator) public view returns (bool) { return operatorApprovals[_owner][_operator]; }
/** * @dev Tells whether an operator is approved by a given owner * @param _owner owner address which you want to query the approval of * @param _operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 4327, 4474 ] }
26,436
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId) { require(_from != address(0)); require(_to != address(0)); clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(_from, _to, _tokenId); }
/** * @dev Transfers the ownership of a given token ID to another address * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible * @dev Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the own...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 4909, 5237 ] }
26,437
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId ) public canTransfer(_tokenId) { // solium-disable-next-line arg-overflow safeTransferFrom(_from, _to, _tokenId, ""); }
/** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, *...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5863, 6101 ] }
26,438
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public canTransfer(_tokenId) { transferFrom(_from, _to, _tokenId); // solium-disable-next-line arg-overflow require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data)); }
/** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, *...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 6799, 7116 ] }
26,439
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
isApprovedOrOwner
function isApprovedOrOwner(address _spender, uint256 _tokenId) internal view returns (bool) { address owner = ownerOf(_tokenId); return _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender); }
/** * @dev Returns whether the given spender can transfer a given token ID * @param _spender address of the spender to query * @param _tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 7469, 7715 ] }
26,440
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_mint
function _mint(address _to, uint256 _tokenId) internal { require(_to != address(0)); addTokenTo(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); }
/** * @dev Internal function to mint a new token * @dev Reverts if the given token ID already exists * @param _to The address that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 7974, 8150 ] }
26,441
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_burn
function _burn(address _owner, uint256 _tokenId) internal { clearApproval(_owner, _tokenId); removeTokenFrom(_owner, _tokenId); emit Transfer(_owner, address(0), _tokenId); }
/** * @dev Internal function to burn a specific token * @dev Reverts if the token does not exist * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 8345, 8540 ] }
26,442
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
clearApproval
function clearApproval(address _owner, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _owner); if (tokenApprovals[_tokenId] != address(0)) { tokenApprovals[_tokenId] = address(0); emit Approval(_owner, address(0), _tokenId); } }
/** * @dev Internal function to clear current approval of a given token ID * @dev Reverts if the given address is not indeed the owner of the token * @param _owner owner of the token * @param _tokenId uint256 ID of the token to be transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 8812, 9086 ] }
26,443
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal { require(tokenOwner[_tokenId] == address(0)); tokenOwner[_tokenId] = _to; ownedTokensCount[_to] = ownedTokensCount[_to].add(1); }
/** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 9353, 9564 ] }
26,444
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _from); ownedTokensCount[_from] = ownedTokensCount[_from].sub(1); tokenOwner[_tokenId] = address(0); }
/** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 9847, 10068 ] }
26,445
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721BasicToken
contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
checkAndCallSafeTransfer
function checkAndCallSafeTransfer( address _from, address _to, uint256 _tokenId, bytes _data ) internal returns (bool) { if (!_to.isContract()) { return true; } bytes4 retval = ERC721Receiver(_to).onERC721Received(_from, _tokenId, _data); return (retval == ERC721_RECEIVED); }
/** * @dev Internal function to invoke `onERC721Received` on a target address * @dev The call is not executed if the target address is not a contract * @param _from address representing the previous owner of the given token ID * @param _to target address that will receive the tokens * @param _tokenId uint256 ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 10587, 10932 ] }
26,446
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
ERC721Token
function ERC721Token(string _name, string _symbol) public { name_ = _name; symbol_ = _symbol; }
/** * @dev Constructor function */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 723, 834 ] }
26,447
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
name
function name() public view returns (string) { return name_; }
/** * @dev Gets the token name * @return string representing the token name */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 931, 1004 ] }
26,448
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
symbol
function symbol() public view returns (string) { return symbol_; }
/** * @dev Gets the token symbol * @return string representing the token symbol */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1105, 1182 ] }
26,449
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 _tokenId) public view returns (string) { require(exists(_tokenId)); return tokenURIs[_tokenId]; }
/** * @dev Returns an URI for a given token ID * @dev Throws if the token ID does not exist. May return an empty string. * @param _tokenId uint256 ID of the token to query */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1379, 1518 ] }
26,450
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { require(_index < balanceOf(_owner)); return ownedTokens[_owner][_index]; }
/** * @dev Gets the token ID at a given index of the tokens list of the requested owner * @param _owner address owning the tokens list to be accessed * @param _index uint256 representing the index to be accessed of the requested tokens list * @return uint256 token ID at the given index of the tokens list owned ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1884, 2067 ] }
26,451
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return allTokens.length; }
/** * @dev Gets the total amount of tokens stored by the contract * @return uint256 representing the total amount of tokens */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 2212, 2304 ] }
26,452
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 _index) public view returns (uint256) { require(_index < totalSupply()); return allTokens[_index]; }
/** * @dev Gets the token ID at a given index of all the tokens in this contract * @dev Reverts if the index is greater or equal to the total number of tokens * @param _index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 2638, 2784 ] }
26,453
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_setTokenURI
function _setTokenURI(uint256 _tokenId, string _uri) internal { require(exists(_tokenId)); tokenURIs[_tokenId] = _uri; }
/** * @dev Internal function to set the token URI for a given token * @dev Reverts if the token ID does not exist * @param _tokenId uint256 ID of the token to set its URI * @param _uri string URI to assign */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 3019, 3155 ] }
26,454
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal { super.addTokenTo(_to, _tokenId); uint256 length = ownedTokens[_to].length; ownedTokens[_to].push(_tokenId); ownedTokensIndex[_tokenId] = length; }
/** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 3422, 3656 ] }
26,455
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal { super.removeTokenFrom(_from, _tokenId); uint256 tokenIndex = ownedTokensIndex[_tokenId]; uint256 lastTokenIndex = ownedTokens[_from].length.sub(1); uint256 lastToken = ownedTokens[_from][lastTokenIndex]; ownedTokens[_from][tokenInde...
/** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 3939, 4814 ] }
26,456
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_mint
function _mint(address _to, uint256 _tokenId) internal { super._mint(_to, _tokenId); allTokensIndex[_tokenId] = allTokens.length; allTokens.push(_tokenId); }
/** * @dev Internal function to mint a new token * @dev Reverts if the given token ID already exists * @param _to address the beneficiary that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5085, 5265 ] }
26,457
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
ERC721Token
contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list ...
/** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */
NatSpecMultiLine
_burn
function _burn(address _owner, uint256 _tokenId) internal { super._burn(_owner, _tokenId); // Clear metadata (if any) if (bytes(tokenURIs[_tokenId]).length != 0) { delete tokenURIs[_tokenId]; } // Reorg all tokens array uint256 tokenIndex = allTokensIndex[_tokenId]; uint256 lastTokenIndex ...
/** * @dev Internal function to burn a specific token * @dev Reverts if the token does not exist * @param _owner owner of the token to burn * @param _tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5507, 6114 ] }
26,458
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersPlayerList
contract StrikersPlayerList is Ownable { // We only use playerIds in StrikersChecklist.sol (to // indicate which player features on instances of a // given ChecklistItem), and nowhere else in the app. // While it's not explictly necessary for any of our // contracts to know that playerId 0 corresponds to...
/// @title The contract that manages all the players that appear in our game. /// @author The CryptoStrikers Team
NatSpecSingleLine
addPlayer
function addPlayer(string _name) public onlyOwner { require(playerCount < 255, "You've already added the maximum amount of players."); emit PlayerAdded(playerCount, _name); playerCount++; }
/// @dev Fires an event, proving that we said a player corresponds to a given ID. /// @param _name The name of the player we are adding.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5268, 5478 ] }
26,459
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
_addOriginalChecklistItem
function _addOriginalChecklistItem(uint8 _playerId, RarityTier _tier) internal { originalChecklistItems.push(ChecklistItem({ playerId: _playerId, tier: _tier })); }
/// @dev Internal function to add a checklist item to the Originals set. /// @param _playerId The player represented by this checklist item. (see StrikersPlayerList.sol) /// @param _tier This checklist item's rarity tier. (see Rarity Tier enum and corresponding tierLimits)
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 3628, 3822 ] }
26,460
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
_addIconicChecklistItem
function _addIconicChecklistItem(uint8 _playerId, RarityTier _tier) internal { iconicChecklistItems.push(ChecklistItem({ playerId: _playerId, tier: _tier })); }
/// @dev Internal function to add a checklist item to the Iconics set. /// @param _playerId The player represented by this checklist item. (see StrikersPlayerList.sol) /// @param _tier This checklist item's rarity tier. (see Rarity Tier enum and corresponding tierLimits)
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 4106, 4296 ] }
26,461
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
addUnreleasedChecklistItem
function addUnreleasedChecklistItem(uint8 _playerId, RarityTier _tier) external onlyOwner { require(deployStep == DeployStep.DoneInitialDeploy, "Finish deploying the Originals and Iconics sets first."); require(unreleasedCount() < 56, "You can't add any more checklist items."); require(_playerId < playerCount,...
/// @dev External function to add a checklist item to our mystery set. /// Must have completed initial deploy, and can't add more than 56 items (because checklistId is a uint8). /// @param _playerId The player represented by this checklist item. (see StrikersPlayerList.sol) /// @param _tier This checklist item's rari...
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 4692, 5184 ] }
26,462
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
originalsCount
function originalsCount() external view returns (uint256) { return originalChecklistItems.length; }
/// @dev Returns how many Original checklist items we've added.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5254, 5364 ] }
26,463
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
iconicsCount
function iconicsCount() public view returns (uint256) { return iconicChecklistItems.length; }
/// @dev Returns how many Iconic checklist items we've added.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5432, 5536 ] }
26,464
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
unreleasedCount
function unreleasedCount() public view returns (uint256) { return unreleasedChecklistItems.length; }
/// @dev Returns how many Unreleased checklist items we've added.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5608, 5719 ] }
26,465
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
deployStepOne
function deployStepOne() external onlyOwner { require(deployStep == DeployStep.WaitingForStepOne, "You're not following the steps in order..."); /* ORIGINALS - DIAMOND */ _addOriginalChecklistItem(0, RarityTier.Diamond); // 000 Messi _addOriginalChecklistItem(1, RarityTier.Diamond); // 001 Ronaldo _add...
/// @dev Deploys Originals #000 through #032.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 6626, 9239 ] }
26,466
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
deployStepTwo
function deployStepTwo() external onlyOwner { require(deployStep == DeployStep.WaitingForStepTwo, "You're not following the steps in order..."); /* ORIGINALS - SILVER (033 to 049) */ _addOriginalChecklistItem(33, RarityTier.Silver); // 033 Casemiro _addOriginalChecklistItem(34, RarityTier.Silver); // 034 ...
/// @dev Deploys Originals #033 through #065.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 9291, 11943 ] }
26,467
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
deployStepThree
function deployStepThree() external onlyOwner { require(deployStep == DeployStep.WaitingForStepThree, "You're not following the steps in order..."); /* ORIGINALS - BRONZE (066 to 099) */ _addOriginalChecklistItem(66, RarityTier.Bronze); // 066 Kagawa _addOriginalChecklistItem(67, RarityTier.Bronze); // 06...
/// @dev Deploys Originals #066 through #099.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 11995, 14666 ] }
26,468
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
deployStepFour
function deployStepFour() external onlyOwner { require(deployStep == DeployStep.WaitingForStepFour, "You're not following the steps in order..."); /* ICONICS */ _addIconicChecklistItem(0, RarityTier.IconicInsert); // 100 Messi _addIconicChecklistItem(1, RarityTier.IconicInsert); // 101 Ronaldo _addIcon...
/// @dev Deploys all Iconics and marks the deploy as complete!
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 14735, 17351 ] }
26,469
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersChecklist
contract StrikersChecklist is StrikersPlayerList { // High level overview of everything going on in this contract: // // ChecklistItem is the parent class to Card and has 3 properties: // - uint8 checklistId (000 to 255) // - uint8 playerId (see StrikersPlayerList.sol) // - RarityTier tier (more in...
/// @title The contract that manages checklist items, sets, and rarity tiers. /// @author The CryptoStrikers Team
NatSpecSingleLine
limitForChecklistId
function limitForChecklistId(uint8 _checklistId) external view returns (uint16) { RarityTier rarityTier; uint8 index; if (_checklistId < 100) { // Originals = #000 to #099 rarityTier = originalChecklistItems[_checklistId].tier; } else if (_checklistId < 200) { // Iconics = #100 to #131 index = _ch...
/// @dev Returns the mint limit for a given checklist item, based on its tier. /// @param _checklistId Which checklist item we need to get the limit for. /// @return How much of this checklist item we are allowed to mint.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 17585, 18363 ] }
26,470
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersBase
contract StrikersBase is ERC721Token("CryptoStrikers", "STRK") { /// @dev Emit this event whenever we mint a new card (see _mintCard below) event CardMinted(uint256 cardId); /// @dev The struct representing the game's main object, a sports trading card. struct Card { // The timestamp at which this ...
/// @title Base contract for CryptoStrikers. Defines what a card is and how to mint one. /// @author The CryptoStrikers Team
NatSpecSingleLine
cardAndChecklistIdsForOwner
function cardAndChecklistIdsForOwner(address _owner) external view returns (uint256[], uint8[]) { uint256[] memory cardIds = ownedTokens[_owner]; uint256 cardCount = cardIds.length; uint8[] memory checklistIds = new uint8[](cardCount); for (uint256 i = 0; i < cardCount; i++) { uint256 cardId = cardId...
/// @dev For a given owner, returns two arrays. The first contains the IDs of every card owned /// by this address. The second returns the corresponding checklist ID for each of these cards. /// There are a few places we need this info in the web app and short of being able to return an /// actual array of Cards,...
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1836, 2277 ] }
26,471
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersBase
contract StrikersBase is ERC721Token("CryptoStrikers", "STRK") { /// @dev Emit this event whenever we mint a new card (see _mintCard below) event CardMinted(uint256 cardId); /// @dev The struct representing the game's main object, a sports trading card. struct Card { // The timestamp at which this ...
/// @title Base contract for CryptoStrikers. Defines what a card is and how to mint one. /// @author The CryptoStrikers Team
NatSpecSingleLine
_mintCard
function _mintCard( uint8 _checklistId, address _owner ) internal returns (uint256) { uint16 mintLimit = strikersChecklist.limitForChecklistId(_checklistId); require(mintLimit == 0 || mintedCountForChecklistId[_checklistId] < mintLimit, "Can't mint any more of this card!"); uint16 serialNumber = ...
/// @dev An internal method that creates a new card and stores it. /// Emits both a CardMinted and a Transfer event. /// @param _checklistId The ID of the checklistItem represented by the card (see Checklist.sol) /// @param _owner The card's first owner!
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 2548, 3214 ] }
26,472
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 513, 609 ] }
26,473
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 693, 791 ] }
26,474
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersMinting
contract StrikersMinting is StrikersBase, Pausable { /// @dev Emit this when we decide to no longer mint a given checklist ID. event PulledFromCirculation(uint8 checklistId); /// @dev If the value for a checklistId is true, we can no longer mint it. mapping (uint8 => bool) public outOfCirculation; ...
/// @title The contract that exposes minting functions to the outside world and limits who can call them. /// @author The CryptoStrikers Team
NatSpecSingleLine
setPackSaleAddress
function setPackSaleAddress(address _address) external onlyOwner { packSaleAddress = _address; }
/// @dev Only the owner can update the address of the pack sale contract. /// @param _address The address of the new StrikersPackSale contract.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 573, 680 ] }
26,475
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersMinting
contract StrikersMinting is StrikersBase, Pausable { /// @dev Emit this when we decide to no longer mint a given checklist ID. event PulledFromCirculation(uint8 checklistId); /// @dev If the value for a checklistId is true, we can no longer mint it. mapping (uint8 => bool) public outOfCirculation; ...
/// @title The contract that exposes minting functions to the outside world and limits who can call them. /// @author The CryptoStrikers Team
NatSpecSingleLine
mintPackSaleCard
function mintPackSaleCard(uint8 _checklistId, address _owner) external returns (uint256) { require(msg.sender == packSaleAddress, "Only the pack sale contract can mint here."); require(!outOfCirculation[_checklistId], "Can't mint any more of this checklist item..."); return _mintCard(_checklistId, _owner); } ...
/// @dev Allows the contract at packSaleAddress to mint cards. /// @param _checklistId The checklist item represented by this new card. /// @param _owner The card's first owner! /// @return The new card's ID.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 904, 1234 ] }
26,476
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersMinting
contract StrikersMinting is StrikersBase, Pausable { /// @dev Emit this when we decide to no longer mint a given checklist ID. event PulledFromCirculation(uint8 checklistId); /// @dev If the value for a checklistId is true, we can no longer mint it. mapping (uint8 => bool) public outOfCirculation; ...
/// @title The contract that exposes minting functions to the outside world and limits who can call them. /// @author The CryptoStrikers Team
NatSpecSingleLine
mintUnreleasedCard
function mintUnreleasedCard(uint8 _checklistId, address _owner) external onlyOwner { require(_checklistId >= 200, "You can only use this to mint unreleased cards."); require(!outOfCirculation[_checklistId], "Can't mint any more of this checklist item..."); _mintCard(_checklistId, _owner); }
/// @dev Allows the owner to mint cards from our Unreleased Set. /// @param _checklistId The checklist item represented by this new card. Must be >= 200. /// @param _owner The card's first owner!
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1442, 1754 ] }
26,477
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersMinting
contract StrikersMinting is StrikersBase, Pausable { /// @dev Emit this when we decide to no longer mint a given checklist ID. event PulledFromCirculation(uint8 checklistId); /// @dev If the value for a checklistId is true, we can no longer mint it. mapping (uint8 => bool) public outOfCirculation; ...
/// @title The contract that exposes minting functions to the outside world and limits who can call them. /// @author The CryptoStrikers Team
NatSpecSingleLine
pullFromCirculation
function pullFromCirculation(uint8 _checklistId) external { bool ownerOrPackSale = (msg.sender == owner) || (msg.sender == packSaleAddress); require(ownerOrPackSale, "Only the owner or pack sale can take checklist items out of circulation."); require(_checklistId >= 100, "This function is reserved for Iconics ...
/// @dev Allows the owner or the pack sale contract to prevent an Iconic or Unreleased card from ever being minted again. /// @param _checklistId The Iconic or Unreleased card we want to remove from circulation.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 1975, 2423 ] }
26,478
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersTrading
contract StrikersTrading is StrikersMinting { /// @dev Emitting this allows us to look up if a trade has been /// successfully filled, by who, and which cards were involved. event TradeFilled( bytes32 indexed tradeHash, address indexed maker, uint256 makerCardId, address indexed taker, ...
/// @title StrikersTrading - Allows users to trustlessly trade cards. /// @author The CryptoStrikers Team
NatSpecSingleLine
fillTrade
function fillTrade( address _maker, uint256 _makerCardId, address _taker, uint256 _takerCardOrChecklistId, uint256 _salt, uint256 _submittedCardId, uint8 _v, bytes32 _r, bytes32 _s) external whenNotPaused { require(_maker != msg.sender, "You can't fill your own trade."); require(...
/// @dev A taker (someone who has received a signed trade hash) /// submits a cardId to this function and, if it satisfies /// the given criteria, the trade is executed. /// @param _maker Address of the maker (i.e. trade creator). /// @param _makerCardId ID of the card the maker has agreed to give up. /// @param _t...
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 2000, 3786 ] }
26,479
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersTrading
contract StrikersTrading is StrikersMinting { /// @dev Emitting this allows us to look up if a trade has been /// successfully filled, by who, and which cards were involved. event TradeFilled( bytes32 indexed tradeHash, address indexed maker, uint256 makerCardId, address indexed taker, ...
/// @title StrikersTrading - Allows users to trustlessly trade cards. /// @author The CryptoStrikers Team
NatSpecSingleLine
cancelTrade
function cancelTrade( address _maker, uint256 _makerCardId, address _taker, uint256 _takerCardOrChecklistId, uint256 _salt) external { require(_maker == msg.sender, "Only the trade creator can cancel this trade."); bytes32 tradeHash = getTradeHash( _maker, _makerCardId, _taker,...
/// @dev Allows the maker to cancel a trade that hasn't been filled yet. /// @param _maker Address of the maker (i.e. trade creator). /// @param _makerCardId ID of the card the maker has agreed to give up. /// @param _taker The counterparty the maker wishes to trade with (if it's address(0), anybody can fill the trade!...
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 4467, 5081 ] }
26,480
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersTrading
contract StrikersTrading is StrikersMinting { /// @dev Emitting this allows us to look up if a trade has been /// successfully filled, by who, and which cards were involved. event TradeFilled( bytes32 indexed tradeHash, address indexed maker, uint256 makerCardId, address indexed taker, ...
/// @title StrikersTrading - Allows users to trustlessly trade cards. /// @author The CryptoStrikers Team
NatSpecSingleLine
getTradeHash
function getTradeHash( address _maker, uint256 _makerCardId, address _taker, uint256 _takerCardOrChecklistId, uint256 _salt) public view returns (bytes32) { // Hashing the contract address prevents a trade from being replayed on any new trade contract we deploy. bytes memory packed = abi....
/// @dev Calculates Keccak-256 hash of a trade with specified parameters. /// @param _maker Address of the maker (i.e. trade creator). /// @param _makerCardId ID of the card the maker has agreed to give up. /// @param _taker The counterparty the maker wishes to trade with (if it's address(0), anybody can fill the trade...
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 5804, 6266 ] }
26,481
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersTrading
contract StrikersTrading is StrikersMinting { /// @dev Emitting this allows us to look up if a trade has been /// successfully filled, by who, and which cards were involved. event TradeFilled( bytes32 indexed tradeHash, address indexed maker, uint256 makerCardId, address indexed taker, ...
/// @title StrikersTrading - Allows users to trustlessly trade cards. /// @author The CryptoStrikers Team
NatSpecSingleLine
isValidSignature
function isValidSignature( address _signer, bytes32 _tradeHash, uint8 _v, bytes32 _r, bytes32 _s) public pure returns (bool) { bytes memory packed = abi.encodePacked("\x19Ethereum Signed Message:\n32", _tradeHash); return _signer == ecrecover(keccak256(packed), _v, _r, _s); }
/// @dev Verifies that a signed trade is valid. /// @param _signer Address of signer. /// @param _tradeHash Signed Keccak-256 hash. /// @param _v ECDSA signature parameter v. /// @param _r ECDSA signature parameters r. /// @param _s ECDSA signature parameters s. /// @return Validity of signature.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 6588, 6923 ] }
26,482
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersCore
contract StrikersCore is StrikersTrading { /// @dev An external metadata contract that the owner can upgrade. StrikersMetadata public strikersMetadata; /// @dev We initialize the CryptoStrikers game with an immutable checklist that oversees card rarity. constructor(address _checklistAddress) public { ...
/// @title The main, ERC721-compliant CryptoStrikers contract. /// @author The CryptoStrikers Team
NatSpecSingleLine
setMetadataAddress
function setMetadataAddress(address _contractAddress) external onlyOwner { strikersMetadata = StrikersMetadata(_contractAddress); }
/// @dev Allows the contract owner to update the metadata contract.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 460, 602 ] }
26,483
StrikersCore
StrikersCore.sol
0xdcaad9fd9a74144d226dbf94ce6162ca9f09ed7e
Solidity
StrikersCore
contract StrikersCore is StrikersTrading { /// @dev An external metadata contract that the owner can upgrade. StrikersMetadata public strikersMetadata; /// @dev We initialize the CryptoStrikers game with an immutable checklist that oversees card rarity. constructor(address _checklistAddress) public { ...
/// @title The main, ERC721-compliant CryptoStrikers contract. /// @author The CryptoStrikers Team
NatSpecSingleLine
tokenURI
function tokenURI(uint256 _tokenId) public view returns (string) { if (strikersMetadata == address(0)) { return super.tokenURI(_tokenId); } require(exists(_tokenId), "Card does not exist."); return strikersMetadata.tokenURI(_tokenId); }
/// @dev If we've set an external metadata contract, use that.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://18fd0ecf06cd11ede612e0ec43bd59ac29e2d96ae3b6bd1a7f6f645f054e5307
{ "func_code_index": [ 671, 942 ] }
26,484
CryptoBeauties
contracts/CryptoBeauties.sol
0xfa1dbfeb3933acab666ce8bc7a20d5560fbe2504
Solidity
CryptoBeauties
contract CryptoBeauties is Ownable, ERC721A, ReentrancyGuard { uint256 public amountForDevsRemaining; uint256 public freeRemaining; uint256 public constant mintPrice = 0.029 ether; bytes32 private _freeMintRoot = "INSERT ROOT HERE"; bytes32 private _whitelistRoot = "INSERT ROOT HERE"; ...
_verifyFreeMintStatus
function _verifyFreeMintStatus(address _account, bytes32[] calldata _merkleProof) private view returns (bool){ bytes32 node = keccak256(abi.encodePacked(_account)); return MerkleProof.verify(_merkleProof, _freeMintRoot, node); }
//Merkle Implementation for ease of access
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://7a3c20c32e1c7de0d2d43582a2a6385b1070506260e629e6e16f54361ce371bb
{ "func_code_index": [ 1546, 1803 ] }
26,485
CryptoBeauties
contracts/CryptoBeauties.sol
0xfa1dbfeb3933acab666ce8bc7a20d5560fbe2504
Solidity
CryptoBeauties
contract CryptoBeauties is Ownable, ERC721A, ReentrancyGuard { uint256 public amountForDevsRemaining; uint256 public freeRemaining; uint256 public constant mintPrice = 0.029 ether; bytes32 private _freeMintRoot = "INSERT ROOT HERE"; bytes32 private _whitelistRoot = "INSERT ROOT HERE"; ...
FreeWhitelistMint
function FreeWhitelistMint (uint256 _beautyAmount, bytes32[] calldata _merkleProof) external payable callerIsUser { require(_beautyAmount > 0); require(saleState == SaleState.Presale, "Presale has not begun yet!"); require(whitelistMintsUsed[msg.sender] + _beautyAmount < 6, "Amount exceeds your allocatio...
// Start of whitelist and free mint implementation
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://7a3c20c32e1c7de0d2d43582a2a6385b1070506260e629e6e16f54361ce371bb
{ "func_code_index": [ 2128, 3156 ] }
26,486
CryptoBeauties
contracts/CryptoBeauties.sol
0xfa1dbfeb3933acab666ce8bc7a20d5560fbe2504
Solidity
CryptoBeauties
contract CryptoBeauties is Ownable, ERC721A, ReentrancyGuard { uint256 public amountForDevsRemaining; uint256 public freeRemaining; uint256 public constant mintPrice = 0.029 ether; bytes32 private _freeMintRoot = "INSERT ROOT HERE"; bytes32 private _whitelistRoot = "INSERT ROOT HERE"; ...
AllowOwnerMint
function AllowOwnerMint(uint256 _beautyAmount) external onlyOwner { require(_beautyAmount > 0); require(_beautyAmount <= amountForDevsRemaining, "Not Enough Dev Tokens left"); amountForDevsRemaining -= _beautyAmount; require(totalSupply() + _beautyAmount <= collectionSize, "Reached Max Supply."); ...
//Owner Mint function
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://7a3c20c32e1c7de0d2d43582a2a6385b1070506260e629e6e16f54361ce371bb
{ "func_code_index": [ 3935, 4328 ] }
26,487
CryptoBeauties
contracts/CryptoBeauties.sol
0xfa1dbfeb3933acab666ce8bc7a20d5560fbe2504
Solidity
CryptoBeauties
contract CryptoBeauties is Ownable, ERC721A, ReentrancyGuard { uint256 public amountForDevsRemaining; uint256 public freeRemaining; uint256 public constant mintPrice = 0.029 ether; bytes32 private _freeMintRoot = "INSERT ROOT HERE"; bytes32 private _whitelistRoot = "INSERT ROOT HERE"; ...
setWithdrawAddress
function setWithdrawAddress(address _DAO, address _Promoter, address _Developer, address _Project ) external onlyOwner { DAO = _DAO; Promoter = _Promoter; Developer = _Developer; Project = _Project; }
// Withdrawal functions
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://7a3c20c32e1c7de0d2d43582a2a6385b1070506260e629e6e16f54361ce371bb
{ "func_code_index": [ 5497, 5729 ] }
26,488
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 93, 300 ] }
26,489
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 390, 690 ] }
26,490
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 810, 938 ] }
26,491
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @d...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 1008, 1154 ] }
26,492
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
Ownable
contract Ownable is EternalStorage { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event OwnershipTransferred(address previousOwner, address newOwn...
/** * @title Ownable * @dev This contract has an owner address providing basic authorization control */
NatSpecMultiLine
owner
function owner() public view returns (address) { return ownerAddress; }
/** * @dev Tells the address of the owner * @return the address of the owner */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 709, 799 ] }
26,493
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
Ownable
contract Ownable is EternalStorage { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event OwnershipTransferred(address previousOwner, address newOwn...
/** * @title Ownable * @dev This contract has an owner address providing basic authorization control */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); setOwner(newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner the address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 968, 1114 ] }
26,494
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
Ownable
contract Ownable is EternalStorage { /** * @dev Event to show ownership has been transferred * @param previousOwner representing the address of the previous owner * @param newOwner representing the address of the new owner */ event OwnershipTransferred(address previousOwner, address newOwn...
/** * @title Ownable * @dev This contract has an owner address providing basic authorization control */
NatSpecMultiLine
setOwner
function setOwner(address newOwner) internal { emit OwnershipTransferred(owner(), newOwner); ownerAddress = newOwner; }
/** * @dev Sets a new owner address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 1171, 1318 ] }
26,495
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
airdrop
contract airdrop is Ownable{ using SafeMath for uint256; event Multisended(uint256 total, address tokenAddress); // function arrayLimit() public view returns(uint256) { // return uintStorage[keccak256(abi.encodePacked("arrayLimit"))]; // } function setTxCount(address c...
setTxCount
function setTxCount(address customer, uint256 _txCount) private { uintStorage[keccak256(abi.encodePacked("txCount", customer))] = _txCount; }
// function arrayLimit() public view returns(uint256) { // return uintStorage[keccak256(abi.encodePacked("arrayLimit"))]; // }
LineComment
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 287, 447 ] }
26,496
airdrop
airdrop.sol
0xb46fbdb2ebf9370fa88418e7d69c11d07d0cb451
Solidity
airdrop
contract airdrop is Ownable{ using SafeMath for uint256; event Multisended(uint256 total, address tokenAddress); // function arrayLimit() public view returns(uint256) { // return uintStorage[keccak256(abi.encodePacked("arrayLimit"))]; // } function setTxCount(address c...
txCount
function txCount(address customer) public view returns(uint256) { return uintStorage[keccak256(abi.encodePacked("txCount", customer))]; }
// function setArrayLimit(uint256 _newLimit) public onlyOwner { // require(_newLimit != 0); // uintStorage[keccak256("arrayLimit")] = _newLimit; // }
LineComment
v0.4.24+commit.e67f0147
None
bzzr://a3bdfaabf9e7efba2ee80d9885469ec0795e96b616d780ce3b612f5d42a0e0f2
{ "func_code_index": [ 634, 790 ] }
26,497
RenExAtomicSwapper
RenExAtomicSwapper.sol
0xd5faef6b5ee44391ffaa42d732c88b86c73ed287
Solidity
RenExAtomicSwapper
contract RenExAtomicSwapper { string public VERSION; // Passed in as a constructor parameter. struct Swap { uint256 timelock; uint256 value; address ethTrader; address withdrawTrader; bytes32 secretLock; bytes32 secretKey; } enum States { ...
/// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface /// for Ether values. Does not support ERC20 tokens.
NatSpecSingleLine
initiate
function initiate( bytes32 _swapID, address _withdrawTrader, bytes32 _secretLock, uint256 _timelock ) external onlyInvalidSwaps(_swapID) payable { // Store the details of the swap. Swap memory swap = Swap({ timelock: _timelock, value: msg.value, ethTrader: msg.s...
/// @notice Initiates the atomic swap. /// /// @param _swapID The unique atomic swap id. /// @param _withdrawTrader The address of the withdrawing trader. /// @param _secretLock The hash of the secret (Hash Lock). /// @param _timelock The unix timestamp when the swap expires.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a
{ "func_code_index": [ 2404, 3075 ] }
26,498
RenExAtomicSwapper
RenExAtomicSwapper.sol
0xd5faef6b5ee44391ffaa42d732c88b86c73ed287
Solidity
RenExAtomicSwapper
contract RenExAtomicSwapper { string public VERSION; // Passed in as a constructor parameter. struct Swap { uint256 timelock; uint256 value; address ethTrader; address withdrawTrader; bytes32 secretLock; bytes32 secretKey; } enum States { ...
/// @notice RenExAtomicSwapper implements the RenEx atomic swapping interface /// for Ether values. Does not support ERC20 tokens.
NatSpecSingleLine
redeem
function redeem(bytes32 _swapID, bytes32 _secretKey) external onlyOpenSwaps(_swapID) onlyWithSecretKey(_swapID, _secretKey) { // Close the swap. Swap memory swap = swaps[_swapID]; swaps[_swapID].secretKey = _secretKey; swapStates[_swapID] = States.CLOSED; /* solium-disable-next-line security/no...
/// @notice Redeems an atomic swap. /// /// @param _swapID The unique atomic swap id. /// @param _secretKey The secret of the atomic swap.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7803594c971963981c8a2a9f19a130eb0591181421756fb522f45c932d51f4a
{ "func_code_index": [ 3237, 3852 ] }
26,499