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
LasersToken
LasersToken.sol
0x8b0517376331939e7d9b8cb62cdd5f768b25cf3a
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
pairFor
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address(uint(keccak256(abi.encodePacked( hex'ff', factory, keccak256(abi.encodePacked(token0, to...
// calculates the CREATE2 address for a pair without making any external calls
LineComment
v0.6.6+commit.6c089d02
MIT
ipfs://68261cfa6d5bc3b38ec7c58ead76491ad4eaa2ce947fce936de4f3118113d970
{ "func_code_index": [ 602, 1085 ] }
4,600
MfersNotSartoshi
@openzeppelin/contracts/proxy/Proxy.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { ...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * ...
NatSpecMultiLine
_delegate
function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, ...
/** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 228, 1151 ] }
4,601
MfersNotSartoshi
@openzeppelin/contracts/proxy/Proxy.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { ...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * ...
NatSpecMultiLine
_implementation
function _implementation() internal view virtual returns (address);
/** * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function * and {_fallback} should delegate. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 1335, 1407 ] }
4,602
MfersNotSartoshi
@openzeppelin/contracts/proxy/Proxy.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { ...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * ...
NatSpecMultiLine
_fallback
function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); }
/** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internall call site, it will return directly to the external caller. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 1638, 1756 ] }
4,603
MfersNotSartoshi
@openzeppelin/contracts/proxy/Proxy.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { ...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * ...
NatSpecMultiLine
/** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 1954, 2025 ] }
4,604
MfersNotSartoshi
@openzeppelin/contracts/proxy/Proxy.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { ...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * ...
NatSpecMultiLine
/** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 2186, 2256 ] }
4,605
MfersNotSartoshi
@openzeppelin/contracts/proxy/Proxy.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { ...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * ...
NatSpecMultiLine
_beforeFallback
function _beforeFallback() internal virtual {}
/** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overriden should call `super._beforeFallback()`. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 2540, 2591 ] }
4,606
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 60, 124 ] }
4,607
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 232, 309 ] }
4,608
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 546, 623 ] }
4,609
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 946, 1042 ] }
4,610
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 1326, 1407 ] }
4,611
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 1615, 1712 ] }
4,612
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Lima
contract Lima is StandardToken { // CHANGE THIS. Update the contract name. /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functional...
Lima
function Lima() { balances[msg.sender] = 7000000000000000000000000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000. (CHANGE THIS) totalSupply = 7000000000000000000000000000; ...
// Where should the raised ETH go? // This is a constructor function // which means the following function name has to match the contract name declared above
LineComment
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 1188, 2205 ] }
4,613
Lima
Lima.sol
0xbf70ef6279dafb7db5166ea17fc14ce28e670402
Solidity
Lima
contract Lima is StandardToken { // CHANGE THIS. Update the contract name. /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functional...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.24+commit.e67f0147
bzzr://8b116e959747243557d6c4774a0be5b278452e98a9830de5de850f247458592d
{ "func_code_index": [ 2806, 3611 ] }
4,614
MfersNotSartoshi
contracts/MfersNotSartoshi.sol
0x3aa7d1a1ac7de7127f528a30434622273c2642ea
Solidity
ERC721ContractWrapper
contract ERC721ContractWrapper is Proxy { address internal constant _IMPLEMENTATION_ADDRESS = 0x0AaD9cf1D64301D6a37B1368f073E99DED6BECa5; bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; constructor( string memory _name, ...
implementation
function implementation() public view returns (address) { return _implementation();
/** * @dev Returns the current implementation address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://59c49321fb689c673cf2c0435d18347f4cd7a3c3128557152e40bae49e25d268
{ "func_code_index": [ 865, 970 ] }
4,615
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /*...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 95, 155 ] }
4,616
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /*...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 238, 311 ] }
4,617
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /*...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 535, 617 ] }
4,618
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /*...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 896, 984 ] }
4,619
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /*...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 1648, 1727 ] }
4,620
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /*...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 2040, 2142 ] }
4,621
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 259, 445 ] }
4,622
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 723, 864 ] }
4,623
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 1162, 1359 ] }
4,624
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 1613, 2089 ] }
4,625
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 2560, 2697 ] }
4,626
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 3188, 3471 ] }
4,627
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 3931, 4066 ] }
4,628
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 4546, 4717 ] }
4,629
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 606, 1230 ] }
4,630
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
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://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 2160, 2562 ] }
4,631
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
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://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 3318, 3496 ] }
4,632
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
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://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 3721, 3922 ] }
4,633
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
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://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 4292, 4523 ] }
4,634
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
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"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @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://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 4774, 5095 ] }
4,635
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 497, 581 ] }
4,636
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 1139, 1292 ] }
4,637
FatShiba
FatShiba.sol
0x6fa04bdd3daf9979a2afc7036ac473528bdefa6a
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://0d51cfaa38e219663e3773b78a9b2081d74d7830902e094203593b81b47eff56
{ "func_code_index": [ 1442, 1691 ] }
4,638
ERC1155PaymentSplitterUAEUpgradeable
@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
IERC1155MetadataURIUpgradeable
interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (strin...
/** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */
NatSpecMultiLine
uri
function uri(uint256 id) external view returns (string memory);
/** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 263, 330 ] }
4,639
ERC1155PaymentSplitterUAEUpgradeable
@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
ERC1155PausableUpgradeable
abstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable { function __ERC1155Pausable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __Pausable_init_unchained(); __ERC1155Pausable_init_unchained(); ...
/** * @dev ERC1155 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * _Available since v3.1._ */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); require(!paused(), "ERC1155Pausable: token trans...
/** * @dev See {ERC1155-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 543, 928 ] }
4,640
Operator
Operator.sol
0xea9988207b63232a46f50019f6cd28dd65a5c40e
Solidity
Operator
contract Operator is DSNote, Auth { TrancheLike_3 public tranche; RestrictedTokenLike public token; constructor(address tranche_) public { wards[msg.sender] = 1; tranche = TrancheLike_3(tranche_); } /// sets the dependency to another contract function depend(bytes32 contractNam...
depend
function depend(bytes32 contractName, address addr) public auth { if (contractName == "tranche") { tranche = TrancheLike_3(addr); } else if (contractName == "token") { token = RestrictedTokenLike(addr); } else revert(); }
/// sets the dependency to another contract
NatSpecSingleLine
v0.5.15+commit.6a57276f
{ "func_code_index": [ 281, 534 ] }
4,641
Operator
Operator.sol
0xea9988207b63232a46f50019f6cd28dd65a5c40e
Solidity
Operator
contract Operator is DSNote, Auth { TrancheLike_3 public tranche; RestrictedTokenLike public token; constructor(address tranche_) public { wards[msg.sender] = 1; tranche = TrancheLike_3(tranche_); } /// sets the dependency to another contract function depend(bytes32 contractNam...
supplyOrder
function supplyOrder(uint amount) public note { require((token.hasMember(msg.sender) == true), "user-not-allowed-to-hold-token"); tranche.supplyOrder(msg.sender, amount); }
/// only investors that are on the memberlist can submit supplyOrders
NatSpecSingleLine
v0.5.15+commit.6a57276f
{ "func_code_index": [ 610, 806 ] }
4,642
Operator
Operator.sol
0xea9988207b63232a46f50019f6cd28dd65a5c40e
Solidity
Operator
contract Operator is DSNote, Auth { TrancheLike_3 public tranche; RestrictedTokenLike public token; constructor(address tranche_) public { wards[msg.sender] = 1; tranche = TrancheLike_3(tranche_); } /// sets the dependency to another contract function depend(bytes32 contractNam...
redeemOrder
function redeemOrder(uint amount) public note { require((token.hasMember(msg.sender) == true), "user-not-allowed-to-hold-token"); token.hasMember(msg.sender); tranche.redeemOrder(msg.sender, amount); }
/// only investors that are on the memberlist can submit redeemOrders
NatSpecSingleLine
v0.5.15+commit.6a57276f
{ "func_code_index": [ 882, 1115 ] }
4,643
Operator
Operator.sol
0xea9988207b63232a46f50019f6cd28dd65a5c40e
Solidity
Operator
contract Operator is DSNote, Auth { TrancheLike_3 public tranche; RestrictedTokenLike public token; constructor(address tranche_) public { wards[msg.sender] = 1; tranche = TrancheLike_3(tranche_); } /// sets the dependency to another contract function depend(bytes32 contractNam...
disburse
function disburse() external returns(uint payoutCurrencyAmount, uint payoutTokenAmount, uint remainingSupplyCurrency, uint remainingRedeemToken) { require((token.hasMember(msg.sender) == true), "user-not-allowed-to-hold-token"); return tranche.disburse(msg.sender); }
/// only investors that are on the memberlist can disburse
NatSpecSingleLine
v0.5.15+commit.6a57276f
{ "func_code_index": [ 1180, 1484 ] }
4,644
Operator
Operator.sol
0xea9988207b63232a46f50019f6cd28dd65a5c40e
Solidity
Operator
contract Operator is DSNote, Auth { TrancheLike_3 public tranche; RestrictedTokenLike public token; constructor(address tranche_) public { wards[msg.sender] = 1; tranche = TrancheLike_3(tranche_); } /// sets the dependency to another contract function depend(bytes32 contractNam...
supplyOrderWithDaiPermit
function supplyOrderWithDaiPermit(uint amount, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { DaiPermitLike(tranche.currency()).permit(msg.sender, address(tranche), nonce, expiry, true, v, r, s); supplyOrder(amount); }
// --- Permit Support ---
LineComment
v0.5.15+commit.6a57276f
{ "func_code_index": [ 1845, 2105 ] }
4,645
ERC1155PaymentSplitterUAEUpgradeable
@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
ERC1155SupplyUpgradeable
abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Supply_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155Supply_init_unchained(); } function __ERC1155Supply_init_unchained() internal init...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not...
NatSpecMultiLine
totalSupply
function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; }
/** * @dev Total amount of tokens in with a given id. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 462, 577 ] }
4,646
ERC1155PaymentSplitterUAEUpgradeable
@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
ERC1155SupplyUpgradeable
abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Supply_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155Supply_init_unchained(); } function __ERC1155Supply_init_unchained() internal init...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not...
NatSpecMultiLine
exists
function exists(uint256 id) public view virtual returns (bool) { return ERC1155SupplyUpgradeable.totalSupply(id) > 0; }
/** * @dev Indicates weither any token exist with a given id, or not. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 666, 801 ] }
4,647
ERC1155PaymentSplitterUAEUpgradeable
@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
ERC1155SupplyUpgradeable
abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Supply_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155Supply_init_unchained(); } function __ERC1155Supply_init_unchained() internal init...
/** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i...
/** * @dev See {ERC1155-_beforeTokenTransfer}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 867, 1505 ] }
4,648
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 94, 154 ] }
4,649
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 237, 310 ] }
4,650
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 534, 616 ] }
4,651
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 895, 983 ] }
4,652
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1647, 1726 ] }
4,653
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 2039, 2175 ] }
4,654
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 100, 159 ] }
4,655
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 226, 287 ] }
4,656
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 363, 418 ] }
4,657
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 811, 916 ] }
4,658
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1030, 1139 ] }
4,659
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
decimals
function decimals() public view virtual override returns (uint8) { return 18; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1773, 1871 ] }
4,660
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1931, 2044 ] }
4,661
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 2102, 2234 ] }
4,662
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 2442, 2622 ] }
4,663
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 2680, 2836 ] }
4,664
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 2978, 3152 ] }
4,665
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true;...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 3629, 3989 ] }
4,666
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 4393, 4616 ] }
4,667
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 5114, 5388 ] }
4,668
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
_transfer
function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); ...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 5873, 6451 ] }
4,669
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 6733, 7116 ] }
4,670
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 7444, 7867 ] }
4,671
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
_approve
function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(own...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 8300, 8685 ] }
4,672
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /**...
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 9283, 9413 ] }
4,673
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 259, 445 ] }
4,674
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 723, 864 ] }
4,675
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1162, 1359 ] }
4,676
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1613, 2089 ] }
4,677
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 2560, 2697 ] }
4,678
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 3188, 3471 ] }
4,679
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 3931, 4066 ] }
4,680
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 4546, 4717 ] }
4,681
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender();...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 492, 576 ] }
4,682
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender();...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1134, 1287 ] }
4,683
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender();...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1437, 1686 ] }
4,684
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 ...
mul
function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; }
/** * @dev Multiplies two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 234, 542 ] }
4,685
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 ...
div
function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; }
/** * @dev Division of two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 632, 896 ] }
4,686
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 ...
sub
function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; }
/** * @dev Subtracts two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 984, 1165 ] }
4,687
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 ...
add
function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; }
/** * @dev Adds two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1248, 1429 ] }
4,688
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 ...
abs
function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; }
/** * @dev Converts to absolute value, and fails on overflow. (easter egg from the genius dev @nomessages9.) */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 1561, 1695 ] }
4,689
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
enableTrading
function enableTrading() external onlyOwner { tradingActive = true; swapEnabled = true; }
// once enabled, can never be turned off
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 5819, 5936 ] }
4,690
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
removeLimits
function removeLimits() external onlyOwner returns (bool){ limitsInEffect = false; gasLimitActive = false; transferDelayEnabled = false; return true; }
// remove limits after token is stable
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 5987, 6184 ] }
4,691
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
disableTransferDelay
function disableTransferDelay() external onlyOwner returns (bool){ transferDelayEnabled = false; return true; }
// disable Transfer delay - cannot be reenabled
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 6244, 6383 ] }
4,692
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
updateSwapTokensAtAmount
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){ require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply."); require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply."); swapToken...
// change the minimum amount of tokens to sell from fees
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 7449, 7835 ] }
4,693
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
updateSwapEnabled
function updateSwapEnabled(bool enabled) external onlyOwner(){ swapEnabled = enabled; }
// only use to disable contract sales if absolutely necessary (emergency use only)
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 8329, 8435 ] }
4,694
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
forceSwapBack
function forceSwapBack() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); require(contractBalance >= totalSupply() / 100, "Can only swap back if more than 1% of tokens stuck on contract"); swapBack(); emit OwnerForcedSwapBack(block.timestamp); }
// force Swap back if slippage above 49% for launch.
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 20042, 20357 ] }
4,695
LegendDAO
LegendDAO.sol
0xa9eb615dfbe56cd96a7e69f1e2a29cf1b28f4651
Solidity
LegendDAO
contract LegendDAO is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address p...
buyBackTokens
function buyBackTokens(uint256 ethAmountInWei) external onlyOwner { // generate the uniswap pair path of weth -> eth address[] memory path = new address[](2); path[0] = uniswapV2Router.WETH(); path[1] = address(this); // make the swap uniswapV2Router.swapExactETHForTokensSupportingFeeOnT...
// useful for buybacks or to reclaim any ETH on the contract in a way that helps holders.
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://b6aff3a79b15c648ac6e8552695855331ebc9455e57bdec192510544b85dee92
{ "func_code_index": [ 20459, 21039 ] }
4,696
Phouns
contracts/Phouns.sol
0xeef77d7f89090667f5618acc194d66d2cba42c76
Solidity
Phouns
contract Phouns is ERC721, Ownable, PaymentSplitter { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; bool public openMint = false; bool private initialized = false; uint256 public tokenPrice = .02 ether; uint256 public constant maxTok...
/** * @title Phouns contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setBaseURI
function setBaseURI(string memory _baseURI) external onlyOwner { _setBaseURI(_baseURI); }
//Set Base URI
LineComment
v0.7.0+commit.9e61f92b
GNU GPLv3
ipfs://7d94ba24cbd81b2f8290c3dc3474981dfe98e3fdc0ff579da54428873c88105f
{ "func_code_index": [ 649, 757 ] }
4,697
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
AddressSet
library AddressSet { struct Set { mapping(address => uint) keyPointers; address[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
insert
function insert(Set storage self, address key) internal { require(!exists(self, key), "AddressSet: key already exists in the set."); self.keyPointers[key] = self.keyList.length; self.keyList.push(key); }
/** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 313, 553 ] }
4,698
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
AddressSet
library AddressSet { struct Set { mapping(address => uint) keyPointers; address[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
remove
function remove(Set storage self, address key) internal { require(exists(self, key), "AddressSet: key does not exist in the set."); uint last = count(self) - 1; uint rowToReplace = self.keyPointers[key]; if(rowToReplace != last) { address keyToMove = self.keyList[last]; self.keyPoi...
/** * @notice remove a key. * @dev key to remove must exist. * @param self storage pointer to a Set. * @param key value to remove. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 730, 1248 ] }
4,699