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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | getMooncakeTextWithLevel | function getMooncakeTextWithLevel(uint256 tokenId, uint256 level) public view returns (string memory) {
uint8[6] memory slotIds = getMooncakeTextSlotIds(tokenId, level);
string memory output = slot0[slotIds[0]];
if (slotIds[1] < 255) {
output = string(abi.encodePacked(output, slot1[slotIds[1]]... | /**
* @dev Return the mooncake text for a given tokenId and its level
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
10470,
11467
]
} | 14,400 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | getMooncakeText | function getMooncakeText(uint256 tokenId) public view returns (string memory) {
uint256 tokenLevel = tokenLevels[tokenId];
return getMooncakeTextWithLevel(tokenId, tokenLevel);
}
| /**
* @dev Return the mooncake text for a given tokenId
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
11546,
11752
]
} | 14,401 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | tokenURIWithLevel | function tokenURIWithLevel(uint256 tokenId, uint256 tokenLevel) public view returns (string memory) {
string[17] memory parts;
parts[
0
] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>foreignObject { fill: black; font-family: "DM Sans... | /**
* @dev Get token URI at a specified token level
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
11827,
13874
]
} | 14,402 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | tokenURI | function tokenURI(uint256 tokenId) public view override returns (string memory) {
uint256 tokenLevel = tokenLevels[tokenId];
return tokenURIWithLevel(tokenId, tokenLevel);
}
| /**
* @dev Retrieve the current tokenURI (embedded SVG)
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
13953,
14154
]
} | 14,403 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | mintWithAffiliate | function mintWithAffiliate(uint256 numberOfNfts, address affiliate) public payable nonReentrant {
// Checks
require(!contractSealed, "Contract sealed");
require(block.timestamp >= SALES_START_TIMESTAMP, "Not started");
require(numberOfNfts > 0, "Cannot mint 0 NFTs");
require(numberOfNfts <=... | /**
* @dev Mint tokens
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
14200,
15092
]
} | 14,404 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | mintNfts | function mintNfts(uint256 numberOfNfts) external payable {
mintWithAffiliate(numberOfNfts, address(0));
}
| /**
* @dev Mint tokens
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
15138,
15262
]
} | 14,405 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | claimOneFreeNft | function claimOneFreeNft() external payable nonReentrant {
// Checks
require(!contractSealed, "Contract sealed");
require(block.timestamp >= CLAIM_START_TIMESTAMP, "Not started");
uint256 total = totalSupply();
require(total + 1 <= maxNftSupply, "Sold out");
require(numFreeMints + 1 <=... | /**
* @dev Claim a free one
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
15313,
15899
]
} | 14,406 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | tokenDetailOfOwnerByIndex | function tokenDetailOfOwnerByIndex(address _owner, uint256 index)
public
view
returns (
uint256,
uint256,
uint256,
string memory
)
{
uint256 tokenId = tokenOfOwnerByIndex(_owner, index);
uint256 tokenLevel = tokenLevels[tokenId];
uint256 tokenTrans... | /**
* @dev Return detail information about an owner's token (tokenId, current level, potential level, uri)
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
16029,
16561
]
} | 14,407 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | deployerMintMultiple | function deployerMintMultiple(address[] calldata recipients) external payable onlyDeployer {
require(!contractSealed, "Contract sealed");
uint256 total = totalSupply();
require(total + recipients.length <= maxNftSupply, "Sold out");
for (uint256 i = 0; i < recipients.length; i++) {
requ... | /**
* @dev Reserve tokens and gift tokens
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
16626,
17104
]
} | 14,408 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | deployerSetParam | function deployerSetParam(uint256 key, uint256 value) external onlyDeployer {
require(!contractSealed, "Contract sealed");
if (key == 0) {
SALES_START_TIMESTAMP = value;
} else if (key == 1) {
CLAIM_START_TIMESTAMP = value;
} else if (key == 2) {
MINT_FEE = value;
}... | /**
* @dev Deployer parameters
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
17158,
17697
]
} | 14,409 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | deployerWithdraw | function deployerWithdraw(uint256 amount) external onlyDeployer {
(bool success, ) = msg.sender.call{value: amount}("");
require(success, "Transfer failed.");
}
| /**
* @dev Deployer withdraws ether from this contract
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
17775,
17963
]
} | 14,410 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | deployerWithdraw20 | function deployerWithdraw20(IERC20 token) external onlyDeployer {
if (address(token) == 0x0000000000000000000000000000000000000000) {
payable(owner()).transfer(address(this).balance);
(bool success, ) = owner().call{value: address(this).balance}("");
require(success, "Transfer failed.");... | /**
* @dev Deployer withdraws ERC20s
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
18023,
18470
]
} | 14,411 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Mooncake | contract Mooncake is ERC721Enumerable, ReentrancyGuard, Ownable {
string[] public slot0 = [
"Almond paste ",
"Azuki bean paste ",
unicode"Açaí coconut custard ",
"Baileys custard ",
"Baked sweet potato ",
"Black sesame paste ",
"Blackberry custard ",
... | deployerSealContract | function deployerSealContract() external onlyDeployer {
contractSealed = true;
}
| /**
* @dev Seal this contract
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
18523,
18622
]
} | 14,412 | ||
Mooncake | Mooncake.sol | 0x20210815fed2e691688d355031fe5b4fc7c241d4 | Solidity | Base64 | library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (le... | /// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <brecht@loopring.org> | NatSpecSingleLine | encode | function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (len == 0) return "";
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((len + 2) / 3);
// Add some extra buffer at the end
bytes memory result = new bytes(encodedLen + 32);
... | /// @notice Encodes some bytes to the base64 representation | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://97685e33481a799223c6250e9a6ee76cbdb22f16389e70a22151759f0ec1a589 | {
"func_code_index": [
190,
1802
]
} | 14,413 |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner`
* of the contract to the sender account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the current o... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner
* @param newOwner The address to transfer ownership to
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
588,
732
]
} | 14,414 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address
* @param _owner The address to query the the balance of
* @return An uint256 representing the amount owned by the passed address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
1001,
1121
]
} | 14,415 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
require(_to != address(0));
require(balances[msg.sender] >= _value);
assert(balances[_to] + _value >= balances[_to]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_valu... | /**
* @dev Transfer token to a specified address
* @param _to The address to transfer to
* @param _value The amount to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
1290,
1716
]
} | 14,416 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
assert(balances[_to] + _value >= balances[_to]);
balances[_from] = balances[_from].s... | /**
* @dev Transfer tokens from one address to another
* @param _from The address which you want to send tokens from
* @param _to The address which you want to transfer to
* @param _value The amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
1984,
2544
]
} | 14,417 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender
* @param _spender The address which will spend the funds
* @param _value The amount of tokens to be spent
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
2786,
3005
]
} | 14,418 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens than an owner allowed to a spender
* @param _owner The address which owns the funds
* @param _spender The address which will spend the funds
* @return A uint specifing the amount of tokens still avaible for the spender
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
3315,
3464
]
} | 14,419 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | mintTokens | function mintTokens(address _account, uint256 _mintedAmount) public onlyOwner returns (bool success){
require(_mintedAmount <= _unmintedTokens);
balances[_account] = balances[_account].add(_mintedAmount);
_unmintedTokens = _unmintedTokens.sub(_mintedAmount);
totalSupply = totalSupply.add(_mintedAm... | /**
* @dev Mint SNGT tokens. No more than 500,000,000 SNGT can be minted
* @param _account The address to which new tokens will be minted
* @param _mintedAmount The amout of tokens to be minted
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
3693,
4114
]
} | 14,420 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address _spender, uint256 _addedValue) public returns (bool) {
require(_spender != address(0));
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0.
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
4419,
4752
]
} | 14,421 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address _spender, uint256 _subtractedValue) public returns (bool) {
require(_spender != address(0));
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].sub(_subtractedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0.
* Emits an Approval event.
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
5095,
5438
]
} | 14,422 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | mintTokensWithApproval | function mintTokensWithApproval(address _target, uint256 _mintedAmount, address _spender) public onlyOwner returns (bool success){
require(_mintedAmount <= _unmintedTokens);
balances[_target] = balances[_target].add(_mintedAmount);
_unmintedTokens = _unmintedTokens.sub(_mintedAmount);
totalSupply ... | /**
* @dev Mint SNGT tokens and aproves the passed address to spend the minted amount of tokens
* No more than 500,000,000 SNGT can be minted
* @param _target The address to which new tokens will be minted
* @param _mintedAmount The amout of tokens to be minted
* @param _spender The address which will spend m... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
5807,
6339
]
} | 14,423 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | burnUnmintedTokens | function burnUnmintedTokens(uint256 _burnedAmount) public onlyOwner returns (bool success){
require(_burnedAmount <= _unmintedTokens);
_unmintedTokens = _unmintedTokens.sub(_burnedAmount);
emit Burn(msg.sender, _burnedAmount);
return true;
}
| /**
* @dev Decrease amount of SNGT tokens that can be minted
* @param _burnedAmount The amount of unminted tokens to be burned
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
6495,
6782
]
} | 14,424 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | burn | function burn(address _account, uint256 _value) onlyOwner public {
require(_account != address(0));
totalSupply = totalSupply.sub(_value);
balances[_account] = balances[_account].sub(_value);
emit Burn(_account, _value);
}
| /**
* @dev Function that burns an amount of the token of a given
* account.
* @param _account The account whose tokens will be burnt.
* @param _value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
7006,
7280
]
} | 14,425 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address _account, uint256 _value) onlyOwner public {
allowed[_account][msg.sender] = allowed[_account][msg.sender].sub(_value);
burn(_account, _value);
emit Burn(_account, _value);
}
| /**
* @dev Function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param _account The account whose tokens will be burnt.
* @param _value The a... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
7667,
7906
]
} | 14,426 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SNGT | contract SNGT is Ownable, ERC20Interface {
using SafeMath for uint256;
string public constant symbol = "SNGT";
string public constant name = "SNGT";
uint8 public constant decimals = 18;
uint256 private _unmintedTokens = 500000000 * uint(10) ** decimals;
uint256 private constant decimalFa... | /**
* @title SNGT
* @dev Implemantation of the SNGT token
*/ | NatSpecMultiLine | unmintedTokens | function unmintedTokens() onlyOwner view public returns (uint256 tokens){
return _unmintedTokens;
}
| /**
* @dev Returns the number of unminted token
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
7979,
8097
]
} | 14,427 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
uint... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
89,
491
]
} | 14,428 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @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 c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
575,
859
]
} | 14,429 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @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);
uint256 c = _a - _b;
return c;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
973,
1117
]
} | 14,430 | |
SNGT | SNGT.sol | 0x7356056a1b5436248fe587d678717de801ca30e2 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
uint256 c = _a + _b;
assert(c >= _a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://aa04be0b03b74ff7108d244430887f2474b049b0d17ae167bfc46fb13c0b77dc | {
"func_code_index": [
1181,
1324
]
} | 14,431 | |
Keep3rV1JobRegistry | Keep3rV1JobRegistry.sol | 0x43f5fcb16ed5544d8ec92ac7866b8111a6f5b329 | Solidity | Keep3rV1JobRegistry | contract Keep3rV1JobRegistry {
/// @notice governance address for the governance contract
address public governance;
address public pendingGovernance;
struct _job {
uint _id;
address _address;
string _name;
string _ipfs;
string _docs;
uint ... | setGovernance | function setGovernance(address _governance) external {
require(msg.sender == governance, "setGovernance: !gov");
pendingGovernance = _governance;
}
| /**
* @notice Allows governance to change governance (for future upgradability)
* @param _governance new governance address to set
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://6c9155badd916192daed8ee4b62f48e111e046f24ce35a0e6e7d2f86ec8a2282 | {
"func_code_index": [
1995,
2170
]
} | 14,432 | ||
Keep3rV1JobRegistry | Keep3rV1JobRegistry.sol | 0x43f5fcb16ed5544d8ec92ac7866b8111a6f5b329 | Solidity | Keep3rV1JobRegistry | contract Keep3rV1JobRegistry {
/// @notice governance address for the governance contract
address public governance;
address public pendingGovernance;
struct _job {
uint _id;
address _address;
string _name;
string _ipfs;
string _docs;
uint ... | acceptGovernance | function acceptGovernance() external {
require(msg.sender == pendingGovernance, "acceptGovernance: !pendingGov");
governance = pendingGovernance;
}
| /**
* @notice Allows pendingGovernance to accept their role as governance (protection pattern)
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://6c9155badd916192daed8ee4b62f48e111e046f24ce35a0e6e7d2f86ec8a2282 | {
"func_code_index": [
2288,
2463
]
} | 14,433 | ||
XRUNE | contracts/ERC677.sol | 0x69fa0fee221ad11012bab0fdb45d444d3d2ce71c | Solidity | ERC677 | abstract contract ERC677 is ERC777, IERC677 {
/**
* @dev transfer token to a contract address with additional data if the recipient is a contact.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
* @param _data The extra data to be passed to the receiving contract.
*/
... | transferAndCall | function transferAndCall(address _to, uint _value, bytes calldata _data)
public
override
returns (bool success)
{
super.transfer(_to, _value);
emit TransferWithData(msg.sender, _to, _value, _data);
if (isContract(_to)) {
contractFallback(_to, _value, _data);
}
return true;
}
| /**
* @dev transfer token to a contract address with additional data if the recipient is a contact.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
* @param _data The extra data to be passed to the receiving contract.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
318,
637
]
} | 14,434 | ||||
Boardboomer | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0x5474d6c39fc6a75b0429f7870a832b8efc76ea11 | 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 `... | 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-... | /**
* @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 | None | ipfs://1e06f0e6d56eff53bdfdbde54087cd86656eeeaa4001d0146945cd41f919bd30 | {
"func_code_index": [
898,
1610
]
} | 14,435 |
Boardboomer | @openzeppelin/contracts/token/ERC20/SafeERC20.sol | 0x5474d6c39fc6a75b0429f7870a832b8efc76ea11 | 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 `... | 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 ad... | /**
* @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... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1e06f0e6d56eff53bdfdbde54087cd86656eeeaa4001d0146945cd41f919bd30 | {
"func_code_index": [
2964,
3829
]
} | 14,436 |
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
60,
124
]
} | 14,437 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
232,
309
]
} | 14,438 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
546,
623
]
} | 14,439 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
946,
1042
]
} | 14,440 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
1326,
1407
]
} | 14,441 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
1615,
1712
]
} | 14,442 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | GazpromCoin | contract GazpromCoin is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core fun... | GazpromCoin | function GazpromCoin() {
balances[msg.sender] = 21000000000000000000000000;
totalSupply = 21000000000000000000000000;
name = "Gazprom Coin";
decimals = 18;
symbol = "GAZPROM"; ... | // This is a constructor function
// which means the following function name has to match the contract name declared above | LineComment | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
857,
1349
]
} | 14,443 | |||
GazpromCoin | GazpromCoin.sol | 0xccbbb04fb9397593936b537b86e8688494b8de50 | Solidity | GazpromCoin | contract GazpromCoin is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core fun... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://fc479899f3be9f5d71e1d0ae2fbe1e88b012bc9d2af87ba3f6955a0181e2c2ea | {
"func_code_index": [
1950,
2755
]
} | 14,444 | |||
XRUNE | contracts/ERC777Permit.sol | 0x69fa0fee221ad11012bab0fdb45d444d3d2ce71c | Solidity | ERC777Permit | abstract contract ERC777Permit is ERC777, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping (address => Counters.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint... | /**
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed b... | NatSpecMultiLine | permit | function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual override {
// solhint-disable-next-line not-rely-on-time
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");
bytes32 structHash = keccak256(
abi.encode(
... | /**
* @dev See {IERC20Permit-permit}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
709,
1463
]
} | 14,445 | ||
XRUNE | contracts/ERC777Permit.sol | 0x69fa0fee221ad11012bab0fdb45d444d3d2ce71c | Solidity | ERC777Permit | abstract contract ERC777Permit is ERC777, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping (address => Counters.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint... | /**
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed b... | NatSpecMultiLine | nonces | function nonces(address owner) public view virtual override returns (uint256) {
return _nonces[owner].current();
}
| /**
* @dev See {IERC20Permit-nonces}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1520,
1650
]
} | 14,446 | ||
XRUNE | contracts/ERC777Permit.sol | 0x69fa0fee221ad11012bab0fdb45d444d3d2ce71c | Solidity | ERC777Permit | abstract contract ERC777Permit is ERC777, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping (address => Counters.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint... | /**
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed b... | NatSpecMultiLine | DOMAIN_SEPARATOR | function DOMAIN_SEPARATOR() external view override returns (bytes32) {
return _domainSeparatorV4();
}
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1770,
1887
]
} | 14,447 | ||
XRUNE | contracts/ERC777Permit.sol | 0x69fa0fee221ad11012bab0fdb45d444d3d2ce71c | Solidity | ERC777Permit | abstract contract ERC777Permit is ERC777, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping (address => Counters.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint... | /**
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed b... | NatSpecMultiLine | _useNonce | function _useNonce(address owner) internal virtual returns (uint256 current) {
Counters.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}
| /**
* @dev "Consume a nonce": return the current value and increment.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2014,
2221
]
} | 14,448 | ||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | supportsInterface | function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, EIP2981) returns (bool) {
return super.supportsInterface(_interfaceId);
}
| /**
* @notice overrides supportsInterface function
* @param _interfaceId is supplied from anyone/contract calling this function, as defined in ERC 165
* @return a boolean saying if this contract supports the interface or not
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
882,
1057
]
} | 14,449 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | totalSupply | function totalSupply(uint256 _tokenId) public view returns(uint256) {
require(_tokenId == 0, "Error: query for non-existent token id");
return tokenSupply;
}
| /**
* @notice function to return totalSupply of a token ID
* @param _tokenId is the uint256 identifier of a tokenId
* @return uint256 value of supply
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
1238,
1419
]
} | 14,450 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | getHasMinted | function getHasMinted(address _address) public view returns(bool) {
return hasMinted[_address];
}
| /**
* @notice function to retrieve user mint status
* @param _address is the address to look up
* @return boolean with status
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
1576,
1689
]
} | 14,451 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | setMintStatus | function setMintStatus(bool _mintStatus) public onlyOwner {
mintStatus = _mintStatus;
}
| /**
* @notice function to set the mint status
* @dev requires owner
* @param _mintStatus is a boolean indicating mint status
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
1845,
1948
]
} | 14,452 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | setBaseURI | function setBaseURI(string memory _uri) public onlyOwner {
_setURI(_uri);
}
| /**s
* @notice sets the baseURI for the tokens
* @dev requires owner
* @param _uri is the base URI set for each token
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
2097,
2188
]
} | 14,453 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | changeRoyaltyRecipient | function changeRoyaltyRecipient(address _newRecipient) public onlyOwner {
require(_newRecipient != address(0), "Error: new recipient is the zero address");
royaltyAddr = _newRecipient;
}
| /**
* @notice function to change the royalty recipient
* @dev requires owner
* @dev this is useful if an account gets compromised or anything like that
* @param _newRecipient is the new royalty recipient
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
2429,
2639
]
} | 14,454 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | changeRoyaltyPercentage | function changeRoyaltyPercentage(uint256 _newPerc) public onlyOwner {
require(_newPerc <= 10000, "Error: new percentage is greater than 10,0000");
royaltyPerc = _newPerc;
}
| /**
* @notice function to change the royalty percentage
* @dev requires owner
* @dev this is useful if the amount was set improperly at contract creation. This can in fact happen... humans are prone to mistakes :)
* @param _newPerc is the new royalty percentage, in basis points (out of 10,000)
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
2972,
3168
]
} | 14,455 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | uri | function uri(uint256 _tokenId) public view virtual override returns (string memory) {
require(_tokenId == 0, "Error: non-existent token id");
return string(abi.encodePacked(ERC1155.uri(_tokenId), _tokenId.toString()));
}
| /**
* @notice function to return uri for a specific token type
* @param _tokenId is the uint256 representation of a token ID
* @return string representing the uri for the token id
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
3379,
3623
]
} | 14,456 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | mint | function mint(bytes32[] calldata _merkleProof) public {
require(mintStatus, "Error: mint not open");
require (availableTokenSupply > 0, "Error: no more tokens left to mint");
require(!hasMinted[msg.sender], "Error: already minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(Mer... | /**
* @notice function for minting piece
* @dev requires owner
* @param _merkleProof is the proof for whitelist
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
3766,
4304
]
} | 14,457 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | adminMint | function adminMint(address _address, uint256 _num) public onlyOwner {
require (availableTokenSupply > 0, "Error: no more tokens left to mint");
require(_address != address(0), "Error: trying to mint to zero address");
for (uint256 i = 0; i < _num; i++) {
_mint(_address, 0, 1, "");
}
availa... | /**
* @notice function for minting to address
* @dev only owner
* @dev only used as backup
* @param _address is the address to mint to
* @param _num is the number to mint
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
4518,
4895
]
} | 14,458 | |||
LITxMedici | LITxMedici.sol | 0x12770beb72920bcdff7b132e207040691dd27213 | Solidity | LITxMedici | contract LITxMedici is ERC1155, EIP2981, Ownable {
using Strings for uint256;
bytes32 private immutable merkleRoot;
uint256 public availableTokenSupply;
uint256 public tokenSupply;
bool public mintStatus;
mapping(address => bool) private hasMinted;
string public constant name = "Noble Me... | addSupply | function addSupply(uint256 _additionalSupply) public onlyOwner {
tokenSupply += _additionalSupply;
availableTokenSupply += _additionalSupply;
}
| /**
* @notice function to increase mint supply
* @dev requires owner
* @param _additionalSupply is a uint256 to add to supply levels
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
5059,
5226
]
} | 14,459 | |||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
165,
238
]
} | 14,460 | ||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | 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.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
462,
544
]
} | 14,461 | ||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | 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.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
823,
911
]
} | 14,462 | ||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | 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.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1575,
1654
]
} | 14,463 | ||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | 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.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1967,
2069
]
} | 14,464 | ||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
259,
445
]
} | 14,465 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
723,
864
]
} | 14,466 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1162,
1359
]
} | 14,467 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1613,
2089
]
} | 14,468 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
2560,
2697
]
} | 14,469 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
3188,
3471
]
} | 14,470 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
3931,
4066
]
} | 14,471 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
4546,
4717
]
} | 14,472 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
606,
1230
]
} | 14,473 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
2160,
2562
]
} | 14,474 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
3318,
3498
]
} | 14,475 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
3723,
3924
]
} | 14,476 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
4294,
4525
]
} | 14,477 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
4776,
5097
]
} | 14,478 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
557,
641
]
} | 14,479 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1193,
1346
]
} | 14,480 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1496,
1745
]
} | 14,481 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = block.timestamp + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
1913,
2144
]
} | 14,482 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(block.timestamp > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
2215,
2525
]
} | 14,483 |
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | DeathStroke | contract DeathStroke is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address deadAddress = 0x000000000000000000000000000000000000dEaD;
string private _name = "DeathStroke";
string private _symbol = "DeathStroke";
uint8 private _decimals = 9;
... | //to receive ETH from uniswapV2Router when swapping | LineComment | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
8681,
8715
]
} | 14,484 | ||||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | DeathStroke | contract DeathStroke is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address deadAddress = 0x000000000000000000000000000000000000dEaD;
string private _name = "DeathStroke";
string private _symbol = "DeathStroke";
uint8 private _decimals = 9;
... | swapAndLiquify | function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
// 1/2 balance is sent to the marketing wallet, 1/2 is added to the liquidity pool
uint256 marketingTokenBalance = contractTokenBalance.div(2);
uint256 liquidityTokenBalance = contractTokenBalance.sub(marketingTokenBalance);
... | // swapAndLiquify takes the balance to be liquified and make sure it is equally distributed
// in BNB and Harold | LineComment | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
13287,
14552
]
} | 14,485 | ||
DeathStroke | DeathStroke.sol | 0xa7bf13a8aecfbda9e1d29a5fc5c6dff907936c85 | Solidity | DeathStroke | contract DeathStroke is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address deadAddress = 0x000000000000000000000000000000000000dEaD;
string private _name = "DeathStroke";
string private _symbol = "DeathStroke";
uint8 private _decimals = 9;
... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded[recipie... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://35aca8e6f9012e184096bca9b1aef71396d14ff7118c1aaffc988cca9282b089 | {
"func_code_index": [
18555,
19378
]
} | 14,486 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | ownerSetPoolRewards | function ownerSetPoolRewards(uint256 _rewardAmount) external onlyOwner {
require(poolStartTime == 0, "Pool rewards already set");
require(_rewardAmount > 0, "Cannot create pool with zero amount");
//set total rewards value
totalRewards = _rewardAmount;
poolStartTime = now;
... | //Set pool rewards | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
1501,
2056
]
} | 14,487 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | stake | function stake(uint256 amount) external {
require(amount > 0, "Cannot stake 0");
require(now < poolEndTime, "Staking pool is closed"); //staking pool is closed for staking
//add value in staking
userTotalStaking[msg.sender].totalStaking = userTotalStaking[msg.sender].totalStaking.add(amoun... | //Stake function for users to stake SWAP token | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
2115,
2802
]
} | 14,488 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | computeNewReward | function computeNewReward(uint256 _rewardAmount, uint256 _stakedAmount, uint256 _stakeTimeSec) private view returns (uint256 _reward) {
uint256 rewardPerSecond = totalRewards.mul(1 ether);
if (rewardPerSecond != 0 ) {
rewardPerSecond = rewardPerSecond.div(poolDuration);
}
if (rewa... | //compute rewards | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
2832,
3574
]
} | 14,489 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | calculateReward | function calculateReward(address _userAddress) public view returns (uint256 _reward) {
// all user stakes
Stake[] storage accountStakes = userStaking[_userAddress];
// Redeem from most recent stake and go backwards in time.
uint256 rewardAmount = 0;
uint256 i = accountStakes.length;
... | //calculate your rewards | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
3611,
4891
]
} | 14,490 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | withdrawStaking | function withdrawStaking(uint256 amount) external {
require(amount > 0, "Amount can not be zero");
require(userTotalStaking[msg.sender].totalStaking >= amount, "You are trying to withdaw more than your stake");
// 1. User Accounting
Stake[] storage accountStakes = userStaking[msg.sender];
... | //Withdraw staking and rewards | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
4934,
7722
]
} | 14,491 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | withdrawRewardsOnly | function withdrawRewardsOnly() external {
uint256 _rwdAmount = calculateReward(msg.sender);
require(_rwdAmount > 0, "You do not have enough rewards");
// 1. User Accounting
Stake[] storage accountStakes = userStaking[msg.sender];
// Redeem from most recent stake and go backw... | //Withdraw rewards | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
7753,
9622
]
} | 14,492 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | getStakingAmount | function getStakingAmount(address _userAddress) external constant returns (uint256 _stakedAmount) {
return userTotalStaking[_userAddress].totalStaking;
}
| //get staking details by user address | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
9672,
9844
]
} | 14,493 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | getTotalRewardCollectedByUser | function getTotalRewardCollectedByUser(address userAddress) view external returns (uint256 _totalRewardCollected)
{
return userRewardInfo[userAddress].totalWithdrawn;
}
| //get total rewards collected by user | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
9894,
10087
]
} | 14,494 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | getTotalStaked | function getTotalStaked() external constant returns ( uint256 _totalStaked) {
return totalStaked;
}
| //get total SWAP token staked in the contract | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
10145,
10263
]
} | 14,495 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | getTotalRewards | function getTotalRewards() external constant returns ( uint256 _totalRewards) {
return totalRewards;
}
| //get total rewards in the contract | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
10311,
10432
]
} | 14,496 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | getPoolDetails | function getPoolDetails() external view returns (address _baseToken, address _pairedToken, uint256 _totalRewards, uint256 _rewardsWithdrawn, uint256 _poolStartTime, uint256 _poolEndTime) {
return (address(tswap),address(rewardToken),totalRewards,rewardsWithdrawn,poolStartTime,poolEndTime);
}
| //get pool details | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
10463,
10774
]
} | 14,497 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | getPoolDuration | function getPoolDuration() external constant returns (uint256 _poolDuration) {
return poolDuration;
}
| //get duration of pools | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
10810,
10930
]
} | 14,498 | ||
StakingPool | StakingPool.sol | 0xd59ef6cd1e78885ad88e333a4b14a44b57a3160c | Solidity | StakingPool | contract StakingPool is Owned {
using SafeMath for uint256;
Ierc20 public tswap;
Ierc20 public rewardToken;
uint256 poolDuration;
uint256 totalRewards;
uint256 rewardsWithdrawn;
uint256 poolStartTime;
uint256 poolEndTime;
uint256 totalStaked;
// Represents a singl... | setPoolDuration | function setPoolDuration(uint256 _poolDuration) external onlyOwner {
poolDuration = _poolDuration;
poolEndTime = poolStartTime + _poolDuration;
emit PoolDurationChange(_poolDuration);
}
| //set duration of pools by owner in seconds | LineComment | v0.4.25+commit.59dbf8f1 | None | bzzr://6e5318eac7df67e48068b4dbee17a08e4e67f2ed053df512c671d44e7a2e589e | {
"func_code_index": [
10982,
11204
]
} | 14,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.