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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | initialize | function initialize(uint160 sqrtPriceX96) external;
| /// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
245,
300
]
} | 9,607 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | mint | function mint(
address recipient,
int24 tickLower,
int24 tickUpper,
uint128 amount,
bytes calldata data
) external returns (uint256 amount0, uint256 amount1);
| /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
/// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
/// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
/// on tickLo... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1336,
1542
]
} | 9,608 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | collect | function collect(
address recipient,
int24 tickLower,
int24 tickUpper,
uint128 amount0Requested,
uint128 amount1Requested
) external returns (uint128 amount0, uint128 amount1);
| /// @notice Collects tokens owed to a position
/// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
/// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
/// amount1Requested may be set to zero. To withdra... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2602,
2826
]
} | 9,609 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | burn | function burn(
int24 tickLower,
int24 tickUpper,
uint128 amount
) external returns (uint256 amount0, uint256 amount1);
| /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
/// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
/// @dev Fees must be collected separately via a call to #collect
/// @param tickLower The lower tick of the posi... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3464,
3614
]
} | 9,610 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | swap | function swap(
address recipient,
bool zeroForOne,
int256 amountSpecified,
uint160 sqrtPriceLimitX96,
bytes calldata data
) external returns (int256 amount0, int256 amount1);
| /// @notice Swap token0 for token1, or token1 for token0
/// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
/// @param recipient The address to receive the output of the swap
/// @param zeroForOne The direction of the swap, true for token0 to token1, false... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
4636,
4858
]
} | 9,611 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | flash | function flash(
address recipient,
uint256 amount0,
uint256 amount1,
bytes calldata data
) external;
| /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
/// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
/// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
/// wi... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
5522,
5662
]
} | 9,612 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolActions | interface IUniswapV3PoolActions {
/// @notice Sets the initial price for the pool
/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
function initialize(uint160 sqrtPriceX96) external;
/// @notice Ad... | /// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone | NatSpecSingleLine | increaseObservationCardinalityNext | function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
| /// @notice Increase the maximum number of price and liquidity observations that this pool will store
/// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
/// the input observationCardinalityNext.
/// @param observationCardinalityNext The desired minimum number of... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6036,
6128
]
} | 9,613 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolOwnerActions | interface IUniswapV3PoolOwnerActions {
/// @notice Set the denominator of the protocol's % share of the fees
/// @param feeProtocol0 new protocol fee for token0 of the pool
/// @param feeProtocol1 new protocol fee for token1 of the pool
function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) ext... | /// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner | NatSpecSingleLine | setFeeProtocol | function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;
| /// @notice Set the denominator of the protocol's % share of the fees
/// @param feeProtocol0 new protocol fee for token0 of the pool
/// @param feeProtocol1 new protocol fee for token1 of the pool | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
249,
326
]
} | 9,614 | ||
UniswapV3Product | contracts/interface/UniswapV3/IUniswapV3Pool.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | IUniswapV3PoolOwnerActions | interface IUniswapV3PoolOwnerActions {
/// @notice Set the denominator of the protocol's % share of the fees
/// @param feeProtocol0 new protocol fee for token0 of the pool
/// @param feeProtocol1 new protocol fee for token1 of the pool
function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) ext... | /// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner | NatSpecSingleLine | collectProtocol | function collectProtocol(
address recipient,
uint128 amount0Requested,
uint128 amount1Requested
) external returns (uint128 amount0, uint128 amount1);
| /// @notice Collect the protocol fee accrued to the pool
/// @param recipient The address to which collected protocol fees should be sent
/// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
/// @param amount1Requested The maximum amount of token1 to send, can be 0 t... | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
816,
998
]
} | 9,615 | ||
UniswapV3Product | contracts/products/UniswapV3Product.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | UniswapV3Product | contract UniswapV3Product is BaseProduct {
IUniswapV3Factory internal _uniV3Factory;
/**
* @notice Constructs the UniswapV3Product.
* @param governance_ The address of the [governor](/docs/protocol/governance).
* @param policyManager_ The [`PolicyManager`](../PolicyManager) contract.
*... | /**
* @title UniswapV3Product
* @author solace.fi
* @notice The **UniswapV3Product** can be used to purchase coverage for **UniswapV3 LP** positions.
*/ | NatSpecMultiLine | uniV2Factory | function uniV2Factory() external view returns (address uniV3Factory_) {
return address(_uniV3Factory);
}
| /**
* @notice Uniswap V2 Factory.
* @return uniV3Factory_ The factory.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1363,
1483
]
} | 9,616 | ||
UniswapV3Product | contracts/products/UniswapV3Product.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | UniswapV3Product | contract UniswapV3Product is BaseProduct {
IUniswapV3Factory internal _uniV3Factory;
/**
* @notice Constructs the UniswapV3Product.
* @param governance_ The address of the [governor](/docs/protocol/governance).
* @param policyManager_ The [`PolicyManager`](../PolicyManager) contract.
*... | /**
* @title UniswapV3Product
* @author solace.fi
* @notice The **UniswapV3Product** can be used to purchase coverage for **UniswapV3 LP** positions.
*/ | NatSpecMultiLine | isValidPositionDescription | function isValidPositionDescription(bytes memory positionDescription) public view virtual override returns (bool isValid) {
// check length
// solhint-disable-next-line var-name-mixedcase
uint256 ADDRESS_SIZE = 20;
// must be concatenation of one or more addresses
if(positionDescription.length == 0 ... | /**
* @notice Determines if the byte encoded description of a position(s) is valid.
* The description will only make sense in context of the product.
* @dev This function should be overwritten in inheriting Product contracts.
* If invalid, return false if possible. Reverting is also acceptable.
* @param positionDe... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1917,
3080
]
} | 9,617 | ||
UniswapV3Product | contracts/products/UniswapV3Product.sol | 0x501ace6c657a9b53b320780068fd99894d5795cb | Solidity | UniswapV3Product | contract UniswapV3Product is BaseProduct {
IUniswapV3Factory internal _uniV3Factory;
/**
* @notice Constructs the UniswapV3Product.
* @param governance_ The address of the [governor](/docs/protocol/governance).
* @param policyManager_ The [`PolicyManager`](../PolicyManager) contract.
*... | /**
* @title UniswapV3Product
* @author solace.fi
* @notice The **UniswapV3Product** can be used to purchase coverage for **UniswapV3 LP** positions.
*/ | NatSpecMultiLine | setCoveredPlatform | function setCoveredPlatform(address uniV3Factory_) public override {
super.setCoveredPlatform(uniV3Factory_);
_uniV3Factory = IUniswapV3Factory(uniV3Factory_);
}
| /**
* @notice Changes the covered platform.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @dev Use this if the the protocol changes their registry but keeps the children contracts.
* A new version of the protocol will likely require a new Product.
* @param uniV3Factory_ The new A... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3567,
3752
]
} | 9,618 | ||
DesperateApeWives | contracts/DesperateApeWives.sol | 0xf1268733c6fb05ef6be9cf23d24436dcd6e0b35e | Solidity | DesperateApeWives | contract DesperateApeWives is Ownable, ERC721Enumerable, PaymentSplitter {
uint public constant MAX_WIVES = 10000;
uint private DAW_PRICE = 0.08 ether;
uint private walletLimit = 3;
string public PROVENANCE_HASH;
string private _baseURIExtended;
string private _contractURI;
bool public _isS... | setAdmin | function setAdmin(address _addr) external onlyOwner {
accounts[_addr].isAdmin = !accounts[_addr].isAdmin;
}
| // End Modifier
// Setters | LineComment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
2483,
2606
]
} | 9,619 | |||
DesperateApeWives | contracts/DesperateApeWives.sol | 0xf1268733c6fb05ef6be9cf23d24436dcd6e0b35e | Solidity | DesperateApeWives | contract DesperateApeWives is Ownable, ERC721Enumerable, PaymentSplitter {
uint public constant MAX_WIVES = 10000;
uint private DAW_PRICE = 0.08 ether;
uint private walletLimit = 3;
string public PROVENANCE_HASH;
string private _baseURIExtended;
string private _contractURI;
bool public _isS... | getSaleTimes | function getSaleTimes() public view returns (uint, uint, uint) {
return (presaleStart, presaleEnd, publicSale);
}
| // End Setter
// Getters | LineComment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
4300,
4429
]
} | 9,620 | |||
DesperateApeWives | contracts/DesperateApeWives.sol | 0xf1268733c6fb05ef6be9cf23d24436dcd6e0b35e | Solidity | DesperateApeWives | contract DesperateApeWives is Ownable, ERC721Enumerable, PaymentSplitter {
uint public constant MAX_WIVES = 10000;
uint private DAW_PRICE = 0.08 ether;
uint private walletLimit = 3;
string public PROVENANCE_HASH;
string private _baseURIExtended;
string private _contractURI;
bool public _isS... | contractURI | function contractURI() public view returns (string memory) {
return _contractURI;
}
| // For OpenSea | LineComment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
4450,
4549
]
} | 9,621 | |||
DesperateApeWives | contracts/DesperateApeWives.sol | 0xf1268733c6fb05ef6be9cf23d24436dcd6e0b35e | Solidity | DesperateApeWives | contract DesperateApeWives is Ownable, ERC721Enumerable, PaymentSplitter {
uint public constant MAX_WIVES = 10000;
uint private DAW_PRICE = 0.08 ether;
uint private walletLimit = 3;
string public PROVENANCE_HASH;
string private _baseURIExtended;
string private _contractURI;
bool public _isS... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return _baseURIExtended;
}
| // For Metadata | LineComment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
4571,
4690
]
} | 9,622 | |||
DesperateApeWives | contracts/DesperateApeWives.sol | 0xf1268733c6fb05ef6be9cf23d24436dcd6e0b35e | Solidity | DesperateApeWives | contract DesperateApeWives is Ownable, ERC721Enumerable, PaymentSplitter {
uint public constant MAX_WIVES = 10000;
uint private DAW_PRICE = 0.08 ether;
uint private walletLimit = 3;
string public PROVENANCE_HASH;
string private _baseURIExtended;
string private _contractURI;
bool public _isS... | claimDonations | function claimDonations() external onlyAdmin {
require(totalSupply() + 2 <= (MAX_WIVES - _reserved), "You would exceed the limit");
_safeMint(donation, 1); // Good Dollar Donation
_safeMint(donation, 2); // Brest Cancer Donation
emit Mint(msg.sender, totalSupply());
}
| // End Getter
// Business Logic | LineComment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
4734,
5043
]
} | 9,623 | |||
DesperateApeWives | contracts/DesperateApeWives.sol | 0xf1268733c6fb05ef6be9cf23d24436dcd6e0b35e | Solidity | DesperateApeWives | contract DesperateApeWives is Ownable, ERC721Enumerable, PaymentSplitter {
uint public constant MAX_WIVES = 10000;
uint private DAW_PRICE = 0.08 ether;
uint private walletLimit = 3;
string public PROVENANCE_HASH;
string private _baseURIExtended;
string private _contractURI;
bool public _isS... | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
... | // helper | LineComment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
7750,
8133
]
} | 9,624 | |||
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721TokenReceiver | interface ERC721TokenReceiver {
/**
* @notice The contract address is always the message sender. A wallet/broker/auction application
* MUST implement the wallet interface if it will accept safe transfers.
* @dev Handle the receipt of a NFT. The ERC721 smart contract calls this function on the
... | /**
* @dev ERC-721 interface for accepting safe transfers.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address _operator,
address _from,
uint256 _tokenId,
bytes calldata _data
) external returns (bytes4);
| /**
* @notice The contract address is always the message sender. A wallet/broker/auction application
* MUST implement the wallet interface if it will accept safe transfers.
* @dev Handle the receipt of a NFT. The ERC721 smart contract calls this function on the
* recipient after a `transfer`. This function MAY ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
996,
1170
]
} | 9,625 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | AddressUtils | library AddressUtils {
/**
* @dev Returns whether the target address is a contract.
* @param _addr Address to check.
* @return addressCheck True if _addr is a contract, false if not.
*/
function isContract(address _addr)
internal
view
returns (bool addressChe... | /**
* @notice Based on:
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
* Requires EIP-1052.
* @dev Utility library of inline functions on addresses.
*/ | NatSpecMultiLine | isContract | function isContract(address _addr)
internal
view
returns (bool addressCheck)
{
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
// According to EIP-1052, 0x0 is the valu... | /**
* @dev Returns whether the target address is a contract.
* @param _addr Address to check.
* @return addressCheck True if _addr is a contract, false if not.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
216,
1069
]
} | 9,626 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | Ownable | contract Ownable {
/**
* @dev Error constants.
*/
string public constant NOT_CURRENT_OWNER = "018001";
string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = "018002";
/**
* @dev Current owner address.
*/
address public owner;
/**
* @dev An event which i... | /**
* @dev The contract has an owner address, and provides basic authorization control whitch
* simplifies the implementation of user permissions. This contract is based on the source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
1137,
1371
]
} | 9,627 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721Metadata | interface ERC721Metadata {
/**
* @dev Returns a descriptive name for a collection of NFTs in this contract.
* @return _name Representing name.
*/
function name() external view returns (string memory _name);
/**
* @dev Returns a abbreviated name for a collection of NFTs in this c... | /**
* @dev Optional metadata extension for ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | name | function name() external view returns (string memory _name);
| /**
* @dev Returns a descriptive name for a collection of NFTs in this contract.
* @return _name Representing name.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
170,
235
]
} | 9,628 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721Metadata | interface ERC721Metadata {
/**
* @dev Returns a descriptive name for a collection of NFTs in this contract.
* @return _name Representing name.
*/
function name() external view returns (string memory _name);
/**
* @dev Returns a abbreviated name for a collection of NFTs in this c... | /**
* @dev Optional metadata extension for ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory _symbol);
| /**
* @dev Returns a abbreviated name for a collection of NFTs in this contract.
* @return _symbol Representing symbol.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
384,
453
]
} | 9,629 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721Metadata | interface ERC721Metadata {
/**
* @dev Returns a descriptive name for a collection of NFTs in this contract.
* @return _name Representing name.
*/
function name() external view returns (string memory _name);
/**
* @dev Returns a abbreviated name for a collection of NFTs in this c... | /**
* @dev Optional metadata extension for ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 _tokenId) external view returns (string memory);
| /**
* @dev Returns a distinct Uniform Resource Identifier (URI) for a given asset. It Throws if
* `_tokenId` is not a valid NFT. URIs are defined in RFC3986. The URI may point to a JSON file
* that conforms to the "ERC721 Metadata JSON Schema".
* @return URI of _tokenId.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
766,
845
]
} | 9,630 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC165 | interface ERC165 {
/**
* @dev Checks if the smart contract includes a specific interface.
* This function uses less than 30,000 gas.
* @param _interfaceID The interface identifier, as specified in ERC-165.
* @return True if _interfaceID is supported, false otherwise.
*/
function ... | /**
* @dev A standard for detecting smart contract interfaces.
* See: https://eips.ethereum.org/EIPS/eip-165.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 _interfaceID)
external
view
returns (bool);
| /**
* @dev Checks if the smart contract includes a specific interface.
* This function uses less than 30,000 gas.
* @param _interfaceID The interface identifier, as specified in ERC-165.
* @return True if _interfaceID is supported, false otherwise.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
307,
416
]
} | 9,631 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | SupportsInterface | contract SupportsInterface is ERC165 {
/**
* @dev Mapping of supported intefraces. You must not set element 0xffffffff to true.
*/
mapping(bytes4 => bool) internal supportedInterfaces;
/**
* @dev Contract constructor.
*/
constructor() {
supportedInterfaces[0x01ffc9... | /**
* @dev Implementation of standard for detect smart contract interfaces.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 _interfaceID)
external
view
override
returns (bool)
{
return supportedInterfaces[_interfaceID];
}
| /**
* @dev Function to check which interfaces are suported by this contract.
* @param _interfaceID Id of the interface.
* @return True if _interfaceID is supported, false otherwise.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
566,
757
]
} | 9,632 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes calldata _data
) external;
| /**
* @notice Throws unless `msg.sender` is the current owner, an authorized operator, or the
* approved address for this NFT. Throws if `_from` is not the current owner. Throws if `_to` is
* the zero address. Throws if `_tokenId` is not a valid NFT. When transfer is complete, this
* function checks if `_to` is... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
2145,
2296
]
} | 9,633 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId
) external;
| /**
* @notice This works identically to the other function with an extra data parameter, except this
* function just sets data to ""
* @dev Transfers the ownership of an NFT from one address to another address. This function can
* be changed to payable.
* @param _from The current owner of the NFT.
* @param ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
2721,
2841
]
} | 9,634 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _tokenId
) external;
| /**
* @notice The caller is responsible to confirm that `_to` is capable of receiving NFTs or else
* they may be permanently lost.
* @dev Throws unless `msg.sender` is the current owner, an authorized operator, or the approved
* address for this NFT. Throws if `_from` is not the current owner. Throws if `_to` i... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
3435,
3551
]
} | 9,635 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | approve | function approve(address _approved, uint256 _tokenId) external;
| /**
* @notice The zero address indicates there is no approved address. Throws unless `msg.sender` is
* the current NFT owner, or an authorized operator of the current owner.
* @param _approved The new approved NFT controller.
* @dev Set or reaffirm the approved address for an NFT. This function can be changed t... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
3959,
4027
]
} | 9,636 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address _operator, bool _approved) external;
| /**
* @notice The contract MUST allow multiple operators per owner.
* @dev Enables or disables approval for a third party ("operator") to manage all of
* `msg.sender`'s assets. It also emits the ApprovalForAll event.
* @param _operator Address to add to the set of authorized operators.
* @param _approved True... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
4441,
4517
]
} | 9,637 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) external view returns (uint256);
| /**
* @dev Returns the number of NFTs owned by `_owner`. NFTs assigned to the zero address are
* considered invalid, and this function throws for queries about the zero address.
* @notice Count all NFTs assigned to an owner.
* @param _owner Address for whom to query the balance.
* @return Balance of _owner.
... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
4873,
4945
]
} | 9,638 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 _tokenId) external view returns (address);
| /**
* @notice Find the owner of an NFT.
* @dev Returns the address of the owner of the NFT. NFTs assigned to the zero address are
* considered invalid, and queries about them do throw.
* @param _tokenId The identifier for an NFT.
* @return Address of _tokenId owner.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
5259,
5331
]
} | 9,639 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 _tokenId) external view returns (address);
| /**
* @notice Throws if `_tokenId` is not a valid NFT.
* @dev Get the approved address for a single NFT.
* @param _tokenId The NFT to find the approved address for.
* @return Address that _tokenId is approved for.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
5586,
5662
]
} | 9,640 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | ERC721 | interface ERC721 {
/**
* @dev Emits when ownership of any NFT changes by any mechanism. This event emits when NFTs are
* created (`from` == 0) and destroyed (`to` == 0). Exception: during contract creation, any
* number of NFTs may be created and assigned without emitting Transfer. At the time of... | /**
* @dev ERC-721 non-fungible token standard.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address _owner, address _operator)
external
view
returns (bool);
| /**
* @notice Query if an address is an authorized operator for another address.
* @dev Returns true if `_operator` is an approved operator for `_owner`, false otherwise.
* @param _owner The address that owns the NFTs.
* @param _operator The address that acts on behalf of the owner.
* @return True if approved... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
6046,
6168
]
} | 9,641 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes calldata _data
) external override {
_safeTransferFrom(_from, _to, _tokenId, _data);
}
| /**
* @notice Throws unless `msg.sender` is the current owner, an authorized operator, or the
* approved address for this NFT. Throws if `_from` is not the current owner. Throws if `_to` is
* the zero address. Throws if `_tokenId` is not a valid NFT. When transfer is complete, this
* function checks if `_to` is... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
3721,
3946
]
} | 9,642 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId
) external override {
_safeTransferFrom(_from, _to, _tokenId, "");
}
| /**
* @notice This works identically to the other function with an extra data parameter, except this
* function just sets data to "".
* @dev Transfers the ownership of an NFT from one address to another address. This function can
* be changed to payable.
* @param _from The current owner of the NFT.
* @param... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
4372,
4563
]
} | 9,643 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _tokenId
) external override canTransfer(_tokenId) validNFToken(_tokenId) {
address tokenOwner = idToOwner[_tokenId];
require(tokenOwner == _from, NOT_OWNER);
require(_to != address(0), ZERO_ADDRESS);
_transfer(_to, _tokenI... | /**
* @notice The caller is responsible to confirm that `_to` is capable of receiving NFTs or else
* they may be permanently lost.
* @dev Throws unless `msg.sender` is the current owner, an authorized operator, or the approved
* address for this NFT. Throws if `_from` is not the current owner. Throws if `_to` i... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
5156,
5523
]
} | 9,644 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | approve | function approve(address _approved, uint256 _tokenId)
external
override
canOperate(_tokenId)
validNFToken(_tokenId)
{
address tokenOwner = idToOwner[_tokenId];
require(_approved != tokenOwner, IS_OWNER);
idToApproval[_tokenId] = _approved;
emit Approval(tokenOwner, _approved, ... | /**
* @notice The zero address indicates there is no approved address. Throws unless `msg.sender` is
* the current NFT owner, or an authorized operator of the current owner.
* @dev Set or reaffirm the approved address for an NFT. This function can be changed to payable.
* @param _approved Address to be approved... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
5955,
6333
]
} | 9,645 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address _operator, bool _approved)
external
override
{
ownerToOperators[msg.sender][_operator] = _approved;
emit ApprovalForAll(msg.sender, _operator, _approved);
}
| /**
* @notice This works even if sender doesn't own any tokens at the time.
* @dev Enables or disables approval for a third party ("operator") to manage all of
* `msg.sender`'s assets. It also emits the ApprovalForAll event.
* @param _operator Address to add to the set of authorized operators.
* @param _appro... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
6755,
6997
]
} | 9,646 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner)
external
view
override
returns (uint256)
{
require(_owner != address(0), ZERO_ADDRESS);
return _getOwnerNFTCount(_owner);
}
| /**
* @dev Returns the number of NFTs owned by `_owner`. NFTs assigned to the zero address are
* considered invalid, and this function throws for queries about the zero address.
* @param _owner Address for whom to query the balance.
* @return Balance of _owner.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
7300,
7527
]
} | 9,647 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 _tokenId)
external
view
override
returns (address _owner)
{
_owner = idToOwner[_tokenId];
require(_owner != address(0), NOT_VALID_NFT);
}
| /**
* @dev Returns the address of the owner of the NFT. NFTs assigned to the zero address are
* considered invalid, and queries about them do throw.
* @param _tokenId The identifier for an NFT.
* @return _owner Address of _tokenId owner.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
7806,
8037
]
} | 9,648 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 _tokenId)
external
view
override
validNFToken(_tokenId)
returns (address)
{
return idToApproval[_tokenId];
}
| /**
* @notice Throws if `_tokenId` is not a valid NFT.
* @dev Get the approved address for a single NFT.
* @param _tokenId ID of the NFT to query the approval of.
* @return Address that _tokenId is approved for.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
8290,
8496
]
} | 9,649 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address _owner, address _operator)
external
view
override
returns (bool)
{
return ownerToOperators[_owner][_operator];
}
| /**
* @dev Checks if `_operator` is an approved operator for `_owner`.
* @param _owner The address that owns the NFTs.
* @param _operator The address that acts on behalf of the owner.
* @return True if approved for all, false otherwise.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
8774,
8980
]
} | 9,650 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _transfer | function _transfer(address _to, uint256 _tokenId) internal {
address from = idToOwner[_tokenId];
_clearApproval(_tokenId);
_removeNFToken(from, _tokenId);
_addNFToken(_to, _tokenId);
emit Transfer(from, _to, _tokenId);
}
| /**
* @notice Does NO checks.
* @dev Actually performs the transfer.
* @param _to Address of a new owner.
* @param _tokenId The NFT that is being transferred.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
9180,
9459
]
} | 9,651 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _mint | function _mint(address _to, uint256 _tokenId) internal virtual {
require(_to != address(0), ZERO_ADDRESS);
require(idToOwner[_tokenId] == address(0), NFT_ALREADY_EXISTS);
_addNFToken(_to, _tokenId);
emit Transfer(address(0), _to, _tokenId);
}
| /**
* @notice This is an internal function which should be called from user-implemented external
* mint function. Its purpose is to show and properly initialize data structures when using this
* implementation.
* @dev Mints a new NFT.
* @param _to The address that will own the minted NFT.
* @param _tokenId ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
9863,
10155
]
} | 9,652 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _burn | function _burn(uint256 _tokenId) internal virtual validNFToken(_tokenId) {
address tokenOwner = idToOwner[_tokenId];
_clearApproval(_tokenId);
_removeNFToken(tokenOwner, _tokenId);
emit Transfer(tokenOwner, address(0), _tokenId);
}
| /**
* @notice This is an internal function which should be called from user-implemented external burn
* function. Its purpose is to show and properly initialize data structures when using this
* implementation. Also, note that this burn implementation allows the minter to re-mint a burned
* NFT.
* @dev Burns ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
10571,
10848
]
} | 9,653 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _removeNFToken | function _removeNFToken(address _from, uint256 _tokenId) internal virtual {
require(idToOwner[_tokenId] == _from, NOT_OWNER);
ownerToNFTokenCount[_from] -= 1;
delete idToOwner[_tokenId];
}
| /**
* @notice Use and override this function with caution. Wrong usage can have serious consequences.
* @dev Removes a NFT from owner.
* @param _from Address from which we want to remove the NFT.
* @param _tokenId Which NFT we want to remove.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
11132,
11357
]
} | 9,654 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _addNFToken | function _addNFToken(address _to, uint256 _tokenId) internal virtual {
require(idToOwner[_tokenId] == address(0), NFT_ALREADY_EXISTS);
idToOwner[_tokenId] = _to;
ownerToNFTokenCount[_to] += 1;
}
| /**
* @notice Use and override this function with caution. Wrong usage can have serious consequences.
* @dev Assigns a new NFT to owner.
* @param _to Address to which we want to add the NFT.
* @param _tokenId Which NFT we want to add.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
11633,
11866
]
} | 9,655 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _getOwnerNFTCount | function _getOwnerNFTCount(address _owner)
internal
view
virtual
returns (uint256)
{
return ownerToNFTokenCount[_owner];
}
| /**
* @dev Helper function that gets NFT count of owner. This is needed for overriding in enumerable
* extension to remove double storage (gas optimization) of owner NFT count.
* @param _owner Address for whom to query the count.
* @return Number of _owner NFTs.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
12170,
12352
]
} | 9,656 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _safeTransferFrom | function _safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
) private canTransfer(_tokenId) validNFToken(_tokenId) {
address tokenOwner = idToOwner[_tokenId];
require(tokenOwner == _from, NOT_OWNER);
require(_to != address(0), ZERO_ADDRESS);
_t... | /**
* @dev Actually perform the safeTransferFrom.
* @param _from The current owner of the NFT.
* @param _to The new owner.
* @param _tokenId The NFT to transfer.
* @param _data Additional data with no specified format, sent in call to `_to`.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
12641,
13401
]
} | 9,657 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFToken | contract NFToken is ERC721, SupportsInterface {
using AddressUtils for address;
/**
* @dev List of revert message codes. Implementing dApp should handle showing the correct message.
* Based on 0xcert framework error codes.
*/
string constant ZERO_ADDRESS = "003001";
string consta... | /**
* @dev Implementation of ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _clearApproval | function _clearApproval(uint256 _tokenId) private {
delete idToApproval[_tokenId];
}
| /**
* @dev Clears the current approval of a given NFT ID.
* @param _tokenId ID of the NFT to be transferred.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
13539,
13642
]
} | 9,658 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFTokenMetadata | contract NFTokenMetadata is NFToken, ERC721Metadata {
/**
* @dev A descriptive name for a collection of NFTs.
*/
string internal nftName;
/**
* @dev An abbreviated name for NFTokens.
*/
string internal nftSymbol;
/**
* @dev Mapping from NFT ID to metadata uri.
... | /**
* @dev Optional metadata implementation for ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | name | function name() external view override returns (string memory _name) {
_name = nftName;
}
| /**
* @dev Returns a descriptive name for a collection of NFTokens.
* @return _name Representing name.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
752,
860
]
} | 9,659 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFTokenMetadata | contract NFTokenMetadata is NFToken, ERC721Metadata {
/**
* @dev A descriptive name for a collection of NFTs.
*/
string internal nftName;
/**
* @dev An abbreviated name for NFTokens.
*/
string internal nftSymbol;
/**
* @dev Mapping from NFT ID to metadata uri.
... | /**
* @dev Optional metadata implementation for ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | symbol | function symbol() external view override returns (string memory _symbol) {
_symbol = nftSymbol;
}
| /**
* @dev Returns an abbreviated name for NFTokens.
* @return _symbol Representing symbol.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
981,
1097
]
} | 9,660 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFTokenMetadata | contract NFTokenMetadata is NFToken, ERC721Metadata {
/**
* @dev A descriptive name for a collection of NFTs.
*/
string internal nftName;
/**
* @dev An abbreviated name for NFTokens.
*/
string internal nftSymbol;
/**
* @dev Mapping from NFT ID to metadata uri.
... | /**
* @dev Optional metadata implementation for ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 _tokenId)
external
view
override
validNFToken(_tokenId)
returns (string memory)
{
return idToUri[_tokenId];
}
| /**
* @dev A distinct URI (RFC 3986) for a given NFT.
* @param _tokenId Id for which we want uri.
* @return URI of _tokenId.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
1257,
1461
]
} | 9,661 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFTokenMetadata | contract NFTokenMetadata is NFToken, ERC721Metadata {
/**
* @dev A descriptive name for a collection of NFTs.
*/
string internal nftName;
/**
* @dev An abbreviated name for NFTokens.
*/
string internal nftSymbol;
/**
* @dev Mapping from NFT ID to metadata uri.
... | /**
* @dev Optional metadata implementation for ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _burn | function _burn(uint256 _tokenId) internal virtual override {
super._burn(_tokenId);
delete idToUri[_tokenId];
}
| /**
* @notice This is an internal function which should be called from user-implemented external
* burn function. Its purpose is to show and properly initialize data structures when using this
* implementation. Also, note that this burn implementation allows the minter to re-mint a burned
* NFT.
* @dev Burns ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
1877,
2018
]
} | 9,662 |
NFT | NFT.sol | 0xc356bc60af6546fe036ba0d56fe758b9e5cd4922 | Solidity | NFTokenMetadata | contract NFTokenMetadata is NFToken, ERC721Metadata {
/**
* @dev A descriptive name for a collection of NFTs.
*/
string internal nftName;
/**
* @dev An abbreviated name for NFTokens.
*/
string internal nftSymbol;
/**
* @dev Mapping from NFT ID to metadata uri.
... | /**
* @dev Optional metadata implementation for ERC-721 non-fungible token standard.
*/ | NatSpecMultiLine | _setTokenUri | function _setTokenUri(uint256 _tokenId, string memory _uri)
internal
validNFToken(_tokenId)
{
idToUri[_tokenId] = _uri;
}
| /**
* @notice This is an internal function which should be called from user-implemented external
* function. Its purpose is to show and properly initialize data structures when using this
* implementation.
* @dev Set a distinct URI (RFC 3986) for a given NFT ID.
* @param _tokenId Id for which we want URI.
*... | NatSpecMultiLine | v0.8.6+commit.11564f7e | MIT | ipfs://36b35c4795538aa6f1ec715fd1d4491538b32e1f1e2adfe185defc55cf321d08 | {
"func_code_index": [
2426,
2589
]
} | 9,663 |
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | FinanceChain | function FinanceChain(
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
n... | /**
* Constructor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
843,
1390
]
} | 9,664 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | _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.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
1474,
2316
]
} | 9,665 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* 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.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
2522,
2634
]
} | 9,666 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | 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.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
2909,
3210
]
} | 9,667 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[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.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
3474,
3650
]
} | 9,668 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | 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.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
4044,
4396
]
} | 9,669 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | 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
Burn(msg.sender, _val... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
4566,
4940
]
} | 9,670 | |||
FinanceChain | FinanceChain.sol | 0x743309636fd55e2afe1b53d0eee8c34defad7a06 | Solidity | FinanceChain | contract FinanceChain {
// 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 (add... | 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.16+commit.d7661dd9 | bzzr://eb8786d682d99c6a3ed2e118db76d9c21919dde1dfc665df67294e026cbe205e | {
"func_code_index": [
5198,
5809
]
} | 9,671 | |||
SimpleToken | ERC20Detailed.sol | 0xd56ae7e69fccdaa21e6cc5b1c3ff19f66f4e841b | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | MIT | bzzr://27a2eb5a6294b610c7c4c8ed2bc6ea811fe9823a2e8b7c461b82ac0ee7e07f92 | {
"func_code_index": [
550,
638
]
} | 9,672 |
SimpleToken | ERC20Detailed.sol | 0xd56ae7e69fccdaa21e6cc5b1c3ff19f66f4e841b | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | MIT | bzzr://27a2eb5a6294b610c7c4c8ed2bc6ea811fe9823a2e8b7c461b82ac0ee7e07f92 | {
"func_code_index": [
752,
844
]
} | 9,673 |
SimpleToken | ERC20Detailed.sol | 0xd56ae7e69fccdaa21e6cc5b1c3ff19f66f4e841b | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
*... | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | MIT | bzzr://27a2eb5a6294b610c7c4c8ed2bc6ea811fe9823a2e8b7c461b82ac0ee7e07f92 | {
"func_code_index": [
1402,
1490
]
} | 9,674 |
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | pause | function pause() external onlyOwner {
_pause();
}
| /**
* @notice pause staking, unstaking and claiming rewards
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1458,
1523
]
} | 9,675 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | unpause | function unpause() external onlyOwner {
_unpause();
}
| /**
* @notice unpause staking, unstaking and claiming rewards
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1602,
1678
]
} | 9,676 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | setRewardsPerBlock | function setRewardsPerBlock(uint128 _rewardPerBlock) external onlyOwner {
require(rewardChanges.length < MAX_REWARD_CHANGES, "Set rewards: Max reward changes reached");
rewardPerBlock = _rewardPerBlock;
rewardChanges.push(RewardChanged(uint128(block.number), _rewardPerBlock));
emit RewardsChanged(_rew... | /**
* @notice set ERC20 reward amount per block
*
* @param _rewardPerBlock the reward amount
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1797,
2156
]
} | 9,677 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | setLockupPeriod | function setLockupPeriod(uint128 _lockupPeriod) external onlyOwner {
lockupPeriod = _lockupPeriod;
emit LockupPeriodChanged(_lockupPeriod);
}
| /**
* @notice set lockup period in seconds.
* unstaking or claiming rewards not allowed until lockup period expired
*
* @param _lockupPeriod length of the lockup period in seconds
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2367,
2537
]
} | 9,678 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | withdraw | function withdraw(address to, uint256 amount) external onlyOwner {
require(
rewardToken.balanceOf(address(this)) >= amount,
"Withdraw: balance exceeded");
rewardToken.transfer(to, amount);
}
| /**
* @notice withdraw reward tokens owned by staking contract
*
* @param to the token ids to unstake
* @param amount the amount of tokens to withdraw
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2718,
2958
]
} | 9,679 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | stake | function stake(uint256[] calldata tokenIds) external whenNotPaused nonReentrant {
require(tokenIds.length <= 40 && tokenIds.length > 0, "Stake: amount prohibited");
for (uint256 i; i < tokenIds.length; i++) {
require(stakedTokenContract.ownerOf(tokenIds[i]) == msg.sender, "Stake: sender not owner");
... | /**
* @notice stake given token ids for specified user
*
* @param tokenIds the token ids to stake
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3082,
3739
]
} | 9,680 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | unstake | function unstake(uint256[] calldata tokenIds) external whenNotPaused nonReentrant {
require(tokenIds.length <= 40 && tokenIds.length > 0, "Unstake: amount prohibited");
uint256 rewards;
for (uint256 i; i < tokenIds.length; i++) {
require(
stakedTokens[msg.sender].contains(tokenIds[i]),... | /**
* @notice unstake given token ids and claim rewards
*
* @param tokenIds the token ids to unstake
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3866,
4860
]
} | 9,681 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | exitWithoutRewards | function exitWithoutRewards(uint256[] calldata tokenIds) external whenNotPaused nonReentrant {
require(tokenIds.length <= 40 && tokenIds.length > 0, "Unstake: amount prohibited");
for (uint256 i; i < tokenIds.length; i++) {
require(
stakedTokens[msg.sender].contains(tokenIds[i]),
... | /**
* @notice unstake given token ids and forfeit rewards
*
* @param tokenIds the token ids to unstake
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4989,
5657
]
} | 9,682 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | claimRewards | function claimRewards(uint256[] calldata tokenIds) external whenNotPaused {
require(tokenIds.length > 0, "ClaimRewards: missing token ids");
uint256 rewards;
for (uint256 i; i < tokenIds.length; i++) {
require(
stakedTokens[msg.sender].contains(tokenIds[i]),
"ClaimRewards:... | /**
* @notice claim rewards for given token ids
*
* @param tokenIds the token ids to claim for
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5778,
6600
]
} | 9,683 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | calculateRewardsByAccount | function calculateRewardsByAccount(address account) external view returns (uint256) {
uint256 rewards;
for (uint256 i; i < stakedTokens[account].length(); i++) {
rewards += calculateRewards(stakedTokens[account].at(i));
}
return rewards;
}
| /**
* @notice calculate rewards for all staken token ids of a given account
*
* @param account the account to calculate for
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
6750,
7047
]
} | 9,684 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | calculateRewards | function calculateRewards(uint256 tokenID) public view returns (uint256) {
require(stakes[tokenID].lastClaimedBlock != 0, "token not staked");
uint256 rewards;
uint256 blocksPassed;
uint128 lastClaimedBlock = stakes[tokenID].lastClaimedBlock;
uint256 from;
uint256 last;
for(uint256 i=0; ... | /**
* @notice calculate rewards for given token id
*
* @param tokenID the token id to calculate for
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
7173,
8173
]
} | 9,685 | ||
ComicStaking | contracts/ComicStaking.sol | 0x2db69d45771055f95050a8530add756264109ac5 | Solidity | ComicStaking | contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard {
using EnumerableSet for EnumerableSet.UintSet;
IERC20 public immutable rewardToken;
IERC721 public immutable stakedTokenContract;
uint256 constant MAX_REWARD_CHANGES = 2000;
uint128 public rewardPerBlock;
uint128 ... | /*
* @title Staking for Pixelvault ERC721 tokens
*
* @author Niftydude
*/ | Comment | stakedTokensOf | function stakedTokensOf(address account) external view returns (uint256[] memory) {
uint256[] memory tokenIds = new uint256[](stakedTokens[account].length());
for (uint256 i; i < tokenIds.length; i++) {
tokenIds[i] = stakedTokens[account].at(i);
}
return tokenIds;
}
| /**
* @notice return all staked token ids for a given account
*
* @param account the account to return token ids for
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
8316,
8628
]
} | 9,686 | ||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | ERC20 | contract ERC20 {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since publi... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance);
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
631,
706
]
} | 9,687 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | ERC20 | contract ERC20 {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since publi... | transfer | function transfer(address _to, uint256 _value) returns (bool success);
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
943,
1018
]
} | 9,688 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | ERC20 | contract ERC20 {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since publi... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
1341,
1435
]
} | 9,689 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | ERC20 | contract ERC20 {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since publi... | approve | function approve(address _spender, uint256 _value) returns (bool success);
| /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
1725,
1804
]
} | 9,690 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | ERC20 | contract ERC20 {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since publi... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining);
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
2012,
2107
]
} | 9,691 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
/// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner.
function balanceOf(address _owner) constant returns ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
| /// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner. | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
264,
381
]
} | 9,692 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
/// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner.
function balanceOf(address _owner) constant returns ... | transfer | function transfer(address _to, uint256 _value) returns (bool) {
if (balances[msg.sender] >= _value && _value > 0) {
balances[msg.sender] = safeSub(balances[msg.sender], _value);
balances[_to] = safeAdd(balances[_to], _value);
Transfer(msg.sender, _to, _value);
return true;
... | /// @dev Transfers sender's tokens to a given address. Returns success.
/// @param _to Address of token receiver.
/// @param _value Number of tokens to transfer. | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
561,
937
]
} | 9,693 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
/// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner.
function balanceOf(address _owner) constant returns ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
balances[_to] = safeAdd(balances[_to], _value);
balances[_from] = safeSub(balances[_from], _value);
allowed[_from][msg... | /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success.
/// @param _from Address from where tokens are withdrawn.
/// @param _to Address to where tokens are sent.
/// @param _value Number of tokens to transfer. | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
1216,
1718
]
} | 9,694 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
/// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner.
function balanceOf(address _owner) constant returns ... | approve | function approve(address _spender, uint256 _value) returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /// @dev Sets approved amount of tokens for spender. Returns success.
/// @param _spender Address of allowed account.
/// @param _value Number of approved tokens. | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
1899,
2098
]
} | 9,695 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | StandardToken | contract StandardToken is ERC20, SafeMath {
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
/// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner.
function balanceOf(address _owner) constant returns ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /// @dev Returns number of allowed tokens for given address.
/// @param _owner Address of token owner.
/// @param _spender Address of token spender. | NatSpecSingleLine | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
2265,
2411
]
} | 9,696 | |||
BsToken_SNOV | BsToken_SNOV.sol | 0x38bca9e1cebc427d31118d1665cbf0e8e8304083 | Solidity | BsToken | contract BsToken is StandardToken, MultiOwnable {
bool public locked;
string public name;
string public symbol;
uint256 public totalSupply;
uint8 public decimals = 18;
string public version = 'v0.1';
address public creator;
address public seller;
uint256 public tokensS... | approveAndCall | function approveAndCall(address _spender, uint256 _value) {
TokenSpender spender = TokenSpender(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value);
}
}
| /* Approve and then communicate the approved contract in a single tx */ | Comment | v0.4.11+commit.68ef5810 | bzzr://b0ff219b13198d2f30f7c5419e4ed879b135f575c6c5f254031e8b6a64d0dc8e | {
"func_code_index": [
2720,
2958
]
} | 9,697 | |||
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
980,
1101
]
} | 9,698 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
1321,
1450
]
} | 9,699 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance 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);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
1794,
2076
]
} | 9,700 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance 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;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
2584,
2797
]
} | 9,701 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance 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);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
3328,
3691
]
} | 9,702 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
3974,
4130
]
} | 9,703 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance 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;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
4485,
4807
]
} | 9,704 |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
4999,
5058
]
} | 9,705 | |
JBFFinance | JBFFinance.sol | 0xb33e9b045e789e4381adcaafa3310402cf660055 | Solidity | JBFFinance | contract JBFFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://77f5dafbc79ce30e58dd19cf5918d319d6e4fb52e17a040a18d25f0dc4c87579 | {
"func_code_index": [
5291,
5480
]
} | 9,706 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.