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
cDivvies
cDivvies.sol
0xac8bcc840cf9aad7d9087b9ddc99db1e5c3e52d6
Solidity
cDivvies
contract cDivvies { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyEnlightened () { require(myTokens() > 0); _; } // only people with profits modifier only...
// FORK OF P3D WITH THE FOLLOWING CHANGES
LineComment
purchaseTokens
function purchaseTokens(uint256 _incomingEthereum, address _referredBy) antiEarlyWhale(_incomingEthereum) internal returns(uint256) { // data setup address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(_incomingEthereum, dividendFee_); uint256 _referralBon...
/*========================================== = INTERNAL FUNCTIONS = ==========================================*/
Comment
v0.4.20+commit.3155dd80
None
bzzr://663cd0c549889fe92bce475a5fbe7948e49cfa5e8ad900772d52aff3f5d7f4c6
{ "func_code_index": [ 14542, 17395 ] }
5,507
cDivvies
cDivvies.sol
0xac8bcc840cf9aad7d9087b9ddc99db1e5c3e52d6
Solidity
cDivvies
contract cDivvies { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyEnlightened () { require(myTokens() > 0); _; } // only people with profits modifier only...
// FORK OF P3D WITH THE FOLLOWING CHANGES
LineComment
ethereumToTokens_
function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( // underflow attempts BTFO SafeMath.sub( (sqrt ( ...
/** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://663cd0c549889fe92bce475a5fbe7948e49cfa5e8ad900772d52aff3f5d7f4c6
{ "func_code_index": [ 17686, 18667 ] }
5,508
cDivvies
cDivvies.sol
0xac8bcc840cf9aad7d9087b9ddc99db1e5c3e52d6
Solidity
cDivvies
contract cDivvies { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyEnlightened () { require(myTokens() > 0); _; } // only people with profits modifier only...
// FORK OF P3D WITH THE FOLLOWING CHANGES
LineComment
tokensToEthereum_
function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( // underflow attempts BTFO SafeMath.sub( ( ( ...
/** * Calculate token sell value. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://663cd0c549889fe92bce475a5fbe7948e49cfa5e8ad900772d52aff3f5d7f4c6
{ "func_code_index": [ 18733, 19461 ] }
5,509
Flasher
contracts/interfaces/IVault.sol
0x7b28716a339e33b9d42f927196016458aca55947
Solidity
IVault
interface IVault { // Events // Log Users Deposit event Deposit(address indexed userAddrs, address indexed asset, uint256 amount); // Log Users withdraw event Withdraw(address indexed userAddrs, address indexed asset, uint256 amount); // Log Users borrow event Borrow(address indexed userAddrs, address in...
deposit
function deposit(uint256 _collateralAmount) external payable;
// Core Vault Functions
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 722, 785 ] }
5,510
Flasher
contracts/interfaces/IVault.sol
0x7b28716a339e33b9d42f927196016458aca55947
Solidity
IVault
interface IVault { // Events // Log Users Deposit event Deposit(address indexed userAddrs, address indexed asset, uint256 amount); // Log Users withdraw event Withdraw(address indexed userAddrs, address indexed asset, uint256 amount); // Log Users borrow event Borrow(address indexed userAddrs, address in...
activeProvider
function activeProvider() external view returns (address);
//Getter Functions
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 1241, 1301 ] }
5,511
Flasher
contracts/interfaces/IVault.sol
0x7b28716a339e33b9d42f927196016458aca55947
Solidity
IVault
interface IVault { // Events // Log Users Deposit event Deposit(address indexed userAddrs, address indexed asset, uint256 amount); // Log Users withdraw event Withdraw(address indexed userAddrs, address indexed asset, uint256 amount); // Log Users borrow event Borrow(address indexed userAddrs, address in...
setActiveProvider
function setActiveProvider(address _provider) external;
//Setter Functions
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 2042, 2099 ] }
5,512
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
TokenERC20
function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { //number of coins for creator of contract uint256 balanceOfSender = 30000000; //balance of creator of contract = balanceOfSender * decimals balanceOf[msg.sender] = balanceOfSender * 10 ** ui...
/** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 1321, 2505 ] }
5,513
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 2589, 3431 ] }
5,514
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 3637, 3749 ] }
5,515
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 4024, 4325 ] }
5,516
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 4589, 4765 ] }
5,517
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 5159, 5511 ] }
5,518
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough //balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply balanceOf[contractW...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 5681, 6134 ] }
5,519
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 6392, 7003 ] }
5,520
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
setCrowdSaleStatus
function setCrowdSaleStatus(bool status) public returns (bool success) { crowdSaleIsOver = status; return true; }
/* ending the crowdsale when the value xx ether or xx days is reached */
Comment
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 7098, 7239 ] }
5,521
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; //variables for crowd sale uint256 public unitsOneEt...
changeAmountPerEther
function changeAmountPerEther(uint256 newAmountPerEther) public returns (bool success) { unitsOneEthCanBuy = newAmountPerEther; return true; }
/* changing the price if needed */
Comment
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 7297, 7467 ] }
5,522
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
MyAdvancedToken
contract MyAdvancedToken is owned, TokenERC20 { //not used uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen);...
/******************************************/
NatSpecMultiLine
MyAdvancedToken
function MyAdvancedToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 414, 598 ] }
5,523
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
MyAdvancedToken
contract MyAdvancedToken is owned, TokenERC20 { //not used uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen);...
/******************************************/
NatSpecMultiLine
_transfer
function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balanc...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 1701, 2483 ] }
5,524
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
MyAdvancedToken
contract MyAdvancedToken is owned, TokenERC20 { //not used uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen);...
/******************************************/
NatSpecMultiLine
mintToken
function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); }
/// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 2675, 2933 ] }
5,525
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
MyAdvancedToken
contract MyAdvancedToken is owned, TokenERC20 { //not used uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen);...
/******************************************/
NatSpecMultiLine
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 3114, 3275 ] }
5,526
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
MyAdvancedToken
contract MyAdvancedToken is owned, TokenERC20 { //not used uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen);...
/******************************************/
NatSpecMultiLine
setPrices
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; }
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 3518, 3678 ] }
5,527
MyAdvancedToken
MyAdvancedToken.sol
0x1487f4195d9953f6930c959a683a49501a8cc8bc
Solidity
MyAdvancedToken
contract MyAdvancedToken is owned, TokenERC20 { //not used uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen);...
/******************************************/
NatSpecMultiLine
buy
function buy() payable public { require(!crowdSaleIsOver); uint amount = msg.value / buyPrice; // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers }
/// @notice Buy tokens from contract by sending ether
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://32f4c4a3c43f3e8963eb0cf68f14acbed59ba892d9ad313db59b5e540fabf1d5
{ "func_code_index": [ 3740, 3994 ] }
5,528
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
// produced by the Solididy File Flattener (c) David Appleton 2018 - 2020 and beyond // contact : calistralabs@gmail.com // source : https://github.com/DaveAppleton/SolidityFlattery // released under Apache 2.0 licence // input /Users/daveappleton/Documents/akombalabs/trait_allocator/distribution/sender721B/sender721...
LineComment
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 374, 455 ] }
5,529
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
balanceOf
function balanceOf(address owner) external view returns (uint256 balance);
/** * @dev Returns the number of tokens in ``owner``'s account. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 719, 798 ] }
5,530
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
ownerOf
function ownerOf(uint256 tokenId) external view returns (address owner);
/** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 944, 1021 ] }
5,531
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token mus...
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 1733, 1816 ] }
5,532
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
transferFrom
function transferFrom(address from, address to, uint256 tokenId) external;
/** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If th...
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 2342, 2421 ] }
5,533
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
approve
function approve(address to, uint256 tokenId) external;
/** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token...
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 2894, 2954 ] }
5,534
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
getApproved
function getApproved(uint256 tokenId) external view returns (address operator);
/** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 3108, 3192 ] }
5,535
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
setApprovalForAll
function setApprovalForAll(address operator, bool _approved) external;
/** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 3519, 3594 ] }
5,536
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
isApprovedForAll
function isApprovedForAll(address owner, address operator) external view returns (bool);
/** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 3745, 3838 ] }
5,537
sender721B
sender721B.sol
0xb931a842fc70a88ddaa0d2e072333348c71de68d
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {appro...
NatSpecMultiLine
v0.7.5+commit.eb77ed08
None
ipfs://02b246ed5abbfe6ca797b143de804f5b07069c81929c01b8ffc42bd6790eb068
{ "func_code_index": [ 4427, 4531 ] }
5,538
Treasury
contracts/utils/Epoch.sol
0x0f5ecb70896fd26e595e81dac3d881fbf8e0f7b3
Solidity
Epoch
contract Epoch is Operator { using SafeMath for uint256; uint256 private period; uint256 private startTime; uint256 private lastExecutedAt; /* ========== CONSTRUCTOR ========== */ constructor( uint256 _period, uint256 _startTime, uint256 _startEpoch ) ...
callable
function callable() public view returns (bool) { return getCurrentEpoch() >= getNextEpoch(); }
/* ========== VIEW FUNCTIONS ========== */
Comment
v0.6.12+commit.27d51765
MIT
ipfs://281dbf07430b63c8e244159e2db3312302f29665b6c6dbdbc87b58cdf8313df1
{ "func_code_index": [ 960, 1073 ] }
5,539
Treasury
contracts/utils/Epoch.sol
0x0f5ecb70896fd26e595e81dac3d881fbf8e0f7b3
Solidity
Epoch
contract Epoch is Operator { using SafeMath for uint256; uint256 private period; uint256 private startTime; uint256 private lastExecutedAt; /* ========== CONSTRUCTOR ========== */ constructor( uint256 _period, uint256 _startTime, uint256 _startEpoch ) ...
getLastEpoch
function getLastEpoch() public view returns (uint256) { return lastExecutedAt.sub(startTime).div(period); }
// epoch
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://281dbf07430b63c8e244159e2db3312302f29665b6c6dbdbc87b58cdf8313df1
{ "func_code_index": [ 1090, 1216 ] }
5,540
Treasury
contracts/utils/Epoch.sol
0x0f5ecb70896fd26e595e81dac3d881fbf8e0f7b3
Solidity
Epoch
contract Epoch is Operator { using SafeMath for uint256; uint256 private period; uint256 private startTime; uint256 private lastExecutedAt; /* ========== CONSTRUCTOR ========== */ constructor( uint256 _period, uint256 _startTime, uint256 _startEpoch ) ...
getPeriod
function getPeriod() public view returns (uint256) { return period; }
// params
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://281dbf07430b63c8e244159e2db3312302f29665b6c6dbdbc87b58cdf8313df1
{ "func_code_index": [ 1719, 1807 ] }
5,541
Treasury
contracts/utils/Epoch.sol
0x0f5ecb70896fd26e595e81dac3d881fbf8e0f7b3
Solidity
Epoch
contract Epoch is Operator { using SafeMath for uint256; uint256 private period; uint256 private startTime; uint256 private lastExecutedAt; /* ========== CONSTRUCTOR ========== */ constructor( uint256 _period, uint256 _startTime, uint256 _startEpoch ) ...
setPeriod
function setPeriod(uint256 _period) external onlyOperator { period = _period; }
/* ========== GOVERNANCE ========== */
Comment
v0.6.12+commit.27d51765
MIT
ipfs://281dbf07430b63c8e244159e2db3312302f29665b6c6dbdbc87b58cdf8313df1
{ "func_code_index": [ 1953, 2051 ] }
5,542
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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://git...
/** * @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 ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 89, 483 ] }
5,543
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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://git...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 _a, uint256 _b) internal pure returns (uint256) { // assert(_b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return _a / _b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 567, 858 ] }
5,544
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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://git...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { assert(_b <= _a); return _a - _b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 972, 1094 ] }
5,545
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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://git...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) { c = _a + _b; assert(c >= _a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1158, 1293 ] }
5,546
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 815, 932 ] }
5,547
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1097, 1205 ] }
5,548
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1343, 1521 ] }
5,549
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @...
/** * @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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 217, 305 ] }
5,550
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_value <= balances[msg.sender]); require(_to != address(0)); 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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 463, 795 ] }
5,551
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @...
/** * @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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1001, 1105 ] }
5,552
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * 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(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(_to != address(0)); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_v...
/** * @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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 401, 891 ] }
5,553
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * 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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1517, 1712 ] }
5,554
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * 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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 2036, 2201 ] }
5,555
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * 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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 2661, 2971 ] }
5,556
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * 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.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 3436, 3886 ] }
5,557
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
UnlimitedAllowanceToken
contract UnlimitedAllowanceToken is StandardToken { uint internal constant MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance, and to add revert reasons. /// @param _from Address to transfer from. /// @param _to A...
transferFrom
function transferFrom( address _from, address _to, uint256 _value) public returns (bool) { uint allowance = allowed[_from][msg.sender]; require(_value <= balances[_from], "insufficient balance"); require(_value <= allowance, "insufficient allowance"); require(_to != address...
/// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance, and to add revert reasons. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 425, 1117 ] }
5,558
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
UnlimitedAllowanceToken
contract UnlimitedAllowanceToken is StandardToken { uint internal constant MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance, and to add revert reasons. /// @param _from Address to transfer from. /// @param _to A...
transfer
function transfer( address _to, uint256 _value) public returns (bool) { require(_value <= balances[msg.sender], "insufficient balance"); require(_to != address(0), "token burn not allowed"); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to...
/// @dev Transfer token for a specified address, modified to add revert reasons. /// @param _to The address to transfer to. /// @param _value The amount to be transferred.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1307, 1760 ] }
5,559
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
transferFrom
function transferFrom( address _from, address _to, uint256 _value) public returns (bool) { if (lockingFinished || minters[msg.sender]) { return super.transferFrom( _from, _to, _value ); } revert("this token is locked for...
/// @dev ERC20 transferFrom function /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 997, 1398 ] }
5,560
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
transfer
function transfer( address _to, uint256 _value) public returns (bool) { if (lockingFinished || minters[msg.sender]) { return super.transfer( _to, _value ); } revert("this token is locked for transfers"); }
/// @dev ERC20 transfer function /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 1564, 1912 ] }
5,561
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
minterTransferFrom
function minterTransferFrom( address _spender, address _from, address _to, uint256 _value) public hasMintPermission canMint returns (bool) { require(canTransfer( _spender, _from, _value), "canTransfer is false"); require(_to != add...
/// @dev Allows minter to initiate a transfer on behalf of another spender /// @param _spender Minter with permission to spend. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 2226, 2992 ] }
5,562
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
mint
function mint( address _to, uint256 _amount) public hasMintPermission canMint returns (bool) { require(_to != address(0), "token burn not allowed"); totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit...
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 3240, 3678 ] }
5,563
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
finishMinting
function finishMinting() public onlyOwner canMint returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 3800, 4008 ] }
5,564
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
finishLocking
function finishLocking() public onlyOwner isLocked returns (bool) { lockingFinished = true; emit LockingFinished(); return true; }
/** * @dev Function to stop locking token. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 4125, 4337 ] }
5,565
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
addMinter
function addMinter( address _minter) public onlyOwner canMint returns (bool) { minters[_minter] = true; return true; }
/** * @dev Function to add minter address. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 4454, 4654 ] }
5,566
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
removeMinter
function removeMinter( address _minter) public onlyOwner canMint returns (bool) { minters[_minter] = false; return true; }
/** * @dev Function to remove minter address. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 4774, 4978 ] }
5,567
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxToken
contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; ...
canTransfer
function canTransfer( address _spender, address _from, uint256 _value) public view returns (bool) { return ( balances[_from] >= _value && (_spender == _from || allowed[_from][_spender] >= _value) ); }
/** * @dev Function to check balance and allowance for a spender. * @return True transfer will succeed based on balance and allowance. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 5139, 5453 ] }
5,568
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxTokenSale
contract BZRxTokenSale is Ownable { using SafeMath for uint256; struct TokenPurchases { uint totalETH; uint totalTokens; uint totalTokenBonus; } event BonusChanged(uint oldBonus, uint newBonus); event TokenPurchase(address indexed buyer, uint ethAmount, uint ethRa...
transferFrom
function transferFrom( address _from, address _to, uint256 _value) public saleOpen returns (bool) { require(msg.sender == bZxVaultAddress, "only the bZx vault can call this function"); if (BZRxToken(bZRxTokenContractAddress).canTransfer(msg.sender, _from, _value)) { ...
// conforms to ERC20 transferFrom function for BZRX token support
LineComment
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 3048, 4722 ] }
5,569
BZRxTokenSale
BZRxTokenSale.sol
0xe23d55af1646a65c1504f69e3d485c1d6da68e94
Solidity
BZRxTokenSale
contract BZRxTokenSale is Ownable { using SafeMath for uint256; struct TokenPurchases { uint totalETH; uint totalTokens; uint totalTokenBonus; } event BonusChanged(uint oldBonus, uint newBonus); event TokenPurchase(address indexed buyer, uint ethAmount, uint ethRa...
closeSale
function closeSale( bool _closed) public onlyOwner returns (bool) { saleClosed = _closed; if (_closed) emit SaleClosed(bonusMultiplier); else emit SaleOpened(bonusMultiplier); return true; }
/** * @dev Function to close the token sale for this contract. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://81e863bc536f152199388d9a50c4a5ab409772f31c6bacac42e240539058ca1c
{ "func_code_index": [ 4859, 5169 ] }
5,570
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_add
function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; retur...
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 908, 1327 ] }
5,571
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_remove
function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element f...
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1498, 3047 ] }
5,572
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_contains
function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3128, 3262 ] }
5,573
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_length
function _length(Set storage set) private view returns (uint256) { return set._values.length; }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3343, 3457 ] }
5,574
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_at
function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3796, 4005 ] }
5,575
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4254, 4384 ] }
5,576
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4555, 4691 ] }
5,577
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4772, 4917 ] }
5,578
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4998, 5120 ] }
5,579
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5459, 5595 ] }
5,580
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5844, 5992 ] }
5,581
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 6163, 6317 ] }
5,582
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 6398, 6561 ] }
5,583
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 6642, 6764 ] }
5,584
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 7103, 7257 ] }
5,585
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 7502, 7638 ] }
5,586
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 7809, 7951 ] }
5,587
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
contains
function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 8032, 8183 ] }
5,588
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
length
function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 8264, 8383 ] }
5,589
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
at
function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 8722, 8864 ] }
5,590
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 606, 1033 ] }
5,591
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1963, 2365 ] }
5,592
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3121, 3299 ] }
5,593
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3524, 3724 ] }
5,594
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4094, 4325 ] }
5,595
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disa...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4576, 5111 ] }
5,596
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5291, 5495 ] }
5,597
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.stat...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5682, 6109 ] }
5,598
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
hasRole
function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); }
/** * @dev Returns `true` if `account` has been granted `role`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1546, 1690 ] }
5,599
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
getRoleMemberCount
function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); }
/** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 1859, 1991 ] }
5,600
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
getRoleMember
function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); }
/** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2585, 2728 ] }
5,601
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
getRoleAdmin
function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; }
/** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 2912, 3031 ] }
5,602
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
grantRole
function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); }
/** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3288, 3520 ] }
5,603
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
revokeRole
function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); }
/** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 3760, 3995 ] }
5,604
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
renounceRole
function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); }
/** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 4497, 4711 ] }
5,605
WePiggyToken
WePiggyToken.sol
0x6f620ec89b8479e97a6985792d0c64f237566746
Solidity
AccessControl
abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant D...
/** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` ...
NatSpecMultiLine
_setupRole
function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); }
/** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor w...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://03b5fe482b4fd33bb915ff9387a37ce6a21f05bab18b03c75e91cf149b1e3aef
{ "func_code_index": [ 5289, 5406 ] }
5,606