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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) public view override returns (address) {
require(_exists(tokenId), "ERC721A: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
| /**
* @dev See {IERC721-getApproved}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
6173,
6380
]
} | 3,407 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public override {
require(operator != _msgSender(), "ERC721A: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC721-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
6441,
6718
]
} | 3,408 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
return _operatorApprovals[owner][operator];
}
| /**
* @dev See {IERC721-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
6778,
6967
]
} | 3,409 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
_transfer(from, to, tokenId);
}
| /**
* @dev See {IERC721-transferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
7023,
7168
]
} | 3,410 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
7228,
7388
]
} | 3,411 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
_transfer(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
"ERC721A: transfer to non ERC721Receiver implementer"
);
}
| /**
* @dev See {IERC721-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
7448,
7762
]
} | 3,412 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _exists | function _exists(uint256 tokenId) internal view returns (bool) {
return tokenId < currentIndex;
}
| /**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
7998,
8106
]
} | 3,413 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _safeMint | function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
uint256 startTokenId = currentIndex;
require(to != address(0), "ERC721A: mint to the zero address");
// We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
... | /**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` cannot be larger than the max batch size.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
8462,
9737
]
} | 3,414 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _transfer | function _transfer(
address from,
address to,
uint256 tokenId
) private {
TokenOwnership memory prevOwnership = ownershipOf(tokenId);
bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
getApproved(tokenId) == _msgSender() ||
isApprovedForAll(prevOwnership.addr, _msgSender()));
... | /**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
9966,
11498
]
} | 3,415 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _approve | function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
| /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
11601,
11776
]
} | 3,416 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _setOwnersExplicit | function _setOwnersExplicit(uint256 quantity) internal {
uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
require(quantity > 0, "quantity must be nonzero");
uint256 endIndex = oldNextOwnerToSet + quantity - 1;
if (endIndex > currentIndex - 1) {
endIndex = currentIndex - 1;
}
// We know if th... | /**
* @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
11927,
12772
]
} | 3,417 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try
IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data)
returns (bytes4 retval) {
return retval == IERC721Receiver... | /**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param to... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
13312,
14005
]
} | 3,418 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _beforeTokenTransfers | function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
| /**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
14464,
14608
]
} | 3,419 |
AlphaDraconis | contracts/ERC721A.sol | 0x749b2c1ef5db3f63e4fbb64888aec78620c7eac6 | Solidity | ERC721A | contract ERC721A is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
... | /**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support ... | NatSpecMultiLine | _afterTokenTransfers | function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
| /**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://b0129ac96174f95a991d497101ac24ab5f5670aaeac412cfa655370e3bcd815f | {
"func_code_index": [
14991,
15134
]
} | 3,420 |
Nicks | Nicks.sol | 0x4a261669208347bf4f47a565edd166c609b84797 | Solidity | Nicks | contract Nicks {
mapping (address => string) private nickOfOwner;
mapping (string => address) private ownerOfNick;
event Set (string indexed _nick, address indexed _owner);
event Unset (string indexed _nick, address indexed _owner);
constructor () public {
contractOwner = msg.sender;
}
ad... | function() payable public
{ }
| /* Fallback function to accept all ether sent directly to the contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://2954e0d91606a16f27fff5935b0d1c186a885a3050c4b37329da98747c200b9d | {
"func_code_index": [
1558,
1600
]
} | 3,421 | ||||
WrapperDistributor721 | WrapperDistributor.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperDistributor721 | contract WrapperDistributor721 is WrapperWithERC20Collateral {
using SafeERC20 for IERC20;
using ERC165Checker for address;
mapping(address => bool) public distributors;
event GasLimit(uint256 wrappedAmountCount, address lastReceiver);
constructor (address _erc20)
WrapperWithERC2... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 with ability add ERC20 collateral
*/ | NatSpecMultiLine | WrapAndDistrib721WithMint | function WrapAndDistrib721WithMint(
address _original721,
address[] memory _receivers,
uint256[] memory _tokenIds,
ERC20Collateral[] memory _forDistrib,
uint256 _unwrapAfter
) public payable
{
require(distributors[msg.sender], "Only for distributors");
//require(_receivers.length <= 256, ... | /// !!!!For gas safe this low levelfunction has NO any check before wrap
/// So you have NO warranty to do Unwrap well | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
528,
3016
]
} | 3,422 | |
WrapperDistributor721 | WrapperDistributor.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperDistributor721 | contract WrapperDistributor721 is WrapperWithERC20Collateral {
using SafeERC20 for IERC20;
using ERC165Checker for address;
mapping(address => bool) public distributors;
event GasLimit(uint256 wrappedAmountCount, address lastReceiver);
constructor (address _erc20)
WrapperWithERC2... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 with ability add ERC20 collateral
*/ | NatSpecMultiLine | WrapAndDistribEmpty | function WrapAndDistribEmpty(
address[] memory _receivers,
ERC20Collateral[] memory _forDistrib,
uint256 _unwrapAfter
) public payable
{
require(distributors[msg.sender], "Only for distributors");
require(_receivers.length <= 256, "Not more 256");
//require(_receivers.length == _tokenIds.length... | /// !!!!For gas safe this low levelfunction has NO any check before wrap
/// So you have NO warranty to do Unwrap well | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
3149,
5355
]
} | 3,423 | |
WrapperDistributor721 | WrapperDistributor.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperDistributor721 | contract WrapperDistributor721 is WrapperWithERC20Collateral {
using SafeERC20 for IERC20;
using ERC165Checker for address;
mapping(address => bool) public distributors;
event GasLimit(uint256 wrappedAmountCount, address lastReceiver);
constructor (address _erc20)
WrapperWithERC2... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 with ability add ERC20 collateral
*/ | NatSpecMultiLine | setDistributorState | function setDistributorState(address _user, bool _state) external onlyOwner {
distributors[_user] = _state;
}
| ////////////////////////////////////////////////////////////////
////////// Admins //////
//////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
5565,
5690
]
} | 3,424 | |
WrapperDistributor721 | WrapperDistributor.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperDistributor721 | contract WrapperDistributor721 is WrapperWithERC20Collateral {
using SafeERC20 for IERC20;
using ERC165Checker for address;
mapping(address => bool) public distributors;
event GasLimit(uint256 wrappedAmountCount, address lastReceiver);
constructor (address _erc20)
WrapperWithERC2... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 with ability add ERC20 collateral
*/ | NatSpecMultiLine | _baseURI | function _baseURI() internal view override(ERC721) returns (string memory) {
return 'https://envelop.is/distribmetadata/';
}
| //////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
5761,
5902
]
} | 3,425 | |
WrapperDistributor721 | WrapperDistributor.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperDistributor721 | contract WrapperDistributor721 is WrapperWithERC20Collateral {
using SafeERC20 for IERC20;
using ERC165Checker for address;
mapping(address => bool) public distributors;
event GasLimit(uint256 wrappedAmountCount, address lastReceiver);
constructor (address _erc20)
WrapperWithERC2... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 with ability add ERC20 collateral
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 _tokenId) public view override returns (string memory) {
NFT storage nft = wrappedTokens[_tokenId];
if (nft.tokenContract != address(0)) {
return IERC721Metadata(nft.tokenContract).tokenURI(nft.tokenId);
} else {
return ERC721.tokenURI(_tokenId);
}
}
| /**
* @dev Function returns tokenURI of **underline original token**
*
* @param _tokenId id of protocol token (new wrapped token)
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
6063,
6407
]
} | 3,426 | |
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | setUGOVShareForTreasury | function setUGOVShareForTreasury(uint256 _uGOVDivider)
external
onlyTokenManager
{
uGOVDivider = _uGOVDivider;
}
| // the bigger uGOVDivider is the less extra Ugov will be minted for the treasury | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
2882,
3030
]
} | 3,427 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | deposit | function deposit(
address to,
uint256 _amount,
uint256 _bondingShareID
) external onlyBondingContract {
BondingShareInfo storage bs = _bsInfo[_bondingShareID];
_updatePool();
if (bs.amount > 0) {
uint256 pending = ((bs.amount * pool.accuGOVPerShare) / 1e12) -
bs.rewardDebt;
... | // Deposit LP tokens to MasterChef for uGOV allocation. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
3303,
3903
]
} | 3,428 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | withdraw | function withdraw(
address to,
uint256 _amount,
uint256 _bondingShareID
) external onlyBondingContract {
BondingShareInfo storage bs = _bsInfo[_bondingShareID];
require(bs.amount >= _amount, "MC: amount too high");
_updatePool();
uint256 pending = ((bs.amount * pool.accuGOVPerShare) / 1e12) ... | // Withdraw LP tokens from MasterChef. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
3948,
4607
]
} | 3,429 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | getRewards | function getRewards(uint256 bondingShareID) external returns (uint256) {
require(
IERC1155Ubiquity(manager.bondingShareAddress()).balanceOf(
msg.sender,
bondingShareID
) == 1,
"MS: caller is not owner"
);
// calculate user reward
BondingShareInfo storage ... | /// @dev get pending uGOV rewards from MasterChef.
/// @return amount of pending rewards transfered to msg.sender
/// @notice only send pending rewards | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
4773,
5439
]
} | 3,430 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | pendingUGOV | function pendingUGOV(uint256 bondingShareID)
external
view
returns (uint256)
{
BondingShareInfo storage user = _bsInfo[bondingShareID];
uint256 accuGOVPerShare = pool.accuGOVPerShare;
uint256 lpSupply = IERC1155Ubiquity(manager.bondingShareAddress())
.totalSupply();
if (block.number... | // View function to see pending uGOVs on frontend. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
5496,
6224
]
} | 3,431 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | getBondingShareInfo | function getBondingShareInfo(uint256 _id)
external
view
returns (uint256[2] memory)
{
return [_bsInfo[_id].amount, _bsInfo[_id].rewardDebt];
}
| /**
* @dev get the amount of shares and the reward debt of a bonding share .
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
6320,
6506
]
} | 3,432 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | totalShares | function totalShares() external view virtual returns (uint256) {
return _totalShares;
}
| /**
* @dev Total amount of shares .
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
6561,
6664
]
} | 3,433 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | _updateUGOVMultiplier | function _updateUGOVMultiplier() internal {
// (1.05/(1+abs(1-TWAP_PRICE)))
uint256 currentPrice = _getTwapPrice();
bool isPriceDiffEnough = false;
// a minimum price variation is needed to update the multiplier
if (currentPrice > lastPrice) {
isPriceDiffEnough =
currentPrice - ... | // UPDATE uGOV multiplier | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
6696,
7448
]
} | 3,434 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | _updatePool | function _updatePool() internal {
if (block.number <= pool.lastRewardBlock) {
return;
}
_updateUGOVMultiplier();
uint256 lpSupply = IERC1155Ubiquity(manager.bondingShareAddress())
.totalSupply();
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
7517,
8473
]
} | 3,435 | ||
BondingShareV2 | contracts/MasterChefV2.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChefV2 | contract MasterChefV2 {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct BondingShareInfo {
uint256 amount; // bonding rights.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basical... | _safeUGOVTransfer | function _safeUGOVTransfer(address _to, uint256 _amount) internal {
IERC20Ubiquity uGOV = IERC20Ubiquity(manager.governanceTokenAddress());
uint256 uGOVBal = uGOV.balanceOf(address(this));
if (_amount > uGOVBal) {
uGOV.safeTransfer(_to, uGOVBal);
} else {
uGOV.safeTransfer(_to, _amount);... | // Safe uGOV transfer function, just in case if rounding
// error causes pool to not have enough uGOVs. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
8587,
8951
]
} | 3,436 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | deposit | function deposit(uint256 _amount, address sender)
external
onlyBondingContract
{
UserInfo storage user = userInfo[sender];
_updatePool();
if (user.amount > 0) {
uint256 pending = ((user.amount * pool.accuGOVPerShare) / 1e12) -
user.rewardDebt;
_safeUGOVTransfer(sender, pe... | // Deposit LP tokens to MasterChef for uGOV allocation. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
2820,
3358
]
} | 3,437 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | withdraw | function withdraw(uint256 _amount, address sender)
external
onlyBondingContract
{
UserInfo storage user = userInfo[sender];
require(user.amount >= _amount, "MC: amount too high");
_updatePool();
uint256 pending = ((user.amount * pool.accuGOVPerShare) / 1e12) -
user.rewardDebt;
_safeU... | // Withdraw LP tokens from MasterChef. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
3403,
3954
]
} | 3,438 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | getRewards | function getRewards() external returns (uint256) {
UserInfo storage user = userInfo[msg.sender];
_updatePool();
uint256 pending = ((user.amount * pool.accuGOVPerShare) / 1e12) -
user.rewardDebt;
_safeUGOVTransfer(msg.sender, pending);
user.rewardDebt = (user.amount * pool.accuGOVPerShare) / ... | /// @dev get pending uGOV rewards from MasterChef.
/// @return amount of pending rewards transfered to msg.sender
/// @notice only send pending rewards | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
4120,
4503
]
} | 3,439 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | pendingUGOV | function pendingUGOV(address _user) external view returns (uint256) {
UserInfo storage user = userInfo[_user];
uint256 accuGOVPerShare = pool.accuGOVPerShare;
uint256 lpSupply = IERC1155Ubiquity(manager.bondingShareAddress())
.totalSupply();
if (block.number > pool.lastRewardBlock && lpSupply !... | // View function to see pending uGOVs on frontend. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
4560,
5235
]
} | 3,440 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | _updateUGOVMultiplier | function _updateUGOVMultiplier() internal {
// (1.05/(1+abs(1-TWAP_PRICE)))
uint256 currentPrice = _getTwapPrice();
bool isPriceDiffEnough = false;
// a minimum price variation is needed to update the multiplier
if (currentPrice > lastPrice) {
isPriceDiffEnough =
currentPrice - ... | // UPDATE uGOV multiplier | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
5267,
6019
]
} | 3,441 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | _updatePool | function _updatePool() internal {
if (block.number <= pool.lastRewardBlock) {
return;
}
_updateUGOVMultiplier();
uint256 lpSupply = IERC1155Ubiquity(manager.bondingShareAddress())
.totalSupply();
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
6088,
7035
]
} | 3,442 | ||
BondingShareV2 | contracts/MasterChef.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | MasterChef | contract MasterChef {
using SafeERC20 for IERC20Ubiquity;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many uAD-3CRV LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some ... | _safeUGOVTransfer | function _safeUGOVTransfer(address _to, uint256 _amount) internal {
IERC20Ubiquity uGOV = IERC20Ubiquity(manager.governanceTokenAddress());
uint256 uGOVBal = uGOV.balanceOf(address(this));
if (_amount > uGOVBal) {
uGOV.safeTransfer(_to, uGOVBal);
} else {
uGOV.safeTransfer(_to, _amount);... | // Safe uGOV transfer function, just in case if rounding
// error causes pool to not have enough uGOVs. | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
7149,
7513
]
} | 3,443 | ||
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | Oishifinance | function Oishifinance() public {
symbol = "OISHI";
name = "Oishi.finance";
decimals = 18;
_totalSupply = 60000000000000000000000;
balances[0x804A5936626d452f742DA4106E0A974Db68c96c0] = _totalSupply;
Transfer(address(0), 0x804A5936626d452f742DA4106E0A974Db68c96c0, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
459,
803
]
} | 3,444 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
991,
1112
]
} | 3,445 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
1332,
1461
]
} | 3,446 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
1805,
2082
]
} | 3,447 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
2590,
2798
]
} | 3,448 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(from, to, tokens);
return... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
3329,
3687
]
} | 3,449 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
3970,
4126
]
} | 3,450 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
4481,
4798
]
} | 3,451 |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
4990,
5049
]
} | 3,452 | |
Oishifinance | Oishifinance.sol | 0x10c1f65bebac506b87e527db48337856f2154c3c | Solidity | Oishifinance | contract Oishifinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://8f60df0dada6aa2682d7a597fdae5e873ed48983bc1f1a1aaec7c32f9948ac05 | {
"func_code_index": [
5282,
5471
]
} | 3,453 |
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | TRCERC20 | function TRCERC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name ... | /**
* Constructor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
1005,
1548
]
} | 3,454 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
1630,
2478
]
} | 3,455 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
2682,
2839
]
} | 3,456 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
3112,
3413
]
} | 3,457 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
3675,
3905
]
} | 3,458 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
4297,
4649
]
} | 3,459 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender,... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
4817,
5196
]
} | 3,460 | |||
TRCERC20 | TRCERC20.sol | 0x5b0fa053297f0ff35954531292d439a252f58919 | Solidity | TRCERC20 | contract TRCERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address =... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://b18533ca01e56a7bb2990d41fedac9748fce77a25db28b165b294cf461312325 | {
"func_code_index": [
5452,
6068
]
} | 3,461 | |||
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | wrap721 | function wrap721(
address _underlineContract,
uint256 _tokenId,
uint256 _unwrapAfter,
uint256 _transferFee,
address _royaltyBeneficiary,
uint256 _royaltyPercent,
uint256 _unwraptFeeThreshold,
address _transferFeeToken
)
external
payable
returns (uint256)
{
/... | /**
* @dev DEPRICTAED method due
* @dev Function for wrap existing ERC721
*
* @param _underlineContract address of native NFT contract
* @param _tokenId id of NFT that need to be wraped
* @param _unwrapAfter Unix time value after that token can be unwrapped
* @param _transferFee transferFee amount of projectToke... | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
3429,
6676
]
} | 3,462 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | addNativeCollateral | function addNativeCollateral(uint256 _wrappedTokenId) external payable {
require(ownerOf(_wrappedTokenId) != address(0));
NFT storage nft = wrappedTokens[_wrappedTokenId];
nft.backedValue += msg.value;
}
| /**
* @dev Function add native(eth, bnb) collateral to wrapped token
*
* @param _wrappedTokenId id of protocol token fo add
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
6829,
7064
]
} | 3,463 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | unWrap721 | function unWrap721(uint256 _tokenId) external nonReentrant {
///////////////////////////////////////////////
//// Base Protocol checks ///
///////////////////////////////////////////////
//1. Only token owner can UnWrap
require(ownerOf(_tokenId) == msg.sender, 'Only owner can unwr... | /**
* @dev Function for unwrap protocol token. If wrapped NFT
* has many erc20 collateral tokens it possible call this method
* more than once, until unwrapped
*
* @param _tokenId id of protocol token to unwrapp
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
7316,
9481
]
} | 3,464 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | chargeTransferFeeAndRoyalty | function chargeTransferFeeAndRoyalty(
address from,
address to,
uint256 transferFee,
uint256 royaltyPercent,
address royaltyBeneficiary,
address _transferFeeToken
) external
override
returns (uint256 feeIncrement)
{
require(msg.sender == address(this), "Wrapper only");
uint256 r... | /**
* @dev Function is part of transferFeeModel interface
* for charge fee in tech protokol Token
*
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
9616,
10266
]
} | 3,465 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 _tokenId) public view override virtual returns (string memory) {
NFT storage nft = wrappedTokens[_tokenId];
return IERC721Metadata(nft.tokenContract).tokenURI(nft.tokenId);
}
| /**
* @dev Function returns tokenURI of **underline original token**
*
* @param _tokenId id of protocol token (new wrapped token)
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
10431,
10655
]
} | 3,466 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | getTokenValue | function getTokenValue(uint256 _tokenId) external view returns (uint256, uint256) {
NFT storage nft = wrappedTokens[_tokenId];
return (nft.backedValue, nft.backedTokens);
}
| /**
* @dev Function returns tuple with accumulated amounts of
* native chain collateral(eth, bnb,..) and transfer Fee
*
* @param _tokenId id of protocol token (new wrapped token)
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
10870,
11066
]
} | 3,467 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | getWrappedToken | function getWrappedToken(uint256 _tokenId) external view returns (NFT memory) {
return wrappedTokens[_tokenId];
}
| /**
* @dev Function returns structure with all data about
* new protocol token
*
* @param _tokenId id of protocol token (new wrapped token)
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
11240,
11369
]
} | 3,468 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | setFee | function setFee(uint256 _fee, uint256 _startDate, address _protocolFeeToken) external onlyOwner {
require(_protocolFeeToken != address(0), "No zero address");
protocolFee = _fee;
chargeFeeAfter = _startDate;
protocolFeeToken = _protocolFeeToken;
emit NewFee(_fee, _startDate);
}
| ///////////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
11602,
11928
]
} | 3,469 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
virtual
override
{
super._beforeTokenTransfer(from, to, tokenId);
//Not for mint and burn
if (to != address(0) && from !=address(0)) {
NFT storage nft = wrappedTokens[tokenId];
//Transfer fee ch... | /////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
///////////// Internals ///////////////////////////////////////
///////////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
12561,
13978
]
} | 3,470 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | _chargeFee | function _chargeFee(address _payer, uint256 _amount) internal returns(bool) {
require(
IERC20(protocolFeeToken).balanceOf(_payer) >= _amount,
"insufficient protocol fee token balance for fee"
);
IERC20(protocolFeeToken).transferFrom(_payer, address(this), _amount);
return true;
... | /**
* @dev Function charge fee in project token
*
* @param _payer fee payer, must have non zero balance in project token
* @param _amount fee amount for charge
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
14175,
14528
]
} | 3,471 | |
WrapperDistributor721 | WrapperBase.sol | 0xdf6f4408497dfe745b116138b9338490366b2303 | Solidity | WrapperBase | contract WrapperBase is ERC721Enumerable, Ownable, ReentrancyGuard, IFeeRoyaltyCharger {
using SafeERC20 for IERC20;
enum AssetType {UNDEFINED, ERC20, ERC721, ERC1155}
struct NFT {
address tokenContract; //Address of wrapping token contract
uint256 tokenId; //Wrapping toke... | /**
* @title ERC-721 Non-Fungible Token Wrapper
* @dev For wrpap existing ERC721 and ERC1155(now only 721)
*/ | NatSpecMultiLine | _beforeUnWrapHook | function _beforeUnWrapHook(uint256 _tokenId) internal virtual returns (bool){
return true;
}
| /**
* @dev This hook may be overriden in inheritor contracts for extend
* base functionality.
*
* @param _tokenId -wrapped token
*
* must returna true for success unwrapping enable
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
14755,
14863
]
} | 3,472 | |
OVM_L1ETHGateway | contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2DepositedToken.sol | 0x40c9067ec8087ecf101fc10d2673636955b81a32 | Solidity | iOVM_L2DepositedToken | interface iOVM_L2DepositedToken {
/**********
* Events *
**********/
event WithdrawalInitiated(
address indexed _from,
address _to,
uint256 _amount
);
event DepositFinalized(
address indexed _to,
uint256 _amount
);
/********************
... | /**
* @title iOVM_L2DepositedToken
*/ | NatSpecMultiLine | withdraw | function withdraw(
uint _amount
)
external;
| /********************
* Public Functions *
********************/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | {
"func_code_index": [
370,
437
]
} | 3,473 | |
OVM_L1ETHGateway | contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2DepositedToken.sol | 0x40c9067ec8087ecf101fc10d2673636955b81a32 | Solidity | iOVM_L2DepositedToken | interface iOVM_L2DepositedToken {
/**********
* Events *
**********/
event WithdrawalInitiated(
address indexed _from,
address _to,
uint256 _amount
);
event DepositFinalized(
address indexed _to,
uint256 _amount
);
/********************
... | /**
* @title iOVM_L2DepositedToken
*/ | NatSpecMultiLine | finalizeDeposit | function finalizeDeposit(
address _to,
uint _amount
)
external;
| /*************************
* Cross-chain Functions *
*************************/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | {
"func_code_index": [
627,
722
]
} | 3,474 | |
BondingShareV2 | contracts/Bonding.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | Bonding | contract Bonding is CollectableDust {
using SafeERC20 for IERC20;
bytes public data = "";
UbiquityAlgorithmicDollarManager public manager;
uint256 public constant ONE = uint256(1 ether); // 3Crv has 18 decimals
ISablier public sablier;
uint256 public bondingDiscountMultiplier = uint256(1000000... | // solhint-disable-next-line no-empty-blocks | LineComment | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
1373,
1406
]
} | 3,475 | ||||
BondingShareV2 | contracts/Bonding.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | Bonding | contract Bonding is CollectableDust {
using SafeERC20 for IERC20;
bytes public data = "";
UbiquityAlgorithmicDollarManager public manager;
uint256 public constant ONE = uint256(1 ether); // 3Crv has 18 decimals
ISablier public sablier;
uint256 public bondingDiscountMultiplier = uint256(1000000... | uADPriceReset | function uADPriceReset(uint256 amount) external onlyBondingManager {
IMetaPool metaPool = IMetaPool(manager.stableSwapMetaPoolAddress());
// safe approve
IERC20(manager.stableSwapMetaPoolAddress()).safeApprove(
address(this),
amount
);
// remove one coin
uint256 expected = (metaP... | /// @dev uADPriceReset remove uAD unilateraly from the curve LP share sitting inside
/// the bonding contract and send the uAD received to the treasury.
/// This will have the immediate effect of pushing the uAD price HIGHER
/// @param amount of LP token to be removed for uAD
/// @notice it will remove one co... | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
1812,
2566
]
} | 3,476 | ||
BondingShareV2 | contracts/Bonding.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | Bonding | contract Bonding is CollectableDust {
using SafeERC20 for IERC20;
bytes public data = "";
UbiquityAlgorithmicDollarManager public manager;
uint256 public constant ONE = uint256(1 ether); // 3Crv has 18 decimals
ISablier public sablier;
uint256 public bondingDiscountMultiplier = uint256(1000000... | crvPriceReset | function crvPriceReset(uint256 amount) external onlyBondingManager {
IMetaPool metaPool = IMetaPool(manager.stableSwapMetaPoolAddress());
// safe approve
IERC20(manager.stableSwapMetaPoolAddress()).safeApprove(
address(this),
amount
);
// remove one coin
uint256 expected = (metaP... | /// @dev crvPriceReset remove 3CRV unilateraly from the curve LP share sitting inside
/// the bonding contract and send the 3CRV received to the treasury
/// This will have the immediate effect of pushing the uAD price LOWER
/// @param amount of LP token to be removed for 3CRV tokens
/// @notice it will remov... | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
2980,
3742
]
} | 3,477 | ||
BondingShareV2 | contracts/Bonding.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | Bonding | contract Bonding is CollectableDust {
using SafeERC20 for IERC20;
bytes public data = "";
UbiquityAlgorithmicDollarManager public manager;
uint256 public constant ONE = uint256(1 ether); // 3Crv has 18 decimals
ISablier public sablier;
uint256 public bondingDiscountMultiplier = uint256(1000000... | addProtocolToken | function addProtocolToken(address _token)
external
override
onlyBondingManager
{
_addProtocolToken(_token);
}
| /// Collectable Dust | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
3769,
3922
]
} | 3,478 | ||
BondingShareV2 | contracts/Bonding.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | Bonding | contract Bonding is CollectableDust {
using SafeERC20 for IERC20;
bytes public data = "";
UbiquityAlgorithmicDollarManager public manager;
uint256 public constant ONE = uint256(1 ether); // 3Crv has 18 decimals
ISablier public sablier;
uint256 public bondingDiscountMultiplier = uint256(1000000... | deposit | function deposit(uint256 _lpsAmount, uint256 _weeks)
public
returns (uint256 _id)
{
require(
1 <= _weeks && _weeks <= 208,
"Bonding: duration must be between 1 and 208 weeks"
);
_updateOracle();
IERC20(manager.stableSwapMetaPoolAddress()).safeTransferFrom(
msg.sender,
... | /// @dev deposit uAD-3CRV LP tokens for a duration to receive bonding shares
/// @param _lpsAmount of LP token to send
/// @param _weeks during lp token will be held
/// @notice weeks act as a multiplier for the amount of bonding shares to be received | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
5806,
6865
]
} | 3,479 | ||
BondingShareV2 | contracts/Bonding.sol | 0x2da07859613c14f6f05c97efe37b9b4f212b5ef5 | Solidity | Bonding | contract Bonding is CollectableDust {
using SafeERC20 for IERC20;
bytes public data = "";
UbiquityAlgorithmicDollarManager public manager;
uint256 public constant ONE = uint256(1 ether); // 3Crv has 18 decimals
ISablier public sablier;
uint256 public bondingDiscountMultiplier = uint256(1000000... | withdraw | function withdraw(uint256 _sharesAmount, uint256 _id) public {
require(
block.number > _id,
"Bonding: Redeem not allowed before bonding time"
);
require(
IERC1155Ubiquity(manager.bondingShareAddress()).balanceOf(
msg.sender,
_id
) >= _sharesAmount,
... | /// @dev withdraw an amount of uAD-3CRV LP tokens
/// @param _sharesAmount of bonding shares of type _id to be withdrawn
/// @param _id bonding shares id
/// @notice bonding shares are ERC1155 (aka NFT) because they have an expiration date | NatSpecSingleLine | v0.8.3+commit.8d00100c | MIT | none | {
"func_code_index": [
7123,
8344
]
} | 3,480 | ||
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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() {
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() {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
261,
314
]
} | 3,481 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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() {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
637,
813
]
} | 3,482 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
268,
659
]
} | 3,483 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
865,
977
]
} | 3,484 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
401,
853
]
} | 3,485 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
1485,
1675
]
} | 3,486 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
1999,
2130
]
} | 3,487 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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;
}
| /**
* @dev 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 transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
2596,
2860
]
} | 3,488 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | 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 | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg... | /**
* @dev 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 transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
3331,
3741
]
} | 3,489 | |
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | Solidity | MintableAndBurnableToken | contract MintableAndBurnableToken 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 Th... | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
498,
769
]
} | 3,490 | |||
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | Solidity | MintableAndBurnableToken | contract MintableAndBurnableToken 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 Th... | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
886,
1028
]
} | 3,491 | |||
QuasacoinTransferToken | QuasacoinTransferToken.sol | 0xd543136385b966ea41fc2cc9820dff390bac636a | Solidity | MintableAndBurnableToken | contract MintableAndBurnableToken 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 Th... | 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.19+commit.c4cbbb05 | bzzr://a2f448998ed6764cdcbdf364d0d6e59f2a19872f35133b3319abed0ec1388c73 | {
"func_code_index": [
1200,
1640
]
} | 3,492 | |||
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
92,
152
]
} | 3,493 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
233,
306
]
} | 3,494 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
524,
606
]
} | 3,495 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
879,
967
]
} | 3,496 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
1618,
1697
]
} | 3,497 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
2002,
2104
]
} | 3,498 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryAdd | function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
157,
384
]
} | 3,499 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | trySub | function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
528,
727
]
} | 3,500 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMul | function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
873,
1381
]
} | 3,501 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryDiv | function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
1528,
1728
]
} | 3,502 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMod | function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
1885,
2085
]
} | 3,503 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
2318,
2421
]
} | 3,504 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
2690,
2793
]
} | 3,505 |
DegenUnitToken | DegenUnitToken.sol | 0xa9b78c8b8e6a34d20c75a9864e128bcc83184cfe | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) retu... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://b9f3ba3a0ddb88a281aaa73b9c4fbf24fd114e6c85f18438083f9c4e21b8e8e6 | {
"func_code_index": [
3038,
3141
]
} | 3,506 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.