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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | 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 t... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | 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.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
3548,
4003
]
} | 2,200 | |
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | Solidity | AbstractToken | contract AbstractToken is Ownable, StandardToken {
string public name;
string public symbol;
uint256 public decimals;
string public value; // Stable Value
string public description; // Description
string public website; // Website
string public email; // Email
... | /**
* @title Abstract Standard ERC20 token
*/ | NatSpecMultiLine | setInfo | function setInfo(string _description, string _website, string _email) external onlyOwner returns (bool) {
description = _description;
website = _website;
email = _email;
return true;
}
| /**
* @dev Set Info
*
* @param _description string
* @param _website string
* @param _email string
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
785,
1015
]
} | 2,201 | |
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | Solidity | AbstractToken | contract AbstractToken is Ownable, StandardToken {
string public name;
string public symbol;
uint256 public decimals;
string public value; // Stable Value
string public description; // Description
string public website; // Website
string public email; // Email
... | /**
* @title Abstract Standard ERC20 token
*/ | NatSpecMultiLine | setNews | function setNews(string _news) external onlyOwner returns (bool) {
news = _news;
emit NewsPublished(_news);
return true;
}
| /**
* @dev Set News
*
* @param _news string
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
1095,
1254
]
} | 2,202 | |
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | Solidity | AbstractToken | contract AbstractToken is Ownable, StandardToken {
string public name;
string public symbol;
uint256 public decimals;
string public value; // Stable Value
string public description; // Description
string public website; // Website
string public email; // Email
... | /**
* @title Abstract Standard ERC20 token
*/ | NatSpecMultiLine | setMintAgent | function setMintAgent(address _addr, bool _state) onlyOwner public returns (bool) {
mintAgents[_addr] = _state;
emit MintAgentChanged(_addr, _state);
return true;
}
| /**
* @dev Set a mint agent address
*
* @param _addr address The address that will receive the minted tokens.
* @param _state bool The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
1537,
1738
]
} | 2,203 | |
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | Solidity | VNETToken | contract VNETToken is Ownable, AbstractToken {
event Donate(address indexed _from, uint256 _amount);
/**
* @dev Constructor
*/
constructor() public {
name = "VNET Token";
symbol = "VNET";
decimals = 6;
value = "1 Token = 100 GByte client newtwork traffi... | /**
* @dev VNET Token for Vision Network Project
*/ | NatSpecMultiLine | function () public payable {
emit Donate(msg.sender, msg.value);
}
| /**
* @dev Sending eth to this contract will be considered as a donation
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
510,
595
]
} | 2,204 | ||
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | Solidity | VNETToken | contract VNETToken is Ownable, AbstractToken {
event Donate(address indexed _from, uint256 _amount);
/**
* @dev Constructor
*/
constructor() public {
name = "VNET Token";
symbol = "VNET";
decimals = 6;
value = "1 Token = 100 GByte client newtwork traffi... | /**
* @dev VNET Token for Vision Network Project
*/ | NatSpecMultiLine | mint | function mint(address _to, uint256 _amount) external returns (bool) {
require(mintAgents[msg.sender] && totalSupply_.add(_amount) <= cap);
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
emit Mint(_to, _amount);
emit Transfer(address(0), _to, _amount);
... | /**
* @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.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
848,
1219
]
} | 2,205 | |
VNETToken | VNETToken.sol | 0xa71074b6c4a31c1d1798b04801a89d78f6e26123 | Solidity | VNETToken | contract VNETToken is Ownable, AbstractToken {
event Donate(address indexed _from, uint256 _amount);
/**
* @dev Constructor
*/
constructor() public {
name = "VNET Token";
symbol = "VNET";
decimals = 6;
value = "1 Token = 100 GByte client newtwork traffi... | /**
* @dev VNET Token for Vision Network Project
*/ | NatSpecMultiLine | mintWithLock | function mintWithLock(address _to, uint256 _amount, uint256 _lockedAmount, uint256 _releaseTime) external returns (bool) {
require(mintAgents[msg.sender] && totalSupply_.add(_amount) <= cap);
require(_amount >= _lockedAmount);
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to]... | /**
* @dev Function to mint tokens, and lock some of them with a release time
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @param _lockedAmount The amount of tokens to be locked.
* @param _releaseTime The timestamp about to release, which could... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://860909762eed448f609e635aaaf8ff4eb12d56d79187c6060d1736a6b1c0efd2 | {
"func_code_index": [
1669,
2398
]
} | 2,206 | |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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.
/... | /**
* @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 | None | bzzr://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
95,
524
]
} | 2,207 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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.
/... | /**
* @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://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
614,
914
]
} | 2,208 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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.
/... | /**
* @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://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
1034,
1162
]
} | 2,209 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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.
/... | /**
* @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://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
1232,
1378
]
} | 2,210 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
211,
307
]
} | 2,211 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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);
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 | None | bzzr://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
475,
835
]
} | 2,212 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
1051,
1163
]
} | 2,213 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = ... | /**
* @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://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
410,
960
]
} | 2,214 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
// avoid race condition
require((_value == 0) || (allowed[msg.sender][_spender] == 0), "reset allowance to 0 before change it's value.");
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
... | /**
* @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 | None | bzzr://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
1596,
1963
]
} | 2,215 |
WORLDToken_StandardToken_U | WORLDToken_StandardToken_U.sol | 0x552151324171a0575c04074a60dfc9c5823a8c82 | 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... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://7c0ed797602230042ca79181c863ec732791698d82ccce20fbbc4c3b8ee290c5 | {
"func_code_index": [
2294,
2490
]
} | 2,216 |
liquidityProviderTokensStaking | liquidityProviderTokensStaking.sol | 0x90bd59d7537a604dc8f08faa478c22660d9fd256 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://092b39146afaf70203d8251300c3cf7d116099b185f06170f03fae8eb24bcd75 | {
"func_code_index": [
251,
437
]
} | 2,217 |
liquidityProviderTokensStaking | liquidityProviderTokensStaking.sol | 0x90bd59d7537a604dc8f08faa478c22660d9fd256 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://092b39146afaf70203d8251300c3cf7d116099b185f06170f03fae8eb24bcd75 | {
"func_code_index": [
707,
896
]
} | 2,218 |
liquidityProviderTokensStaking | liquidityProviderTokensStaking.sol | 0x90bd59d7537a604dc8f08faa478c22660d9fd256 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://092b39146afaf70203d8251300c3cf7d116099b185f06170f03fae8eb24bcd75 | {
"func_code_index": [
1142,
1617
]
} | 2,219 |
liquidityProviderTokensStaking | liquidityProviderTokensStaking.sol | 0x90bd59d7537a604dc8f08faa478c22660d9fd256 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://092b39146afaf70203d8251300c3cf7d116099b185f06170f03fae8eb24bcd75 | {
"func_code_index": [
2080,
2418
]
} | 2,220 |
CowsRegistry | CowsRegistry.sol | 0xc88c9e7e29cc77b16d3dd8e0c39b8a620e94bc70 | 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() {
_setOwner(_msgSender());
... | /**
* @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.8.10+commit.fc410830 | MIT | ipfs://438cc02cf55a74a39f87a6aa5c50972b2b65a00cda2a29313535535185d1e7ca | {
"func_code_index": [
399,
491
]
} | 2,221 |
CowsRegistry | CowsRegistry.sol | 0xc88c9e7e29cc77b16d3dd8e0c39b8a620e94bc70 | 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() {
_setOwner(_msgSender());
... | /**
* @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 {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://438cc02cf55a74a39f87a6aa5c50972b2b65a00cda2a29313535535185d1e7ca | {
"func_code_index": [
1050,
1149
]
} | 2,222 |
CowsRegistry | CowsRegistry.sol | 0xc88c9e7e29cc77b16d3dd8e0c39b8a620e94bc70 | 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() {
_setOwner(_msgSender());
... | /**
* @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");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://438cc02cf55a74a39f87a6aa5c50972b2b65a00cda2a29313535535185d1e7ca | {
"func_code_index": [
1299,
1496
]
} | 2,223 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
606,
1033
]
} | 2,224 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
1963,
2365
]
} | 2,225 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
3121,
3299
]
} | 2,226 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
3524,
3724
]
} | 2,227 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
4094,
4325
]
} | 2,228 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disa... | /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
4576,
5111
]
} | 2,229 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
5291,
5495
]
} | 2,230 |
AdminUpgradeabilityProxy | Address.sol | 0xce797549a7025561ae60569f68419f016e97d8c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://0e97f647ae7957c25ff392b2ef1138af51f4ab45d260533a2cba2576c9c45e69 | {
"func_code_index": [
5682,
6109
]
} | 2,231 |
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | TokenERC20 | function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public
{ totalSupply = initialSupply * 10 ** uint256(decimals);
// Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply;
// Give the creator all initial tokens
name = tokenName;
// Set the name for di... | /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
807,
1251
]
} | 2,232 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > bala... | /** * Internal transfer, only can be called by this contract */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
1328,
2172
]
} | 2,233 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | transfer | function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
| /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
2339,
2441
]
} | 2,234 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]);
// Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value); return true; }
| /** * Transfer tokens from other address * * Send `_value` tokens to `_to` on behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
2670,
2959
]
} | 2,235 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | approve | function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
| /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
3184,
3332
]
} | 2,236 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
| /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the app... | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
3681,
3962
]
} | 2,237 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | burn | function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value);
// Check if the sender has enough
balanceOf[msg.sender] -= _value;
// Subtract from the sender
totalSupply -= _value;
// Updates totalSupply
Burn(msg.sender, _value); return true; }
| /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
4099,
4451
]
} | 2,238 | |||
TokenERC20 | TokenERC20.sol | 0x13ab12f2e72aae20b19e3206affad7bb000b06f3 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply; // This creates an array with all balances
mapping (address => ui... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value);
// Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]);
// Check allowance
balanceOf[_from] -= _value;
// Subtract from the targeted balance
allowance[_from]... | /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ | NatSpecMultiLine | v0.4.20-nightly.2018.1.17+commit.4715167e | bzzr://93548ab05ad7719610271327b685a9401d3c3afdc4b3a085d1b3663ad41b78b8 | {
"func_code_index": [
4670,
5229
]
} | 2,239 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Ownable | contract Ownable {
//Variables
address public owner;
address public newOwner;
// Modifiers
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev The O... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
422,
490
]
} | 2,240 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Ownable | contract Ownable {
//Variables
address public owner;
address public newOwner;
// Modifiers
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev The O... | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0));
newOwner = _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.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
665,
815
]
} | 2,241 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | 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, uin... | /**
* @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]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_va... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
282,
705
]
} | 2,242 | |
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | 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, uin... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public 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.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
921,
1045
]
} | 2,243 | |
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | 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);
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
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
401,
853
]
} | 2,244 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
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.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1485,
1675
]
} | 2,245 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public 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 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1999,
2144
]
} | 2,246 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* 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
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
2389,
2662
]
} | 2,247 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | 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 that wi... | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(0x0, _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.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
481,
745
]
} | 2,248 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | 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 that wi... | finishMinting | function finishMinting() onlyOwner public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
862,
996
]
} | 2,249 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | LamdenTau | contract LamdenTau is MintableToken {
string public constant name = "Lamden Tau";
string public constant symbol = "TAU";
uint8 public constant decimals = 18;
// locks transfers until minting is over, which ends at the end of the sale
// thus, the behavior of this token is locked transfers dur... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(mintingFinished);
bool success = super.transfer(_to, _value);
return success;
}
| // locks transfers until minting is over, which ends at the end of the sale
// thus, the behavior of this token is locked transfers during sale, and unlocked after :) | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
353,
542
]
} | 2,250 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
... | createTokenContract | function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
}
| // creates the token to be sold.
// override this method to have crowdsale of a specific mintable token. | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1280,
1386
]
} | 2,251 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
... | function () payable {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1441,
1498
]
} | 2,252 | ||||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
... | buyTokens | function buyTokens(address beneficiary) public payable {
require(beneficiary != 0x0);
require(validPurchase());
uint256 weiAmount = msg.value;
// calculate token amount to be created
uint256 tokens = weiAmount.mul(rate);
// update state
weiRaised = weiRaised.add(weiAmount);
token.mint(be... | // low level token purchase function | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1541,
1991
]
} | 2,253 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
... | forwardFunds | function forwardFunds() internal {
wallet.transfer(msg.value);
}
| // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
2100,
2175
]
} | 2,254 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
... | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinPeriod = now >= startTime && now <= endTime;
bool nonZeroPurchase = msg.value != 0;
return withinPeriod && nonZeroPurchase;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
2231,
2448
]
} | 2,255 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
... | hasEnded | function hasEnded() public constant returns (bool) {
return now > endTime;
}
| // @return true if crowdsale event has ended | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
2499,
2586
]
} | 2,256 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | CappedCrowdsale | contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) {
require(_cap > 0);
cap = _cap;
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function ... | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinCap = weiRaised.add(msg.value) <= cap;
return super.validPurchase() && withinCap;
}
| // overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
309,
479
]
} | 2,257 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | CappedCrowdsale | contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) {
require(_cap > 0);
cap = _cap;
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function ... | hasEnded | function hasEnded() public constant returns (bool) {
bool capReached = weiRaised >= cap;
return super.hasEnded() || capReached;
}
| // overriding Crowdsale#hasEnded to add cap logic
// @return true if crowdsale event has ended | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
583,
728
]
} | 2,258 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Presale | contract Presale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
mapping (address => bool) public whitelist;
bool public isFinalized = false;
event Finalized();
address public team = 0x7D72dc07876435d3B2eE498E53A803958bc55b42;
uint256 public teamShare = 150000000 * (10 ... | createTokenContract | function createTokenContract() internal returns (MintableToken) {
return LamdenTau(0x0);
}
| // Crowdsale overrides | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
846,
955
]
} | 2,259 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Presale | contract Presale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
mapping (address => bool) public whitelist;
bool public isFinalized = false;
event Finalized();
address public team = 0x7D72dc07876435d3B2eE498E53A803958bc55b42;
uint256 public teamShare = 150000000 * (10 ... | finalize | function finalize() onlyOwner public {
require(mediator != 0x0);
require(!isFinalized);
require(hasEnded());
finalization();
Finalized();
isFinalized = true;
}
| // * * *
// Finalizer functions. Redefined from FinalizableCrowdsale to prevent diamond inheritence complexities | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1330,
1551
]
} | 2,260 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Presale | contract Presale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
mapping (address => bool) public whitelist;
bool public isFinalized = false;
event Finalized();
address public team = 0x7D72dc07876435d3B2eE498E53A803958bc55b42;
uint256 public teamShare = 150000000 * (10 ... | assignMediator | function assignMediator(address _m) public onlyOwner returns(bool) {
mediator = _m;
return true;
}
| // * * *
// Contract Specific functions | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1916,
2042
]
} | 2,261 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Sale | contract Sale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
// Initialization Variables
uint256 public amountPerDay; // 30 eth
uint256 public constant UNIX_DAY = 86400;
bool public isFinalized = false;
event Finalized();
mapping (address => bool) public whitelist;
... | Sale | function Sale(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap, address _wallet, uint256 _amountPerDay, address _tokenAddress)
Crowdsale(_startTime, _endTime, _rate, _wallet)
CappedCrowdsale(_cap)
{
amountPerDay = _amountPerDay;
token = LamdenTau(_tokenAddress);
}
| // * * *
// Constructor | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
417,
741
]
} | 2,262 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Sale | contract Sale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
// Initialization Variables
uint256 public amountPerDay; // 30 eth
uint256 public constant UNIX_DAY = 86400;
bool public isFinalized = false;
event Finalized();
mapping (address => bool) public whitelist;
... | createTokenContract | function createTokenContract() internal returns (MintableToken) {
return LamdenTau(0x0);
}
| // * * *
// Crowdsale overrides | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
790,
899
]
} | 2,263 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Sale | contract Sale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
// Initialization Variables
uint256 public amountPerDay; // 30 eth
uint256 public constant UNIX_DAY = 86400;
bool public isFinalized = false;
event Finalized();
mapping (address => bool) public whitelist;
... | finalize | function finalize() onlyOwner public {
require(!isFinalized);
require(hasEnded());
finalization();
Finalized();
isFinalized = true;
}
| // * * *
// Finalizer functions | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1502,
1684
]
} | 2,264 | |||
Presale | Presale.sol | 0x2bca686de0b312ab453b676502f3108f4ab83106 | Solidity | Sale | contract Sale is CappedCrowdsale, Ownable {
using SafeMath for uint256;
// Initialization Variables
uint256 public amountPerDay; // 30 eth
uint256 public constant UNIX_DAY = 86400;
bool public isFinalized = false;
event Finalized();
mapping (address => bool) public whitelist;
... | daysSinceLaunch | function daysSinceLaunch() public constant returns(uint256) {
return now.sub(startTime).div(UNIX_DAY);
}
| // * * *
// Contract Specific functions | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://fe61060f479015f88f84fd83293fdbc8a757fe73f6b4e3ad9f2be3141d07dafb | {
"func_code_index": [
1827,
1950
]
} | 2,265 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {}
/// @notic... | totalSupply | function totalSupply() constant returns (uint supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
60,
121
]
} | 2,266 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {}
/// @notic... | balanceOf | function balanceOf(address _owner) constant returns (uint balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
229,
303
]
} | 2,267 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {}
/// @notic... | transfer | function transfer(address _to, uint _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
540,
614
]
} | 2,268 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {}
/// @notic... | transferFrom | function transferFrom(address _from, address _to, uint _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
937,
1030
]
} | 2,269 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {}
/// @notic... | approve | function approve(address _spender, uint _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
1314,
1392
]
} | 2,270 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {}
/// @notic... | allowance | function allowance(address _owner, address _spender) constant returns (uint remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
1600,
1694
]
} | 2,271 | |||
YaoChainToken | YaoChainToken.sol | 0x58dd024f550acf4cc885f2bc51d320b3afba8552 | Solidity | UnboundedRegularToken | contract UnboundedRegularToken is RegularToken {
uint constant MAX_UINT = 2**256 - 1;
/// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount.
/// @param _from Address to transfer from.
/// @param _to Address to transfer to.
/// @param _va... | transferFrom | function transferFrom(address _from, address _to, uint _value)
public
returns (bool)
{
uint allowance = allowed[_from][msg.sender];
if (balances[_from] >= _value
&& allowance >= _value
&& balances[_to] + _value >= balances[_to]
) {
balances[_to] += _value;
b... | /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount.
/// @param _from Address to transfer from.
/// @param _to Address to transfer to.
/// @param _value Amount to transfer.
/// @return Success of transfer. | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e0bac22a44dd9ffcf0ea72724217e01a92e73aa7e686e858b3568550a242edf4 | {
"func_code_index": [
383,
1016
]
} | 2,272 | |||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | 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 () {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
497,
589
]
} | 2,273 |
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | 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 () {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
1148,
1301
]
} | 2,274 |
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | 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 () {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
1451,
1700
]
} | 2,275 |
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indi... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
106,
179
]
} | 2,276 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indi... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
421,
503
]
} | 2,277 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indi... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
816,
918
]
} | 2,278 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indi... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
1582,
1661
]
} | 2,279 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | IERC721 | interface IERC721 {
/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
/// THEY MAY BE PERMANENTLY LOST
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved addr... | transferFrom | function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
| /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
/// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
/// THEY MAY BE PERMANENTLY LOST
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// n... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
611,
701
]
} | 2,280 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | CrossAssetSwap | contract CrossAssetSwap is Ownable {
struct ERC20Details {
address[] tokenAddrs;
uint256[] amounts;
}
struct ERC721Details {
address tokenAddr;
uint256[] ids;
MarketRegistry.SellDetails[] sellDetails;
}
struct ERC1155Details {
address ... | multiAssetSwap | function multiAssetSwap(
ERC20Details memory inputERC20s,
ERC721Details[] memory inputERC721s,
ERC1155Details[] memory inputERC1155s,
MarketRegistry.BuyDetails[] memory buyDetails,
ExchangeRegistry.SwapDetails[] memory swapDetails,
address[] memory addrs // [changeIn, exchange, recipient]
... | // swaps any combination of ERC-20/721/1155
// User needs to approve assets before invoking swap | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
4432,
5329
]
} | 2,281 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | CrossAssetSwap | contract CrossAssetSwap is Ownable {
struct ERC20Details {
address[] tokenAddrs;
uint256[] amounts;
}
struct ERC721Details {
address tokenAddr;
uint256[] ids;
MarketRegistry.SellDetails[] sellDetails;
}
struct ERC1155Details {
address ... | rescueERC20 | function rescueERC20(address asset, address recipient) onlyOwner external returns(uint256 amountRescued) {
amountRescued = IERC20(asset).balanceOf(address(this));
IERC20(asset).transfer(recipient, amountRescued);
}
| // Emergency function: In case any ERC20 tokens get stuck in the contract unintentionally
// Only owner can retrieve the asset balance to a recipient address | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
17325,
17568
]
} | 2,282 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | CrossAssetSwap | contract CrossAssetSwap is Ownable {
struct ERC20Details {
address[] tokenAddrs;
uint256[] amounts;
}
struct ERC721Details {
address tokenAddr;
uint256[] ids;
MarketRegistry.SellDetails[] sellDetails;
}
struct ERC1155Details {
address ... | rescueERC721 | function rescueERC721(address asset, uint256[] calldata ids, address recipient) onlyOwner external {
for (uint256 i = 0; i < ids.length; i++) {
IERC721(asset).transferFrom(address(this), recipient, ids[i]);
}
}
| // Emergency function: In case any ERC721 tokens get stuck in the contract unintentionally
// Only owner can retrieve the asset balance to a recipient address | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
17740,
17991
]
} | 2,283 | ||
CrossAssetSwap | CrossAssetSwap.sol | 0x95470f8e330d20788e76e8da3063c9a19555ac0c | Solidity | CrossAssetSwap | contract CrossAssetSwap is Ownable {
struct ERC20Details {
address[] tokenAddrs;
uint256[] amounts;
}
struct ERC721Details {
address tokenAddr;
uint256[] ids;
MarketRegistry.SellDetails[] sellDetails;
}
struct ERC1155Details {
address ... | rescueERC1155 | function rescueERC1155(address asset, uint256[] calldata ids, uint256[] calldata amounts, address recipient) onlyOwner external {
for (uint256 i = 0; i < ids.length; i++) {
IERC1155(asset).safeTransferFrom(address(this), recipient, ids[i], amounts[i], "");
}
}
| // Emergency function: In case any ERC1155 tokens get stuck in the contract unintentionally
// Only owner can retrieve the asset balance to a recipient address | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://58155467ed651020d1f8c07012ccbc9978eba79dd5a5f5d2da3f60329adb57fa | {
"func_code_index": [
18164,
18465
]
} | 2,284 | ||
ThugWhales | @openzeppelin/contracts/access/Ownable.sol | 0x2b73f11f7f58e3d25b84adc0a6693072207f7dac | 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() {
_setOwner(_msgSender());
... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://d21251a8341395a27461909f282f0da3735590433e375c49fa1ff0968d33db07 | {
"func_code_index": [
399,
491
]
} | 2,285 |
ThugWhales | @openzeppelin/contracts/access/Ownable.sol | 0x2b73f11f7f58e3d25b84adc0a6693072207f7dac | 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() {
_setOwner(_msgSender());
... | /**
* @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 {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://d21251a8341395a27461909f282f0da3735590433e375c49fa1ff0968d33db07 | {
"func_code_index": [
1050,
1149
]
} | 2,286 |
ThugWhales | @openzeppelin/contracts/access/Ownable.sol | 0x2b73f11f7f58e3d25b84adc0a6693072207f7dac | 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() {
_setOwner(_msgSender());
... | /**
* @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");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://d21251a8341395a27461909f282f0da3735590433e375c49fa1ff0968d33db07 | {
"func_code_index": [
1299,
1496
]
} | 2,287 |
ThugWhales | @openzeppelin/contracts/access/Ownable.sol | 0x2b73f11f7f58e3d25b84adc0a6693072207f7dac | Solidity | ThugWhales | contract ThugWhales is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 2222;
uint256 public maxMintAmount = 10;
uint256 publi... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://d21251a8341395a27461909f282f0da3735590433e375c49fa1ff0968d33db07 | {
"func_code_index": [
805,
918
]
} | 2,288 | ||
ThugWhales | @openzeppelin/contracts/access/Ownable.sol | 0x2b73f11f7f58e3d25b84adc0a6693072207f7dac | Solidity | ThugWhales | contract ThugWhales is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 2222;
uint256 public maxMintAmount = 10;
uint256 publi... | mint | function mint(uint256 _mintAmount) public payable {
require(!paused);
uint256 supply = totalSupply();
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);
if (msg.sender != owner()) {
if (onlyWhitelisted == true) {
... | // public | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://d21251a8341395a27461909f282f0da3735590433e375c49fa1ff0968d33db07 | {
"func_code_index": [
936,
1693
]
} | 2,289 | ||
ThugWhales | @openzeppelin/contracts/access/Ownable.sol | 0x2b73f11f7f58e3d25b84adc0a6693072207f7dac | Solidity | ThugWhales | contract ThugWhales is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 2222;
uint256 public maxMintAmount = 10;
uint256 publi... | reveal | function reveal() public onlyOwner {
revealed = true;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://d21251a8341395a27461909f282f0da3735590433e375c49fa1ff0968d33db07 | {
"func_code_index": [
3127,
3201
]
} | 2,290 | ||
Bleeps | src/base/IERC4494.sol | 0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78 | Solidity | IERC4494 | interface IERC4494 {
function DOMAIN_SEPARATOR() external view returns (bytes32);
/// @notice Allows to retrieve current nonce for token
/// @param tokenId token id
/// @return current token nonce
function nonces(uint256 tokenId) external view returns (uint256);
/// @notice function to be call... | nonces | function nonces(uint256 tokenId) external view returns (uint256);
| /// @notice Allows to retrieve current nonce for token
/// @param tokenId token id
/// @return current token nonce | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
214,
283
]
} | 2,291 | |||
Bleeps | src/base/IERC4494.sol | 0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78 | Solidity | IERC4494 | interface IERC4494 {
function DOMAIN_SEPARATOR() external view returns (bytes32);
/// @notice Allows to retrieve current nonce for token
/// @param tokenId token id
/// @return current token nonce
function nonces(uint256 tokenId) external view returns (uint256);
/// @notice function to be call... | permit | function permit(
address spender,
uint256 tokenId,
uint256 deadline,
bytes memory signature
) external;
| /// @notice function to be called by anyone to approve `spender` using a Permit signature
/// @dev Anyone can call this to approve `spender`, even a third-party
/// @param spender the actor to approve
/// @param tokenId the token id
/// @param deadline the deadline for the permit to be used
/// @param signature permit | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
629,
772
]
} | 2,292 | |||
Bleeps | src/base/IERC4494.sol | 0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78 | Solidity | IERC4494Alternative | interface IERC4494Alternative {
function DOMAIN_SEPARATOR() external view returns (bytes32);
/// @notice Allows to retrieve current nonce for token
/// @param tokenId token id
/// @return current token nonce
function tokenNonces(uint256 tokenId) external view returns (uint256);
/// @notice fun... | tokenNonces | function tokenNonces(uint256 tokenId) external view returns (uint256);
| /// @notice Allows to retrieve current nonce for token
/// @param tokenId token id
/// @return current token nonce | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
225,
299
]
} | 2,293 | |||
Bleeps | src/base/IERC4494.sol | 0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78 | Solidity | IERC4494Alternative | interface IERC4494Alternative {
function DOMAIN_SEPARATOR() external view returns (bytes32);
/// @notice Allows to retrieve current nonce for token
/// @param tokenId token id
/// @return current token nonce
function tokenNonces(uint256 tokenId) external view returns (uint256);
/// @notice fun... | permit | function permit(
address spender,
uint256 tokenId,
uint256 deadline,
bytes memory signature
) external;
| /// @notice function to be called by anyone to approve `spender` using a Permit signature
/// @dev Anyone can call this to approve `spender`, even a third-party
/// @param spender the actor to approve
/// @param tokenId the token id
/// @param deadline the deadline for the permit to be used
/// @param signature permit | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
645,
788
]
} | 2,294 | |||
HappyNewYearToken | HappyNewYearToken.sol | 0x8189952b0b8d88622a4b0b592f0b7115d81e16fc | 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;
}
/**
* ... | 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.25+commit.59dbf8f1 | bzzr://d2f40a04f505f0a60799ef6425f5cd1eeb5aac4b3177331311d5620122d01b0e | {
"func_code_index": [
95,
302
]
} | 2,295 | |||
HappyNewYearToken | HappyNewYearToken.sol | 0x8189952b0b8d88622a4b0b592f0b7115d81e16fc | 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;
}
/**
* ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://d2f40a04f505f0a60799ef6425f5cd1eeb5aac4b3177331311d5620122d01b0e | {
"func_code_index": [
392,
692
]
} | 2,296 | |||
HappyNewYearToken | HappyNewYearToken.sol | 0x8189952b0b8d88622a4b0b592f0b7115d81e16fc | 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;
}
/**
* ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://d2f40a04f505f0a60799ef6425f5cd1eeb5aac4b3177331311d5620122d01b0e | {
"func_code_index": [
812,
940
]
} | 2,297 | |||
HappyNewYearToken | HappyNewYearToken.sol | 0x8189952b0b8d88622a4b0b592f0b7115d81e16fc | 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;
}
/**
* ... | 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.25+commit.59dbf8f1 | bzzr://d2f40a04f505f0a60799ef6425f5cd1eeb5aac4b3177331311d5620122d01b0e | {
"func_code_index": [
1010,
1156
]
} | 2,298 | |||
Bleeps | src/base/ERC721BaseWithERC4494Permit.sol | 0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78 | Solidity | ERC721BaseWithERC4494Permit | abstract contract ERC721BaseWithERC4494Permit is ERC721Base {
using Address for address;
bytes32 public constant PERMIT_TYPEHASH =
keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)");
bytes32 public constant PERMIT_FOR_ALL_TYPEHASH =
keccak256("PermitForAll(a... | DOMAIN_SEPARATOR | function DOMAIN_SEPARATOR() external view returns (bytes32) {
return _DOMAIN_SEPARATOR();
}
| /// @dev Return the DOMAIN_SEPARATOR. | NatSpecSingleLine | v0.8.9+commit.e5eed63a | MIT | {
"func_code_index": [
993,
1100
]
} | 2,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.