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
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_safeMint
function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); }
/** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: d* * - `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.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 11053, 11168 ] }
3,200
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_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.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 11390, 11645 ] }
3,201
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_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); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId...
/** * @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.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 11976, 12385 ] }
3,202
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_burn
function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); // internal owner _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { ...
/** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 12609, 13159 ] }
3,203
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @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.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 13491, 14095 ] }
3,204
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_setTokenURI
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; }
/** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 14246, 14466 ] }
3,205
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_setBaseURI
function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; }
/** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 14691, 14796 ] }
3,206
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (!to.isContract()) { return true; } bytes memory returndata = to.functionCall(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, ...
/** * @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.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 15356, 15965 ] }
3,207
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner }
/** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 16079, 16276 ] }
3,208
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(...
/** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
_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.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 16884, 16982 ] }
3,209
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 161, 344 ] }
3,210
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 492, 651 ] }
3,211
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0)...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 801, 1249 ] }
3,212
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 1400, 1560 ] }
3,213
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 1721, 1881 ] }
3,214
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 2123, 2307 ] }
3,215
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 2585, 2748 ] }
3,216
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 3002, 3227 ] }
3,217
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting 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 re...
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 3700, 3858 ] }
3,218
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 (consu...
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 4320, 4476 ] }
3,219
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 4950, 5121 ] }
3,220
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv...
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 5790, 5960 ] }
3,221
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); r...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 6618, 6788 ] }
3,222
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 497, 589 ] }
3,223
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 1148, 1301 ] }
3,224
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 1451, 1700 ] }
3,225
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
CuriousAxolotlNFT
contract CuriousAxolotlNFT is ERC721, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIds; event licenseisLocked(string _licenseText); string public AXOLOTL_PROVENANCE = "QmcXvN9tph2HKhMCr3jrcXr1BUdiWjhdR4M2AVnxGHAvvh"; /...
// Accessing the Ownable method ensures that only the creator of the smart contract can interact with it
LineComment
tokenLicense
function tokenLicense(uint _id) public view returns(string memory) { require(_id < totalSupply(), "CHOOSE A AXOLOTL WITHIN RANGE"); return LICENSE_TEXT; }
// Returns the license for tokens
LineComment
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 1846, 2028 ] }
3,226
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
CuriousAxolotlNFT
contract CuriousAxolotlNFT is ERC721, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIds; event licenseisLocked(string _licenseText); string public AXOLOTL_PROVENANCE = "QmcXvN9tph2HKhMCr3jrcXr1BUdiWjhdR4M2AVnxGHAvvh"; /...
// Accessing the Ownable method ensures that only the creator of the smart contract can interact with it
LineComment
lockLicense
function lockLicense() public onlyOwner { licenseLocked = true; emit licenseisLocked(LICENSE_TEXT); }
// Locks the license to prevent further changes
LineComment
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 2089, 2219 ] }
3,227
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
CuriousAxolotlNFT
contract CuriousAxolotlNFT is ERC721, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIds; event licenseisLocked(string _licenseText); string public AXOLOTL_PROVENANCE = "QmcXvN9tph2HKhMCr3jrcXr1BUdiWjhdR4M2AVnxGHAvvh"; /...
// Accessing the Ownable method ensures that only the creator of the smart contract can interact with it
LineComment
changeLicense
function changeLicense(string memory _license) public onlyOwner { require(licenseLocked == false, "License already locked"); LICENSE_TEXT = _license; }
// Change the license
LineComment
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 2249, 2428 ] }
3,228
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
CuriousAxolotlNFT
contract CuriousAxolotlNFT is ERC721, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIds; event licenseisLocked(string _licenseText); string public AXOLOTL_PROVENANCE = "QmcXvN9tph2HKhMCr3jrcXr1BUdiWjhdR4M2AVnxGHAvvh"; /...
// Accessing the Ownable method ensures that only the creator of the smart contract can interact with it
LineComment
mintCuriousAxolotl
function mintCuriousAxolotl(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint Axolotl"); require(numberOfTokens > 0 && numberOfTokens <= maxAxolotlPurchase, "Can only mint 20 tokens at a time"); require(totalSupply().add(numberOfTokens) <= MAX_AXOLOTL, "Purchase wou...
// Create a function to mint/create the NFT
LineComment
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 2583, 3296 ] }
3,229
CuriousAxolotlNFT
CuriousAxolotlNFT.sol
0x75e177433805cc252c18743b2c4d51e18ad970c0
Solidity
CuriousAxolotlNFT
contract CuriousAxolotlNFT is ERC721, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIds; event licenseisLocked(string _licenseText); string public AXOLOTL_PROVENANCE = "QmcXvN9tph2HKhMCr3jrcXr1BUdiWjhdR4M2AVnxGHAvvh"; /...
// Accessing the Ownable method ensures that only the creator of the smart contract can interact with it
LineComment
axolotlNamesOfOwner
function axolotlNamesOfOwner(address _owner) external view returns(string[] memory ) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { // Return an empty array return new string[](0); } else { string[] memory result = new string[](tokenCount); uint256 in...
// GET ALL AXOLOTL OF A WALLET AS AN ARRAY OF STRINGS.
LineComment
v0.7.3+commit.9bfce1f6
MIT
ipfs://f746f698b1f7097327eead01480889fee30091e43a0c56b79118819a73ad6300
{ "func_code_index": [ 3363, 3927 ] }
3,230
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
BLONDCOIN
function BLONDCOIN() public { symbol = "BLO"; name = "BLONDCOIN"; decimals = 18; _totalSupply = 45000000000000000000000000; balances[0xff72c65aa864774aa029114c0f15a44bfc6bc4e0] = _totalSupply; Transfer(address(0), 0xff72c65aa864774aa029114c0f15a44bfc6bc4e0, _totalSupply); }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 456, 794 ] }
3,231
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 982, 1103 ] }
3,232
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 1323, 1452 ] }
3,233
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 1796, 2073 ] }
3,234
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md // recommends that there are no checks for the approval double-spend attack /...
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 2566, 2774 ] }
3,235
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 3305, 3663 ] }
3,236
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 3946, 4102 ] }
3,237
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 4457, 4774 ] }
3,238
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 4966, 5025 ] }
3,239
BLONDCOIN
BLONDCOIN.sol
0x1c3bb10de15c31d5dbe48fbb7b87735d1b7d8c32
Solidity
BLONDCOIN
contract BLONDCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://017d092fbdba6dec9e155baa1c645ad1cba0de70c3cde2cc5b980b9c8b8d61ba
{ "func_code_index": [ 5258, 5447 ] }
3,240
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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 la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 251, 437 ] }
3,241
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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 la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
/** * @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.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 707, 896 ] }
3,242
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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 la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/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.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1142, 1617 ] }
3,243
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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 la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); 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 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.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2080, 2418 ] }
3,244
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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 la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
/** * @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.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2870, 3027 ] }
3,245
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 441, 525 ] }
3,246
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
isOwner
function isOwner() public view returns (bool) { return msg.sender == _owner; }
/** * @dev Returns true if the caller is the current owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 807, 904 ] }
3,247
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public 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.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1252, 1397 ] }
3,248
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1547, 1661 ] }
3,249
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal { 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`). */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1762, 1996 ] }
3,250
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 94, 154 ] }
3,251
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 237, 310 ] }
3,252
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 534, 616 ] }
3,253
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 895, 983 ] }
3,254
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * trans...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1638, 1717 ] }
3,255
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
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); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2030, 2132 ] }
3,256
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to a...
/** * @dev Collection of functions related to the address type, */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function retur...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 455, 882 ] }
3,257
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getBalance
function getBalance( address user, address token ) public view returns (uint256) { return balances[token][user]; }
/** * @return return the balance of `token` for certain `user` */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2053, 2241 ] }
3,258
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getBalances
function getBalances( address user, address[] memory token ) public view returns(uint256[] memory balanceArray) { balanceArray = new uint256[](token.length); for(uint256 index = 0; index < token.length; index++) { balanceArray[index] = balances[token[index]][user]; }...
/** * @return return the balance of multiple tokens for certain `user` */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2337, 2713 ] }
3,259
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getFill
function getFill( bytes32 orderHash ) public view returns (uint256) { return filled[orderHash]; }
/** * @return return the filled amount of order specified by `orderHash` */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2811, 2973 ] }
3,260
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getFills
function getFills( bytes32[] memory orderHash ) public view returns (uint256[] memory filledArray) { filledArray = new uint256[](orderHash.length); for(uint256 index = 0; index < orderHash.length; index++) { filledArray[index] = filled[orderHash[index]]; } }
/** * @return return the filled amount of multple orders specified by `orderHash` array */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3086, 3442 ] }
3,261
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getCancel
function getCancel( bytes32 orderHash ) public view returns (bool) { return cancelled[orderHash]; }
/** * @return return true(false) if order specified by `orderHash` is(not) cancelled */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3552, 3716 ] }
3,262
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getCancels
function getCancels( bytes32[] memory orderHash ) public view returns (bool[]memory cancelledArray) { cancelledArray = new bool[](orderHash.length); for(uint256 index = 0; index < orderHash.length; index++) { cancelledArray[index] = cancelled[orderHash[index]]; } }
/** * @return return array of true(false) if orders specified by `orderHash` array are(not) cancelled */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3843, 4206 ] }
3,263
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
getReferral
function getReferral( address user ) public view returns (address) { return referrals[user]; }
/** * @return return the referrer address of `user` */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 4283, 4442 ] }
3,264
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
setMakerFeeRate
function setMakerFeeRate( uint256 newMakerFeeRate ) external onlyOwner { require( newMakerFeeRate >= minMakerFeeRate && newMakerFeeRate <= maxMakerFeeRate, "INVALID_MAKER_FEE_RATE" ); makerFeeRate = newMakerFeeRate; }
/** * @return set new rate for the maker fee received */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 4521, 4851 ] }
3,265
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
setTakerFeeRate
function setTakerFeeRate( uint256 newTakerFeeRate ) external onlyOwner { require( newTakerFeeRate >= minTakerFeeRate && newTakerFeeRate <= maxTakerFeeRate, "INVALID_TAKER_FEE_RATE" ); takerFeeRate = newTakerFeeRate; }
/** * @return set new rate for the taker fee paid */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 4926, 5258 ] }
3,266
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeStorage
contract ExchangeStorage is Ownable { /** * @dev The minimum fee rate that the maker will receive * Note: 20% = 20 * 10^16 */ uint256 constant internal minMakerFeeRate = 200000000000000000; /** * @dev The maximum fee rate that the maker will receive * Note: 90% = 90...
setFeeAccount
function setFeeAccount( address newFeeAccount ) external onlyOwner { feeAccount = newFeeAccount; }
/** * @return set new fee account */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 5317, 5471 ] }
3,267
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, addr...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
callOptionalReturn
function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checke...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2082, 3201 ] }
3,268
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
getOrderInfo
function getOrderInfo( uint256 partialAmount, Order memory order ) public view returns (OrderInfo memory orderInfo) { // Compute the order hash orderInfo.hash = getPrefixedHash(order); // Fetch filled amount orderInfo.filledAmount = filled[orderInfo.hash]; // Chec...
/** * @dev Compute the status of an order. * Should be called before a contract execution is performet in order to not waste gas. * @return OrderStatus.FILLABLE if the order is valid for taking. * Note: See LibOrder.sol to see all statuses */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1721, 3238 ] }
3,269
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
trade
function trade( Order memory order, bytes memory signature ) public { bool result = _trade(order, signature); require(result, "INVALID_TRADE"); }
/** * @dev Execute a trade based on the input order and signature. * Reverts if order is not valid */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3369, 3579 ] }
3,270
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
_trade
function _trade( Order memory order, bytes memory signature ) internal returns(bool) { order.taker = msg.sender; uint256 takerReceivedAmount = getPartialAmount( order.makerSellAmount, order.makerBuyAmount, order.takerSellAmount ); OrderInfo memory...
/** * @dev Execute a trade based on the input order and signature. * If the order is valid returns true. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3716, 4976 ] }
3,271
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
cancelSingleOrder
function cancelSingleOrder( Order memory order, bytes memory signature ) public { bytes32 orderHash = getPrefixedHash(order); require( recover(orderHash, signature) == msg.sender, "INVALID_SIGNER" ); require( cancelled[orderHash] == false, "AL...
/** * @dev Cancel an order if msg.sender is the order signer. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 5063, 5668 ] }
3,272
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
getOrderFillResult
function getOrderFillResult( uint256 takerReceivedAmount, Order memory order ) internal view returns (OrderFill memory orderFill) { orderFill.takerFillAmount = takerReceivedAmount; orderFill.makerFillAmount = order.takerSellAmount; // 0.2% == 0.2*10^16 orderFill.takerF...
/** * @dev Computation of the following properties based on the order input: * takerFillAmount -> amount of assets received by the taker * makerFillAmount -> amount of assets received by the maker * takerFeePaid -> amount of fee paid by the taker (0.2% of takerFillAmount) * makerFeeReceived -> amount of fee r...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 6266, 7332 ] }
3,273
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
assertTakeOrder
function assertTakeOrder( bytes32 orderHash, uint8 status, address signer, bytes memory signature ) internal pure returns(uint8) { uint8 result = uint8(OrderStatus.FILLABLE); if(recover(orderHash, signature) != signer) { result = uint8(OrderStatus.INVALID_SIGNER...
/** * @dev Throws when the order status is invalid or the signer is not valid. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 7436, 7951 ] }
3,274
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
Exchange
contract Exchange is LibMath, LibOrder, LibSignatureValidator, ExchangeStorage { using SafeMath for uint256; /** * @dev emitted when a trade is executed */ event Trade( address indexed makerAddress, // Address that created the order address indexed takerAddress,...
executeTrade
function executeTrade( Order memory order, OrderFill memory orderFill ) private { uint256 makerGiveAmount = orderFill.takerFillAmount.sub(orderFill.makerFeeReceived); uint256 takerFillAmount = orderFill.takerFillAmount.sub(orderFill.takerFeePaid); address referrer = referrals[order.tak...
/** * @dev Updates the contract state i.e. user balances */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 8033, 9211 ] }
3,275
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeKyberProxy
contract ExchangeKyberProxy is Exchange, LibKyberData { using SafeERC20 for IERC20; /** * @dev The precision used for calculating the amounts - 10*18 */ uint256 constant internal PRECISION = 1000000000000000000; /** * @dev Max decimals allowed when calculating amounts. ...
kyberSwap
function kyberSwap( uint256 givenAmount, address givenToken, address receivedToken, bytes32 hash ) public payable { address taker = msg.sender; KyberData memory kyberData = getSwapInfo( givenAmount, givenToken, receivedToken, taker ); ...
/** * @dev Swaps ETH/TOKEN, TOKEN/ETH or TOKEN/TOKEN using KyberNetwork reserves. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1073, 2040 ] }
3,276
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeKyberProxy
contract ExchangeKyberProxy is Exchange, LibKyberData { using SafeERC20 for IERC20; /** * @dev The precision used for calculating the amounts - 10*18 */ uint256 constant internal PRECISION = 1000000000000000000; /** * @dev Max decimals allowed when calculating amounts. ...
kyberTrade
function kyberTrade( uint256 givenAmount, address givenToken, address receivedToken, bytes32 hash ) public { address taker = msg.sender; KyberData memory kyberData = getTradeInfo( givenAmount, givenToken, receivedToken ); balances[givenToken]...
/** * @dev Exchange ETH/TOKEN, TOKEN/ETH or TOKEN/TOKEN using the internal * balance mapping that keeps track of user's balances. It requires user to first invoke deposit function. * The function relies on KyberNetworkProxy contract. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2313, 3437 ] }
3,277
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeKyberProxy
contract ExchangeKyberProxy is Exchange, LibKyberData { using SafeERC20 for IERC20; /** * @dev The precision used for calculating the amounts - 10*18 */ uint256 constant internal PRECISION = 1000000000000000000; /** * @dev Max decimals allowed when calculating amounts. ...
getSwapInfo
function getSwapInfo( uint256 givenAmount, address givenToken, address receivedToken, address taker ) private returns(KyberData memory) { KyberData memory kyberData; uint256 givenTokenDecimals; uint256 receivedTokenDecimals; if(givenToken == address(0x0)) { ...
/** * @dev Helper function to determine what is being swapped. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3525, 5427 ] }
3,278
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeKyberProxy
contract ExchangeKyberProxy is Exchange, LibKyberData { using SafeERC20 for IERC20; /** * @dev The precision used for calculating the amounts - 10*18 */ uint256 constant internal PRECISION = 1000000000000000000; /** * @dev Max decimals allowed when calculating amounts. ...
getTradeInfo
function getTradeInfo( uint256 givenAmount, address givenToken, address receivedToken ) private returns(KyberData memory) { KyberData memory kyberData; uint256 givenTokenDecimals; uint256 receivedTokenDecimals; if(givenToken == address(0x0)) { kyberData.givenTok...
/** * @dev Helper function to determines what is being swapped using the internal balance mapping. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 5560, 7194 ] }
3,279
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeBatchTrade
contract ExchangeBatchTrade is Exchange { /** * @dev Cancel an array of orders if msg.sender is the order signer. */ function cancelMultipleOrders( Order[] memory orders, bytes[] memory signatures ) public { for (uint256 index = 0; index < orders.l...
cancelMultipleOrders
function cancelMultipleOrders( Order[] memory orders, bytes[] memory signatures ) public { for (uint256 index = 0; index < orders.length; index++) { cancelSingleOrder( orders[index], signatures[index] ); } }
/** * @dev Cancel an array of orders if msg.sender is the order signer. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 139, 471 ] }
3,280
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeBatchTrade
contract ExchangeBatchTrade is Exchange { /** * @dev Cancel an array of orders if msg.sender is the order signer. */ function cancelMultipleOrders( Order[] memory orders, bytes[] memory signatures ) public { for (uint256 index = 0; index < orders.l...
takeAllOrRevert
function takeAllOrRevert( Order[] memory orders, bytes[] memory signatures ) public { for (uint256 index = 0; index < orders.length; index++) { bool result = _trade(orders[index], signatures[index]); require(result, "INVALID_TAKEALL"); } }
/** * @dev Execute multiple trades based on the input orders and signatures. * Note: reverts of one or more trades fail. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 624, 954 ] }
3,281
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeBatchTrade
contract ExchangeBatchTrade is Exchange { /** * @dev Cancel an array of orders if msg.sender is the order signer. */ function cancelMultipleOrders( Order[] memory orders, bytes[] memory signatures ) public { for (uint256 index = 0; index < orders.l...
takeAllPossible
function takeAllPossible( Order[] memory orders, bytes[] memory signatures ) public { for (uint256 index = 0; index < orders.length; index++) { _trade(orders[index], signatures[index]); } }
/** * @dev Execute multiple trades based on the input orders and signatures. * Note: does not revert if one or more trades fail. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1115, 1382 ] }
3,282
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeMovements
contract ExchangeMovements is ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev emitted when a deposit is received */ event Deposit( address indexed token, address indexed user, address indexed referral, address...
deposit
function deposit( address token, uint256 amount, address beneficiary, address referral ) public payable { uint256 value = amount; address user = msg.sender; if(token == address(0x0)) { value = msg.value; } else { IERC20(token).safeTransferFrom(user...
/** * @dev Updates the level 2 map `balances` based on the input * Note: token address is (0x0) when the deposit is for ETH */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1058, 1859 ] }
3,283
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeMovements
contract ExchangeMovements is ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev emitted when a deposit is received */ event Deposit( address indexed token, address indexed user, address indexed referral, address...
withdraw
function withdraw( address token, uint amount ) public { address payable user = msg.sender; require( balances[token][user] >= amount, "INVALID_WITHDRAW" ); balances[token][user] = balances[token][user].sub(amount); if (token == address(0x0)) { u...
/** * @dev Updates the level 2 map `balances` based on the input * Note: token address is (0x0) when the deposit is for ETH */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2020, 2642 ] }
3,284
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeMovements
contract ExchangeMovements is ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev emitted when a deposit is received */ event Deposit( address indexed token, address indexed user, address indexed referral, address...
transfer
function transfer( address token, address to, uint256 amount ) external payable { address user = msg.sender; require( balances[token][user] >= amount, "INVALID_TRANSFER" ); balances[token][user] = balances[token][user].sub(amount); balances[tok...
/** * @dev Transfer assets between two users inside the exchange. Updates the level 2 map `balances` */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2768, 3382 ] }
3,285
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
setNewExchangeAddress
function setNewExchangeAddress(address exchange) external onlyOwner { newExchange = exchange; }
/** * @dev Owner can set the address of the new version of the exchange contract. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 707, 844 ] }
3,286
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
allowOrRestrictMigrations
function allowOrRestrictMigrations() external onlyOwner { migrationAllowed = !migrationAllowed; }
/** * @dev Enables/Disables the migrations. Can be called only by the owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 942, 1081 ] }
3,287
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
migrateFunds
function migrateFunds(address[] calldata tokens) external { require( false != migrationAllowed, "MIGRATIONS_DISALLOWED" ); require( IExchangeUpgradability(newExchange).VERSION() > VERSION, "INVALID_VERSION" ); migrateEthers(); migrateTokens(token...
/** * @dev Migrating assets of the caller to the new exchange contract */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1173, 1604 ] }
3,288
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
migrateEthers
function migrateEthers() private { address user = msg.sender; uint256 etherAmount = balances[address(0x0)][user]; if (etherAmount > 0) { balances[address(0x0)][user] = 0; IExchangeUpgradability(newExchange).importEthers.value(etherAmount)(user); } }
/** * @dev Helper function to migrate user's Ethers. Should be called in migrateFunds() function. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 1723, 2044 ] }
3,289
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
migrateTokens
function migrateTokens(address[] memory tokens) private { address user = msg.sender; address exchange = newExchange; for (uint256 index = 0; index < tokens.length; index++) { address tokenAddress = tokens[index]; uint256 tokenAmount = balances[tokenAddress][user]; if (0 =...
/** * @dev Helper function to migrate user's tokens. Should be called in migrateFunds() function. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2163, 2804 ] }
3,290
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
importEthers
function importEthers(address user) external payable { require( false != migrationAllowed, "MIGRATION_DISALLOWED" ); require( user != address(0x0), "INVALID_USER" ); require( msg.value > 0, "INVALID_AMOUNT" ); requ...
/** * @dev Helper function to migrate user's Ethers. Should be called only from the new exchange contract. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 2932, 3550 ] }
3,291
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeUpgradability
contract ExchangeUpgradability is Ownable, ExchangeStorage { using SafeERC20 for IERC20; using SafeMath for uint256; /** * @dev version of the exchange */ uint8 constant public VERSION = 1; /** * @dev the address of the upgraded exchange contract */ addres...
importTokens
function importTokens( address token, uint256 amount, address user ) external { require( false != migrationAllowed, "MIGRATION_DISALLOWED" ); require( token != address(0x0), "INVALID_TOKEN" ); require( user != address(0x0), ...
/** * @dev Helper function to migrate user's Tokens. Should be called only from the new exchange contract. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 3682, 4484 ] }
3,292
WeiDex
WeiDex.sol
0x2bde6edff9304ead741ff7f4e0a1a636135cba2c
Solidity
ExchangeSwap
contract ExchangeSwap is Exchange, ExchangeMovements { /** * @dev Swaps ETH/TOKEN, TOKEN/ETH or TOKEN/TOKEN using off-chain signed messages. * The flow of the function is Deposit -> Trade -> Withdraw to allow users to directly * take liquidity without the need of deposit and withdraw. ...
swapFill
function swapFill( Order[] memory orders, bytes[] memory signatures, uint256 givenAmount, address givenToken, address receivedToken, address referral ) public payable { address taker = msg.sender; uint256 balanceGivenBefore = balances[givenToken][taker]; uint25...
/** * @dev Swaps ETH/TOKEN, TOKEN/ETH or TOKEN/TOKEN using off-chain signed messages. * The flow of the function is Deposit -> Trade -> Withdraw to allow users to directly * take liquidity without the need of deposit and withdraw. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
bzzr://b58a6ab95c800b680478fb92810bd8eaa1fae0f568cede962069c0bcf7f41146
{ "func_code_index": [ 326, 1661 ] }
3,293
CryptoCrowd
CryptoCrowd.sol
0x2df816710cd7ed473718bf0da9a8fdc4e982a130
Solidity
CryptoCrowd
contract CryptoCrowd is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Crypto Crowd";// string private constant _symbol = "CROWD";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint2...
setMinSwapTokensThreshold
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; }
//Set minimum tokens required to swap.
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://fc822de242e02f4f76ff67d402acb10718a7cfde87916945cf468a1821d19f03
{ "func_code_index": [ 12715, 12859 ] }
3,294
CryptoCrowd
CryptoCrowd.sol
0x2df816710cd7ed473718bf0da9a8fdc4e982a130
Solidity
CryptoCrowd
contract CryptoCrowd is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Crypto Crowd";// string private constant _symbol = "CROWD";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint2...
toggleSwap
function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; }
//Set minimum tokens required to swap.
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://fc822de242e02f4f76ff67d402acb10718a7cfde87916945cf468a1821d19f03
{ "func_code_index": [ 12907, 13013 ] }
3,295
CryptoCrowd
CryptoCrowd.sol
0x2df816710cd7ed473718bf0da9a8fdc4e982a130
Solidity
CryptoCrowd
contract CryptoCrowd is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Crypto Crowd";// string private constant _symbol = "CROWD";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint2...
setMaxTxnAmount
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; }
//Set maximum transaction
LineComment
v0.8.9+commit.e5eed63a
Unlicense
ipfs://fc822de242e02f4f76ff67d402acb10718a7cfde87916945cf468a1821d19f03
{ "func_code_index": [ 13048, 13161 ] }
3,296
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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 r...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 104, 168 ] }
3,297
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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 r...
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://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 261, 338 ] }
3,298
SIB
SIB.sol
0x6d03c06b762100e211a9c3280aebac3b7675486e
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 r...
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://5dcc9e7b65467b7f808dd69116a78c1080274f18d745caed11020fbdec624dbc
{ "func_code_index": [ 584, 670 ] }
3,299