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
AddressMapper
contracts/mapping/AddressMapper.sol
0x8141304775e86471ee16a17e5b3bae6456019b03
Solidity
AddressMapper
contract AddressMapper { // @notice Contract that defines access controls for the CUDO ecosystem CudosAccessControls public accessControls; // @notice defines whether a user can set their mapping bool public userActionsPaused; // @notice defines mapping between ETH address and CUDO address ma...
setAddress
function setAddress(string memory _cudoAddress) external onlyUnpaused { cudosAddress[msg.sender] = _cudoAddress; emit AddressMapped(msg.sender, _cudoAddress); }
// Set mapping between ETH address and CUDOS address
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 757, 942 ] }
3,400
AddressMapper
contracts/mapping/AddressMapper.sol
0x8141304775e86471ee16a17e5b3bae6456019b03
Solidity
AddressMapper
contract AddressMapper { // @notice Contract that defines access controls for the CUDO ecosystem CudosAccessControls public accessControls; // @notice defines whether a user can set their mapping bool public userActionsPaused; // @notice defines mapping between ETH address and CUDO address ma...
updateUserActionsPaused
function updateUserActionsPaused(bool _isPaused) external { require(accessControls.hasAdminRole(msg.sender), "Only admin"); userActionsPaused = _isPaused; emit UserActionsPausedToggled(_isPaused); }
// ***** // Admin // *****
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 984, 1216 ] }
3,401
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 96, 303 ] }
3,402
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 400, 700 ] }
3,403
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 827, 955 ] }
3,404
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 1032, 1178 ] }
3,405
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender account. **/ constructor() public { owner = msg.sender; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". **/
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 665, 856 ] }
3,406
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence **/ function totalSupply() public view returns (uint256) { return totalSupply_; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. **/
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 214, 310 ] }
3,407
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence **/ function totalSupply() public view returns (uint256) { return totalSupply_; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. **/
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); ...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 487, 855 ] }
3,408
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence **/ function totalSupply() public view returns (uint256) { return totalSupply_; } ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. **/
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 1080, 1192 ] }
3,409
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to tr...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value)...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 410, 917 ] }
3,410
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to tr...
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 1574, 1785 ] }
3,411
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to tr...
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 2126, 2265 ] }
3,412
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to tr...
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 2756, 3041 ] }
3,413
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to tr...
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 3537, 3992 ] }
3,414
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
CrowdsaleToken
contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ construc...
/** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/
NatSpecMultiLine
function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); uint256 weiAmount = msg.value; // Calculate tokens to sell uint256 tokens = weiAmount.mul(basePrice).div(1 ether); uint256 returnWei = 0; ...
/** * @dev fallback function to send ether to for Crowd sale **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 678, 1851 ] }
3,415
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
CrowdsaleToken
contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ construc...
/** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/
NatSpecMultiLine
startIco
function startIco() public onlyOwner { require(currentStage != Stages.icoEnd); currentStage = Stages.icoStart; }
/** * @dev startIco starts the public ICO **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 1911, 2051 ] }
3,416
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
CrowdsaleToken
contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ construc...
/** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/
NatSpecMultiLine
endIco
function endIco() internal { currentStage = Stages.icoEnd; // Transfer any remaining tokens if(remainingTokens > 0) balances[owner] = balances[owner].add(remainingTokens); // transfer any remaining ETH balance in the contract to the owner owner.transfer(address(this).balance); }
/** * @dev endIco closes down the ICO **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 2108, 2456 ] }
3,417
XPlusToken
XPlusToken.sol
0x941a0dded012adc9359cca55240b8e0b0ebbbcad
Solidity
CrowdsaleToken
contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ construc...
/** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/
NatSpecMultiLine
finalizeIco
function finalizeIco() public onlyOwner { require(currentStage != Stages.icoEnd); endIco(); }
/** * @dev finalizeIco closes down the ICO and sets needed varriables **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://1aa777e45ce48f7384d03bfe377a9c93c455ed24860896a5fb6faeec7218ae9f
{ "func_code_index": [ 2544, 2665 ] }
3,418
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See:...
/**xxp 校验防止溢出情况 * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 89, 518 ] }
3,419
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See:...
/**xxp 校验防止溢出情况 * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 602, 902 ] }
3,420
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See:...
/**xxp 校验防止溢出情况 * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1016, 1144 ] }
3,421
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See:...
/**xxp 校验防止溢出情况 * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1208, 1354 ] }
3,422
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to th...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 851, 980 ] }
3,423
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to th...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1145, 1261 ] }
3,424
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to th...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1399, 1593 ] }
3,425
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 216, 312 ] }
3,426
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_value <= balances[msg.sender]); require(_to != address(0)); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return t...
/** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 480, 840 ] }
3,427
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1056, 1168 ] }
3,428
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(_to != address(0)); balances[_from] = balances[_from].sub(_value); balances[_to] = ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1532, 2082 ] }
3,429
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 2718, 2929 ] }
3,430
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 3260, 3456 ] }
3,431
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender T...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 3926, 4274 ] }
3,432
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
StandardToken
contract StandardToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue >= oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValu...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender T...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 4749, 5259 ] }
3,433
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
BurnableToken
contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } funct...
/** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */
NatSpecMultiLine
burn
function burn(uint256 _value) public { _burn(msg.sender, _value); }
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 222, 308 ] }
3,434
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.s...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint( address _to, uint256 _amount ) hasMintPermission canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; }...
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 604, 985 ] }
3,435
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.s...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 1107, 1270 ] }
3,436
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Controlled
contract Controlled is Ownable{ constructor() public { setExclude(msg.sender); } // Flag that determines if the token is transferable or not. bool public transferEnabled = false; // flag that makes locked address effect bool public plockFlag=true; mapping(address => boo...
enableTransfer
function enableTransfer(bool _enable) public onlyOwner{ transferEnabled = _enable; }
// 控制全局全局锁
LineComment
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 389, 492 ] }
3,437
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Controlled
contract Controlled is Ownable{ constructor() public { setExclude(msg.sender); } // Flag that determines if the token is transferable or not. bool public transferEnabled = false; // flag that makes locked address effect bool public plockFlag=true; mapping(address => boo...
enableLockFlag
function enableLockFlag(bool _enable) public onlyOwner returns (bool success){ plockFlag = _enable; return true; }
// 控制个人锁功能
LineComment
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 511, 653 ] }
3,438
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Fitcoin
contract Fitcoin is BurnableToken, MintableToken, PausableToken { // Public variables of the token string public name; string public symbol; // decimals is the strongly suggested default, avoid changing it uint8 public decimals; constructor() public { name = "Fitcoin"; ...
/* * @title Fitcoin */
Comment
withdrawEther
function withdrawEther() onlyOwner public { address addr = this; owner.transfer(addr.balance); }
// transfer balance to owner
LineComment
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 565, 689 ] }
3,439
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Fitcoin
contract Fitcoin is BurnableToken, MintableToken, PausableToken { // Public variables of the token string public name; string public symbol; // decimals is the strongly suggested default, avoid changing it uint8 public decimals; constructor() public { name = "Fitcoin"; ...
/* * @title Fitcoin */
Comment
function() payable public { }
// can accept ether
LineComment
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 717, 751 ] }
3,440
Fitcoin
Fitcoin.sol
0x32739415398b642c8c0e0b76c509a10e065ead81
Solidity
Fitcoin
contract Fitcoin is BurnableToken, MintableToken, PausableToken { // Public variables of the token string public name; string public symbol; // decimals is the strongly suggested default, avoid changing it uint8 public decimals; constructor() public { name = "Fitcoin"; ...
/* * @title Fitcoin */
Comment
allocateTokens
function allocateTokens(address[] _owners, uint256[] _values) public onlyOwner { require(_owners.length == _values.length, "data length mismatch"); address from = msg.sender; for(uint256 i = 0; i < _owners.length ; i++){ address to = _owners[i]; uint256 value = _values[i]; ...
// Allocate tokens to the users // @param _owners The owners list of the token // @param _values The value list of the token
LineComment
v0.4.24+commit.e67f0147
bzzr://6cc1a2b0ccde428396cd672dc08baecce6020acffa038460ba83ec5061648743
{ "func_code_index": [ 894, 1451 ] }
3,441
Token
contracts/interfaces/IToken.sol
0x8ebfe1e17ea41f8b737e4f7670885b2278b1cc32
Solidity
IToken
interface IToken is IERC20 { struct Distribution { address recipient; uint256 amount; } error NonZeroTotalSupply(uint256 totalSupply); /** * @notice Mints tokens according to `distributions` array, only one distribution is possible * * @param distributions Array of the D...
distribute
function distribute(Distribution[] calldata distributions) external;
/** * @notice Mints tokens according to `distributions` array, only one distribution is possible * * @param distributions Array of the Distribution structs, * which describe recipients and the corresponding amounts * * Requirements: * * - `_msgSender()` should be an owner * - `totalSupply()` should be equal to...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 539, 611 ] }
3,442
Token
contracts/Token.sol
0x8ebfe1e17ea41f8b737e4f7670885b2278b1cc32
Solidity
Token
contract Token is Ownable, ERC20VotesComp, IToken { // Token name string internal constant NAME = "Chadverse Token"; // Token symbol string internal constant SYMBOL = "ROIDZ"; /// @notice Token initialization constructor() ERC20(NAME, SYMBOL) ERC20Permit(NAME) { //solhint-disable-previ...
distribute
function distribute(Distribution[] calldata distributions) external override onlyOwner { if (totalSupply() != uint256(0)) revert NonZeroTotalSupply(totalSupply()); for (uint256 i = 0; i < distributions.length; i++) { _mint(distributions[i].recipient, distributions[i].amount); } }
/// @inheritdoc IToken
NatSpecSingleLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 379, 704 ] }
3,443
AdminUpgradeabilityProxy
Ownable.sol
0xa89412ce8706735bb694f4a6de714a0a42e8a1e2
Solidity
Ownable
abstract 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...
/** * @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 virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://46d2e76e4f2da32f9295a400f439f9ec11acaee0cbc86f5feac4d8a16ca55dd3
{ "func_code_index": [ 510, 599 ] }
3,444
AdminUpgradeabilityProxy
Ownable.sol
0xa89412ce8706735bb694f4a6de714a0a42e8a1e2
Solidity
Ownable
abstract 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...
/** * @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.7.6+commit.7338295f
MIT
ipfs://46d2e76e4f2da32f9295a400f439f9ec11acaee0cbc86f5feac4d8a16ca55dd3
{ "func_code_index": [ 1142, 1291 ] }
3,445
AdminUpgradeabilityProxy
Ownable.sol
0xa89412ce8706735bb694f4a6de714a0a42e8a1e2
Solidity
Ownable
abstract 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...
/** * @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.7.6+commit.7338295f
MIT
ipfs://46d2e76e4f2da32f9295a400f439f9ec11acaee0cbc86f5feac4d8a16ca55dd3
{ "func_code_index": [ 1436, 1714 ] }
3,446
Token
@openzeppelin/contracts/utils/math/Math.sol
0x8ebfe1e17ea41f8b737e4f7670885b2278b1cc32
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
max
function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; }
/** * @dev Returns the largest of two numbers. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 79, 188 ] }
3,447
Token
@openzeppelin/contracts/utils/math/Math.sol
0x8ebfe1e17ea41f8b737e4f7670885b2278b1cc32
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
min
function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; }
/** * @dev Returns the smallest of two numbers. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 255, 363 ] }
3,448
Token
@openzeppelin/contracts/utils/math/Math.sol
0x8ebfe1e17ea41f8b737e4f7670885b2278b1cc32
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
average
function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; }
/** * @dev Returns the average of two numbers. The result is rounded towards * zero. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 472, 629 ] }
3,449
Token
@openzeppelin/contracts/utils/math/Math.sol
0x8ebfe1e17ea41f8b737e4f7670885b2278b1cc32
Solidity
Math
library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uin...
/** * @dev Standard math utilities missing in the Solidity language. */
NatSpecMultiLine
ceilDiv
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); }
/** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 824, 1022 ] }
3,450
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
getPrice
function getPrice(uint256 amount) public view returns (uint256){ uint256 supply = totalSupply(ARTWORK) - _reserved; uint totalCost = 0; for (uint i = 0; i < amount; i++) { totalCost += getCurrentPriceAtPosition(supply + i); } return totalCost; }
/** * @notice retrieve price for multiple NFTs * * @param amount the amount of NFTs to get price for */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 1205, 1519 ] }
3,451
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
getCurrentPriceAtPosition
function getCurrentPriceAtPosition(uint256 position) public view returns (uint256){ uint256 multiplier = position/incrementNumber; uint256 priceIncrease = multiplier * priceInc; return priceIncrease + startingPrice; }
/** * @notice get price at position of the NFT token by ID * * @param position positiong to check the price at */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 1661, 1917 ] }
3,452
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
whitelistMint
function whitelistMint(uint256 amount) external payable whenNotPaused { require(block.timestamp >= whitelistWindowOpens, "Early access: window closed"); require(whiteList[msg.sender], "Sender not on the whitelist"); require(purchaseTxs[msg.sender] + amount <= maxPerTx, "Wallet mint limit"); mint(a...
/** * @notice purchase NFTs during whitelist mint * * @param amount the amount of cards to purchase */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 2048, 2403 ] }
3,453
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
publicMint
function publicMint(uint256 amount) external payable whenNotPaused { require(block.timestamp >= publicWindowOpens, "Purchase: window closed"); mint(amount); }
/** * @notice mint NFTs during public mint * * @param amount the amount of tokens to mint */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 2524, 2712 ] }
3,454
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
mint
function mint(uint256 amount) private { require(amount > 0, "Need to request at least 1 NFT"); require(totalSupply(ARTWORK) + amount <= _maxSupply, "Exceeds maximum supply"); require(msg.value >= getPrice(amount), "Not enough ETH sent, check price"); purchaseTxs[msg.sender] += amount; _mint(m...
/** * @notice global mint function used in early access and public sale * * @param amount the amount of tokens to mint */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 2862, 3246 ] }
3,455
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
editWindows
function editWindows( uint256 _publicWindowOpens, uint256 _whitelistWindowOpens ) external onlyRole(DEFAULT_ADMIN_ROLE) { require( _publicWindowOpens > _whitelistWindowOpens, "window combination not allowed" ); publicWindowOpens = _publicWindowOpens; whitelistWindowOpens...
/** * @notice edit windows * * @param _publicWindowOpens UNIX timestamp for purchasing public window time * @param _whitelistWindowOpens UNIX timestamp for purchasing whitelist window time */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 3471, 3864 ] }
3,456
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
editMintSettings
function editMintSettings( uint256 _priceInc, uint256 _incrementNumber, uint256 _startingPrice ) external onlyRole(DEFAULT_ADMIN_ROLE) { priceInc = _priceInc; incrementNumber = _incrementNumber; startingPrice = _startingPrice; }
/** * @notice edit mint settings * * @param _priceInc how much the price increments * @param _incrementNumber per how many tokens to increase price * @param _startingPrice starting price of the token */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 4105, 4402 ] }
3,457
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
setWhiteList
function setWhiteList(address[] calldata addresses ) external onlyRole(DEFAULT_ADMIN_ROLE) { for (uint256 i = 0; i < addresses.length; i++) { whiteList[addresses[i]] = true; } }
/** * @notice adds addresses into a whitelist * * @param addresses an array of addresses to add to whitelist */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 4542, 4760 ] }
3,458
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
isWhitelisted
function isWhitelisted() external view returns (bool) { return whiteList[msg.sender]; }
/** * @notice returns true or false depending on */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 4831, 4938 ] }
3,459
NFTCheese
contracts/NFTCheese.sol
0x1b603c18bc6766c0e6abcae9d83e8662d75b1b96
Solidity
NFTCheese
contract NFTCheese is AbstractERC1155Factory { uint256 public constant ARTWORK = 0; uint256 public _maxSupply = 333; uint256 public _reserved = 33; uint8 maxPerTx = 2; uint256 public whitelistWindowOpens = 1644523200; uint256 public publicWindowOpens = 1644609600; uint256 p...
/* * @title ERC1155 token for NFT Cheese * @author Nazariy Dumanskyy, Lem Canady */
Comment
uri
function uri(uint256 _id) public view override returns (string memory) { require(exists(_id), "URI: nonexistent token"); return string(abi.encodePacked(super.uri(_id), Strings.toString(_id), ".json")); }
/** * @notice returns the metadata uri for a given id * * @param _id the NFT id to return metadata for */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://322cf1e12fc4613d5b6be99d2da7163e6d3d01e08e1af01097d9a4bbfc44238d
{ "func_code_index": [ 5072, 5305 ] }
3,460
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 971, 1092 ] }
3,461
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 1312, 1441 ] }
3,462
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 1785, 2067 ] }
3,463
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 2575, 2788 ] }
3,464
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 3319, 3682 ] }
3,465
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 3965, 4121 ] }
3,466
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 4476, 4798 ] }
3,467
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 4990, 5049 ] }
3,468
PALTRY
PALTRY.sol
0x0d0ab17e613b5afc16d89b8b5843875545de3dd1
Solidity
PALTRY
contract PALTRY is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://bb6ab4bc82a4967c68eef85109f46897b3f3e0f4543dc707a46be1a05480b282
{ "func_code_index": [ 5282, 5471 ] }
3,469
AaveImport
contracts/interfaces/ILendingPool.sol
0x751961666d8605af1c5ee549205f822f47b04168
Solidity
ILendingPool
abstract contract ILendingPool { function flashLoan( address payable _receiver, address _reserve, uint _amount, bytes calldata _params) external virtual; function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external virtual payable; function setUserUseReserveAsCollateral(address _reserve, ...
getReserveData
function getReserveData(address _reserve) external virtual view returns ( uint256 totalLiquidity, // reserve total liquidity uint256 availableLiquidity, // reserve available liquidity for borrowing uint256 totalBorrowsStable, // total amount of outst...
/// @param _reserve underlying token address
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://34c42220a035234e7357a4f4dce033d4f7741dd29565a8d77139b7fde50d3c09
{ "func_code_index": [ 778, 2169 ] }
3,470
AaveImport
contracts/interfaces/ILendingPool.sol
0x751961666d8605af1c5ee549205f822f47b04168
Solidity
ILendingPool
abstract contract ILendingPool { function flashLoan( address payable _receiver, address _reserve, uint _amount, bytes calldata _params) external virtual; function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external virtual payable; function setUserUseReserveAsCollateral(address _reserve, ...
getUserAccountData
function getUserAccountData(address _user) external virtual view returns ( uint256 totalLiquidityETH, // user aggregated deposits across all the reserves. In Wei uint256 totalCollateralETH, // user aggregated collateral across all the reserves. In Wei uint256 tot...
/// @param _user users address
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://34c42220a035234e7357a4f4dce033d4f7741dd29565a8d77139b7fde50d3c09
{ "func_code_index": [ 2206, 3184 ] }
3,471
AaveImport
contracts/interfaces/ILendingPool.sol
0x751961666d8605af1c5ee549205f822f47b04168
Solidity
ILendingPool
abstract contract ILendingPool { function flashLoan( address payable _receiver, address _reserve, uint _amount, bytes calldata _params) external virtual; function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external virtual payable; function setUserUseReserveAsCollateral(address _reserve, ...
getUserReserveData
function getUserReserveData(address _reserve, address _user) external virtual view returns ( uint256 currentATokenBalance, // user current reserve aToken balance uint256 currentBorrowBalance, // user current reserve outstanding borrow balance uint256 principalBorrowBa...
/// @param _reserve underlying token address /// @param _user users address
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://34c42220a035234e7357a4f4dce033d4f7741dd29565a8d77139b7fde50d3c09
{ "func_code_index": [ 3270, 4319 ] }
3,472
AaveImport
contracts/interfaces/ILendingPool.sol
0x751961666d8605af1c5ee549205f822f47b04168
Solidity
ILendingPool
abstract contract ILendingPool { function flashLoan( address payable _receiver, address _reserve, uint _amount, bytes calldata _params) external virtual; function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external virtual payable; function setUserUseReserveAsCollateral(address _reserve, ...
getReserveATokenAddress
function getReserveATokenAddress(address _reserve) public virtual view returns (address);
// ------------------ LendingPoolCoreData ------------------------
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://34c42220a035234e7357a4f4dce033d4f7741dd29565a8d77139b7fde50d3c09
{ "func_code_index": [ 4807, 4900 ] }
3,473
AaveImport
contracts/interfaces/ILendingPool.sol
0x751961666d8605af1c5ee549205f822f47b04168
Solidity
ILendingPool
abstract contract ILendingPool { function flashLoan( address payable _receiver, address _reserve, uint _amount, bytes calldata _params) external virtual; function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external virtual payable; function setUserUseReserveAsCollateral(address _reserve, ...
calculateUserGlobalData
function calculateUserGlobalData(address _user) public virtual view returns ( uint256 totalLiquidityBalanceETH, uint256 totalCollateralBalanceETH, uint256 totalBorrowBalanceETH, uint256 totalFeesETH, uint256 currentLtv, uint256 currentLiquidationThreshold, ...
// ---------------- LendingPoolDataProvider ---------------------
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://34c42220a035234e7357a4f4dce033d4f7741dd29565a8d77139b7fde50d3c09
{ "func_code_index": [ 6007, 6452 ] }
3,474
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) r...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 270, 509 ] }
3,475
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) r...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 715, 824 ] }
3,476
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_to].add(_val...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 388, 891 ] }
3,477
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs...
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 1126, 1674 ] }
3,478
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to *...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 1997, 2135 ] }
3,479
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyO...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 169, 222 ] }
3,480
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyO...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner { require(newOwner != address(0)); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 541, 666 ] }
3,481
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address tha...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 485, 720 ] }
3,482
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address tha...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() public onlyOwner returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 837, 976 ] }
3,483
ACrowdsale
ACrowdsale.sol
0x05ef5be2983f8091a57433938bb5d17612e11268
Solidity
ACrowdsale
contract ACrowdsale is Ownable{ uint sat = 1e18; // *** Config *** // Token string name ="utrade.cash"; string symbol = "UTRD"; uint32 decimals = 18; // ICO uint start = 1599062400; uint period = 12 hours; uint maxSellingInICO = 140 * sat; uint256 coinsAfterI...
myBalance
function myBalance() public view returns (uint balance){ return token.balanceOf(msg.sender) / sat; }
// Development utils
LineComment
v0.4.26+commit.4563c3fc
Apache-2.0
bzzr://643e48b89c3533ebf696f8469c67db2e071b058340421a94093f6f2eb3b7a5be
{ "func_code_index": [ 18545, 18664 ] }
3,484
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 94, 154 ] }
3,485
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 235, 308 ] }
3,486
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 530, 612 ] }
3,487
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 889, 977 ] }
3,488
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 1639, 1718 ] }
3,489
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 2029, 2131 ] }
3,490
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 259, 445 ] }
3,491
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 721, 862 ] }
3,492
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 1158, 1353 ] }
3,493
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 1605, 2077 ] }
3,494
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 2546, 2683 ] }
3,495
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 3172, 3453 ] }
3,496
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 3911, 4046 ] }
3,497
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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.6.12+commit.27d51765
MIT
ipfs://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 4524, 4695 ] }
3,498
MuskFinance
MuskFinance.sol
0x2e843a93998935022e52b6b94877dd1660467f74
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 ...
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://6255a7e7511730f9230d0fc910a1aba6e96a6dd74abb3683f87858ee265769f9
{ "func_code_index": [ 606, 1230 ] }
3,499