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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | strings | library strings {
struct slice {
uint _len;
uint _ptr;
}
function memcpy(uint dest, uint src, uint len) private {
// Copy word-length chunks while possible
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
... | /*
* @title String & slice utility library for Solidity contracts.
* @author Nick Johnson <arachnid@notdot.net>
*
* @dev Functionality in this library is largely implemented using an
* abstraction called a 'slice'. A slice represents a part of a string -
* anything from the entire string to a sing... | Comment | count | function count(slice self, slice needle) internal returns (uint count) {
uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len;
while (ptr <= self._ptr + self._len) {
count++;
ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len... | /*
* @dev Counts the number of nonoverlapping occurrences of `needle` in `self`.
* @param self The slice to search.
* @param needle The text to search for in `self`.
* @return The number of occurrences of `needle` found in `self`.
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
20941,
21301
]
} | 8,207 |
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | strings | library strings {
struct slice {
uint _len;
uint _ptr;
}
function memcpy(uint dest, uint src, uint len) private {
// Copy word-length chunks while possible
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
... | /*
* @title String & slice utility library for Solidity contracts.
* @author Nick Johnson <arachnid@notdot.net>
*
* @dev Functionality in this library is largely implemented using an
* abstraction called a 'slice'. A slice represents a part of a string -
* anything from the entire string to a sing... | Comment | contains | function contains(slice self, slice needle) internal returns (bool) {
return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr;
}
| /*
* @dev Returns True if `self` contains `needle`.
* @param self The slice to search.
* @param needle The text to search for in `self`.
* @return True if `needle` is found in `self`, false otherwise.
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
21543,
21711
]
} | 8,208 |
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | strings | library strings {
struct slice {
uint _len;
uint _ptr;
}
function memcpy(uint dest, uint src, uint len) private {
// Copy word-length chunks while possible
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
... | /*
* @title String & slice utility library for Solidity contracts.
* @author Nick Johnson <arachnid@notdot.net>
*
* @dev Functionality in this library is largely implemented using an
* abstraction called a 'slice'. A slice represents a part of a string -
* anything from the entire string to a sing... | Comment | concat | function concat(slice self, slice other) internal returns (string) {
var ret = new string(self._len + other._len);
uint retptr;
assembly { retptr := add(ret, 32) }
memcpy(retptr, self._ptr, self._len);
memcpy(retptr + self._len, other._ptr, other._len);
return ret;
}
| /*
* @dev Returns a newly allocated string containing the concatenation of
* `self` and `other`.
* @param self The first slice to concatenate.
* @param other The second slice to concatenate.
* @return The concatenation of the two strings.
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
22002,
22333
]
} | 8,209 |
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | strings | library strings {
struct slice {
uint _len;
uint _ptr;
}
function memcpy(uint dest, uint src, uint len) private {
// Copy word-length chunks while possible
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
... | /*
* @title String & slice utility library for Solidity contracts.
* @author Nick Johnson <arachnid@notdot.net>
*
* @dev Functionality in this library is largely implemented using an
* abstraction called a 'slice'. A slice represents a part of a string -
* anything from the entire string to a sing... | Comment | join | function join(slice self, slice[] parts) internal returns (string) {
if (parts.length == 0)
return "";
uint len = self._len * (parts.length - 1);
for(uint i = 0; i < parts.length; i++)
len += parts[i]._len;
var ret = new string(len);
uint retptr;
assembly { retptr := ... | /*
* @dev Joins an array of slices, using `self` as a delimiter, returning a
* newly allocated string.
* @param self The delimiter to use.
* @param parts A list of slices to join.
* @return A newly allocated string containing all the slices in `parts`,
* joined with `self`.
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
22674,
23379
]
} | 8,210 |
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | Eth2x | function Eth2x() {
owner = msg.sender;
oraclize_setNetwork(networkID_auto);
/* use TLSNotary for oraclize call */
oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);
/* init min bet (0.1 ether) */
ownerSetMinBet(100000000000000000);
/* init gas for oraclize... | /*
* init
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
2553,
3090
]
} | 8,211 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | enter | function enter(bytes32 _playerBetNo) public gameIsActive payable {
require (msg.value >= minBet);
require (players.length <= maxPlayers);
playerBetNo[msg.sender] = _playerBetNo;
TotalBetAmount = TotalBetAmount.add(msg.value);
if(_playerBetNo == sha3("Zero") ){
... | /* enter into the game */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
3124,
4892
]
} | 8,212 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | getAllPlayers | function getAllPlayers() view public returns (address[])
{
return players;
}
| /*
* get players
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
4934,
5034
]
} | 8,213 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | getPlayerBetNo | function getPlayerBetNo(address _player) constant public returns (bytes32 betNo) {
return playerBetNo[_player];
}
| /*
* get players bet no and amount
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
5494,
5626
]
} | 8,214 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | getTotalBetAmount | function getTotalBetAmount() constant public returns (uint256 _totalBetAmount) {
return TotalBetAmount;
}
| /*
* get players bet amount
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
6202,
6326
]
} | 8,215 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | pickWinner | function pickWinner(uint randomNo) internal {
uint TotalBetAmount1 = TotalBetAmount.mul(ownerProfitInPercent);
TotalBetAmount1 = TotalBetAmount1.div(100);
TotalBetAmount1 = TotalBetAmount.sub(TotalBetAmount1);
lastamountSent = 0;
uint playerLength; address sendTo; uint betamou... | /*
* public function
* player submit bet
* only if game is active & bet is valid can query oraclize and set player vars
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
7058,
11735
]
} | 8,216 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | __callback | function __callback(bytes32 _queryId, string _result, bytes _proof) public
onlyOraclize
payoutsAreActive
{
if (bytes(_result).length != 0 || bytes(_proof).length != 0) {
uint randomNumber = uint(sha3(_result)) % maxNumber; // this is an efficient way to get the uint out in the [0, m... | /*TLSNotary for oraclize call */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
12339,
12775
]
} | 8,217 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | playerWithdrawPendingTransactions | function playerWithdrawPendingTransactions() public
payoutsAreActive
returns (bool)
{
uint withdrawAmount = playerPendingWithdrawals[msg.sender];
playerPendingWithdrawals[msg.sender] = 0;
/* external call to untrusted contract */
if (msg.sender.send(withdrawAmount)) {
return tru... | /*
* public function
* in case of a failed refund or win send
*/ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
12867,
13498
]
} | 8,218 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | playerGetPendingTxByAddress | function playerGetPendingTxByAddress(address addressToCheck) public constant returns (uint) {
return playerPendingWithdrawals[addressToCheck];
}
| /* check for pending withdrawals */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
13543,
13712
]
} | 8,219 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerSetCallbackGasPrice | function ownerSetCallbackGasPrice(uint newCallbackGasPrice) public
lyOwner
oraclize_setCustomGasPrice(newCallbackGasPrice);
}
| /* set gas price for oraclize callback */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
13762,
13921
]
} | 8,220 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerSetOraclizeSafeGas | function ownerSetOraclizeSafeGas(uint32 newSafeGasToOraclize) public
lyOwner
gasForOraclize = newSafeGasToOraclize;
}
| /* set gas limit for oraclize query */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
13968,
14111
]
} | 8,221 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | setOwnerProfitInPercent | function setOwnerProfitInPercent(uint newMaxProfitAsPercent) public
lyOwner
{
ownerProfitInPercent = newMaxProfitAsPercent;
}
| /* only owner address can set ownerProfitInPercent */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
14179,
14334
]
} | 8,222 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerSetMinBet | function ownerSetMinBet(uint newMinimumBet) public
lyOwner
{
minBet = newMinimumBet;
}
| /* only owner address can set minBet */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
14382,
14498
]
} | 8,223 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerSetmaxNumber | function ownerSetmaxNumber(uint newmaxNumber) public
lyOwner
{
maxNumber = newmaxNumber;
}
| /* only owner address can set maxNumber */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
14553,
14673
]
} | 8,224 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerSetmaxPlayers | function ownerSetmaxPlayers(uint newmaxPlayers) public
lyOwner
{
maxPlayers = newmaxPlayers;
}
| /* only owner address can set maxPlayers */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
14729,
14853
]
} | 8,225 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerTransferEther | function ownerTransferEther(address sendTo, uint amount) public
lyOwner
{
/* update max profit */
if(!sendTo.send(amount)) throw;
LogOwnerTransfer(sendTo, amount);
}
| /* only owner address can transfer ether */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
14905,
15127
]
} | 8,226 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerPauseGame | function ownerPauseGame(bool newStatus) public
lyOwner
{
mePaused = newStatus;
}
| /* only owner address can set emergency pause #1 */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
15193,
15299
]
} | 8,227 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerPausePayouts | function ownerPausePayouts(bool newPayoutStatus) public
lyOwner
{
youtsPaused = newPayoutStatus;
}
| /* only owner address can set emergency pause #2 */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
15359,
15486
]
} | 8,228 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerChangeOwner | function ownerChangeOwner(address newOwner) public
lyOwner
owner = newOwner;
}
| /* only owner address can set owner address */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
15541,
15648
]
} | 8,229 | ||
Eth2x | Eth2x.sol | 0x88c8e21fd5509af42109f9cd40423f1c365a46c7 | Solidity | Eth2x | contract Eth2x is usingOraclize {
using strings for *;
using SafeMath for uint256;
/*
* checks game is currently active
*/
modifier gameIsActive {
if(gamePaused == true) throw;
_;
}
/*
* checks payouts are currently active
*/
modifier ... | ownerkill | function ownerkill() public
lyOwner
icide(owner);
| /* only owner address can suicide - emergency */ | Comment | v0.4.18+commit.9cf6e910 | None | bzzr://97596762d0cdb0978841279c5455689bee4470e7b1f2ec842907fbf57970a659 | {
"func_code_index": [
15705,
15782
]
} | 8,230 | ||
EthStarterFarming | /Volumes/Data/Projects/BscStarter/source/crispy-octo/contracts/lib/SafeERC20.sol | 0x9dfda6ca37734d69b0ebc5b65f98501ea7296893 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
)... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using ... | NatSpecMultiLine | safeApprove | function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
864,
1558
]
} | 8,231 | ||
EthStarterFarming | /Volumes/Data/Projects/BscStarter/source/crispy-octo/contracts/lib/SafeERC20.sol | 0x9dfda6ca37734d69b0ebc5b65f98501ea7296893 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
)... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using ... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target addre... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.enc... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2868,
3715
]
} | 8,232 | ||
MandalaToken | src/MandalaToken.sol | 0xdaca87395f3b1bbc46f3fa187e996e03a5dcc985 | Solidity | MandalaToken | contract MandalaToken is ERC721Base, IERC721Metadata, Proxied {
using EnumerableSet for EnumerableSet.UintSet;
using ECDSA for bytes32;
// solhint-disable-next-line quotes
bytes internal constant TEMPLATE = 'data:text/plain,{"name":"Mandala 0x0000000000000000000000000000000000000000","description":"A ... | postUpgrade | function postUpgrade(address payable _creator, uint256 _initialPrice, uint256 _creatorCutPer10000th, uint256 _linearCoefficient) public proxied {
// immutables are set in the constructor:
// initialPrice = _initialPrice;
// creatorCutPer10000th = _creatorCutPer10000th;
// linearCoefficient = _linearCoef... | // solhint-disable-next-line no-unused-vars | LineComment | v0.7.1+commit.f4a555be | MIT | {
"func_code_index": [
2621,
3061
]
} | 8,233 | |||
MandalaToken | src/MandalaToken.sol | 0xdaca87395f3b1bbc46f3fa187e996e03a5dcc985 | Solidity | MandalaToken | contract MandalaToken is ERC721Base, IERC721Metadata, Proxied {
using EnumerableSet for EnumerableSet.UintSet;
using ECDSA for bytes32;
// solhint-disable-next-line quotes
bytes internal constant TEMPLATE = 'data:text/plain,{"name":"Mandala 0x0000000000000000000000000000000000000000","description":"A ... | name | function name() external pure override returns (string memory) {
return "Mandala Tokens";
}
| /// @notice A descriptive name for a collection of NFTs in this contract | NatSpecSingleLine | v0.7.1+commit.f4a555be | MIT | {
"func_code_index": [
3431,
3538
]
} | 8,234 | |||
MandalaToken | src/MandalaToken.sol | 0xdaca87395f3b1bbc46f3fa187e996e03a5dcc985 | Solidity | MandalaToken | contract MandalaToken is ERC721Base, IERC721Metadata, Proxied {
using EnumerableSet for EnumerableSet.UintSet;
using ECDSA for bytes32;
// solhint-disable-next-line quotes
bytes internal constant TEMPLATE = 'data:text/plain,{"name":"Mandala 0x0000000000000000000000000000000000000000","description":"A ... | symbol | function symbol() external pure override returns (string memory) {
return "MANDALA";
}
| /// @notice An abbreviated name for NFTs in this contract | NatSpecSingleLine | v0.7.1+commit.f4a555be | MIT | {
"func_code_index": [
3602,
3704
]
} | 8,235 | |||
MandalaToken | src/MandalaToken.sol | 0xdaca87395f3b1bbc46f3fa187e996e03a5dcc985 | Solidity | MandalaToken | contract MandalaToken is ERC721Base, IERC721Metadata, Proxied {
using EnumerableSet for EnumerableSet.UintSet;
using ECDSA for bytes32;
// solhint-disable-next-line quotes
bytes internal constant TEMPLATE = 'data:text/plain,{"name":"Mandala 0x0000000000000000000000000000000000000000","description":"A ... | supportsInterface | function supportsInterface(bytes4 id) public pure virtual override(ERC721Base, IERC165) returns (bool) {
return ERC721Base.supportsInterface(id) || id == 0x5b5e139f;
}
| /// @notice Check if the contract supports an interface.
/// 0x01ffc9a7 is ERC165.
/// 0x80ac58cd is ERC721
/// 0x5b5e139f is for ERC721 metadata
/// 0x780e9d63 is for ERC721 enumerable
/// @param id The id of the interface.
/// @return Whether the interface is supported. | NatSpecSingleLine | v0.7.1+commit.f4a555be | MIT | {
"func_code_index": [
4223,
4406
]
} | 8,236 | |||
MandalaToken | src/MandalaToken.sol | 0xdaca87395f3b1bbc46f3fa187e996e03a5dcc985 | Solidity | MandalaToken | contract MandalaToken is ERC721Base, IERC721Metadata, Proxied {
using EnumerableSet for EnumerableSet.UintSet;
using ECDSA for bytes32;
// solhint-disable-next-line quotes
bytes internal constant TEMPLATE = 'data:text/plain,{"name":"Mandala 0x0000000000000000000000000000000000000000","description":"A ... | _tokenURI | function _tokenURI(uint256 id) internal pure returns (string memory) {
bytes memory metadata = TEMPLATE;
writeUintAsHex(metadata, ADDRESS_NAME_POS, id);
for (uint256 i = 0; i < 40; i++) {
uint8 value = uint8((id >> (40-(i+1))*4) % 16);
if (value == 0) {
value = 16; // use black ... | // solhint-disable-next-line code-complexity | LineComment | v0.7.1+commit.f4a555be | MIT | {
"func_code_index": [
6845,
8813
]
} | 8,237 | |||
UniverseFactory | UniverseFactory.sol | 0xe62e470c8fba49aea4e87779d536c5923d01bb95 | Solidity | SafeMathUint256 | library SafeMathUint256 {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
require(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatical... | fxpMul | function fxpMul(uint256 a, uint256 b, uint256 base) internal pure returns (uint256) {
return div(mul(a, b), base);
}
| // Float [fixed point] Operations | LineComment | v0.4.20+commit.3155dd80 | bzzr://f29d68c633b53a5bd945494fdcf325defec4766c304d51219d778f057b4317ae | {
"func_code_index": [
1548,
1683
]
} | 8,238 | |||
UniverseFactory | UniverseFactory.sol | 0xe62e470c8fba49aea4e87779d536c5923d01bb95 | Solidity | Order | library Order {
using SafeMathUint256 for uint256;
enum Types {
Bid, Ask
}
enum TradeDirections {
Long, Short
}
struct Data {
// Contracts
IOrders orders;
IMarket market;
IAugur augur;
// Order
bytes32 id;
... | create | function create(IController _controller, address _creator, uint256 _outcome, Order.Types _type, uint256 _attoshares, uint256 _price, IMarket _market, bytes32 _betterOrderId, bytes32 _worseOrderId) internal view returns (Data) {
require(_outcome < _market.getNumberOfOutcomes());
require(_price < _market.getNum... | //
// Constructor
//
// No validation is needed here as it is simply a librarty function for organizing data | LineComment | v0.4.20+commit.3155dd80 | bzzr://f29d68c633b53a5bd945494fdcf325defec4766c304d51219d778f057b4317ae | {
"func_code_index": [
718,
1635
]
} | 8,239 | |||
UniverseFactory | UniverseFactory.sol | 0xe62e470c8fba49aea4e87779d536c5923d01bb95 | Solidity | Order | library Order {
using SafeMathUint256 for uint256;
enum Types {
Bid, Ask
}
enum TradeDirections {
Long, Short
}
struct Data {
// Contracts
IOrders orders;
IMarket market;
IAugur augur;
// Order
bytes32 id;
... | getOrderId | function getOrderId(Order.Data _orderData) internal view returns (bytes32) {
if (_orderData.id == bytes32(0)) {
bytes32 _orderId = _orderData.orders.getOrderId(_orderData.orderType, _orderData.market, _orderData.amount, _orderData.price, _orderData.creator, block.number, _orderData.outcome, _orderData.mon... | //
// "public" functions
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://f29d68c633b53a5bd945494fdcf325defec4766c304d51219d778f057b4317ae | {
"func_code_index": [
1683,
2209
]
} | 8,240 | |||
UniverseFactory | UniverseFactory.sol | 0xe62e470c8fba49aea4e87779d536c5923d01bb95 | Solidity | Order | library Order {
using SafeMathUint256 for uint256;
enum Types {
Bid, Ask
}
enum TradeDirections {
Long, Short
}
struct Data {
// Contracts
IOrders orders;
IMarket market;
IAugur augur;
// Order
bytes32 id;
... | escrowFundsForBid | function escrowFundsForBid(Order.Data _orderData) private returns (bool) {
require(_orderData.moneyEscrowed == 0);
require(_orderData.sharesEscrowed == 0);
uint256 _attosharesToCover = _orderData.amount;
uint256 _numberOfOutcomes = _orderData.market.getNumberOfOutcomes();
// Figure out how ma... | //
// Private functions
// | LineComment | v0.4.20+commit.3155dd80 | bzzr://f29d68c633b53a5bd945494fdcf325defec4766c304d51219d778f057b4317ae | {
"func_code_index": [
3447,
5252
]
} | 8,241 | |||
CoreVault | contracts/INBUNIERC20.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | INBUNIERC20 | interface INBUNIERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
99,
159
]
} | 8,242 |
CoreVault | contracts/INBUNIERC20.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | INBUNIERC20 | interface INBUNIERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
242,
315
]
} | 8,243 |
CoreVault | contracts/INBUNIERC20.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | INBUNIERC20 | interface INBUNIERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
539,
621
]
} | 8,244 |
CoreVault | contracts/INBUNIERC20.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | INBUNIERC20 | interface INBUNIERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
900,
988
]
} | 8,245 |
CoreVault | contracts/INBUNIERC20.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | INBUNIERC20 | interface INBUNIERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
1652,
1731
]
} | 8,246 |
CoreVault | contracts/INBUNIERC20.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | INBUNIERC20 | interface INBUNIERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
2044,
2146
]
} | 8,247 |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | onERC721Received | function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) public virtual override returns (bytes4) {
return this.onERC721Received.selector;
}
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
1860,
2043
]
} | 8,248 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | onERC1155BatchReceived | function onERC1155BatchReceived(address operator, address from, uint256[] memory ids, uint256[] memory values, bytes calldata data) public virtual override returns (bytes4) {
return this.onERC1155Received.selector;
}
| /**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
is called at the end of a `safeBatchTransferFrom` after the balances have
been updated. To accept the transfer(s), this must return
`bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
(i.e.... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
2962,
3182
]
} | 8,249 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | setRaffleTicket | function setRaffleTicket(address raffleTicketAddress) public override onlyManager {
require(raffleTicketAddress != address(0), 'Raffle: RaffleTicket address cannot be zero');
raffleTicket = ERC1155(raffleTicketAddress);
}
| /**
* @dev It allows to set a new raffle ticket.
* @param raffleTicketAddress The raffleTicketAddress. It must be ERC-1155 token.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
3324,
3552
]
} | 8,250 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | onERC1155Received | function onERC1155Received(address operator, address from, uint256 id, uint256 value, bytes calldata data) public virtual override returns (bytes4) {
return this.onERC1155Received.selector;
}
| /**
* @dev Handles the receipt of a single ERC1155 token type. This function is
called at the end of a `safeTransferFrom` after the balance has been updated.
To accept the transfer, this must return
`bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
(i.e. 0xf23a6e61, or its ow... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
4310,
4505
]
} | 8,251 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | supportsInterface | function supportsInterface(bytes4 interfaceID) public pure override(IERC165, AccessControlEnumerable) returns (bool) {
return interfaceID == 0x01ffc9a7 || // ERC165
interfaceID == 0x4e2312e0; // ERC1155_ACCEPTED ^ ERC1155_BATCH_ACCEPTED;
}
| // ERC165 interface support | LineComment | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
4536,
4796
]
} | 8,252 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | startRaffle | function startRaffle(uint startDate, uint endDate) public override onlyManager returns (uint256) {
require(startDate > now(), 'Raffle: Start date should be later than current block time');
require(startDate < endDate, 'Raffle: End date should be later than start date');
raffleInfo.push();
uint256 newIndex = raffle... | /**
* @dev Initiate a new raffle.
* Only the Owner can call this method.
* @param startDate The timestamp after when a raffle starts
* @param endDate The timestamp after when a raffle can be finalised
* @return (uint256) the index of the raffle
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
5053,
5600
]
} | 8,253 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getPlayersLength | function getPlayersLength(uint256 raffleIndex) public override view returns (uint256) {
return raffleInfo[raffleIndex].players.length;
}
| /**
* @dev This function helps to get a better picture of a given raffle. It also
* @dev helps in verifying offchain the fairness of the Raffle.
* @param raffleIndex The index of the Raffle to check.
* @return (uint256) the number of players in the raffle
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
5867,
6008
]
} | 8,254 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getPrizesLength | function getPrizesLength(uint256 raffleIndex) public override view returns (uint256) {
return raffleInfo[raffleIndex].prizes.length;
}
| /**
* @dev This function helps to get a better picture of a given raffle by
* @dev helping retrieving the number of Prizes
* @param raffleIndex The index of the Raffle to check.
* @return (uint256) the number of prizes in the raffle
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
6252,
6391
]
} | 8,255 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | changeWithdrawGracePeriod | function changeWithdrawGracePeriod(uint256 period) public onlyManager override {
require(period >= 60 * 60 * 24 * 7, 'Withdraw grace period too short'); // 1 week in seconds
withdrawGracePeriod = period;
}
| /**
* @dev With this function the Owner can change the grace period
* @dev to withdraw unclamed Prices
* @param period The length of the grace period in seconds
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
6562,
6774
]
} | 8,256 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getPlayerAtIndex | function getPlayerAtIndex(
uint256 raffleIndex,
uint256 playerIndex
)
public
view
override
raffleExists(raffleIndex)
returns (address)
{
require(playerIndex < raffleInfo[raffleIndex].players.length, 'Raffle: No Player at index');
return raffleInfo[raffleIndex].players[playerIndex];
}
| /**
* @dev A handy getter for a Player of a given Raffle.
* @param raffleIndex the index of the Raffle where to get the Player
* @param playerIndex the index of the Player to get
* @return (address) the address of the player
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
7010,
7317
]
} | 8,257 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getPrizeAtIndex | function getPrizeAtIndex(uint256 raffleIndex, uint256 prizeIndex) public override view returns (address, uint256) {
return (
raffleInfo[raffleIndex].prizes[prizeIndex].tokenAddress,
raffleInfo[raffleIndex].prizes[prizeIndex].tokenId
);
}
| /**
* @dev A handy getter for the Prizes
* @param raffleIndex the index of the Raffle where to get the Player
* @param prizeIndex the index of the Prize to get
* @return (address, uint256) the prize address and the prize tokenId
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
7557,
7806
]
} | 8,258 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | draftWinners | function draftWinners(
uint256 raffleIndex,
uint256 entropy
)
public
override
onlyManager
raffleExists(raffleIndex)
raffleIsConcluded(raffleIndex)
{
require(raffleInfo[raffleIndex].randomResult == 0, 'Raffle: Randomness already requested');
raffleInfo[raffleIndex].randomResult = 1; // 1 is our flag for 'pendi... | /**
* @dev This method disclosed the committed message and closes the current raffle.
* Only the Owner can call this method
* @param raffleIndex the index of the Raffle where to draft winners
* @param entropy The message in clear. It will be used as part of entropy from Chainlink
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
8103,
8724
]
} | 8,259 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | claimPrize | function claimPrize(
uint256 raffleIndex,
uint prizeIndex
)
public
override
raffleExists(raffleIndex)
raffleIsConcluded(raffleIndex)
{
require(
raffleInfo[raffleIndex].randomResult != 0 &&
raffleInfo[raffleIndex].randomResult != 1,
'Raffle: Random Number not drafted yet'
);
address prizeWinner = getPriz... | /**
* @dev Allows a winner to withdraw his/her prize
* @param raffleIndex The index of the Raffle where to find the Price to withdraw
* @param prizeIndex The index of the Prize to withdraw
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
8927,
9441
]
} | 8,260 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getPrizeWinner | function getPrizeWinner(uint256 raffleIndex, uint256 prizeIndex) public override view returns (address) {
uint winnerIndex = getPrizeWinnerIndex(raffleIndex, prizeIndex);
return raffleInfo[raffleIndex].players[winnerIndex];
}
| /**
* @dev It maps a given Prize with the address of the winner.
* @param raffleIndex The index of the Raffle where to find the Price winner
* @param prizeIndex The index of the prize to withdraw
* @return (uint256) The index of the winning account
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
9701,
9934
]
} | 8,261 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getPrizeWinnerIndex | function getPrizeWinnerIndex(
uint256 raffleIndex,
uint256 prizeIndex
)
public
override
view
raffleIsConcluded(raffleIndex)
returns (uint256)
{
require(getPlayersLength(raffleIndex) > 0, 'Raffle: Raffle concluded without Players');
require(
raffleInfo[raffleIndex].randomResult != 0 &&
raffleInfo[raffleInde... | /**
* @dev It maps a given Prize with the index of the winner.
* @param raffleIndex The index of the Raffle where to find the Price winner
* @param prizeIndex The index of the prize to withdraw
* @return (uint256) The index of the winning account
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
10192,
10748
]
} | 8,262 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | unlockUnclaimedPrize | function unlockUnclaimedPrize(
uint256 raffleIndex,
uint prizeIndex
)
public
override
onlyPrizeManager
raffleIsConcluded(raffleIndex)
{
require(
now() >= raffleInfo[raffleIndex].endDate + withdrawGracePeriod ||
getPlayersLength(raffleIndex) == 0, // if there is no players, we can withdraw immediately
'Raff... | /**
* @dev Prevents locked NFT by allowing the Owner to withdraw an unclaimed
* @dev prize after a grace period has passed
* @param raffleIndex The index of the Raffle containing the Prize to withdraw
* @param prizeIndex The index of the prize to withdraw
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
11020,
11449
]
} | 8,263 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | _addPrize | function _addPrize(
uint256 raffleIndex,
address tokenAddress,
uint256 tokenId,
PrizeType prizeType
) internal {
Prize memory prize;
prize.tokenAddress = tokenAddress;
prize.tokenId = tokenId;
prize.prizeType = prizeType;
raffleInfo[raffleIndex].prizes.push(prize);
uint256 prizeIndex = raffleInfo[raffleInde... | /**
* @dev Once a non-ticket NFT is received, it is considered as prize
* @dev play multiple tickets.
* @notice MUST trigger PrizeAdded event
* @dev With this function, we add the received NFT as raffle Prize
* @param tokenAddress the address of the NFT received
* @param tokenId the id of the NFT received
... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
11835,
12236
]
} | 8,264 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | addERC1155Prize | function addERC1155Prize(
uint256 raffleIndex,
address tokenAddress,
uint256 tokenId
)
public
override
onlyPrizeManager
raffleExists(raffleIndex)
raffleIsNotConcluded(raffleIndex)
{
ERC1155 prizeInstance = ERC1155(tokenAddress);
prizeInstance.safeTransferFrom(msg.sender, address(this), tokenId, 1, '');
_a... | /**
* @dev Once a non-ticket NFT is received, it is considered as prize
* @dev play multiple tickets.
* @notice MUST trigger PrizeAdded event
* @dev With this function, we add the received ERC1155 NFT as raffle Prize
* @param tokenAddress the address of the NFT received
* @param tokenId the id of the NFT re... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
12563,
12963
]
} | 8,265 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | addERC721Prize | function addERC721Prize(
uint256 raffleIndex,
address tokenAddress,
uint256 tokenId
)
public
override
onlyPrizeManager
raffleExists(raffleIndex)
raffleIsNotConcluded(raffleIndex)
{
ERC721 prizeInstance = ERC721(tokenAddress);
prizeInstance.safeTransferFrom(msg.sender, address(this), tokenId);
_addPrize(ra... | /**
* @dev Once a non-ticket NFT is received, it is considered as prize
* @dev play multiple tickets.
* @notice MUST trigger PrizeAdded event
* @dev With this function, we add the received ERC721 NFT as raffle Prize
* @param tokenAddress the address of the NFT received
* @param tokenId the id of the NFT rec... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
13289,
13678
]
} | 8,266 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | enterGame | function enterGame(
uint256 raffleIndex,
uint256 ticketsAmount
)
public
override
raffleExists(raffleIndex)
raffleIsRunning(raffleIndex)
{
raffleTicket.safeTransferFrom(msg.sender, address(this), 0, ticketsAmount, '');
for (uint i = 0; i < ticketsAmount; i++) {
raffleInfo[raffleIndex].players.push(msg.sender... | /**
* @dev Anyone with a valid ticket can enter the raffle. One player can also
* @dev play multiple tickets.
* @notice MUST trigger EnteredGame event
* @param raffleIndex The index of the Raffle to enter
* @param ticketsAmount the number of tickets to play
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
13948,
14380
]
} | 8,267 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | _transferPrize | function _transferPrize(uint256 raffleIndex, uint prizeIndex, address winnerAddress) internal {
Prize storage prize = raffleInfo[raffleIndex].prizes[prizeIndex];
if(prize.prizeType == PrizeType.ERC1155) {
ERC1155 prizeInstance = ERC1155(prize.tokenAddress);
prizeInstance.safeTransferFrom(address(this), winnerAd... | /**
* @dev It transfers the prize to a given address.
* @notice MUST trigger WinnersDrafted event
* @param raffleIndex The index of the Raffle to enter
* @param prizeIndex The index of the prize to withdraw
* @param winnerAddress The address of the winner
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
14648,
15279
]
} | 8,268 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | getRandomNumber | function getRandomNumber(
uint256 raffleIndex,
uint256 userProvidedSeed
)
internal
returns (bytes32 requestId)
{
require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
bytes32 requestId = requestRandomness(keyHash, fee, userProvidedSeed);
randomnessRequests[requestId] = ra... | /**
* @dev Requests randomness from a user-provided seed
* @param raffleIndex The index of the Raffle to to require randomness for
* @param userProvidedSeed The seed provided by the Owner
* @return requestId (bytes32) the request id
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
15523,
15964
]
} | 8,269 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | fulfillRandomness | function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
uint256 raffleIndex = randomnessRequests[requestId];
require(raffleInfo[raffleIndex].randomResult == 1, 'Raffle: Request already fulfilled');
raffleInfo[raffleIndex].randomResult = randomness;
emit WinnersDrafted(randomnessRequ... | /**
* @dev Callback function used by VRF Coordinator
* @notice MUST trigger WinnersDrafted event
* @param requestId The id of the request being fulfilled
* @param randomness The result of the randomness request
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
16186,
16543
]
} | 8,270 | |
Raffle | contracts/Raffle/Raffle.sol | 0x13838388afa16c7a2507dd65feb961b53bb7b78c | Solidity | Raffle | contract Raffle is IRaffle, RaffleAdminAccessControl, IERC721Receiver, IERC1155Receiver, VRFConsumerBase {
bytes32 internal keyHash;
uint256 internal fee;
mapping(bytes32 => uint256) public randomnessRequests;
RaffleInfo[] public raffleInfo;
ERC1155 public raffleTicket;
uint256 public withdrawGracePeriod;
c... | /// @title A provably fair NFT raffle
/// @author Valerio Leo @valerioHQ | NatSpecSingleLine | now | function now() internal view returns (uint256) {
return block.timestamp;
}
| /**
* @dev A simple time util
* @return (uint256) current block timestamp
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | {
"func_code_index": [
16629,
16707
]
} | 8,271 | |
RocketFuelV2 | RocketFuelV2.sol | 0x6f8655032885e22268a74703b76b43db0acef582 | Solidity | RocketFuelV2 | contract RocketFuelV2 is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isEx... | name | function name() public pure returns (string memory) {
return _name;
}
| //std ERC20: | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://da73f3f16b109b70329266f2661ff6afbd2a2b9bd4661a751b78d4f9ee193a54 | {
"func_code_index": [
3704,
3792
]
} | 8,272 | ||
RocketFuelV2 | RocketFuelV2.sol | 0x6f8655032885e22268a74703b76b43db0acef582 | Solidity | RocketFuelV2 | contract RocketFuelV2 is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isEx... | totalSupply | function totalSupply() public view override returns (uint256) {
return _tTotal;
}
| //override ERC20: | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://da73f3f16b109b70329266f2661ff6afbd2a2b9bd4661a751b78d4f9ee193a54 | {
"func_code_index": [
4000,
4100
]
} | 8,273 | ||
RocketFuelV2 | RocketFuelV2.sol | 0x6f8655032885e22268a74703b76b43db0acef582 | Solidity | RocketFuelV2 | contract RocketFuelV2 is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isEx... | excludeFromReward | function excludeFromReward(address account) public onlyOwner() {
require(!_isExcluded[account], "Account is already excluded");
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
| //@dev kept original RFI naming -> "reward" as in reflection | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://da73f3f16b109b70329266f2661ff6afbd2a2b9bd4661a751b78d4f9ee193a54 | {
"func_code_index": [
6928,
7266
]
} | 8,274 | ||
RocketFuelV2 | RocketFuelV2.sol | 0x6f8655032885e22268a74703b76b43db0acef582 | Solidity | RocketFuelV2 | contract RocketFuelV2 is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isEx... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
valuesFromGetValues memory s = _getValues(tAmount, takeFee, isSell);
if (_isExcluded[sender] ) { //from excluded
_tOwned[sender] = _tOwned[sender]-tAmount;
}
if (_isExcl... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://da73f3f16b109b70329266f2661ff6afbd2a2b9bd4661a751b78d4f9ee193a54 | {
"func_code_index": [
15712,
16932
]
} | 8,275 | ||
RocketFuelV2 | RocketFuelV2.sol | 0x6f8655032885e22268a74703b76b43db0acef582 | Solidity | RocketFuelV2 | contract RocketFuelV2 is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isEx... | rescueBNB | function rescueBNB(uint256 weiAmount) external onlyOwner{
require(address(this).balance >= weiAmount, "insufficient BNB balance");
payable(msg.sender).transfer(weiAmount);
}
| //Use this in case BNB are sent to the contract by mistake | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://da73f3f16b109b70329266f2661ff6afbd2a2b9bd4661a751b78d4f9ee193a54 | {
"func_code_index": [
21172,
21373
]
} | 8,276 | ||
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @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://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
336,
396
]
} | 8,277 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | 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://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
89,
266
]
} | 8,278 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | 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://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
350,
630
]
} | 8,279 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | 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://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
744,
860
]
} | 8,280 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | 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://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
924,
1054
]
} | 8,281 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | TokenVesting | function TokenVesting(
address _beneficiary,
uint256 _start,
uint256 _cliff,
uint256 _duration,
bool _revocable
)
public
{
require(_beneficiary != address(0));
require(_cliff <= _duration);
beneficiary = _beneficiary;
revocable = _revocable;
duration = _duration;
cliff = _start.a... | /**
* @dev Creates a vesting contract that vests its balance of any ERC20 token to the
* _beneficiary, gradually in a linear fashion until _start + _duration. By then all
* of the balance will have vested.
* @param _beneficiary address of the beneficiary to whom vested tokens are transferred
* @param _cliff d... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
1048,
1436
]
} | 8,282 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | release | function release(ERC20Basic token) public {
uint256 unreleased = releasableAmount(token);
require(unreleased > 0);
released[token] = released[token].add(unreleased);
require(token.transfer(beneficiary, unreleased));
emit Released(unreleased);
}
| /**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
1560,
1843
]
} | 8,283 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | revoke | function revoke(ERC20Basic token) public onlyOwner {
require(revocable);
require(!revoked[token]);
uint256 balance = token.balanceOf(this);
uint256 unreleased = releasableAmount(token);
uint256 refund = balance.sub(unreleased);
revoked[token] = true;
require(token.transfer(owner, refund));
... | /**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
2055,
2419
]
} | 8,284 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | releasableAmount | function releasableAmount(ERC20Basic token) public view returns (uint256) {
return vestedAmount(token).sub(released[token]);
}
| /**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
2576,
2713
]
} | 8,285 | |
TokenVesting | TokenVesting.sol | 0xdd2f263fe642769b3b3b9c164c565a16beb508a0 | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | vestedAmount | function vestedAmount(ERC20Basic token) public view returns (uint256) {
uint256 currentBalance = token.balanceOf(this);
uint256 totalBalance = currentBalance.add(released[token]);
if (block.timestamp < cliff) {
return 0;
} else if (block.timestamp >= start.add(duration) || revoked[token]) {
retu... | /**
* @dev Calculates the amount that has already vested.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://7063eb0d7b7ec16be1eb99c49ee9f6d6b1547011de2e7d1f16e4ea6509a6342a | {
"func_code_index": [
2841,
3292
]
} | 8,286 | |
BlocBurgers | contracts/BlocBurgers.sol | 0x58d2035cc2aa0d9d8b8a02b1192bf20d17bf726f | Solidity | BlocBurgers | contract BlocBurgers is ERC721Enumerable, Ownable {
using SafeMath for uint256;
uint256 public ticketCounter = 0;
uint256 public reservationPrice = 0.069 ether;
uint256 public maxReservePerTransaction = 20;
uint256 public maxReservePublic = 40;
uint256 public maxReservePresale = 2;
uint25... | /*
████████████████████
██ ██
██ ██ ██ ██
██ ████ ████ ██
██ ████ ██
██ ██
████████████████████████████████████
██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██
████████████████████████████████
██░░░░░░░░░░░░░░░░░░░░░░░░... | Comment | claimAll | function claimAll() external {
require(publicClaimAllowed, "Public claim is disabled");
uint256 walletReservedPresaleClaims = reservedPresaleClaims[_msgSender()];
uint256 walletReservedPublicClaims = reservedPublicClaims[_msgSender()];
uint256 walletPublicClaimCount = publicClaimCounts[_msgSender()];
... | // public sale means all claims are available, no need to check presale state | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4232,
5491
]
} | 8,287 | ||
Dalmatians | @openzeppelin/contracts/access/Ownable.sol | 0x2544cde635fab0a56202dbfe4feab2ec40eef3ab | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
... | /**
* @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 virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.7.0+commit.9e61f92b | None | ipfs://4aec117c3c6006628e910a5c206f5e5a428ce1b67d6025e9a69f46b58113026d | {
"func_code_index": [
530,
622
]
} | 8,288 |
Dalmatians | @openzeppelin/contracts/access/Ownable.sol | 0x2544cde635fab0a56202dbfe4feab2ec40eef3ab | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
... | /**
* @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.7.0+commit.9e61f92b | None | ipfs://4aec117c3c6006628e910a5c206f5e5a428ce1b67d6025e9a69f46b58113026d | {
"func_code_index": [
1181,
1334
]
} | 8,289 |
Dalmatians | @openzeppelin/contracts/access/Ownable.sol | 0x2544cde635fab0a56202dbfe4feab2ec40eef3ab | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() internal {
... | /**
* @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.7.0+commit.9e61f92b | None | ipfs://4aec117c3c6006628e910a5c206f5e5a428ce1b67d6025e9a69f46b58113026d | {
"func_code_index": [
1484,
1770
]
} | 8,290 |
Dalmatians | @openzeppelin/contracts/access/Ownable.sol | 0x2544cde635fab0a56202dbfe4feab2ec40eef3ab | Solidity | Dalmatians | contract Dalmatians is ERC721, Ownable {
using SafeMath for uint256;
string public Dalmatians_PROVENANCE = "";
string public LICENSE_TEXT = "";
bool licenseLocked = false;
uint256 public Price = 10000000000000000; // 0.01 ETH
uint256 public constant MAX_Purchase = 50;
uint... | tokenLicense | function tokenLicense(uint256 _id) public view returns (string memory) {
require(_id < totalSupply(), "CHOOSE A Dalmatian WITHIN RANGE");
return LICENSE_TEXT;
}
| // Returns the license for tokens | LineComment | v0.7.0+commit.9e61f92b | None | ipfs://4aec117c3c6006628e910a5c206f5e5a428ce1b67d6025e9a69f46b58113026d | {
"func_code_index": [
1766,
1954
]
} | 8,291 | ||
Dalmatians | @openzeppelin/contracts/access/Ownable.sol | 0x2544cde635fab0a56202dbfe4feab2ec40eef3ab | Solidity | Dalmatians | contract Dalmatians is ERC721, Ownable {
using SafeMath for uint256;
string public Dalmatians_PROVENANCE = "";
string public LICENSE_TEXT = "";
bool licenseLocked = false;
uint256 public Price = 10000000000000000; // 0.01 ETH
uint256 public constant MAX_Purchase = 50;
uint... | lockLicense | function lockLicense() public onlyOwner {
licenseLocked = true;
emit licenseisLocked(LICENSE_TEXT);
}
| // Locks the license to prevent further changes | LineComment | v0.7.0+commit.9e61f92b | None | ipfs://4aec117c3c6006628e910a5c206f5e5a428ce1b67d6025e9a69f46b58113026d | {
"func_code_index": [
2010,
2139
]
} | 8,292 | ||
Dalmatians | @openzeppelin/contracts/access/Ownable.sol | 0x2544cde635fab0a56202dbfe4feab2ec40eef3ab | Solidity | Dalmatians | contract Dalmatians is ERC721, Ownable {
using SafeMath for uint256;
string public Dalmatians_PROVENANCE = "";
string public LICENSE_TEXT = "";
bool licenseLocked = false;
uint256 public Price = 10000000000000000; // 0.01 ETH
uint256 public constant MAX_Purchase = 50;
uint... | changeLicense | function changeLicense(string memory _license) public onlyOwner {
require(licenseLocked == false, "License already locked");
LICENSE_TEXT = _license;
}
| // Change the license | LineComment | v0.7.0+commit.9e61f92b | None | ipfs://4aec117c3c6006628e910a5c206f5e5a428ce1b67d6025e9a69f46b58113026d | {
"func_code_index": [
2169,
2348
]
} | 8,293 | ||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | uri | function uri(uint256 tokenId) override public view returns (string memory) { return(string(abi.encodePacked(_BASE_URI, Strings.toString(tokenId), ".json"))); }
| //URI for decoding storage of tokenIDs | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
873,
1036
]
} | 8,294 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | SpiritSeedMint | function SpiritSeedMint(uint numberOfTokens) public payable
{
require(_SALE_IS_ACTIVE, "Sale must be active to mint Seeds");
require(numberOfTokens <= _MAX_SEEDS_PURCHASE, "Can only mint 5 Seeds at a time");
require(_SEEDS_MINTED.add(numberOfTokens) <= _MAX_SEEDS, "Purchase would exceed max supply of Seeds"... | //Mints SpiritSeed Seeds | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1067,
1954
]
} | 8,295 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | _beforeTokenTransfer | function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override
{
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
}
| //Conforms to ERC-1155 Standard | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1996,
2263
]
} | 8,296 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __batchTransfer | function __batchTransfer(address[] memory recipients, uint256[] memory tokenIDs, uint256[] memory amounts) public onlyOwner
{
for(uint i=0; i < recipients.length; i++)
{
_safeTransferFrom(msg.sender, recipients[i], tokenIDs[i], amounts[i], "");
}
}
| //Batch Transfers Tokens | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2294,
2595
]
} | 8,297 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __reserveSeeds | function __reserveSeeds(uint256 amt) public onlyOwner
{
for(uint i=0; i<amt; i++)
{
_mint(msg.sender, i, 1, "");
_SEEDS_MINTED += 1;
}
}
| //Reserves Seeds | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2618,
2817
]
} | 8,298 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __setBaseURI | function __setBaseURI(string memory BASE_URI) public onlyOwner { _BASE_URI = BASE_URI; }
| //Sets Base URI For .json hosting | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2857,
2949
]
} | 8,299 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __setMaxSeeds | function __setMaxSeeds(uint256 MAX_SEEDS) public onlyOwner { _MAX_SEEDS = MAX_SEEDS; }
| //Sets Max Seeds for future Seed Expansion Packs | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3004,
3094
]
} | 8,300 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __setMaxSeedsPurchase | function __setMaxSeedsPurchase(uint256 MAX_SEEDS_PURCHASE) public onlyOwner { _MAX_SEEDS_PURCHASE = MAX_SEEDS_PURCHASE; }
| //Sets Max Seeds Purchaseable by Wallet | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3140,
3265
]
} | 8,301 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __setSeedPrice | function __setSeedPrice(uint256 SEED_PRICE) public onlyOwner { _SEED_PRICE = SEED_PRICE; }
| //Sets Future Seed Price | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3296,
3390
]
} | 8,302 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __flip_allowMultiplePurchases | function __flip_allowMultiplePurchases() public onlyOwner { _ALLOW_MULTIPLE_PURCHASES = !_ALLOW_MULTIPLE_PURCHASES; }
| //Flips Allowing Multiple Purchases for future Seed Expansion Packs | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3464,
3585
]
} | 8,303 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __flip_saleState | function __flip_saleState() public onlyOwner { _SALE_IS_ACTIVE = !_SALE_IS_ACTIVE; }
| //Flips Sale State | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3614,
3702
]
} | 8,304 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __withdraw | function __withdraw() public onlyOwner { payable(msg.sender).transfer(address(this).balance); }
| //Withdraws Ether from Contract | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3740,
3839
]
} | 8,305 | ||||
SpiritSeed | contracts/SpiritSeed.sol | 0x9b07bb421df4e2d52d5997da54a99cff33d5ed6b | Solidity | SpiritSeed | contract SpiritSeed is ERC1155, Ownable, Pausable, ERC1155Burnable
{
using SafeMath for uint256;
//Initialization
string public constant name = "SpiritSeed";
string public constant symbol = "SEED";
string public _BASE_URI = "https://ipfs.io/ipfs/QmXXAE5fQmPkx7Jkeoj1Kq6ANWSqVov5mCzgmAwf8Fmcxs/";
... | __pause | function __pause() public onlyOwner { _pause(); }
| //Pauses Contract | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3863,
3916
]
} | 8,306 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.