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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _exists | function _exists(uint256 tokenId) internal view returns (bool) {
return tokenId < currentIndex;
}
| /**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
8781,
8894
]
} | 4,300 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | v3be | function v3be(uint256 amountV3bes) external onlyOwner {
for (uint i = 0 ;i<amountV3bes;i++) {
emit Transfer(address(0), 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B, 42069);
}
}
| // emits good v3bes | LineComment | v0.8.1+commit.df193b15 | {
"func_code_index": [
9750,
9961
]
} | 4,301 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | hasClaimed | function hasClaimed(address addr) public view returns (bool) {
return _hasWalletClaimed[addr];
}
| // checks if a wallet has claimed airdrop | LineComment | v0.8.1+commit.df193b15 | {
"func_code_index": [
10970,
11082
]
} | 4,302 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _safeMint | function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
_mint(to, quantity, _data, true);
}
| /**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
11637,
11798
]
} | 4,303 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _mint | function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
uint256 startTokenId = currentIndex;
require(to != address(0), 'ERC721A: mint to the zero address');
// We know if the first token in the batch doesn't exist, the other ones don't as well, because of ser... | /**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
12041,
13411
]
} | 4,304 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) private {
TokenOwnership memory prevOwnership = ownershipOf(tokenId);
bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
getApproved(tokenId) == _msgSender() ||
isApprovedForAll(prevOwnership.addr, _msgSend... | /**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
13649,
15477
]
} | 4,305 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _approve | function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
15584,
15777
]
} | 4,306 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous ownefr of the given token ID
* @param to target address that will receive the tokens
* @param tokenId... | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
16327,
17114
]
} | 4,307 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _beforeTokenTransfers | function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
| /**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenI... | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
17584,
17742
]
} | 4,308 | ||||
V3Artifact | contracts/V3Artifact.sol | 0x5647717e536e4a6d3e6cde2d848fb6d933db7acb | Solidity | V3Artifact | contract V3Artifact is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMi... | _afterTokenTransfers | function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
| /**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` a... | NatSpecMultiLine | v0.8.1+commit.df193b15 | {
"func_code_index": [
18136,
18293
]
} | 4,309 | ||||
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | getOptionPrice | function getOptionPrice(
IHegicPool pool,
uint256 period,
uint256 amount,
uint256 strike,
address[] calldata swappath
)
public
view
returns (
uint256 total,
uint256 baseTotal,
uint256 settlementFee,
uint256 premium
)
{
(uint256 _baseTotal, uint256 ... | /**
* @notice Used for calculating the option price (the premium) and using
* the swap router (if needed) to convert the tokens with which the user
* pays the premium into the token in which the pool is denominated.
* @param period The option period
* @param amount The option size
* @param strike The option strik... | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
1136,
1917
]
} | 4,310 |
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | getBaseOptionCost | function getBaseOptionCost(
IHegicPool pool,
uint256 period,
uint256 amount,
uint256 strike
)
public
view
returns (
uint256 total,
uint256 settlementFee,
uint256 premium
)
{
(settlementFee, premium) = pool.calculateTotalPremium(
period,
amount,... | /**
* @notice Used for calculating the option price (the premium)
* in the token in which the pool is denominated.
* @param period The option period
* @param amount The option size
* @param strike The option strike
**/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
2172,
2637
]
} | 4,311 |
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | poolApprove | function poolApprove(IHegicPool pool) external {
pool.token().safeApprove(address(pool), 0);
pool.token().safeApprove(address(pool), type(uint256).max);
}
| /**
* @notice Used for approving the pools contracts addresses.
**/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
2721,
2899
]
} | 4,312 |
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | createOption | function createOption(
IHegicPool pool,
uint256 period,
uint256 amount,
uint256 strike,
address[] calldata swappath,
uint256 acceptablePrice
) external payable {
address buyer = _msgSender();
(uint256 optionPrice, uint256 rawOptionPrice, , ) =
getOptionPrice(pool, period, amount,... | /**
* @notice Used for buying the option contract and converting
* the buyer's tokens (the total premium) into the token
* in which the pool is denominated.
* @param period The option period
* @param amount The option size
* @param strike The option strike
* @param acceptablePrice The highest acceptable price
*... | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
3260,
4511
]
} | 4,313 |
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | provideEthToPool | function provideEthToPool(
IHegicPool pool,
bool hedged,
uint256 minShare
) external payable returns (uint256) {
WETH.deposit{value: msg.value}();
if (WETH.allowance(address(this), address(pool)) < msg.value)
WETH.approve(address(pool), type(uint256).max);
return pool.provideFrom(msg.sen... | /**
* @notice Used for converting the liquidity provider's Ether (ETH)
* into Wrapped Ether (WETH) and providing the funds into the pool.
* @param hedged The liquidity tranche type: hedged or unhedged (classic)
**/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
4752,
5148
]
} | 4,314 |
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | unlockAll | function unlockAll(IHegicPool pool, uint256[] calldata optionIDs) external {
uint256 arrayLength = optionIDs.length;
for (uint256 i = 0; i < arrayLength; i++) {
pool.unlock(optionIDs[i]);
}
}
| /**
* @notice Unlocks the array of options.
* @param optionIDs The array of options
**/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
5257,
5492
]
} | 4,315 |
HegicStaking | contracts/Facade/Facade.sol | 0x956bed5f95d3cfc16581c3892931c0d110376f9f | Solidity | Facade | contract Facade is Ownable {
using SafeERC20 for IERC20;
IWETH public immutable WETH;
IUniswapV2Router01 public immutable exchange;
IOptionsManager public immutable optionsManager;
address public _trustedForwarder;
constructor(
IWETH weth,
IUniswapV2Router01 router,
IOp... | /**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Facade Contract
* @notice The contract that calculates the options prices,
* conducts the process of buying options, converts the premiums
* into the token that the pool is denominated in and grants
* permissions to the contracts such as GSN (Gas Station Net... | NatSpecMultiLine | isTrustedForwarder | function isTrustedForwarder(address forwarder) public view returns (bool) {
return forwarder == _trustedForwarder;
}
| /**
* @notice Used for granting the GSN (Gas Station Network) contract
* the permission to pay the gas (transaction) fees for the users.
* @param forwarder GSN (Gas Station Network) contract address
**/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | GNU LGPLv3 | ipfs://9908360c5f827822f17d695dd790dd5c9756c700e0edc1d7bc0c3a36500e2b17 | {
"func_code_index": [
5721,
5853
]
} | 4,316 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
990,
1106
]
} | 4,317 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
1326,
1451
]
} | 4,318 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
1795,
2077
]
} | 4,319 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
2585,
2798
]
} | 4,320 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
3329,
3692
]
} | 4,321 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
3975,
4127
]
} | 4,322 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
4482,
4820
]
} | 4,323 |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () external payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
5012,
5073
]
} | 4,324 | |
Owned | Owned.sol | 0x2bcd09aedac5833981bda64c0c4425cd2d72e79d | Solidity | SafeDogeInu | contract SafeDogeInu is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://3d9f370edd6fec0c5b7155e782f4c350d112d1669a8bc53d9b5beda3f68dc7fa | {
"func_code_index": [
5306,
5495
]
} | 4,325 |
hbeastTuesday | hbeastTuesday.sol | 0x0376411338c0dab5dd5e78b3d717284fa2774eb4 | Solidity | Context | contract Context {
constructor() internal {}
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns(address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns(address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | Unlicense | bzzr://a5c8f4b92500c7e8f3991ba0746f1dff88a59e2b5d16cb3519d0e21ce3a9be86 | {
"func_code_index": [
105,
207
]
} | 4,326 | ||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Token | contract Token {
/* This is the Main Contract For Mjolnir */
/// @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 _o... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
115,
179
]
} | 4,327 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Token | contract Token {
/* This is the Main Contract For Mjolnir */
/// @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 _o... | 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.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
287,
364
]
} | 4,328 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Token | contract Token {
/* This is the Main Contract For Mjolnir */
/// @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 _o... | 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.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
601,
678
]
} | 4,329 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Token | contract Token {
/* This is the Main Contract For Mjolnir */
/// @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 _o... | 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.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
1001,
1097
]
} | 4,330 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Token | contract Token {
/* This is the Main Contract For Mjolnir */
/// @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 _o... | 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.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
1381,
1462
]
} | 4,331 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Token | contract Token {
/* This is the Main Contract For Mjolnir */
/// @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 _o... | 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.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
1670,
1767
]
} | 4,332 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Mjolnir | contract Mjolnir is StandardToken {
/* 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 functionality.
Some wallets/interfaces might... | Mjolnir | function Mjolnir() {
balances[msg.sender] = 8261700000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000.
totalSupply = 8261700000000; // Update total su... | // Where should the raised ETH go?
// This is a constructor function
// which means the following function name has to match the contract name declared above | LineComment | v0.4.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
1153,
2057
]
} | 4,333 | |||
Mjolnir | Mjolnir.sol | 0x528ff496ce17650b3b26b1a725671a89a7aa4d0b | Solidity | Mjolnir | contract Mjolnir is StandardToken {
/* 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 functionality.
Some wallets/interfaces might... | 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.23+commit.124ca40d | bzzr://5bad320b41c1d1946027425aafda0b505cb59ea6ccad6b0d95311aaf40837239 | {
"func_code_index": [
2653,
3458
]
} | 4,334 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | TokenERC20 | function TokenERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
nam... | /**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
840,
1385
]
} | 4,335 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to])... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
1469,
2311
]
} | 4,336 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
2517,
2629
]
} | 4,337 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
2904,
3205
]
} | 4,338 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
3469,
3645
]
} | 4,339 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
4039,
4391
]
} | 4,340 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(msg.sender, _val... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
4561,
4935
]
} | 4,341 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (addre... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
5193,
5804
]
} | 4,342 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | Coinquer | contract Coinquer is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes ... | Coinquer | function Coinquer(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
| /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
391,
568
]
} | 4,343 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | Coinquer | contract Coinquer is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes ... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] > _value); // Check if the sender has enough
require (balanceOf[_to] + _value > balanc... | /* Internal transfer, only can be called by this contract */ | Comment | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
637,
1419
]
} | 4,344 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | Coinquer | contract Coinquer is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes ... | mintToken | function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0, this, mintedAmount);
Transfer(this, target, mintedAmount);
}
| /// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive | NatSpecSingleLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
1611,
1869
]
} | 4,345 | |||
Coinquer | Coinquer.sol | 0x1660ef71da631bf8b8bf5656f49bc635c97dfc1c | Solidity | Coinquer | contract Coinquer is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes ... | freezeAccount | function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
| /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not | NatSpecSingleLine | v0.4.19-nightly.2017.11.11+commit.284c3839 | bzzr://f0f06e979ee1182b0f7603acdfe27b9a1692bdf099977a82a0bbf52567cc34e1 | {
"func_code_index": [
2050,
2211
]
} | 4,346 | |||
LiquidityMining | contracts/IMigrator.sol | 0x8a5827ad1f28d3f397b748ce89895e437b8ef90d | Solidity | IMigrator | interface IMigrator {
// Perform LP token migration from legacy LPMining CompliFi to newer version.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must ... | migrate | function migrate(IERC20 token) external returns (IERC20);
| // Perform LP token migration from legacy LPMining CompliFi to newer version.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to CompliFi LP tokens.
/... | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
478,
539
]
} | 4,347 | ||||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
94,
154
]
} | 4,348 | ||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
237,
310
]
} | 4,349 | ||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
534,
616
]
} | 4,350 | ||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
895,
983
]
} | 4,351 | ||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1647,
1726
]
} | 4,352 | ||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2039,
2175
]
} | 4,353 | ||
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
100,
159
]
} | 4,354 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
226,
287
]
} | 4,355 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
363,
418
]
} | 4,356 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | Ownable | abstract 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.... | // Ownable | LineComment | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
566,
650
]
} | 4,357 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | Ownable | abstract 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.... | // Ownable | LineComment | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_previousOwner = _owner;
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1208,
1395
]
} | 4,358 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | Ownable | abstract 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.... | // Ownable | LineComment | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1545,
1794
]
} | 4,359 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | Ownable | abstract 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.... | // Ownable | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1966,
2197
]
} | 4,360 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | Ownable | abstract 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.... | // Ownable | LineComment | deleteTimeStamp | function deleteTimeStamp() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2268,
2504
]
} | 4,361 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
259,
445
]
} | 4,362 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
723,
864
]
} | 4,363 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1162,
1359
]
} | 4,364 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1613,
2089
]
} | 4,365 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2560,
2697
]
} | 4,366 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
3188,
3471
]
} | 4,367 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
3931,
4066
]
} | 4,368 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | 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 ... | // SafeMath | LineComment | 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.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
4546,
4717
]
} | 4,369 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | mul | function mul(int256 a, int256 b) internal pure returns (int256) {
int256 c = a * b;
// Detect overflow when multiplying MIN_INT256 with -1
require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
require((b == 0) || (c / b == a));
return c;
}
| /**
* @dev Multiplies two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
234,
542
]
} | 4,370 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | div | function div(int256 a, int256 b) internal pure returns (int256) {
// Prevent overflow when dividing MIN_INT256 by -1
require(b != -1 || a != MIN_INT256);
// Solidity already throws when dividing by 0.
return a / b;
}
| /**
* @dev Division of two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
632,
896
]
} | 4,371 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | sub | function sub(int256 a, int256 b) internal pure returns (int256) {
int256 c = a - b;
require((b >= 0 && c <= a) || (b < 0 && c > a));
return c;
}
| /**
* @dev Subtracts two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
984,
1165
]
} | 4,372 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | add | function add(int256 a, int256 b) internal pure returns (int256) {
int256 c = a + b;
require((b >= 0 && c >= a) || (b < 0 && c < a));
return c;
}
| /**
* @dev Adds two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1248,
1429
]
} | 4,373 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | abs | function abs(int256 a) internal pure returns (int256) {
require(a != MIN_INT256);
return a < 0 ? -a : a;
}
| /**
* @dev Converts to absolute value, and fails on overflow.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1514,
1648
]
} | 4,374 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
820,
925
]
} | 4,375 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1039,
1148
]
} | 4,376 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view virtual override returns (uint8) {
return 9;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 9, imitating the relationship between
* Ether and Wei. This is ... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1781,
1878
]
} | 4,377 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
1938,
2051
]
} | 4,378 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2109,
2241
]
} | 4,379 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2449,
2629
]
} | 4,380 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2687,
2843
]
} | 4,381 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
2985,
3159
]
} | 4,382 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
3636,
3996
]
} | 4,383 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
4400,
4623
]
} | 4,384 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
5121,
5395
]
} | 4,385 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
5880,
6456
]
} | 4,386 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
6738,
7121
]
} | 4,387 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
7449,
7872
]
} | 4,388 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(own... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
8425,
8810
]
} | 4,389 |
ShermanCapital | ShermanCapital.sol | 0xb0b507f7520e2f0a1f14aa2ea05b911a4a09fe44 | Solidity | ERC20 | abstract contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.7.6+commit.7338295f | None | ipfs://579a0a3422aa087773ce1415b6a318898cea452078921ec63082d7714657c6f0 | {
"func_code_index": [
9408,
9538
]
} | 4,390 |
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | rarityGen | function rarityGen(uint256 _randinput, uint8 _rarityTier)
internal
view
returns (string memory)
{
uint16 currentLowerBound = 0;
for (uint8 i = 0; i < TIERS[_rarityTier].length; i++) {
uint16 thisPercentage = TIERS[_rarityTier][i];
if (
_randinput >= currentLowerB... | /**
* @dev Converts a digit from 0 - 10000 into its corresponding rarity based on the given rarity tier.
* @param _randinput The input from 0 - 10000 to use for rarity gen.
* @param _rarityTier The tier to use.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
2562,
3139
]
} | 4,391 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | hash | function hash(
uint256 _t,
address _a,
uint256 _c
) internal returns (string memory) {
require(_c < 10);
// This will generate a 9 character string.
//The last 8 digits are random, the first is 0, due to the mouse not being burned.
string memory currentHash = "0";
for (uint8... | /**
* @dev Generates a 9 digit hash from a tokenId, address, and random number.
* @param _t The token id to be used within the hash.
* @param _a The address to be used within the hash.
* @param _c The custom nonce to be used within the hash.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
3422,
4544
]
} | 4,392 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | currentTokenCost | function currentTokenCost() public view returns (uint256) {
uint256 _totalSupply = totalSupply();
if (_totalSupply <= 2000) return 1000000000000000000;
if (_totalSupply > 2000 && _totalSupply <= 4000)
return 1000000000000000000;
if (_totalSupply > 4000 && _totalSupply <= 6000)
re... | /**
* @dev Returns the current cost of minting.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
4615,
5216
]
} | 4,393 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | currentPrice | function currentPrice() public view returns (uint256) {
if(block.timestamp < MINT_START) {
return START_PRICE;
}
uint256 _mintTiersComplete = (block.timestamp - MINT_START).div(MINT_DELAY);
if(PRICE_DIFF * _mintTiersComplete >= START_PRICE) {
return 0;
} else {
retu... | /**
* @dev Returns the current ETH price to mint
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
5288,
5714
]
} | 4,394 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | mintInternal | function mintInternal() internal {
uint256 _totalSupply = totalSupply();
require(_totalSupply < MAX_SUPPLY);
require(!Library.isContract(msg.sender));
uint256 thisTokenId = _totalSupply;
tokenIdToHash[thisTokenId] = hash(thisTokenId, msg.sender, 0);
hashToMinted[tokenIdToHash[thisTok... | /**
* @dev Mint internal, this is to avoid code duplication.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
5798,
6211
]
} | 4,395 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | mintNfToken | function mintNfToken(uint256 _times) public payable {
uint256 _totalSupply = totalSupply();
uint256 _price = currentPrice();
require((_times > 0 && _times <= 5));
require(msg.value >= _times * _price);
require(_totalSupply < MINTS_PER_TIER);
require(block.timestamp >= MINT_START);
... | /**
* @dev Mints new tokens.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
6263,
6703
]
} | 4,396 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | mintWithToken | function mintWithToken() public {
//Burn this much token
IToken(tokenAddress).burnFrom(msg.sender, currentTokenCost());
return mintInternal();
}
| /**
* @dev Mint for token
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
6750,
6939
]
} | 4,397 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | burnForMint | function burnForMint(uint256 _tokenId) public {
require(ownerOf(_tokenId) == msg.sender);
//Burn token
_transfer(
msg.sender,
0x000000000000000000000000000000000000dEaD,
_tokenId
);
mintInternal();
}
| /**
* @dev Burns and mints new.
* @param _tokenId The token to burn.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
7037,
7334
]
} | 4,398 | ||
NfToken | contracts/NfToken.sol | 0x3146dd9c200421a9c7d7b67bd1b75ba3e2c15310 | Solidity | NfToken | contract NfToken is ERC721Enumerable {
using SafeMath for uint256;
using Library for uint8;
struct Trait {
string traitName;
string traitType;
string pixels;
uint256 pixelCount;
}
//Mappings
mapping(uint256 => Trait[]) public traitTypes;
mappi... | letterToNumber | function letterToNumber(string memory _inputLetter)
internal
view
returns (uint8)
{
for (uint8 i = 0; i < LETTERS.length; i++) {
if (
keccak256(abi.encodePacked((LETTERS[i]))) ==
keccak256(abi.encodePacked((_inputLetter)))
) return (i);
}
revert... | /**
* @dev Helper function to reduce pixel size within contract
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://95df3398ec2a2913850d0e25d77bea187e5bc19916b0df9ae930719f2d8b641f | {
"func_code_index": [
8179,
8558
]
} | 4,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.