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
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 4663, 4993 ] }
7,007
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 5397, 5688 ] }
7,008
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 6186, 6334 ] }
7,009
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
addApprove
function addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 6747, 7031 ] }
7,010
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 7518, 8065 ] }
7,011
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 8341, 8647 ] }
7,012
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 8974, 9397 ] }
7,013
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount)...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 9832, 10181 ] }
7,014
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approveCheck
function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(send...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 10624, 11215 ] }
7,015
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 13080, 13175 ] }
7,016
ROTT
ROTT.sol
0xe05480b1a133a37544f2ccc1b6b8e638ce31fdf1
Solidity
ROTT
contract ROTT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://4202f0f8e723c0c293db66e81609b582a5fb9d78d897e6fbe0ce067ac47421e5
{ "func_code_index": [ 13773, 13870 ] }
7,017
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateGrapes
function updateGrapes(address _grapes) external onlyOwner { require( IERC165(_grapes).supportsInterface(INTERFACE_ID_ERC721), "Not ERC721" ); grapes = _grapes; }
/** @notice Update grapes contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 882, 1099 ] }
7,018
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateAuction
function updateAuction(address _auction) external onlyOwner { auction = _auction; }
/** @notice Update Auction contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1175, 1274 ] }
7,019
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateMarketplace
function updateMarketplace(address _marketplace) external onlyOwner { marketplace = _marketplace; }
/** @notice Update Marketplace contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1354, 1469 ] }
7,020
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateBundleMarketplace
function updateBundleMarketplace(address _bundleMarketplace) external onlyOwner { bundleMarketplace = _bundleMarketplace; }
/** @notice Update BundleMarketplace contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1555, 1714 ] }
7,021
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateNFTFactory
function updateNFTFactory(address _factory) external onlyOwner { factory = _factory; }
/** @notice Update NFTFactory contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1793, 1895 ] }
7,022
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateNFTFactoryPrivate
function updateNFTFactoryPrivate(address _privateFactory) external onlyOwner { privateFactory = _privateFactory; }
/** @notice Update NFTFactoryPrivate contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1981, 2131 ] }
7,023
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateArtFactory
function updateArtFactory(address _artFactory) external onlyOwner { artFactory = _artFactory; }
/** @notice Update ArtFactory contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2210, 2321 ] }
7,024
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateArtFactoryPrivate
function updateArtFactoryPrivate(address _privateArtFactory) external onlyOwner { privateArtFactory = _privateArtFactory; }
/** @notice Update ArtFactoryPrivate contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2407, 2566 ] }
7,025
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updateTokenRegistry
function updateTokenRegistry(address _tokenRegistry) external onlyOwner { tokenRegistry = _tokenRegistry; }
/** @notice Update token registry contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2649, 2772 ] }
7,026
AddressRegistry
contracts/AddressRegistry.sol
0xf0f1dacd48b78b95545332cc5eb6a12a9bcffa1d
Solidity
AddressRegistry
contract AddressRegistry is Ownable { bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd; /// @notice Grapes contract address public grapes; /// @notice Auction contract address public auction; /// @notice Marketplace contract address public marketplace; /// @notice BundleMarke...
updatePriceFeed
function updatePriceFeed(address _priceFeed) external onlyOwner { priceFeed = _priceFeed; }
/** @notice Update price feed contract @dev Only admin */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2851, 2958 ] }
7,027
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, ...
// produced by the Solididy File Flattener (c) David Appleton 2018 // contact : dave@akomba.com // released under Apache 2.0 licence // input D:\Project\java\FanMei\src\main\solidity\FMC.sol // flattened : Wednesday, 09-Jan-19 14:12:44 UTC
LineComment
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 87, 270 ] }
7,028
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, ...
// produced by the Solididy File Flattener (c) David Appleton 2018 // contact : dave@akomba.com // released under Apache 2.0 licence // input D:\Project\java\FanMei\src\main\solidity\FMC.sol // flattened : Wednesday, 09-Jan-19 14:12:44 UTC
LineComment
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 352, 632 ] }
7,029
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, ...
// produced by the Solididy File Flattener (c) David Appleton 2018 // contact : dave@akomba.com // released under Apache 2.0 licence // input D:\Project\java\FanMei\src\main\solidity\FMC.sol // flattened : Wednesday, 09-Jan-19 14:12:44 UTC
LineComment
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 744, 860 ] }
7,030
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, ...
// produced by the Solididy File Flattener (c) David Appleton 2018 // contact : dave@akomba.com // released under Apache 2.0 licence // input D:\Project\java\FanMei\src\main\solidity\FMC.sol // flattened : Wednesday, 09-Jan-19 14:12:44 UTC
LineComment
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 922, 1058 ] }
7,031
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a s...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 193, 281 ] }
7,032
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a s...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 437, 767 ] }
7,033
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a s...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 971, 1075 ] }
7,034
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_val...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 395, 883 ] }
7,035
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 1507, 1702 ] }
7,036
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 2024, 2189 ] }
7,037
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 2647, 2957 ] }
7,038
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to ...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue)...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender T...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 3420, 3869 ] }
7,039
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** *...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); 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.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 623, 804 ] }
7,040
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); //normal transfer balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _...
/** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 1573, 3107 ] }
7,041
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
issue
function issue(address[] payees, uint256[] values, uint16[] deferDays) public onlyOwner returns(bool) { require(payees.length > 0 && payees.length == values.length); uint256 _now0 = _getNow0(); for (uint i = 0; i<payees.length; i++) { require(balances[owner] >= values[i], "Issuer balance is insu...
// issue in batch with forzen
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 3143, 4846 ] }
7,042
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
airdrop
function airdrop(address[] payees, uint256 value, uint16 deferDays) public onlyOwner returns(bool) { require(payees.length > 0 && value > 0); uint256 _amount = value.mul(payees.length); require(balances[owner] > _amount); uint256 _now0 = _getNow0(); uint256 _date0 = _now0.add(deferDays*24*3600)...
// airdrop in with same value and deferDays
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 4896, 6669 ] }
7,043
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
updateFrozenAddress
function updateFrozenAddress(address newFrozenAddress) public onlyOwner returns(bool){ //要求: //1. 新地址不能为空 //2. 新地址不能为owner //3. 新地址不能与旧地址相同 require(newFrozenAddress != address(0) && newFrozenAddress != owner && newFrozenAddress != frozenAddress); //要求:新地址账本为零 require(balances[newFroze...
// update frozen address
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 6700, 7345 ] }
7,044
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
defrozen
function defrozen(address fellow) public onlyOwner returns(bool){ require(fellow != address(0)); Info storage _info = fellowInfo[fellow]; require(_info.totalFrozenValue > 0); for(uint i = 0; i< _info.defrozenDates.length; i++){ uint256 _date0 = _info.defrozenDates[i]; if(_info.froz...
//平台解冻指定资产
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 7362, 8431 ] }
7,045
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
getOwnAssets
function getOwnAssets() public view returns(uint256, uint256, uint256[], uint256[]){ return getAssets(msg.sender); }
// check own assets include: balance, totalForzenValue, defrozenDates, defrozenValues
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 8523, 8658 ] }
7,046
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
getAssets
function getAssets(address fellow) public view returns(uint256, uint256, uint256[], uint256[]){ uint256 _value = balances[fellow]; Info storage _info = fellowInfo[fellow]; uint256 _totalFrozenValue = _info.totalFrozenValue; uint256 _size = _info.defrozenDates.length; uint256[] memory _values = ...
// check own assets include: balance, totalForzenValue, defrozenDates, defrozenValues
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 8750, 9321 ] }
7,047
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
setWebInfo
function setWebInfo(string _website, string _icon) public onlyOwner returns(bool){ website = _website; icon = _icon; return true; }
// 设置token官网和icon信息
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 9347, 9515 ] }
7,048
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
getNow
function getNow() public view returns(uint256){ return now; }
//返回当前区块链时间: 年月日时
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 9539, 9619 ] }
7,049
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
_calcDate0
function _calcDate0(uint256 _timestamp) internal pure returns(uint256){ return _timestamp.sub(_timestamp % (60*24)); }
// @dev An internal pure function to calculate date in XX:00:00
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 9689, 9826 ] }
7,050
FMC
FMC.sol
0x66d4f385c12927493cd205ed25bf21f1512f02ea
Solidity
FMC
contract FMC is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Fan Mei Chain (FMC)"; string public constant symbol = "FMC"; uint8 public constant decimals = 18; //总配额2亿 uint256 constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals)); //设置代币...
_getNow0
function _getNow0() internal view returns(uint256){ return _calcDate0(now); }
// 获取当前日期零点时间戳
LineComment
v0.4.25+commit.59dbf8f1
bzzr://7a0ccc9375b07b61ca670f527c5d0ceee8de9898d467ab47544bc70ad284ea8f
{ "func_code_index": [ 9847, 9943 ] }
7,051
Savings
Savings.sol
0xd513a407d6e8de115d8765ccfc50dacd57f22c01
Solidity
Savings
contract Savings { mapping(address => mapping(address => uint256)) private balances; mapping(address => mapping(address => uint)) private experations; // Function to deposit currency to the contract // _duration is in blocks from current function deposit(address _tokenAddress, uint256 _amount, uint ...
deposit
function deposit(address _tokenAddress, uint256 _amount, uint _duration) public returns (bool success) { // Require that user doesn't have any pending balances in this token require(balances[msg.sender][_tokenAddress] == 0, "You can't have two pending pools with the same currency"); // Check that we have al...
// Function to deposit currency to the contract // _duration is in blocks from current
LineComment
v0.6.2+commit.bacdbe57
MIT
ipfs://7e9bec656f19a9fd3f527be89bc3ca130f6e43d84509388756f23d33a3b09819
{ "func_code_index": [ 257, 1356 ] }
7,052
WrappedMosContract
WrappedMosContract.sol
0xfb2973757a86f4640020363262a0e6e4bb006442
Solidity
WrappedMosContract
contract WrappedMosContract is ERC20 { string internal _name = "wrappedMOS"; string internal _symbol = "wMOS"; string internal _standard = "ERC20"; uint8 internal _decimals = 18; uint internal _totalSupply = 100000000 * 1 ether; ...
function () external payable { revert("This SmartContract is not payable"); }
// Try to prevent sending ETH to SmartContract by mistake.
LineComment
v0.5.17+commit.d19bba13
MIT
bzzr://3189c6eac3fb9ad3cb558620a2206f6ec545ea671ba092b122d849a09572364a
{ "func_code_index": [ 933, 1030 ] }
7,053
DSYS
contracts/token/DSYS.sol
0x10a34bbe9b3c5ad536ca23d5eefa81ca448e92ff
Solidity
DSYS
contract DSYS is ERC20 { using SafeMath for uint256; address public admin; string public constant name = "DSYS"; string public constant symbol = "DSYS"; uint8 public constant decimals = 18; uint256 public totalSupply; mapping(address => bool) internal blacklist; event B...
blockTransfer
function blockTransfer(bool _block) external adminOnly { checkTokenLock = _block; }
// _block // True : Can not Transfer // false : Can Transfer
LineComment
v0.4.18+commit.9cf6e910
bzzr://97fd60aad1173c64bfe4a425076c65ea600ddc7823754264f0ad551b09f5135d
{ "func_code_index": [ 1060, 1162 ] }
7,054
DSYS
contracts/token/DSYS.sol
0x10a34bbe9b3c5ad536ca23d5eefa81ca448e92ff
Solidity
DSYS
contract DSYS is ERC20 { using SafeMath for uint256; address public admin; string public constant name = "DSYS"; string public constant symbol = "DSYS"; uint8 public constant decimals = 18; uint256 public totalSupply; mapping(address => bool) internal blacklist; event B...
updateBlackList
function updateBlackList(address _addr, bool _inBlackList) external adminOnly{ blacklist[_addr] = _inBlackList; }
// _inBlackList // True : Can not Transfer // false : Can Transfer
LineComment
v0.4.18+commit.9cf6e910
bzzr://97fd60aad1173c64bfe4a425076c65ea600ddc7823754264f0ad551b09f5135d
{ "func_code_index": [ 1249, 1381 ] }
7,055
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 251, 437 ] }
7,056
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 707, 896 ] }
7,057
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1142, 1617 ] }
7,058
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 2080, 2418 ] }
7,059
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 2870, 3027 ] }
7,060
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to a...
/** * @dev Collection of functions related to the address type, */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function retur...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 455, 882 ] }
7,061
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ECDSA
library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the ...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
recover
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover tak...
/** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half ord...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1013, 2945 ] }
7,062
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ECDSA
library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the ...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
toEthSignedMessageHash
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); }
/** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * [`eth_sign`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign) * JSON-RPC method. * * See `recover`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 3216, 3490 ] }
7,063
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 94, 154 ] }
7,064
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 237, 310 ] }
7,065
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 534, 616 ] }
7,066
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 895, 983 ] }
7,067
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * trans...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1638, 1717 ] }
7,068
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 2030, 2132 ] }
7,069
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, addr...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
callOptionalReturn
function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checke...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 2082, 3201 ] }
7,070
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See `IERC20.totalSupply`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 290, 386 ] }
7,071
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See `IERC20.balanceOf`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 444, 559 ] }
7,072
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, recipient, amount); return true; }
/** * @dev See `IERC20.transfer`. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 767, 928 ] }
7,073
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See `IERC20.allowance`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 986, 1125 ] }
7,074
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
approve
function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; }
/** * @dev See `IERC20.approve`. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1267, 1420 ] }
7,075
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; }
/** * @dev See `IERC20.transferFrom`. * * Emits an `Approval` event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of `ERC20`; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `valu...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1886, 2147 ] }
7,076
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to `approve` that can be used as a mitigation for * problems described in `IERC20.approve`. * * Emits an `Approval` event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 2551, 2762 ] }
7,077
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to `approve` that can be used as a mitigation for * problems described in `IERC20.approve`. * * Emits an `Approval` event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 3260, 3481 ] }
7,078
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] ...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to `transfer`, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a `Transfer` event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 3966, 4400 ] }
7,079
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a `Transfer` event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 4676, 4989 ] }
7,080
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_burn
function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Destoys `amount` tokens from `account`, reducing the * total supply. * * Emits a `Transfer` event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 5316, 5627 ] }
7,081
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an `Approval` event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 6062, 6402 ] }
7,082
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() pub...
/** * @dev Implementation of the `IERC20` interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using `_mint`. * For a generic mechanism see `ERC20Mintable`. * * *For a detailed writeup see our guide [How to...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); }
/** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See `_burn` and `_approve`. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 6582, 6775 ] }
7,083
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 441, 525 ] }
7,084
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
isOwner
function isOwner() public view returns (bool) { return msg.sender == _owner; }
/** * @dev Returns true if the caller is the current owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 807, 904 ] }
7,085
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * > Note: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1252, 1397 ] }
7,086
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1547, 1661 ] }
7,087
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functio...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1762, 1996 ] }
7,088
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
NOIAToken
contract NOIAToken is TokenRecoverable, ERC20 { using SafeMath for uint256; using Address for address; using ECDSA for bytes32; string public constant name = "NOIA Token"; string public constant symbol = "NOIA"; uint8 public constant decimals = uint8(18); uint256 public tokensToMin...
transfer
function transfer(address to, uint256 value) public returns (bool) { bool success = super.transfer(to, value); if (success) { _postTransfer(msg.sender, to, value); } return success; }
/** * @dev Transfer token to a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 1384, 1626 ] }
7,089
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
NOIAToken
contract NOIAToken is TokenRecoverable, ERC20 { using SafeMath for uint256; using Address for address; using ECDSA for bytes32; string public constant name = "NOIA Token"; string public constant symbol = "NOIA"; uint8 public constant decimals = uint8(18); uint256 public tokensToMin...
transferFrom
function transferFrom(address from, address to, uint256 value) public returns (bool) { bool success = super.transferFrom(from, to, value); if (success) { _postTransfer(from, to, value); } return success; }
/** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 2094, 2358 ] }
7,090
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
NOIAToken
contract NOIAToken is TokenRecoverable, ERC20 { using SafeMath for uint256; using Address for address; using ECDSA for bytes32; string public constant name = "NOIA Token"; string public constant symbol = "NOIA"; uint8 public constant decimals = uint8(18); uint256 public tokensToMin...
mint
function mint(address to, uint256 value) public onlyOwner returns (bool) { require(tokensToMint.sub(value) >= 0, "Not enough tokens left"); tokensToMint = tokensToMint.sub(value); _mint(to, value); _postTransfer(address(0), to, value); return true; }
/** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 3159, 3464 ] }
7,091
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
NOIAToken
contract NOIAToken is TokenRecoverable, ERC20 { using SafeMath for uint256; using Address for address; using ECDSA for bytes32; string public constant name = "NOIA Token"; string public constant symbol = "NOIA"; uint8 public constant decimals = uint8(18); uint256 public tokensToMin...
burn
function burn(uint256 value) public { require(msg.sender == burnAddress, "Only burnAddress can burn tokens"); _burn(msg.sender, value); }
/** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 3588, 3753 ] }
7,092
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
NOIAToken
contract NOIAToken is TokenRecoverable, ERC20 { using SafeMath for uint256; using Address for address; using ECDSA for bytes32; string public constant name = "NOIA Token"; string public constant symbol = "NOIA"; uint8 public constant decimals = uint8(18); uint256 public tokensToMin...
transferPreSigned
function transferPreSigned( bytes memory _signature, address _to, uint256 _value, uint256 _fee, uint256 _nonce ) public onlyEtherlessTransferEnabled returns (bool) { require(_to != address(0), "Transfer to the zero address"); bytes32 hashedParams = hashForSign(msg.s...
/** * @notice Submit a presigned transfer * @param _signature bytes The signature, issued by the owner. * @param _to address The address which you want to transfer to. * @param _value uint256 The amount of tokens to be transferred. * @param _fee uint256 The amount of tokens paid to msg.sender, by the owner. ...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 4436, 5649 ] }
7,093
NOIAVault
NOIAVault.sol
0xda4936143386adc3a97e5c863a7da74d7777d002
Solidity
NOIAToken
contract NOIAToken is TokenRecoverable, ERC20 { using SafeMath for uint256; using Address for address; using ECDSA for bytes32; string public constant name = "NOIA Token"; string public constant symbol = "NOIA"; uint8 public constant decimals = uint8(18); uint256 public tokensToMin...
hashForSign
function hashForSign( bytes4 _selector, address _token, address _to, uint256 _value, uint256 _fee, uint256 _nonce ) public pure returns (bytes32) { return keccak256(abi.encodePacked(_selector, _token, _to, _value, _fee, _nonce)); }
/** * @notice Hash (keccak256) of the payload used by transferPreSigned * @param _token address The address of the token. * @param _to address The address which you want to transfer to. * @param _value uint256 The amount of tokens to be transferred. * @param _fee uint256 The amount of tokens paid to msg.sende...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
MIT
bzzr://31061468ee3262fc45797cac7bee022f405fc82ffb1ed3f1afb9d3d532da8842
{ "func_code_index": [ 6083, 6424 ] }
7,094
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 638, 755 ] }
7,095
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 920, 1028 ] }
7,096
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1166, 1344 ] }
7,097
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
add
function add(Role storage role, address addr) internal { role.bearer[addr] = true; }
/** * @dev give an address access to this role */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 141, 244 ] }
7,098
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
remove
function remove(Role storage role, address addr) internal { role.bearer[addr] = false; }
/** * @dev remove an address' access to this role */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 311, 418 ] }
7,099
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
check
function check(Role storage role, address addr) view internal { require(has(role, addr)); }
/** * @dev check if an address has this role * // reverts */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 497, 612 ] }
7,100
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
has
function has(Role storage role, address addr) view internal returns (bool) { return role.bearer[addr]; }
/** * @dev check if an address has this role * @return bool */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 693, 826 ] }
7,101
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
checkRole
function checkRole(address addr, string roleName) view public { roles[roleName].check(addr); }
/** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of the role * // reverts */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 353, 471 ] }
7,102
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
hasRole
function hasRole(address addr, string roleName) view public returns (bool) { return roles[roleName].has(addr); }
/** * @dev determine if addr has role * @param addr address * @param roleName the name of the role * @return bool */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 614, 755 ] }
7,103
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
addRole
function addRole(address addr, string roleName) internal { roles[roleName].add(addr); emit RoleAdded(addr, roleName); }
/** * @dev add a role to an address * @param addr address * @param roleName the name of the role */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 877, 1020 ] }
7,104
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
removeRole
function removeRole(address addr, string roleName) internal { roles[roleName].remove(addr); emit RoleRemoved(addr, roleName); }
/** * @dev remove a role from an address * @param addr address * @param roleName the name of the role */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 1147, 1298 ] }
7,105
USDT
USDT.sol
0x2be88f8b93d164936b776c5c6766441d193f23f7
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
None
bzzr://eed33e140d17ff18d31f71d6727fdc7d960e9ce28843d8ba5e8c8a25acfff25d
{ "func_code_index": [ 89, 476 ] }
7,106