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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | Fish | function Fish() {
owner = msg.sender;
balances[msg.sender] = 1; // Owner can now be a referral
totalSupply = 1;
buyPrice_wie= 100000000000000; // 100 szabo per one token. One unit = 1000 tokens. 1 ether = 10 units... | /*
* Constructor function
*/ | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
367,
755
]
} | 8,600 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | setGrowth | function setGrowth(uint32 _newGrowth_ppm) onlyOwner external returns(bool result) {
if (_newGrowth_ppm >= dailyGrowthMin_ppm &&
_newGrowth_ppm <= dailyGrowthMax_ppm
) {
dailyGrowth_ppm = _newGrowth_ppm;
DailyGrowthUpdate(_newGrowth_ppm);
return true;
} else {
return false;
}
}
| /*
* OWNER ONLY; EXTERNAL METHOD
* setGrowth can accept values within range from 20% to 100% of growth per month (based on 30 days per month assumption).
*
* Formula is:
*
* buyPrice_eth = buyPrice_eth * (1000000 + dailyGrowthMin_ppm) / 1000000;
* ^new value ^current value ^1.0061 (if... | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
3183,
3523
]
} | 8,601 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | buy | function buy() adjustPrice payable external {
require(msg.value >= buyPrice_wie);
var amount = safeDiv(msg.value, buyPrice_wie);
assignBountryToReferals(msg.sender, amount); // First assign bounty
// Buy discount if User is a new user and has set referral
if ( balances[... | /*
* EXTERNAL METHOD
* User can buy arbitrary amount of tokens. Before amount of tokens will be calculated, the price of tokens
* has to be adjusted. This happens in adjustPrice modified before function call.
*
* Short description of this method
*
* Calculate tokens that user is buying
* Assign awa... | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
4380,
4976
]
} | 8,602 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | sell | function sell(uint256 _amount) adjustPrice external {
require(_amount > 0 && balances[msg.sender] >= _amount);
uint moneyWorth = safeMul(_amount, sellPrice_wie);
require(this.balance > moneyWorth); // We can't sell if we don't have enough money
if (
balan... | /*
* EXTERNAL METHOD
* User can sell tokens back to contract.
*
* Short description of this method
*
* Adjust price
* Calculate tokens price that user is selling
* Make all possible checks
* Transfer the money
*/ | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
5244,
6499
]
} | 8,603 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | issueTo | function issueTo(address _beneficiary, uint256 _amount_tkns) private {
if (
balances[this] >= _amount_tkns
) {
// All tokens are taken from balance
balances[this] = safeSub(balances[this], _amount_tkns);
balances[_beneficiary] = safeAdd(balances[_beneficiary], _amount_tkns);
} else {
... | /*
* PRIVATE METHOD
* Issue new tokens to contract
*/ | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
6572,
7250
]
} | 8,604 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | referral | function referral(address _referral) external returns(bool) {
if ( balances[_referral] > 0 && // Referral participated already
balances[msg.sender] == 0 && // Sender is a new user
referrals[msg.sender][0] == 0 ... | /*
* EXTERNAL METHOD
* Set your referral first. You will get 4% more tokens on your first buy and trigger a
* reward of whoever told you about this contract. A win-win scenario.
*/ | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
7752,
8423
]
} | 8,605 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | assignBountryToReferals | function assignBountryToReferals(address _referralsOf, uint256 _amount) private {
var refs = referrals[_referralsOf];
if (refs[0] != 0) {
issueTo(refs[0], (_amount * 4) / 100); // 4% bounty to direct referral
if (refs[1] != 0) {
issueTo(refs[1], (_amount *... | /*
* PRIVATE METHOD
* Award bounties to referrals.
*/ | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
8496,
9100
]
} | 8,606 | |||
Fish | Fish.sol | 0x80c1a36dcbdca742f59f09fda16c43e6ad877c2b | Solidity | Fish | contract Fish is owned, StandardToken {
string public constant TermsOfUse = "https://github.com/triangles-things/fish.project/blob/master/terms-of-use.md";
/*
* State variables
*/
string public constant symbol = "FSH";
string public constant name = "Fish";
uint8 public constant decimals = 3... | assignBounty | function assignBounty(address _account, uint256 _amount) onlyOwner external returns(bool) {
require(_amount > 0);
if (balances[_account] > 0 && // Account had participated already
bounties[_account] + _amount <= 1000000 /... | /*
* OWNER ONLY; EXTERNAL METHOD
* Santa is coming! Who ever made impact to promote the Fish and can prove it will get the bonus
*/ | Comment | v0.4.15+commit.bbb8e64f | bzzr://4613992a993e1bbc51872aa0c9329a881775179ceea4634a49734b7b20cbfb32 | {
"func_code_index": [
9250,
9732
]
} | 8,607 | |||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
971,
1281
]
} | 8,608 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | balanceOf | function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
| /**
* @dev See {IERC721-balanceOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
1340,
1553
]
} | 8,609 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | ownerOf | function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
| /**
* @dev See {IERC721-ownerOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
1610,
1854
]
} | 8,610 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev See {IERC721Metadata-name}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
1916,
2021
]
} | 8,611 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev See {IERC721Metadata-symbol}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
2085,
2194
]
} | 8,612 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | tokenURI | function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
| /**
* @dev See {IERC721Metadata-tokenURI}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
2260,
2599
]
} | 8,613 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | _baseURI | function _baseURI() internal view virtual returns (string memory) {
return "";
}
| /**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
2842,
2941
]
} | 8,614 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | approve | function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor... | /**
* @dev See {IERC721-approve}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
2998,
3414
]
} | 8,615 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | getApproved | function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
3475,
3701
]
} | 8,616 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
3768,
4068
]
} | 8,617 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | isApprovedForAll | function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
4134,
4303
]
} | 8,618 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
4365,
4709
]
} | 8,619 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
4775,
4965
]
} | 8,620 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
5031,
5364
]
} | 8,621 | ||
LinguaFranca | @openzeppelin/contracts/token/ERC721/ERC721.sol | 0x9a7a5ff2c9563e96fbbed4dda94d5549b30f1efb | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _ow... | _approve | function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ec30ad3b2c7be55c484ddb84aa17c0c44a22d432c6fab023a60ec5e2d7d4b3de | {
"func_code_index": [
8115,
8294
]
} | 8,622 | ||
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | KomicaToken | function KomicaToken() public {
symbol = "KOMICA";
name = "Komica Token";
decimals = 18;
_totalSupply = 188300000000000000000000000000;
balances[0x006bdc1a30995Fd5a318B48c78F01A4ecFeA209E] = _totalSupply;
Transfer(address(0), 0x006bdc1a30995Fd5a318B48c78F01A4ecFeA209E, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
749,
1099
]
} | 8,623 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
1287,
1408
]
} | 8,624 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
1628,
1757
]
} | 8,625 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
2101,
2378
]
} | 8,626 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
2886,
3094
]
} | 8,627 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
3625,
3983
]
} | 8,628 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
4266,
4422
]
} | 8,629 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
4777,
5094
]
} | 8,630 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
5327,
5516
]
} | 8,631 | |
KomicaToken | KomicaToken.sol | 0xa7c0728bf78328dc3c3e6c7e7e0da08a20eec1cb | Solidity | KomicaToken | contract KomicaToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
bytes32 public currentChallenge; // The coin starts with a challenge
uint public timeOfLastProof = now; // V... | // ----------------------------------------------------------------------------
// 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.23+commit.124ca40d | bzzr://4c6c8ebca81579c41a48e19e01d6c6fe800b097643ac441fadac67cf06780c97 | {
"func_code_index": [
5708,
5767
]
} | 8,632 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | BokkyPooBahsDateTimeLibrary | library BokkyPooBahsDateTimeLibrary {
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
uint constant SECONDS_PER_HOUR = 60 * 60;
uint constant SECONDS_PER_MINUTE = 60;
int constant OFFSET19700101 = 2440588;
uint constant DOW_MON = 1;
uint constant DOW_TUE = 2;
uint constant DOW_WED = 3;
u... | // ----------------------------------------------------------------------------
// BokkyPooBah's DateTime Library v1.01
//
// A gas-efficient Solidity date and time library
//
// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
//
// Tested date range 1970/01/01 to 2345/12/31
//
// Conventions:
// Unit |... | LineComment | _daysFromDate | function _daysFromDate(uint year, uint month, uint day) internal pure returns (uint _days) {
require(year >= 1970);
int _year = int(year);
int _month = int(month);
int _day = int(day);
int __days = _day
- 32075
+ 1461 * (_year + 4800 + (_month - 14) / 12) / 4
+ 367 * (_month - 2 -... | // ------------------------------------------------------------------------
// Calculate the number of days from 1970/01/01 to year/month/day using
// the date conversion algorithm from
// http://aa.usno.navy.mil/faq/docs/JD_Formula.php
// and subtracting the offset 2440588 so that 1970/01/01 is day 0
//
// days = da... | LineComment | v0.8.10+commit.fc410830 | {
"func_code_index": [
1096,
1611
]
} | 8,633 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | BokkyPooBahsDateTimeLibrary | library BokkyPooBahsDateTimeLibrary {
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
uint constant SECONDS_PER_HOUR = 60 * 60;
uint constant SECONDS_PER_MINUTE = 60;
int constant OFFSET19700101 = 2440588;
uint constant DOW_MON = 1;
uint constant DOW_TUE = 2;
uint constant DOW_WED = 3;
u... | // ----------------------------------------------------------------------------
// BokkyPooBah's DateTime Library v1.01
//
// A gas-efficient Solidity date and time library
//
// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
//
// Tested date range 1970/01/01 to 2345/12/31
//
// Conventions:
// Unit |... | LineComment | _daysToDate | function _daysToDate(uint _days) internal pure returns (uint year, uint month, uint day) {
int __days = int(_days);
int L = __days + 68569 + OFFSET19700101;
int N = 4 * L / 146097;
L = L - (146097 * N + 3) / 4;
int _year = 4000 * (L + 1) / 1461001;
L = L - 1461 * _year / 4 + 31;
int _month ... | // ------------------------------------------------------------------------
// Calculate year/month/day from the number of days since 1970/01/01 using
// the date conversion algorithm from
// http://aa.usno.navy.mil/faq/docs/JD_Formula.php
// and adding the offset 2440588 so that 1970/01/01 is day 0
//
// int L = day... | LineComment | v0.8.10+commit.fc410830 | {
"func_code_index": [
2360,
2969
]
} | 8,634 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | BokkyPooBahsDateTimeLibrary | library BokkyPooBahsDateTimeLibrary {
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
uint constant SECONDS_PER_HOUR = 60 * 60;
uint constant SECONDS_PER_MINUTE = 60;
int constant OFFSET19700101 = 2440588;
uint constant DOW_MON = 1;
uint constant DOW_TUE = 2;
uint constant DOW_WED = 3;
u... | // ----------------------------------------------------------------------------
// BokkyPooBah's DateTime Library v1.01
//
// A gas-efficient Solidity date and time library
//
// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
//
// Tested date range 1970/01/01 to 2345/12/31
//
// Conventions:
// Unit |... | LineComment | getDayOfWeek | function getDayOfWeek(uint timestamp) internal pure returns (uint dayOfWeek) {
uint _days = timestamp / SECONDS_PER_DAY;
dayOfWeek = (_days + 3) % 7 + 1;
}
| // 1 = Monday, 7 = Sunday | LineComment | v0.8.10+commit.fc410830 | {
"func_code_index": [
5949,
6128
]
} | 8,635 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | 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() {
_transferOwnership(_msgSender());
... | /**
* @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.8.10+commit.fc410830 | {
"func_code_index": [
393,
482
]
} | 8,636 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | 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() {
_transferOwnership(_msgSender());
... | /**
* @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 {
_transferOwnership(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
1025,
1130
]
} | 8,637 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | 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() {
_transferOwnership(_msgSender());
... | /**
* @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");
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
1275,
1477
]
} | 8,638 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | 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() {
_transferOwnership(_msgSender());
... | /**
* @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) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
1627,
1818
]
} | 8,639 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
178,
885
]
} | 8,640 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
986,
1319
]
} | 8,641 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
requ... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
1438,
1883
]
} | 8,642 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | ERC721 | abstract contract ERC721 {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address ind... | /// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC. | NatSpecSingleLine | approve | function approve(address spender, uint256 id) public virtual {
address owner = ownerOf[id];
require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");
getApproved[id] = spender;
emit Approval(owner, spender, id);
}
| /*///////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/ | Comment | v0.8.10+commit.fc410830 | {
"func_code_index": [
1708,
1993
]
} | 8,643 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | ERC721 | abstract contract ERC721 {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address ind... | /// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC. | NatSpecSingleLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {
return
interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
}
| /*///////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/ | Comment | v0.8.10+commit.fc410830 | {
"func_code_index": [
3963,
4302
]
} | 8,644 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | ERC721 | abstract contract ERC721 {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address ind... | /// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC. | NatSpecSingleLine | _mint | function _mint(address to, uint256 id) internal virtual {
require(to != address(0), "INVALID_RECIPIENT");
require(ownerOf[id] == address(0), "ALREADY_MINTED");
// Counter overflow is incredibly unrealistic.
unchecked {
balanceOf[to]++;
}
ownerOf[id] = to;
emit Transfer(address(0)... | /*///////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/ | Comment | v0.8.10+commit.fc410830 | {
"func_code_index": [
4492,
4864
]
} | 8,645 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | ERC721 | abstract contract ERC721 {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address ind... | /// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
/// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC. | NatSpecSingleLine | _safeMint | function _safeMint(address to, uint256 id) internal virtual {
_mint(to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
| /*///////////////////////////////////////////////////////////////
INTERNAL SAFE MINT LOGIC
//////////////////////////////////////////////////////////////*/ | Comment | v0.8.10+commit.fc410830 | {
"func_code_index": [
5434,
5778
]
} | 8,646 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | CharitySplitter | contract CharitySplitter {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice Tracks splitting profits with a charity.
/// @dev This module essentialy does two things:
/// * Tracks how much money goes to the charity and how much to someone else.
/// * Implements a simple time-lock to avoid the contract owner changing the
/// charity address to one they own.
///
/// Anyone can ca... | NatSpecSingleLine | _updateCharity | function _updateCharity(address payable _charity)
internal
{
if (_charity == address(0)) {
revert CharitySplitter__InvalidCharityAddress();
}
charity = _charity;
}
| /// @dev Update the charity address. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
1637,
1857
]
} | 8,647 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | CharitySplitter | contract CharitySplitter {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice Tracks splitting profits with a charity.
/// @dev This module essentialy does two things:
/// * Tracks how much money goes to the charity and how much to someone else.
/// * Implements a simple time-lock to avoid the contract owner changing the
/// charity address to one they own.
///
/// Anyone can ca... | NatSpecSingleLine | _updateBalance | function _updateBalance(uint256 value)
internal
{
// checks: if value is zero nothing to update.
if (value == 0) {
return;
}
uint256 charityValue = (value * charityFeeBp) / BP_DENOMINATOR;
uint256 ownerValue = value - charityValue;
// effects: update balances.
charityBalance +=... | /// @dev Update charity and owner balance. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
2570,
2990
]
} | 8,648 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | CharitySplitter | contract CharitySplitter {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice Tracks splitting profits with a charity.
/// @dev This module essentialy does two things:
/// * Tracks how much money goes to the charity and how much to someone else.
/// * Implements a simple time-lock to avoid the contract owner changing the
/// charity address to one they own.
///
/// Anyone can ca... | NatSpecSingleLine | _withdrawCharityBalance | function _withdrawCharityBalance()
internal
{
uint256 value = charityBalance;
// checks: no money to withdraw.
if (value == 0) {
return;
}
// effects: reset charity balance to zero.
charityBalance = 0;
// interactions: send money to charity address.
(bool sent, ) = charity... | //////////////////////////////////////////////////////////////////////////
/// @notice Withdraw funds to charity address. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
3439,
3860
]
} | 8,649 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | CharitySplitter | contract CharitySplitter {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice Tracks splitting profits with a charity.
/// @dev This module essentialy does two things:
/// * Tracks how much money goes to the charity and how much to someone else.
/// * Implements a simple time-lock to avoid the contract owner changing the
/// charity address to one they own.
///
/// Anyone can ca... | NatSpecSingleLine | _withdrawOwnerBalance | function _withdrawOwnerBalance(address payable destination)
internal
{
uint256 value = ownerBalance;
// checks: no money to withdraw.
if (value == 0) {
return;
}
// effects: reset owner balance to zero.
ownerBalance = 0;
// interactions: send money to destination address.
... | /// @notice Withdraw funds to owner address.
/// @param destination the address that receives the funds. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
3975,
4423
]
} | 8,650 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | withdrawCharityBalance | function withdrawCharityBalance()
public
nonReentrant
{
_withdrawCharityBalance();
}
| //////////////////////////////////////////////////////////////////////////
/// @notice Withdraw charity balance to charity address.
/// @dev Anyone can call this at any time. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
2804,
2924
]
} | 8,651 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | withdrawOwnerBalance | function withdrawOwnerBalance(address payable destination)
public
onlyOwner
nonReentrant
{
_withdrawOwnerBalance(destination);
}
| /// @notice Withdraw owner balance to the specified address.
/// @param destination the address that receives the owner balance. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
3063,
3235
]
} | 8,652 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | updateCharity | function updateCharity(address payable charity)
public
onlyOwner
nonReentrant
{
_updateCharity(charity);
}
| /// @notice Update the address that receives the charity fee.
/// @param charity the new charity address. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
3351,
3501
]
} | 8,653 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | setTimeOffsetMinutes | function setTimeOffsetMinutes(uint256 id, int128 offsetMinutes)
public
{
// checks: id exists
if (ownerOf[id] == address(0)) {
revert EthTime__DoesNotExist();
}
// checks: sender is owner.
if (ownerOf[id] != msg.sender) {
revert EthTime__NotOwner();
}
// checks: validat... | /// @notice Sets the time offset of the given token id.
/// @dev Use minutes because some timezones (like IST) are offset by half an hour.
/// @param id the NFT unique id.
/// @param offsetMinutes the offset in minutes. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
4265,
4835
]
} | 8,654 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | mint | function mint(address to, int128 offsetMinutes, uint256 id)
public
payable
nonReentrant
virtual
{
// interactions: mint.
uint256 valueLeft = _mint(to, offsetMinutes, id, msg.value);
// interactions: send back leftover value.
if (valueLeft > 0) {
(bool success, ) = msg.sender... | /// @notice Mint a new NFT, transfering ownership to the given account.
/// @dev If the token id already exists, this method fails.
/// @param to the NFT ower.
/// @param offsetMinutes the time offset in minutes.
/// @param id the NFT unique id. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
6127,
6565
]
} | 8,655 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | batchMint | function batchMint(address to, int128 offsetMinutes, uint256[] calldata ids)
public
payable
nonReentrant
virtual
{
uint256 count = ids.length;
// checks: can mint count nfts
_validateBatchMintCount(count);
uint256 valueLeft = msg.value;
for (uint256 i = 0; i < count; i++) {
... | /// @notice Mint new NFTs, transfering ownership to the given account.
/// @dev If any of the token ids already exists, this method fails.
/// @param to the NFT ower.
/// @param offsetMinutes the time offset in minutes.
/// @param ids the NFT unique ids. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
6842,
7509
]
} | 8,656 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | getBatchMintPrice | function getBatchMintPrice(uint256 count)
public
view
returns (uint256)
{
// checks: can mint count nfts
_validateBatchMintCount(count);
uint256 supply = totalSupply;
uint256 price = 0;
for (uint256 i = 0; i < count; i++) {
price += _priceAtSupplyLevel(supply + i);
}
... | /// @notice Get the price for minting the next `count` NFT. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
7575,
7972
]
} | 8,657 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | getMintPrice | function getMintPrice()
public
view
returns (uint256)
{
return _priceAtSupplyLevel(totalSupply);
}
| /// @notice Get the price for minting the next NFT. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
8030,
8172
]
} | 8,658 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | tokenURI | function tokenURI(uint256 id)
public
view
override
returns (string memory)
{
if (ownerOf[id] == address(0)) {
revert EthTime__DoesNotExist();
}
string memory tokenId = Strings.toString(id);
(uint256 hour, uint256 minute) = _adjustedHourMinutes(id);
bytes memory topHue = _c... | //////////////////////////////////////////////////////////////////////////
/// @notice Returns the URI with the NFT metadata.
/// @dev Returns the base64 encoded metadata inline.
/// @param id the NFT unique id | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
10497,
12341
]
} | 8,659 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | tokenImagePreview | function tokenImagePreview(address to, uint256 id)
public
view
returns (string memory)
{
(uint256 hour, uint256 minute) = _adjustedHourMinutes(id);
bytes memory topHue = _computeHue(uint160(id >> 4), id);
bytes memory bottomHue = _computeHue(uint160(to), id);
return _tokenImage(topHue, bot... | /// @dev Generate a preview of the token that will be minted.
/// @param to the minter.
/// @param id the NFT unique id. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
12476,
12860
]
} | 8,660 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | _updateHistory | function _updateHistory(address to, uint256 id)
internal
{
// effects: xor existing value with address bytes content.
historyAccumulator[id] ^= uint160(to) << 2;
}
| //////////////////////////////////////////////////////////////////////////
/// @dev Update the NFT history based on the transfer to the given account.
/// @param to the address that will receive the nft.
/// @param id the NFT unique id. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
13432,
13631
]
} | 8,661 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | _tokenImage | function _tokenImage(bytes memory topHue, bytes memory bottomHue, uint256 hour, uint256 minute)
internal
pure
returns (string memory)
{
return
Base64.encode(
bytes.concat(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">',
'<linearGra... | /// @dev Generate the SVG image for the given NFT. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
14729,
15583
]
} | 8,662 | ||
EthTime | EthTime.sol | 0xe339d6f5a42e581dce5a479fca0ed02248a6dca4 | Solidity | EthTime | contract EthTime is ERC721, CharitySplitter, Ownable, ReentrancyGuard {
//////////////////////////////////////////////////////////////////////////
// //
// Constructor //
// ... | /// @notice ETH-Time NFT contract. | NatSpecSingleLine | _binaryColor | function _binaryColor(uint256 n)
internal
pure
returns (bytes[7] memory)
{
unchecked {
uint256 firstDigit = n / 10;
uint256 secondDigit = n % 10;
return [
(firstDigit & 0x1 != 0) ? onColor : offColor,
(firstDigit & 0x2 != 0) ? onColor : offColor,
... | /// @dev Returns the colors to be used to display the time.
/// The first 3 bytes are used for the first digit, the remaining 4 bytes
/// for the second digit. | NatSpecSingleLine | v0.8.10+commit.fc410830 | {
"func_code_index": [
17426,
18126
]
} | 8,663 | ||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
60,
124
]
} | 8,664 | |||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
232,
309
]
} | 8,665 | |||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
546,
623
]
} | 8,666 | |||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
946,
1042
]
} | 8,667 | |||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
1326,
1407
]
} | 8,668 | |||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
1615,
1712
]
} | 8,669 | |||
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Hollow | contract Hollow is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customis... | //name this contract whatever you'd like | LineComment | Hollow | function Hollow(
) {
balances[msg.sender] = 1618033988749894; // Give the creator all initial tokens (100000 for example)
totalSupply = 1618033988749894; // Update total supply (100000 for example)
name = "Hollow Coin"; // Set th... | //human 0.1 standard. Just an arbitrary versioning scheme.
//
// CHANGE THESE VALUES FOR YOUR TOKEN
//
//make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
1155,
1720
]
} | 8,670 | |
Hollow | Hollow.sol | 0x1020e32c0f831f61cc5be9e16ccc2fbc6c6c8369 | Solidity | Hollow | contract Hollow is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customis... | //name this contract whatever you'd like | LineComment | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.19+commit.c4cbbb05 | bzzr://cd5168dea995829c8c8e1370022707b5cba6753761cafcf6a14d88f050325663 | {
"func_code_index": [
1781,
2586
]
} | 8,671 | |
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
94,
154
]
} | 8,672 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
237,
310
]
} | 8,673 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
534,
616
]
} | 8,674 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
895,
983
]
} | 8,675 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
1647,
1726
]
} | 8,676 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
2039,
2141
]
} | 8,677 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
259,
445
]
} | 8,678 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
723,
864
]
} | 8,679 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
1162,
1359
]
} | 8,680 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
1613,
2089
]
} | 8,681 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
2560,
2697
]
} | 8,682 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
3188,
3471
]
} | 8,683 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
3931,
4066
]
} | 8,684 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
4546,
4717
]
} | 8,685 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
606,
1230
]
} | 8,686 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
2160,
2562
]
} | 8,687 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
3318,
3496
]
} | 8,688 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
3721,
3922
]
} | 8,689 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
4292,
4523
]
} | 8,690 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
4774,
5095
]
} | 8,691 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
497,
581
]
} | 8,692 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
1139,
1292
]
} | 8,693 | ||
Address | Address.sol | 0xaaf28fc39e0dc1fa4b1c7f02b034f48b211d3792 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://da9bea1f0f6f0a5e146550ef47bb79e6d7e0ee4d5b464330b11af0c2351c4e00 | {
"func_code_index": [
1442,
1691
]
} | 8,694 | ||
DODONFTRegistry | contracts/Factory/Registries/DODONFTRegistry.sol | 0xa7263eb38b9a61b72397c884b5f9bfb5c34a7840 | Solidity | DODONFTRegistry | contract DODONFTRegistry is InitializableOwnable, IDODONFTRegistry {
mapping (address => bool) public isAdminListed;
// ============ Registry ============
// Vault -> Frag
mapping(address => address) public _VAULT_FRAG_REGISTRY_;
// base -> quote -> DVM address list
mapping(addre... | /**
* @title DODONFT Registry
* @author DODO Breeder
*
* @notice Register DODONFT Pools
*/ | NatSpecMultiLine | addRegistry | function addRegistry(
address vault,
address fragment,
address quoteToken,
address dvm
) override external {
require(isAdminListed[msg.sender], "ACCESS_DENIED");
_VAULT_FRAG_REGISTRY_[vault] = fragment;
_REGISTRY_[fragment][quoteToken].push(dvm);
emit NewRegistry(vault, fragmen... | // ============ Admin Operation Functions ============ | LineComment | v0.6.9+commit.3e3065ac | Apache-2.0 | ipfs://7b7bfeb5b4504088fc081b5532fb95756fccd6e62f0fcd2e0699633543130769 | {
"func_code_index": [
639,
1015
]
} | 8,695 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
94,
154
]
} | 8,696 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
237,
310
]
} | 8,697 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
534,
616
]
} | 8,698 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
895,
983
]
} | 8,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.