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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _safeMint | function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
| /**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
d*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
11060,
11175
]
} | 307 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _safeMint | function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
_mint(to, tokenId);
require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
| /**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
11397,
11652
]
} | 308 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _mint | function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId... | /**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
11983,
12392
]
} | 309 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _burn | function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId); // internal owner
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
... | /**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
12616,
13166
]
} | 310 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _transfer | function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
//... | /**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
13498,
14102
]
} | 311 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _setTokenURI | function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
| /**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
14253,
14473
]
} | 312 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _setBaseURI | function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
| /**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
14698,
14803
]
} | 313 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _checkOnERC721Received | function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
private returns (bool)
{
if (!to.isContract()) {
return true;
}
bytes memory returndata = to.functionCall(abi.encodeWithSelector(
IERC721Receiver(to).onERC721Received.selector,
... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param to... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
15363,
15992
]
} | 314 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | ERC721 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(... | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``... | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
16791,
16889
]
} | 315 | ||
HogeNFTv3 | HogeNFTv3.sol | 0xae58a033b6d7e66014fe88227c97680cc6ccecd9 | Solidity | HogeNFTv3 | contract HogeNFTv3 is Context, AccessControl, ERC721 {
using Counters for Counters.Counter;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
Counters.Counter private _tokenIdTracker;
address private _owner;
... | owner | function owner() public view returns (address) {
return _owner;
}
| // Begin Ownable interface from openzeppelin
// Primarily used for OpenSea storefront management, AccessControl is used for choosing who can mint.
// Owner, MINTER_ROLE, PAUSER_ROLE can all be separate addresses! | LineComment | v0.7.6+commit.7338295f | MIT | ipfs://c9934b71fc610797d2cdb07781f8b745bc463b58cb1b7325cc49abe91d425949 | {
"func_code_index": [
1770,
1838
]
} | 316 | ||
yCurveGrantPool | yCurveGrantPool.sol | 0x35a618b7844c90e19975e5697c9281421be01f6e | Solidity | Context | contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
function _msgData() internal view returns (bytes memory) {
this; // silence state mutability... | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.12+commit.7709ece9 | MIT | bzzr://849fa1025011f5f399b18ace13959cf60c57cacb5bd77acce18b71ac86f2ad71 | {
"func_code_index": [
109,
212
]
} | 317 | ||
yCurveGrantPool | yCurveGrantPool.sol | 0x35a618b7844c90e19975e5697c9281421be01f6e | Solidity | yCurveGrantPool | contract yCurveGrantPool is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public DAI;
address public yDAI;
address public USDC;
address public yUSDC;
address public USDT;
address public yUSDT;
address public TUSD;
... | inCaseTokenGetsStuck | function inCaseTokenGetsStuck(IERC20 _TokenAddress) onlyOwner public {
uint qty = _TokenAddress.balanceOf(address(this));
_TokenAddress.safeTransfer(msg.sender, qty);
}
| // incase of half-way error | LineComment | v0.5.12+commit.7709ece9 | MIT | bzzr://849fa1025011f5f399b18ace13959cf60c57cacb5bd77acce18b71ac86f2ad71 | {
"func_code_index": [
2412,
2600
]
} | 318 | ||
yCurveGrantPool | yCurveGrantPool.sol | 0x35a618b7844c90e19975e5697c9281421be01f6e | Solidity | yCurveGrantPool | contract yCurveGrantPool is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address public DAI;
address public yDAI;
address public USDC;
address public yUSDC;
address public USDT;
address public yUSDT;
address public TUSD;
... | inCaseETHGetsStuck | function inCaseETHGetsStuck() onlyOwner public{
(bool result, ) = msg.sender.call.value(address(this).balance)("");
require(result, "transfer of ETH failed");
}
| // incase of half-way error | LineComment | v0.5.12+commit.7709ece9 | MIT | bzzr://849fa1025011f5f399b18ace13959cf60c57cacb5bd77acce18b71ac86f2ad71 | {
"func_code_index": [
2634,
2814
]
} | 319 | ||
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
268,
659
]
} | 320 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
865,
977
]
} | 321 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
401,
853
]
} | 322 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
1485,
1675
]
} | 323 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
1999,
2130
]
} | 324 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
2375,
2639
]
} | 325 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
261,
321
]
} | 326 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
644,
820
]
} | 327 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | /**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ | NatSpecMultiLine | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(address(0), _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
483,
754
]
} | 328 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | /**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/ | NatSpecMultiLine | finishMinting | function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
871,
1013
]
} | 329 | |
ICO | ICO.sol | 0x85f8c84b0f7a212b23b5586889ec3152aff5cc99 | Solidity | BurnableToken | contract BurnableToken is BasicToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = ba... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.20+commit.3155dd80 | bzzr://9616334fedcaabb3da6475f1145ca8a372a8747e294f0a242fcae29fbdb4a5b8 | {
"func_code_index": [
222,
680
]
} | 330 | |
CvxCrvStrategy | contracts/strategies/CvxCrvStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | CvxCrvStrategy | contract CvxCrvStrategy is ClaimableStrategy {
uint256 public constant MAX_BPS = 10000;
struct Settings {
address crvRewards;
address cvxRewards;
address convexBooster;
address crvDepositor;
address crvToken;
uint256 poolIndex;
address cvxCrvT... | /// @title CvxCrvStrategy | NatSpecSingleLine | deposit | function deposit() external override onlyController {
if (checkPoolIndex(poolSettings.poolIndex)) {
IERC20 wantToken = IERC20(_want);
if (
wantToken.allowance(
address(this),
poolSettings.convexBooster
) == 0
) {
wa... | /// @dev Function that controller calls | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
1269,
1942
]
} | 331 | ||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | _configure | function _configure(
address _wantAddress,
address _controllerAddress,
address _governance
) internal {
_want = _wantAddress;
controller = _controllerAddress;
transferOwnership(_governance);
}
| /// @notice Default initialize method for solving migration linearization problem
/// @dev Called once only by deployer
/// @param _wantAddress address of eurxb instance or address of TokenWrapper(EURxb) instance
/// @param _controllerAddress address of controller instance | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
1301,
1562
]
} | 332 | ||||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | setController | function setController(address _newController) external override onlyOwner {
require(controller != _newController, "!old");
controller = _newController;
}
| /// @notice Usual setter with check if param is new
/// @param _newController New value | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
1663,
1845
]
} | 333 | ||||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | setWant | function setWant(address _newWant) external override onlyOwner {
require(_want != _newWant, "!old");
_want = _newWant;
}
| /// @notice Usual setter with check if param is new
/// @param _newWant New value | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
1940,
2088
]
} | 334 | ||||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | want | function want() external view override returns (address) {
return _want;
}
| /// @notice Usual getter (inherited from IStrategy)
/// @return 'want' token (In this case EURxb) | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
2199,
2292
]
} | 335 | ||||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | withdraw | function withdraw(address _token) external virtual override onlyController {
require(address(_token) != address(_want), "!want");
uint256 balance = IERC20(_token).balanceOf(address(this));
IERC20(_token).safeTransfer(controller, balance);
emit Withdrawn(_token, balance, controller);
}
| /// @notice must exclude any tokens used in the yield
/// @dev Controller role - withdraw should return to Controller | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
2423,
2754
]
} | 336 | ||||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | withdraw | function withdraw(uint256 _amount)
public
virtual
override
onlyControllerOrVault
{
uint256 _balance = IERC20(_want).balanceOf(address(this));
if (_balance < _amount) {
_amount = _withdrawSome(_amount.sub(_balance));
_amount = _amount.add(_balance);
}
address _v... | /// @notice Withdraw partial funds, normally used with a vault withdrawal
/// @dev Controller | Vault role - withdraw should always return to Vault | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
2915,
3439
]
} | 337 | ||||
CvxCrvStrategy | contracts/strategies/base/BaseStrategy.sol | 0x958477765fa9b37e93ce9320af8cd53db5f1866c | Solidity | BaseStrategy | abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
... | balanceOf | function balanceOf() public view virtual override returns (uint256) {
return IERC20(_want).balanceOf(address(this));
}
| /// @notice balance of this address in "want" tokens | NatSpecSingleLine | v0.6.6+commit.6c089d02 | {
"func_code_index": [
3500,
3637
]
} | 338 | ||||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | /**
* Default Interfaces for accepting ETH
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1286,
1343
]
} | 339 | ||||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | withdrawalAll | function withdrawalAll() external onlyAdmin() {
require(payable(msg.sender).send(address(this).balance));
}
| /**
* Withrawal Function for Admins
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1457,
1580
]
} | 340 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | withdrawalAllNfts | function withdrawalAllNfts() external onlyAdmin() {
for (uint p = 0; p < _availableTokens.length; p++) {
require(
ERC1155(nftContractAddress).balanceOf(address(this), _availableTokens[p].id) > 0,
"NFT is owned by this contract"
);
ERC1155(nftContractAddress).safeTrans... | /**
* Withrawal NFTs Function for Admins
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1640,
2317
]
} | 341 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | deposit | function deposit() public payable {
require(msg.value == 0.25 ether, "Please transfer 0.25 ether");
require(
_buyers[msg.sender] == false,
"Only 1 purchase per wallet allowed"
);
require(
_whitelisted[msg.sender] == true,
"You need to be whitelisted to purchase"
);
... | /**
* take eth and distribute NFT
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2370,
3518
]
} | 342 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | transferNft | function transferNft(uint256 nftId, address to) private {
require(
ERC1155(nftContractAddress).balanceOf(address(this), nftId) > 0,
"NFT is owned by this contract"
);
ERC1155(nftContractAddress).safeTransferFrom(
address(this),
to,
nftId,
1,
'0x0'
... | /**
*
* @param nftId - nftId of the artwork
* @param to - address of the artwork recipient
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
3639,
4071
]
} | 343 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | onERC1155Received | function onERC1155Received(
address _operator,
address _from,
uint256 _id,
uint256 _amount,
bytes memory
) public virtual returns (bytes4) {
require(
_admins[_from] || _from == owner(),
"Only Admins can send NFTs"
);
int selectedIdx = getAvailableTokensByTokenId(_id);
... | /**
* ERC1155 Receiver Methods
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4142,
4919
]
} | 344 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | getAvailableTokensByTokenId | function getAvailableTokensByTokenId(uint256 id)
public
view
returns (int)
{
int index = -1;
for (uint p = 0; p < _availableTokens.length; p++) {
if (_availableTokens[p].id == id) {
index = int(p);
}
}
return index;
}
| /**
* Helper Function to get Available Token by Token Id
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5976,
6301
]
} | 345 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | randomAvailableTokenIndex | function randomAvailableTokenIndex() private view returns (uint8) {
uint256 max_amount = _availableTokens.length;
return
uint8(
uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty))) %
max_amount
);
}
| /**
* Get a random Token Index based on array length
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6373,
6674
]
} | 346 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | addToWhitelist | function addToWhitelist(address _address) public onlyAdmin() {
_whitelisted[_address] = true;
emit AddedToWhitelist(_address);
}
| /**
* Whitelist
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6812,
6964
]
} | 347 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | setAdmin | function setAdmin(address admin, bool enabled) external onlyOwner {
_admins[admin] = enabled;
emit AdminAccessSet(admin, enabled);
}
| /**
* Set Admin Access
*
* @param admin - Address of Minter
* @param enabled - Enable/Disable Admin Access
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7649,
7805
]
} | 348 | ||
MultipleDropsSale | /contracts/MultipleDropsSale.sol | 0xcaa57c4038fce04185898466fb454e33d5b27029 | Solidity | MultipleDropsSale | contract MultipleDropsSale is Ownable, IERC1155Receiver {
using Address for address;
using SafeMath for uint256;
address public nftContractAddress;
mapping(address => bool) private _admins;
mapping(address => bool) private _buyers;
mapping(address => bool) private _whitelisted;
struct Ava... | // The Drops Multiple Public Sale | LineComment | isAdmin | function isAdmin(address admin) public view returns (bool) {
return _admins[admin];
}
| /**
* Check Admin Access
*
* @param admin - Address of Admin
* @return whether minter has access
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7936,
8037
]
} | 349 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | // receive eth from uniswap swap | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
3079,
3114
]
} | 350 | ||||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | lockLiquidity | function lockLiquidity(uint256 _lockableSupply) public {
// lockable supply is the token balance of this contract
require(_lockableSupply <= super.balanceOf(address(this)), "ERC20TransferLiquidityLock::lockLiquidity: lock amount higher than lockable balance");
require(_lockableSupply != 0, "ERC20Transfer... | // few things to do here. out of the 4% collected:
// 1% to dev
// 1% burn
// 1% to uniswap pool
// 1% to LP holders
// make sure all 3 added up postdivisor is < 100! | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
3320,
5137
]
} | 351 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | rewardLiquidityProviders | function rewardLiquidityProviders() external {
// lock everything that is lockable
lockLiquidity(super.balanceOf(address(this)));
}
| // external util so anyone can easily distribute rewards
// must call lockLiquidity first which automatically
// calls _rewardLiquidityProviders | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
5300,
5459
]
} | 352 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | lockableSupply | function lockableSupply() external view returns (uint256) {
return super.balanceOf(address(this));
}
| // returns token amount | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
7265,
7384
]
} | 353 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | lockedSupply | function lockedSupply() external view returns (uint256) {
uint256 lpTotalSupply = ERC20(uniswapV2Pair).totalSupply();
uint256 lpBalance = lockedLiquidity();
uint256 percentOfLpTotalSupply = lpBalance.mul(1e12).div(lpTotalSupply);
uint256 uniswapBalance = super.balanceOf(uniswapV2Pair);
uint25... | // returns token amount | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
7416,
7870
]
} | 354 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | burnedSupply | function burnedSupply() external view returns (uint256) {
uint256 lpTotalSupply = ERC20(uniswapV2Pair).totalSupply();
uint256 lpBalance = burnedLiquidity();
uint256 percentOfLpTotalSupply = lpBalance.mul(1e12).div(lpTotalSupply);
uint256 uniswapBalance = super.balanceOf(uniswapV2Pair);
uint25... | // returns token amount | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
7902,
8356
]
} | 355 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | burnableLiquidity | function burnableLiquidity() public view returns (uint256) {
return ERC20(uniswapV2Pair).balanceOf(address(this));
}
| // returns LP amount, not token amount | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
8403,
8538
]
} | 356 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | burnedLiquidity | function burnedLiquidity() public view returns (uint256) {
return ERC20(uniswapV2Pair).balanceOf(address(0));
}
| // returns LP amount, not token amount | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
8585,
8715
]
} | 357 | ||
TMC | contracts\ERC20TransferLiquidityLock.sol | 0xe13559cf6edf84bd04bf679e251f285000b9305e | Solidity | ERC20TransferLiquidityLock | abstract contract ERC20TransferLiquidityLock is ERC20, Ownable {
using SafeMath for uint256;
event AddLiquidity(uint256 tokenAmount, uint256 ethAmount);
event BurnedLiquidity(uint256 balance);
event RewardLiquidityProviders(uint256 tokenAmount);
event BurnTokens(uint256 amt);
event Fro... | lockedLiquidity | function lockedLiquidity() public view returns (uint256) {
return burnableLiquidity().add(burnedLiquidity());
}
| // returns LP amount, not token amount | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f969306797bf890d2262b1bdc989f84d358e814b1d35dd9ae2010e6f1c5c9201 | {
"func_code_index": [
8762,
8892
]
} | 358 | ||
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | Owned | contract Owned {
address public owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
owner = 0x8d84F107D0eBC8A7b1c56E6676040863F9311f6F;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
// t... | // ----------------------------------------------------------------------------
// Ownership contract
// ---------------------------------------------------------------------------- | LineComment | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0x0));
emit OwnershipTransferred(owner,_newOwner);
owner = _newOwner;
}
| // transfer Ownership to other address | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
356,
558
]
} | 359 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | function() public payable {
getTokens();
}
| // ----------------------------------------------------------------------------
// It invokes when someone sends ETH to this contract address
// ---------------------------------------------------------------------------- | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
1341,
1402
]
} | 360 | |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | getTokens | function getTokens() onlyWhenRunning public payable {
require(msg.value > 0);
uint tokens = msg.value.mul(RATE).div(DENOMINATOR);
require(balances[owner] >= tokens);
balances[msg.sender] = balances[msg.sender].add(tokens);
balances[owner] = balances[owner].sub(tokens);
emit Transfer(... | // ----------------------------------------------------------------------------
// Low level token purchase function
// tokens are transferred to user
// ETH are transferred to current owner
// ---------------------------------------------------------------------------- | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
1701,
2122
]
} | 361 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply;
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
2308,
2401
]
} | 362 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
2621,
2746
]
} | 363 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
require(to != address(0));
require(tokens > 0);
require(balances[msg.sender] >= tokens);
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(msg.sender, ... | // ------------------------------------------------------------------------
// 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.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
3092,
3482
]
} | 364 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
require(spender != address(0));
require(tokens > 0);
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
3993,
4279
]
} | 365 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
require(from != address(0));
require(to != address(0));
require(tokens > 0);
require(balances[from] >= tokens);
require(allowed[from][msg.sender] >= tokens);
balances[from] = balances[from].sub(t... | // ------------------------------------------------------------------------
// 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... | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
4777,
5330
]
} | 366 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
5613,
5765
]
} | 367 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
require(_spender != address(0));
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| // ------------------------------------------------------------------------
// Increase the amount of tokens that an owner allowed to a spender.
//
// approve should be called when allowed[_spender] == 0. To increment
// allowed value is better to use this function to avoid 2 calls (and wait until
// the first transact... | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
6343,
6672
]
} | 368 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
require(_spender != address(0));
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] ... | // ------------------------------------------------------------------------
// Decrease the amount of tokens that an owner allowed to a spender.
//
// approve should be called when allowed[_spender] == 0. To decrement
// allowed value is better to use this function to avoid 2 calls (and wait until
// the first transact... | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
7255,
7754
]
} | 369 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | changeRate | function changeRate(uint256 _rate) public onlyOwner {
require(_rate > 0);
RATE =_rate;
emit ChangeRate(_rate);
}
| // ------------------------------------------------------------------------
// Change the ETH to IO rate
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
7955,
8106
]
} | 370 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | mint | function mint(address _to, uint256 _amount) onlyOwner public returns (bool) {
require(_to != address(0));
require(_amount > 0);
uint newamount = _amount * 10**uint(decimals);
_totalSupply = _totalSupply.add(newamount);
balances[_to] = balances[_to].add(newamount);
emit Mint(_to, newamo... | // ------------------------------------------------------------------------
// Function to mint tokens
// _to The address that will receive the minted tokens.
// _amount The amount of tokens to mint.
// A boolean that indicates if the operation was successful.
// --------------------------------------------------------... | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
8478,
8913
]
} | 371 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | stopICO | function stopICO() onlyOwner public {
isStopped = true;
}
| // ------------------------------------------------------------------------
// function to stop the ICO
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
9113,
9189
]
} | 372 |
KUNTokens | KUNTokens.sol | 0xfc09986798267ff95c804a755240da9b18d677c3 | Solidity | KUNTokens | contract KUNTokens is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public RATE;
uint public DENOMINATOR;
bool public isStopped = false;
mapping(address => uint) balance... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | resumeICO | function resumeICO() onlyOwner public {
isStopped = false;
}
| // ------------------------------------------------------------------------
// function to resume ICO
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://a9aa2812f680342d8f830d65f8e49570c2d44c9187930120b0644cef1f087fcd | {
"func_code_index": [
9387,
9466
]
} | 373 |
RingMusic | RingMusic.sol | 0x82c5e2dd3d4652701c1da91d364a383edbaa0686 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cd81418324899a202110c36cf740450630e8098745e9134b02521ea17ee3d4fc | {
"func_code_index": [
95,
302
]
} | 374 | |
RingMusic | RingMusic.sol | 0x82c5e2dd3d4652701c1da91d364a383edbaa0686 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cd81418324899a202110c36cf740450630e8098745e9134b02521ea17ee3d4fc | {
"func_code_index": [
392,
692
]
} | 375 | |
RingMusic | RingMusic.sol | 0x82c5e2dd3d4652701c1da91d364a383edbaa0686 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cd81418324899a202110c36cf740450630e8098745e9134b02521ea17ee3d4fc | {
"func_code_index": [
812,
940
]
} | 376 | |
RingMusic | RingMusic.sol | 0x82c5e2dd3d4652701c1da91d364a383edbaa0686 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cd81418324899a202110c36cf740450630e8098745e9134b02521ea17ee3d4fc | {
"func_code_index": [
1010,
1156
]
} | 377 | |
Creature | contracts/Creature.sol | 0xda396a2fc5f0e3a87a874757f1317102f49da5b0 | Solidity | Creature | contract Creature is TradeableERC721Token {
string public metadata;
constructor(address _proxyRegistryAddress, string memory _metadata, string memory _name) TradeableERC721Token(_name, "RELAX", _proxyRegistryAddress) public {
metadata = _metadata;
}
function updatemetadata(string memory _metadata) pu... | /**
* @title Creature
* Creature - a contract for my non-fungible creatures.
*/ | NatSpecMultiLine | burn | function burn(uint256 _tokenId) public onlyOwner {
_burn(msg.sender, _tokenId);
}
| // The only token contract owner can burn the token. | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://f67c4a3b52bfc13e940ea61d0409c8ac3aedf1b9704cc9b99e361d7fc7a469e2 | {
"func_code_index": [
521,
613
]
} | 378 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | AbstractToken | contract AbstractToken is Token, SafeMath {
/**
* Create new Abstract Token contract.
*/
constructor () public {
// Do nothing
}
/**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* ... | /**
* Abstract Token Smart Contract that could be used as a base contract for
* ERC-20 token contracts.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return accounts [_owner];
}
| /**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* owner of
* @return number of tokens currently belonging to the owner of given address
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
421,
534
]
} | 379 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | AbstractToken | contract AbstractToken is Token, SafeMath {
/**
* Create new Abstract Token contract.
*/
constructor () public {
// Do nothing
}
/**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* ... | /**
* Abstract Token Smart Contract that could be used as a base contract for
* ERC-20 token contracts.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
require(_to != address(0));
if (accounts [msg.sender] < _value) return false;
if (_value > 0 && msg.sender != _to) {
accounts [msg.sender] = safeSub (accounts [msg.sender], _value);
accounts [_to] = safeAdd (accounts [_to]... | /**
* Transfer given number of tokens from message sender to given recipient.
*
* @param _to address to transfer tokens to the owner of
* @param _value number of tokens to transfer to the owner of given address
* @return true if tokens were transferred successfully, false otherwise
* accounts [_to] + _value... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
951,
1370
]
} | 380 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | AbstractToken | contract AbstractToken is Token, SafeMath {
/**
* Create new Abstract Token contract.
*/
constructor () public {
// Do nothing
}
/**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* ... | /**
* Abstract Token Smart Contract that could be used as a base contract for
* ERC-20 token contracts.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public
returns (bool success) {
require(_to != address(0));
if (allowances [_from][msg.sender] < _value) return false;
if (accounts [_from] < _value) return false;
if (_value > 0 && _from != _to) {
allowances [_from][msg.sender] = safeS... | /**
* Transfer given number of tokens from given owner to given recipient.
*
* @param _from address to transfer tokens from the owner of
* @param _to address to transfer tokens to the owner of
* @param _value number of tokens to transfer from given owner to given
* recipient
* @return true if token... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
1867,
2436
]
} | 381 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | AbstractToken | contract AbstractToken is Token, SafeMath {
/**
* Create new Abstract Token contract.
*/
constructor () public {
// Do nothing
}
/**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* ... | /**
* Abstract Token Smart Contract that could be used as a base contract for
* ERC-20 token contracts.
*/ | NatSpecMultiLine | approve | function approve (address _spender, uint256 _value) public returns (bool success) {
allowances [msg.sender][_spender] = _value;
emit Approval (msg.sender, _spender, _value);
return true;
| /**
* Allow given spender to transfer given number of tokens from message sender.
* @param _spender address to allow the owner of to transfer tokens from message sender
* @param _value number of tokens to allow to transfer
* @return true if token transfer was successfully approved, false otherwise
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
2764,
2974
]
} | 382 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | AbstractToken | contract AbstractToken is Token, SafeMath {
/**
* Create new Abstract Token contract.
*/
constructor () public {
// Do nothing
}
/**
* Get number of tokens currently belonging to given owner.
*
* @param _owner address to get number of tokens currently belonging to the
* ... | /**
* Abstract Token Smart Contract that could be used as a base contract for
* ERC-20 token contracts.
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view
returns (uint256 remaining) {
return allowances [_owner][_spender];
}
| /**
* Tell how many tokens given spender is currently allowed to transfer from
* given owner.
*
* @param _owner address to get number of tokens allowed to be transferred
* from the owner of
* @param _spender address to get number of tokens allowed to be transferred
* by the owner of
* @ret... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
3422,
3570
]
} | 383 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256 supply) {
return tokenCount;
}
| /**
* Get total number of tokens in circulation.
*
* @return total number of tokens in circulation
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
932,
1025
]
} | 384 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
require(!frozenAccount[msg.sender]);
f (frozen) return false;
else return AbstractToken.transfer (_to, _value);
}
| /**
* Transfer given number of tokens from message sender to given recipient.
* @param _to address to transfer tokens to the owner of
* @param _value number of tokens to transfer to the owner of given address
* @return true if tokens were transferred successfully, false otherwise
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
1478,
1689
]
} | 385 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public
returns (bool success) {
equire(!frozenAccount[_from]);
if (frozen) return false;
else return AbstractToken.transferFrom (_from, _to, _value);
}
| /**
* Transfer given number of tokens from given owner to given recipient.
*
* @param _from address to transfer tokens from the owner of
* @param _to address to transfer tokens to the owner of
* @param _value number of tokens to transfer from given owner to given
* recipient
* @return true if token... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
2085,
2326
]
} | 386 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | approve | function approve (address _spender, uint256 _value) public
returns (bool success) {
equire(allowance (msg.sender, _spender) == 0 || _value == 0);
return AbstractToken.approve (_spender, _value);
}
| /**
* Change how many tokens given spender is allowed to transfer from message
* spender. In order to prevent double spending of allowance,
* To change the approve amount you first have to reduce the addresses`
* allowance to zero by calling `approve(_spender, 0)` if it is not
* already 0 to mitigate the rac... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
3012,
3227
]
} | 387 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | createTokens | function createTokens(uint256 _value) public
returns (bool success) {
require (msg.sender == owner);
if (_value > 0) {
if (_value > safeSub (MAX_TOKEN_COUNT, tokenCount)) return false;
accounts [msg.sender] = safeAdd (accounts [msg.sender], _value);
tokenCount = safeAdd (tokenCount, _valu... | /**
* Create _value new tokens and give new created tokens to msg.sender.
* May only be called by smart contract owner.
*
* @param _value number of tokens to create
* @return true if tokens were created successfully, false otherwise
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
3493,
4011
]
} | 388 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | setOwner | function setOwner(address _newOwner) public {
require (msg.sender == owner);
owner = _newOwner;
}
| /**
* Set new owner for the smart contract.
* May only be called by smart contract owner.
*
* @param _newOwner address of new owner of the smart contract
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
4198,
4313
]
} | 389 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | freezeTransfers | function freezeTransfers () public {
require (msg.sender == owner);
if (!frozen) {
frozen = true;
emit Freeze ();
}
}
| /**
* Freeze ALL token transfers.
* May only be called by smart contract owner.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
4414,
4568
]
} | 390 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | unfreezeTransfers | function unfreezeTransfers () public {
require (msg.sender == owner);
if (frozen) {
frozen = false;
emit Unfreeze ();
}
}
| /**
* Unfreeze ALL token transfers.
* May only be called by smart contract owner.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
4671,
4829
]
} | 391 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | refundTokens | function refundTokens(address _token, address _refund, uint256 _value) public {
require (msg.sender == owner);
require(_token != address(this));
AbstractToken token = AbstractToken(_token);
token.transfer(_refund, _value);
emit RefundTokens(_token, _refund, _value);
}
| /*A user is able to unintentionally send tokens to a contract
* and if the contract is not prepared to refund them they will get stuck in the contract.
* The same issue used to happen for Ether too but new Solidity versions added the payable modifier to
* prevent unintended Ether transfers. However, there’s no ... | Comment | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
5248,
5547
]
} | 392 |
WFT | WFT.sol | 0x8b9f1a6f9ad81aceed5760e21744e8e6e4d9510c | Solidity | WFT | contract WFT is AbstractToken {
/**
* Maximum allowed number of tokens in circulation.
* tokenSupply = tokensIActuallyWant * (10 ^ decimals)
*/
uint256 constant MAX_TOKEN_COUNT = 170000000 * (10**6);
/**
* Address of the owner of this smart contract.
*/
address private own... | /**
* world Financial token smart contract.
*/ | NatSpecMultiLine | freezeAccount | function freezeAccount(address _target, bool freeze) public {
require (msg.sender == owner);
require (msg.sender != _target);
frozenAccount[_target] = freeze;
emit FrozenFunds(_target, freeze);
| /**
* Freeze specific account
* May only be called by smart contract owner.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://78a9700485b4b2907d51c2174b1cdc7420bcea4f5af2fd8a69d8592c01900e0b | {
"func_code_index": [
5646,
5871
]
} | 393 |
XSwapProxyV1 | contracts/lib/Address.sol | 0x82484b7e77e4b80de6d78bdf9014e44cc715f66a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://316a544e1f11cd7e0e41ffde4e03125d20f67cb26ff89413baa1890feb4e765a | {
"func_code_index": [
606,
1265
]
} | 394 |
XSwapProxyV1 | contracts/lib/Address.sol | 0x82484b7e77e4b80de6d78bdf9014e44cc715f66a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | toPayable | function toPayable(address account)
internal
pure
returns (address payable)
{
return address(uint160(account));
}
| /**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://316a544e1f11cd7e0e41ffde4e03125d20f67cb26ff89413baa1890feb4e765a | {
"func_code_index": [
1477,
1641
]
} | 395 |
XSwapProxyV1 | contracts/lib/Address.sol | 0x82484b7e77e4b80de6d78bdf9014e44cc715f66a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
// solhint-disable-next-line avoid-call-value
(bool success, ) = recipient.call.value(amount).gas(9100)("");
require(
... | /**
* @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.5.17+commit.d19bba13 | None | bzzr://316a544e1f11cd7e0e41ffde4e03125d20f67cb26ff89413baa1890feb4e765a | {
"func_code_index": [
2613,
3073
]
} | 396 |
GoldBitCoin | GoldBitCoin.sol | 0x2cdf36dd45444c2949fffaa9044ce99ba4cdadb8 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken, owned {
mapping (address => mapping (address => uint256)) internal allowed;
mapping (address => bool) public frozenAccount;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
require(!frozenAccount[_from]);
require(!frozenAccount[_to]);
balances[_from] = balances[_from]... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | GNU GPLv2 | bzzr://cbcac90a4f93136a0f2f4c9857b47e3e7df0714f550d9fd1461351412f5dec7c | {
"func_code_index": [
461,
996
]
} | 397 | ||
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Fallback | abstract contract Fallback {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback() external payable {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive() external payable {
... | /**
* @title Fallback
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | /**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
125,
188
]
} | 398 | ||
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Fallback | abstract contract Fallback {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback() external payable {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive() external payable {
... | /**
* @title Fallback
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | /**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
285,
347
]
} | 399 | ||
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Fallback | abstract contract Fallback {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback() external payable {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive() external payable {
... | /**
* @title Fallback
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal view virtual returns (address);
| /**
* @return The Address of the implementation.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
419,
491
]
} | 400 |
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Fallback | abstract contract Fallback {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback() external payable {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive() external payable {
... | /**
* @title Fallback
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _delegate | function _delegate(address implementation) internal {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calld... | /**
* @dev Delegates execution to an implementation contract.
* This is a low level function that doesn't return to its internal call site.
* It will return to the external caller whatever the implementation returns.
* @param implementation Address to delegate.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
794,
1737
]
} | 401 |
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Fallback | abstract contract Fallback {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback() external payable {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive() external payable {
... | /**
* @title Fallback
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _willFallback | function _willFallback() internal virtual {}
| /**
* @dev Function that is run as the first thing in the fallback function.
* Can be redefined in derived contracts to add functionality.
* Redefinitions must call super._willFallback().
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
1960,
2009
]
} | 402 |
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Fallback | abstract contract Fallback {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback() external payable {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive() external payable {
... | /**
* @title Fallback
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _fallback | function _fallback() internal {
_willFallback();
_delegate(_implementation());
}
| /**
* @dev fallback implementation.
* Extracted to enable manual triggering.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
2115,
2223
]
} | 403 |
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
606,
1055
]
} | 404 |
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: ... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
1985,
2385
]
} | 405 |
VaultRouter | VaultRouter.sol | 0x9e9f4b105e10a66b27c771811ce4defbd44567d2 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://38ce5c6af5f119df33d6c128c761796ed6341eb5d78756f5cf54835a34958588 | {
"func_code_index": [
3141,
3321
]
} | 406 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.