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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
8634,
8749
]
} | 400 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _safeMint | function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
8971,
9297
]
} | 401 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Tra... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
9628,
10015
]
} | 402 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), toke... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
10239,
10604
]
} | 403 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(
ERC721.ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
10936,
11556
]
} | 404 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
11669,
11848
]
} | 405 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _setApprovalForAll | function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
| /**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
11985,
12305
]
} | 406 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _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,
... | /**
* @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 owner of the given token ID
* @param to target address that will receive the tokens
* @param to... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
12865,
13850
]
} | 407 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string internal _name;
// Token symbol
string private _symbol;
// Base URI
string private _tokenBaseURI;
// Mapping from token ID to own... | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
14417,
14548
]
} | 408 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | supportsInterface | function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(IERC165, ERC721)
returns (bool)
{
return
interfaceId == type(IERC721Enumerable).interfaceId ||
super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
605,
910
]
} | 409 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
virtual
override
returns (uint256)
{
require(
index < ERC721.balanceOf(owner),
"ERC721Enumerable: owner index out of bounds"
);
return _ownedTokens[owner][index];
}
| /**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
989,
1337
]
} | 410 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
1408,
1526
]
} | 411 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | tokenByIndex | function tokenByIndex(uint256 index)
public
view
virtual
override
returns (uint256)
{
require(
index < ERC721Enumerable.totalSupply(),
"ERC721Enumerable: global index out of bounds"
);
return _allTokens[index];
}
| /**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
1598,
1923
]
} | 412 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnume... | /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
2531,
3125
]
} | 413 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | _addTokenToOwnerEnumeration | function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
| /**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
3421,
3647
]
} | 414 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | _addTokenToAllTokensEnumeration | function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
| /**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
3843,
4012
]
} | 415 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | _removeTokenFromOwnerEnumeration | function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId)
private
{
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
ui... | /**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
4634,
5641
]
} | 416 | ||
Collection | Collection.sol | 0x3e4318d6cf48cfcffdd09a7c382850c8bfa328e9 | Solidity | ERC721Enumerable | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;... | _removeTokenFromAllTokensEnumeration | function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allT... | /**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://ceffa63e1e34b2aeafc86765cf39bf58cb0eb8f9e1ea23f26ac9bd2d47896059 | {
"func_code_index": [
5931,
7015
]
} | 417 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | avnrichdefi | function avnrichdefi()
public
{
// add administrators here
administrators[keccak256(0xa614f9293d9ce8b61357b916B6C2c08b9e7f8E43)] = true;
ambassadors_[0x0000000000000000000000000000000000000000] = true;
}
| /*
* -- APPLICATION ENTRY POINTS --
*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
4486,
4780
]
} | 418 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | buy | function buy(address _referredBy)
public
payable
returns(uint256)
{
purchaseTokens(msg.value, _referredBy);
}
| /**
* Converts all incoming Ethereum to tokens for the caller, and passes down the referral address (if any)
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
4923,
5083
]
} | 419 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | reinvest | function reinvest()
onlyhodler()
public
{
// fetch dividends
uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code
// pay out the dividends virtually
address _customerAddress = msg.sender;
payoutsTo_[_customerAddress] += (int256) (_dividends * m... | /**
* Converts all of caller's dividends to tokens.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
5278,
6045
]
} | 420 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | exit | function exit()
public
{
// get token count for caller & sell them all
address _customerAddress = msg.sender;
uint256 _tokens = tokenBalanceLedger_[_customerAddress];
if(_tokens > 0) sell(_tokens);
withdraw();
}
| /**
* Alias of sell() and withdraw().
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
6110,
6410
]
} | 421 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | withdraw | function withdraw()
onlyhodler()
public
{
// setup data
address _customerAddress = msg.sender;
uint256 _dividends = myDividends(false); // get ref. bonus later in the code
// update dividend tracker
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
... | /**
* Withdraws all of the callers earnings.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
6478,
7150
]
} | 422 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | sell | function sell(uint256 _amountOfTokens)
onlybelievers ()
public
{
address _customerAddress = msg.sender;
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 _tokens = _amountOfTokens;
uint256 _ethereum = tokensToEthereum_(_tokens);
uint256 _divi... | /**
* Liquifies tokens to ethereum.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
7213,
8479
]
} | 423 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | transfer | function transfer(address _toAddress, uint256 _amountOfTokens)
onlybelievers ()
public
returns(bool)
{
// setup
address _customerAddress = msg.sender;
// make sure we have the requested tokens
require(!onlyAmbassadors && _amountOfTokens <= tokenBalanceLedger_[_custom... | /**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
8617,
10300
]
} | 424 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | disableInitialStage | function disableInitialStage()
onlyAdministrator()
public
{
onlyAmbassadors = false;
}
| /**
* administrator can manually disable the ambassador phase.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
10452,
10580
]
} | 425 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | totalEthereumBalance | function totalEthereumBalance()
public
view
returns(uint)
{
return this.balance;
}
| /**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
11400,
11533
]
} | 426 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | totalSupply | function totalSupply()
public
view
returns(uint256)
{
return tokenSupply_;
}
| /**
* Retrieve the total token supply.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
11599,
11726
]
} | 427 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | myTokens | function myTokens()
public
view
returns(uint256)
{
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
| /**
* Retrieve the tokens owned by the caller.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
11800,
11987
]
} | 428 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | myDividends | function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
address _customerAddress = msg.sender;
return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ;
}
| /**
* Retrieve the dividends owned by the caller.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
12067,
12382
]
} | 429 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | balanceOf | function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
return tokenBalanceLedger_[_customerAddress];
}
| /**
* Retrieve the token balance of any single address.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
12465,
12639
]
} | 430 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | dividendsOf | function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
return (uint256) ((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude;
}
| /**
* Retrieve the dividend balance of any single address.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
12725,
12984
]
} | 431 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | sellPrice | function sellPrice()
public
view
returns(uint256)
{
if(tokenSupply_ == 0){
return tokenPriceInitial_ - tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_ );
uin... | /**
* Return the buy price of 1 individual token.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
13061,
13538
]
} | 432 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | buyPrice | function buyPrice()
public
view
returns(uint256)
{
if(tokenSupply_ == 0){
return tokenPriceInitial_ + tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_ );
uin... | /**
* Return the sell price of 1 individual token.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
13616,
14093
]
} | 433 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | purchaseTokens | function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
antiEarlyWhale(_incomingEthereum)
internal
returns(uint256)
{
// data setup
address _customerAddress = msg.sender;
uint256 _undividedDividends = SafeMath.div(_incomingEthereum, dividendFee_);
uint256 _referralBon... | /*==========================================
= INTERNAL FUNCTIONS =
==========================================*/ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
15102,
17955
]
} | 434 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | ethereumToTokens_ | function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived =
(
(
// underflow attempts BTFO
SafeMath.sub(
(sqrt
(
... | /**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
18246,
19227
]
} | 435 | ||
Avnrich | Avnrich.sol | 0x2e535cccb45d7a464d9fe186705aa3eb1fcf79ff | Solidity | Avnrich | contract Avnrich {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onlyhod... | tokensToEthereum_ | function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
uint256 tokens_ = (_tokens + 1e18);
uint256 _tokenSupply = (tokenSupply_ + 1e18);
uint256 _etherReceived =
(
// underflow attempts BTFO
SafeMath.sub(
(
(
... | /**
* Calculate token sell value.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://401efe666986017e86e11eb0879b95eac5d6d627cc989dd40e5d43d31bacb2af | {
"func_code_index": [
19293,
20021
]
} | 436 | ||
BabiesWorldNFT | contracts/BabiesWorldNft.sol | 0xefc6cbd22ef3591736d32912a7e498dc7076622d | Solidity | BabiesWorldNFT | contract BabiesWorldNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.03 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = false;
mapping(address => ... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.4+commit.c7e474f2 | GNU GPLv3 | ipfs://fb14649ada6c663b849e5bc9181cc5bc82cc391c955e70700b7135598d80554b | {
"func_code_index": [
561,
666
]
} | 437 | ||
BabiesWorldNFT | contracts/BabiesWorldNft.sol | 0xefc6cbd22ef3591736d32912a7e498dc7076622d | Solidity | BabiesWorldNFT | contract BabiesWorldNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.03 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = false;
mapping(address => ... | mint | function mint(address _to, uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);
if (msg.sender != owner()) {
if(whitelisted[msg.sender] != true) {
... | // public | LineComment | v0.8.4+commit.c7e474f2 | GNU GPLv3 | ipfs://fb14649ada6c663b849e5bc9181cc5bc82cc391c955e70700b7135598d80554b | {
"func_code_index": [
682,
1186
]
} | 438 | ||
BabiesWorldNFT | contracts/BabiesWorldNft.sol | 0xefc6cbd22ef3591736d32912a7e498dc7076622d | Solidity | BabiesWorldNFT | contract BabiesWorldNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.03 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = false;
mapping(address => ... | setCost | function setCost(uint256 _newCost) public onlyOwner() {
cost = _newCost;
}
| //only owner | LineComment | v0.8.4+commit.c7e474f2 | GNU GPLv3 | ipfs://fb14649ada6c663b849e5bc9181cc5bc82cc391c955e70700b7135598d80554b | {
"func_code_index": [
1988,
2073
]
} | 439 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
94,
154
]
} | 440 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
237,
310
]
} | 441 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
534,
616
]
} | 442 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
895,
983
]
} | 443 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
1647,
1726
]
} | 444 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
2039,
2141
]
} | 445 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
259,
445
]
} | 446 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
723,
864
]
} | 447 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
1162,
1359
]
} | 448 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
1613,
2089
]
} | 449 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
2560,
2697
]
} | 450 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
3188,
3471
]
} | 451 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
3931,
4066
]
} | 452 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
4546,
4717
]
} | 453 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
606,
1230
]
} | 454 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
2160,
2562
]
} | 455 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
3318,
3496
]
} | 456 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
3721,
3922
]
} | 457 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
4292,
4523
]
} | 458 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
4774,
5095
]
} | 459 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
497,
581
]
} | 460 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
1139,
1292
]
} | 461 | ||
BOON | BOON.sol | 0x89613e9a5b8ad44f4e3ef9eac4c9f3c3fcc92512 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | 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.6.12+commit.27d51765 | None | ipfs://210aee356bc75793ff96c54f3bb87f2971a533409dfdfc022cbb040f8d8ae9ac | {
"func_code_index": [
1442,
1691
]
} | 462 | ||
PowerfulMamacita | contracts/PowerfulMamacita.sol | 0x15f88c9c14d294c2e33c7549741204dee6889670 | Solidity | PowerfulMamacita | contract PowerfulMamacita is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 private constant TOKEN_MAX = 111; // @dev 111 powerfulmamacitas
bool public isActive = false;
string public proof;
string private _contractURI = '';
string private _tokenBaseURI = '';
str... | mintTokens | function mintTokens(uint256 init, uint256 qty) external onlyOwner {
require(isActive, 'Contract is not active');
require(totalSupply() < TOKEN_MAX, 'All tokens have been minted');
require(init >= totalSupply() + 1, 'Must start from the last mint batch');
uint256 i = init;
do{
_safeMint... | /**
*
* @dev mint tokens with the owner
* @param init // the init batch
* @param qty // qty for the batch
**/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://8d93571c259670f8c591e1d316349369af1b12c340e51bdbbe9bcbb666d28662 | {
"func_code_index": [
711,
1138
]
} | 463 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
908,
1327
]
} | 464 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
1498,
3047
]
} | 465 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
3128,
3262
]
} | 466 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
3343,
3457
]
} | 467 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
3796,
4005
]
} | 468 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint(uint160(value))));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
4254,
4408
]
} | 469 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint(uint160(value))));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
4579,
4739
]
} | 470 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint(uint160(value))));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
4820,
4989
]
} | 471 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
5070,
5192
]
} | 472 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint(_at(set._inner, index))));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
5531,
5691
]
} | 473 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
5936,
6072
]
} | 474 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
6243,
6385
]
} | 475 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
6466,
6617
]
} | 476 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
6698,
6817
]
} | 477 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
7156,
7298
]
} | 478 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() {
owner = msg.sender;
}
/**... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
633,
814
]
} | 479 |
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | BSB_StakingSoftStakers | contract BSB_StakingSoftStakers is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
event RewardsRestaked(address holder, uint amount);
/*
* @dev Token contract address
*/
addre... | end | function end() public onlyOwner returns (bool){
require(!ended, "Staking already ended");
address _aux;
for(uint i = 0; i < holders.length(); i = i.add(1)){
_aux = holders.at(i);
rewardEnded[_aux] = getPendingRewards(_aux);
unclaimed[_aux] = 0;
stakingTime[_a... | /*
* @dev End the staking pool
*/ | Comment | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
2704,
3370
]
} | 480 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | BSB_StakingSoftStakers | contract BSB_StakingSoftStakers is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
event RewardsRestaked(address holder, uint amount);
/*
* @dev Token contract address
*/
addre... | getMaxAmountWithdrawable | function getMaxAmountWithdrawable(address _staker) public view returns(uint){
uint _res = 0;
if(block.timestamp.sub(stakingTime[msg.sender]) < unstakeTime && !ended && alreadyProgUnstaked[_staker] == 0){
_res = 0;
}else if(alreadyProgUnstaked[_staker] == 0 && !ended){
if(b... | /*
* @dev Max amount withdrawable on basis on time
*/ | Comment | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
11945,
13534
]
} | 481 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | BSB_StakingSoftStakers | contract BSB_StakingSoftStakers is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
event RewardsRestaked(address holder, uint amount);
/*
* @dev Token contract address
*/
addre... | withdraw2 | function withdraw2(uint amountToWithdraw) public returns (bool){
require(holders.contains(msg.sender), "Not a staker");
require(amountToWithdraw <= getMaxAmountWithdrawable(msg.sender), "Maximum reached");
require(alreadyProgUnstaked[msg.sender] > 0 || ended, "Use withdraw first");
already... | /*
* @dev Progressive Unstaking (Second, third, fourth... Progressive withdraws)
*/ | Comment | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
13640,
14968
]
} | 482 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | BSB_StakingSoftStakers | contract BSB_StakingSoftStakers is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
event RewardsRestaked(address holder, uint amount);
/*
* @dev Token contract address
*/
addre... | withdraw | function withdraw(uint amountToWithdraw) public returns (bool){
require(holders.contains(msg.sender), "Not a staker");
require(alreadyProgUnstaked[msg.sender] == 0 && !ended , "Use withdraw2 function");
amountPerInterval[msg.sender] = depositedTokens[msg.sender].div(number_intervals);
require(deposi... | /*
* @dev Progressive Unstaking (First withdraw)
*/ | Comment | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
15043,
16460
]
} | 483 | ||
BSB_StakingSoftStakers | BSB_StakingSoftStakers.sol | 0x78e3dd527d0f9d2c64e5ac2f7c1ec9384da58803 | Solidity | BSB_StakingSoftStakers | contract BSB_StakingSoftStakers is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
event RewardsRestaked(address holder, uint amount);
/*
* @dev Token contract address
*/
addre... | transferAnyERC20Tokens | function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner returns (bool){
require (_tokenAddr != tokenDepositAddress, "Cannot Transfer Out this token");
Token(_tokenAddr).transfer(_to, _amount);
return true;
}
| /*
* @dev function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
*/ | Comment | v0.8.7+commit.e28d00a7 | BSD-3-Clause | ipfs://da519b4ea63d5036e5980d69dae3e015e46b21150075bb1d9f046c3d06f17974 | {
"func_code_index": [
19167,
19452
]
} | 484 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
248,
428
]
} | 485 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
695,
833
]
} | 486 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1120,
1311
]
} | 487 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1554,
2017
]
} | 488 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (co... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2475,
2609
]
} | 489 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3087,
3363
]
} | 490 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3810,
3942
]
} | 491 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | 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 (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to r... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4409,
4576
]
} | 492 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | fromInt | function fromInt (int256 x) internal pure returns (int128) {
require (x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF);
return int128 (x << 64);
}
| /**
* Convert signed 256-bit integer number into signed 64.64-bit fixed point
* number. Revert on overflow.
*
* @param x signed 256-bit integer number
* @return signed 64.64-bit fixed point number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
580,
746
]
} | 493 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | toInt | function toInt (int128 x) internal pure returns (int64) {
return int64 (x >> 64);
}
| /**
* Convert signed 64.64 fixed point number into signed 64-bit integer number
* rounding down.
*
* @param x signed 64.64-bit fixed point number
* @return signed 64-bit integer number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
964,
1058
]
} | 494 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | fromUInt | function fromUInt (uint256 x) internal pure returns (int128) {
require (x <= 0x7FFFFFFFFFFFFFFF);
return int128 (x << 64);
}
| /**
* Convert unsigned 256-bit integer number into signed 64.64-bit fixed point
* number. Revert on overflow.
*
* @param x unsigned 256-bit integer number
* @return signed 64.64-bit fixed point number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1293,
1433
]
} | 495 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | toUInt | function toUInt (int128 x) internal pure returns (uint64) {
require (x >= 0);
return uint64 (x >> 64);
}
| /**
* Convert signed 64.64 fixed point number into unsigned 64-bit integer
* number rounding down. Revert on underflow.
*
* @param x signed 64.64-bit fixed point number
* @return unsigned 64-bit integer number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1677,
1797
]
} | 496 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | from128x128 | function from128x128 (int256 x) internal pure returns (int128) {
int256 result = x >> 64;
require (result >= MIN_64x64 && result <= MAX_64x64);
return int128 (result);
}
| /**
* Convert signed 128.128 fixed point number into signed 64.64-bit fixed point
* number rounding down. Revert on overflow.
*
* @param x signed 128.128-bin fixed point number
* @return signed 64.64-bit fixed point number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2054,
2244
]
} | 497 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | to128x128 | function to128x128 (int128 x) internal pure returns (int256) {
return int256 (x) << 64;
}
| /**
* Convert signed 64.64 fixed point number into signed 128.128 fixed point
* number.
*
* @param x signed 64.64-bit fixed point number
* @return signed 128.128 fixed point number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2458,
2558
]
} | 498 | ||
CoFiXVaultForLP | CoFiXVaultForLP.sol | 0xbc99a5e7764792cd1024fd5310e9867ee578c23d | Solidity | ABDKMath64x64 | library ABDKMath64x64 {
/**
* @dev Minimum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;
/**
* @dev Maximum value signed 64.64-bit fixed point number may have.
*/
int128 private constant MAX_64x64 = 0x7FFFF... | /**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* nee... | NatSpecMultiLine | add | function add (int128 x, int128 y) internal pure returns (int128) {
int256 result = int256(x) + y;
require (result >= MIN_64x64 && result <= MAX_64x64);
return int128 (result);
}
| /**
* Calculate x + y. Revert on overflow.
*
* @param x signed 64.64-bit fixed point number
* @param y signed 64.64-bit fixed point number
* @return signed 64.64-bit fixed point number
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2777,
2975
]
} | 499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.