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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
980,
1101
]
} | 14,900 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
1321,
1450
]
} | 14,901 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
1794,
2071
]
} | 14,902 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
2579,
2787
]
} | 14,903 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(from, to, tokens);
return... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
3318,
3676
]
} | 14,904 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
3959,
4115
]
} | 14,905 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
4470,
4787
]
} | 14,906 |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
4979,
5038
]
} | 14,907 | |
CornField | CornField.sol | 0xbcb58347ac827b9c4f29248de70487d23d4d3301 | Solidity | CornField | contract CornField is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://ef7e394f5be9951248172a96f1eca1d51046beb74881fc5a1348d2e87e7ca1b8 | {
"func_code_index": [
5271,
5460
]
} | 14,908 |
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
104,
168
]
} | 14,909 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
261,
338
]
} | 14,910 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
584,
670
]
} | 14,911 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
971,
1063
]
} | 14,912 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
1770,
1853
]
} | 14,913 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view r... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
2194,
2300
]
} | 14,914 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
290,
496
]
} | 14,915 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
805,
958
]
} | 14,916 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
1287,
1504
]
} | 14,917 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
1789,
2309
]
} | 14,918 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
2817,
2966
]
} | 14,919 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
3494,
3801
]
} | 14,920 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
4298,
4445
]
} | 14,921 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
4962,
5149
]
} | 14,922 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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.
*
* Amon... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
658,
1322
]
} | 14,923 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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.
*
* Amon... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
2301,
2727
]
} | 14,924 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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.
*
* Amon... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
3538,
3726
]
} | 14,925 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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.
*
* Amon... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
3970,
4183
]
} | 14,926 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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.
*
* Amon... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
4587,
4830
]
} | 14,927 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | 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.
*
* Amon... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
5100,
5437
]
} | 14,928 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
622,
718
]
} | 14,929 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
1324,
1493
]
} | 14,930 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
1656,
1925
]
} | 14,931 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
2109,
2352
]
} | 14,932 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
2431,
2753
]
} | 14,933 | ||
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | MVP | contract MVP is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
m... | // Contract implementarion | LineComment | manualSwap | function manualSwap() external onlyOwner() {
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
| // We are exposing these functions to be able to manual swap and send
// in case the token is highly valued and 5M becomes too much | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
11350,
11527
]
} | 14,934 |
MVP | MVP.sol | 0x93cc91853e6cac729ce5432d007e8b744b282daa | Solidity | MVP | contract MVP is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
m... | // Contract implementarion | LineComment | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://cdc62440aacead5521adcab97f556c9c7872c1bfc1b6c3aa50365cce884cc33d | {
"func_code_index": [
15736,
15774
]
} | 14,935 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @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 `recipi... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
165,
238
]
} | 14,936 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @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 `recipi... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
462,
544
]
} | 14,937 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @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 `recipi... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
823,
911
]
} | 14,938 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @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 `recipi... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1575,
1654
]
} | 14,939 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @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 `recipi... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1967,
2069
]
} | 14,940 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
259,
445
]
} | 14,941 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
723,
864
]
} | 14,942 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1162,
1359
]
} | 14,943 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1613,
2089
]
} | 14,944 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
2560,
2697
]
} | 14,945 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
3188,
3471
]
} | 14,946 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
3931,
4066
]
} | 14,947 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
4546,
4717
]
} | 14,948 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
606,
1230
]
} | 14,949 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
2160,
2562
]
} | 14,950 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
3318,
3496
]
} | 14,951 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
3721,
3922
]
} | 14,952 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
4292,
4523
]
} | 14,953 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
4774,
5095
]
} | 14,954 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
566,
650
]
} | 14,955 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1209,
1362
]
} | 14,956 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1512,
1761
]
} | 14,957 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
1929,
2148
]
} | 14,958 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
2219,
2517
]
} | 14,959 |
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Token | contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
// These are 3 mappings are used to keep track of the amount of tokens people own
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address =>... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
8459,
8493
]
} | 14,960 | ||||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Token | contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
// These are 3 mappings are used to keep track of the amount of tokens people own
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address =>... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount) private {
if(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]){
removeAllFee();
}
//Calculate burn amount and dev amount
uint256 burnAmt = amount.mul(_burnFee).div(100);
uint256 devAmt = amo... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
15749,
17410
]
} | 14,961 | ||
Token | Token.sol | 0x2eba25d498a43101ceac28f9a9fc9333f2303e40 | Solidity | Token | contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
// These are 3 mappings are used to keep track of the amount of tokens people own
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address =>... | setRouterAddress | function setRouterAddress(address newRouter) public onlyOwner() {
IUniswapV2Router02 _newPancakeRouter = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_newPancakeRouter.factory()).createPair(address(this), _newPancakeRouter.WETH());
uniswapV2Router = _newPancakeRouter;
}
| // Just in case you need to change the router address ( you shouldnt need to do that unless uniswap updates their contracts) | LineComment | v0.6.12+commit.27d51765 | None | ipfs://5e76b4cf3eb001a92e81e9b65ebde9fc9758696d1e9df6892c953dce5279488b | {
"func_code_index": [
20048,
20375
]
} | 14,962 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | sortTokens | function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'UniswapV2Library: ZERO_... | // returns sorted token addresses, used to handle return values from pairs sorted in this order | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
161,
515
]
} | 14,963 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | pairFor | function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(uint(keccak256(abi.encodePacked(
hex'ff',
factory,
keccak256(abi.encodePacked(token0, to... | // calculates the CREATE2 address for a pair without making any external calls | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
602,
1085
]
} | 14,964 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getReserves | function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == t... | // fetches and sorts the reserves for a pair | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
1138,
1534
]
} | 14,965 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | quote | function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
amountB = amountA.mul(reserveB) / reserveA;
}
| // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
1642,
1968
]
} | 14,966 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountOut | function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint amountInWithFee = amountIn.mul(99... | // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
2085,
2607
]
} | 14,967 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountIn | function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint numerator = reserveIn.mul(amount... | // given an output amount of an asset and pair reserves, returns a required input amount of the other asset | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
2723,
3200
]
} | 14,968 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountsOut | function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[0] = amountIn;
for (uint i; i < path.length - 1; i++) {
(uint... | // performs chained getAmountOut calculations on any number of pairs | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
3277,
3793
]
} | 14,969 | ||
UniswapLPOracleFactory | @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2L... | getAmountsIn | function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint i = path.length - 1; i > 0;... | // performs chained getAmountIn calculations on any number of pairs | LineComment | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
3869,
4406
]
} | 14,970 | ||
UniswapLPOracleFactory | contracts\UniswapLPOracleFactory.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapLPOracleFactory | contract UniswapLPOracleFactory is Ownable {
using SafeMath for uint256;
address public usdc_add;
address public factory;
IUniswapV2Router02 public uniswapRouter;
mapping(address => address[]) public LPAssetTracker;
mapping(address => address) public instanceTracker;
mapping(address... | /**
The UniswapLPOracleFactory contract is designed to produce individual UniswapLPOracleInstance contracts
This contract uses the OpenZeppelin contract Library to inherit functions from
Ownable.sol
**/ | NatSpecMultiLine | createNewOracles | function createNewOracles(
address _tokenA,
address _tokenB,
address _lpToken
) public onlyOwner {
(address token0, address token1) = sortTokens(_tokenA, _tokenB);
address oracle1 = tokenToUSDC[token0];
if (oracle1 == address(0)) {
oracle1 = address(
new UniswapLPO... | /**
@notice createNewOracle allows the owner of this contract to deploy deploy two new asset oracle contracts
when a new LP token is whitelisted. this contract will link the address of an LP token contract to
two seperate oracles that are designed to look up the price of their respective assets in USDC. This
wi... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
2453,
3341
]
} | 14,971 |
UniswapLPOracleFactory | contracts\UniswapLPOracleFactory.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapLPOracleFactory | contract UniswapLPOracleFactory is Ownable {
using SafeMath for uint256;
address public usdc_add;
address public factory;
IUniswapV2Router02 public uniswapRouter;
mapping(address => address[]) public LPAssetTracker;
mapping(address => address) public instanceTracker;
mapping(address... | /**
The UniswapLPOracleFactory contract is designed to produce individual UniswapLPOracleInstance contracts
This contract uses the OpenZeppelin contract Library to inherit functions from
Ownable.sol
**/ | NatSpecMultiLine | getUnderlyingPrice | function getUnderlyingPrice(address _lpToken) public returns (uint256) {
address[] memory oracleAdds = LPAssetTracker[_lpToken];
//retreives the oracle contract addresses for each asset that makes up a LP
UniswapLPOracleInstance oracle1 = UniswapLPOracleInstance(
oracleAdds[0]
);
Unisw... | /**
@notice getUnderlyingPrice allows for the price calculation and retrieval of a LP tokens price
@param _lpToken is the address of the LP token whos asset price is being retrieved
@return returns the price of one LP token
**/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
3598,
4961
]
} | 14,972 |
UniswapLPOracleFactory | contracts\UniswapLPOracleFactory.sol | 0x4a224cd0517f08b26608a2f73bf390b01a6618c8 | Solidity | UniswapLPOracleFactory | contract UniswapLPOracleFactory is Ownable {
using SafeMath for uint256;
address public usdc_add;
address public factory;
IUniswapV2Router02 public uniswapRouter;
mapping(address => address[]) public LPAssetTracker;
mapping(address => address) public instanceTracker;
mapping(address... | /**
The UniswapLPOracleFactory contract is designed to produce individual UniswapLPOracleInstance contracts
This contract uses the OpenZeppelin contract Library to inherit functions from
Ownable.sol
**/ | NatSpecMultiLine | viewUnderlyingPrice | function viewUnderlyingPrice(address _lpToken)
public
view
returns (uint256)
{
address[] memory oracleAdds = LPAssetTracker[_lpToken];
//retreives the oracle contract addresses for each asset that makes up a LP
UniswapLPOracleInstance oracle1 = UniswapLPOracleInstance(
oracleAdds... | /**
@notice viewUnderlyingPrice allows for the price retrieval of a LP tokens price
@param _lpToken is the address of the LP token whos asset price is being retrieved
@return returns the price of one LP token
**/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a | {
"func_code_index": [
5694,
7155
]
} | 14,973 |
SportGiftToken | contracts/SportGiftToken.sol | 0x0d325b398288ccb6363cfdfc2f05ab1afff9c3fb | Solidity | SportGiftToken | contract SportGiftToken is StandardToken, Ownable {
string public constant name = "SportGift Token";
string public constant symbol = "SPORTG";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals));
mapping (address => bool) pu... | /**
* @title SportGiftTtoken
* @dev DistributableToken contract is based on a simple initial supply token, with an API for the owner to perform bulk distributions.
* transactions to the distributeTokens function should be paginated to avoid gas limits or computational time restrictions.
*/ | NatSpecMultiLine | airDrop | function airDrop ( address contractObj,
address tokenRepo,
address[] airDropDesinationAddress,
uint[] amounts) public onlyOwner{
for( uint i = 0 ; i < airDropDesinationAddress.length ; i++ ) {
ERC20(contractObj).transferFrom( tokenRepo, airDropDesinationAddress[i],amounts[i]);
}
}
| ///Airdrop's function | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://821cafc18b6f516aec62349ada371e146f602f50c298d40fc28aad751b11b179 | {
"func_code_index": [
957,
1286
]
} | 14,974 | |
SportGiftToken | contracts/SportGiftToken.sol | 0x0d325b398288ccb6363cfdfc2f05ab1afff9c3fb | Solidity | SportGiftToken | contract SportGiftToken is StandardToken, Ownable {
string public constant name = "SportGift Token";
string public constant symbol = "SPORTG";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals));
mapping (address => bool) pu... | /**
* @title SportGiftTtoken
* @dev DistributableToken contract is based on a simple initial supply token, with an API for the owner to perform bulk distributions.
* transactions to the distributeTokens function should be paginated to avoid gas limits or computational time restrictions.
*/ | NatSpecMultiLine | freezeAccount | function freezeAccount(address target, bool freeze) public onlyOwner{
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
| /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://821cafc18b6f516aec62349ada371e146f602f50c298d40fc28aad751b11b179 | {
"func_code_index": [
1468,
1634
]
} | 14,975 | |
RestrictedToken | contracts/TransferRules.sol | 0x2c3d7c64e2ada94d9ecb1ee2aef992d127ce43de | Solidity | TransferRules | contract TransferRules is ITransferRules {
using SafeMath for uint256;
mapping(uint8 => string) internal errorMessage;
uint8 public constant SUCCESS = 0;
uint8 public constant GREATER_THAN_RECIPIENT_MAX_BALANCE = 1;
uint8 public constant SENDER_TOKENS_TIME_LOCKED = 2;
uint8 public consta... | detectTransferRestriction | function detectTransferRestriction(address _token, address from, address to, uint256 value) external view returns(uint8) {
RestrictedToken token = RestrictedToken(_token);
if (token.isPaused()) return ALL_TRANSFERS_PAUSED;
if (to == address(0)) return DO_NOT_SEND_TO_EMPTY_ADDRESS;
if (to == address(token)) ... | /// @notice Detects if a transfer will be reverted and if so returns an appropriate reference code
/// @param from Sending address
/// @param to Receiving address
/// @param value Amount of tokens being transferred
/// @return Code by which to reference message for rejection reason | NatSpecSingleLine | v0.5.12+commit.7709ece9 | MIT | bzzr://ccfbc6e4dd4827747e21570ea618016582b01d4b9bb253a408ff0135733064a9 | {
"func_code_index": [
1681,
2537
]
} | 14,976 | ||
RestrictedToken | contracts/TransferRules.sol | 0x2c3d7c64e2ada94d9ecb1ee2aef992d127ce43de | Solidity | TransferRules | contract TransferRules is ITransferRules {
using SafeMath for uint256;
mapping(uint8 => string) internal errorMessage;
uint8 public constant SUCCESS = 0;
uint8 public constant GREATER_THAN_RECIPIENT_MAX_BALANCE = 1;
uint8 public constant SENDER_TOKENS_TIME_LOCKED = 2;
uint8 public consta... | messageForTransferRestriction | function messageForTransferRestriction(uint8 restrictionCode) external view returns(string memory) {
return errorMessage[restrictionCode];
}
| /// @notice Returns a human-readable message for a given restriction code
/// @param restrictionCode Identifier for looking up a message
/// @return Text showing the restriction's reasoning | NatSpecSingleLine | v0.5.12+commit.7709ece9 | MIT | bzzr://ccfbc6e4dd4827747e21570ea618016582b01d4b9bb253a408ff0135733064a9 | {
"func_code_index": [
2739,
2890
]
} | 14,977 | ||
RestrictedToken | contracts/TransferRules.sol | 0x2c3d7c64e2ada94d9ecb1ee2aef992d127ce43de | Solidity | TransferRules | contract TransferRules is ITransferRules {
using SafeMath for uint256;
mapping(uint8 => string) internal errorMessage;
uint8 public constant SUCCESS = 0;
uint8 public constant GREATER_THAN_RECIPIENT_MAX_BALANCE = 1;
uint8 public constant SENDER_TOKENS_TIME_LOCKED = 2;
uint8 public consta... | checkSuccess | function checkSuccess(uint8 restrictionCode) external view returns(bool isSuccess) {
return restrictionCode == SUCCESS;
}
| /// @notice a method for checking a response code to determine if a transfer was succesful.
/// Defining this separately from the token contract allows it to be upgraded.
/// For instance this method would need to be upgraded if the SUCCESS code was changed to 1
/// as specified in ERC-1066 instead of 0 as specified in... | NatSpecSingleLine | v0.5.12+commit.7709ece9 | MIT | bzzr://ccfbc6e4dd4827747e21570ea618016582b01d4b9bb253a408ff0135733064a9 | {
"func_code_index": [
3364,
3496
]
} | 14,978 | ||
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
261,
314
]
} | 14,979 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
637,
813
]
} | 14,980 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @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));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return ... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
268,
613
]
} | 14,981 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
819,
935
]
} | 14,982 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);... | /**
* @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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
392,
941
]
} | 14,983 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) 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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
1573,
1763
]
} | 14,984 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) 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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2087,
2232
]
} | 14,985 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2477,
2748
]
} | 14,986 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | MINDToken | contract MINDToken is StandardToken, Ownable {
string public constant name = "MIND Token";
string public constant symbol = "MIND";
uint8 public constant decimals = 18;
uint public transferableStartTime;
address public tokenSaleContract;
address public fullTokenWallet;
... | /**
* @title The MINDToken contract
* @dev The MINDToken Token contract
* @dev inherite from StandardToken and Ownable by Zeppelin
* @author Request.network
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint _value)
public
validDestination(_to)
onlyWhenTransferEnabled
returns (bool)
{
return super.transfer(_to, _value);
}
| /**
* @dev override transfer token for a specified address to add onlyWhenTransferEnabled and validDestination
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
1784,
1996
]
} | 14,987 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | MINDToken | contract MINDToken is StandardToken, Ownable {
string public constant name = "MIND Token";
string public constant symbol = "MIND";
uint8 public constant decimals = 18;
uint public transferableStartTime;
address public tokenSaleContract;
address public fullTokenWallet;
... | /**
* @title The MINDToken contract
* @dev The MINDToken Token contract
* @dev inherite from StandardToken and Ownable by Zeppelin
* @author Request.network
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint _value)
public
validDestination(_to)
onlyWhenTransferEnabled
returns (bool)
{
return super.transferFrom(_from, _to, _value);
}
| /**
* @dev override transferFrom token for a specified address to add onlyWhenTransferEnabled and validDestination
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2284,
2526
]
} | 14,988 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | MINDToken | contract MINDToken is StandardToken, Ownable {
string public constant name = "MIND Token";
string public constant symbol = "MIND";
uint8 public constant decimals = 18;
uint public transferableStartTime;
address public tokenSaleContract;
address public fullTokenWallet;
... | /**
* @title The MINDToken contract
* @dev The MINDToken Token contract
* @dev inherite from StandardToken and Ownable by Zeppelin
* @author Request.network
*/ | NatSpecMultiLine | burn | function burn(uint _value)
public
onlyWhenTransferEnabled
onlyOwner
returns (bool)
{
balances[msg.sender] = balances[msg.sender].sub(_value);
totalSupply = totalSupply.sub(_value);
Burn(msg.sender, _value);
Transfer(msg.sender, address(0x0), _value);
return true;
}
| /**
* @dev burn tokens
* @param _value The amount to be burned.
* @return always true (necessary in case of override)
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2736,
3098
]
} | 14,989 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | MINDToken | contract MINDToken is StandardToken, Ownable {
string public constant name = "MIND Token";
string public constant symbol = "MIND";
uint8 public constant decimals = 18;
uint public transferableStartTime;
address public tokenSaleContract;
address public fullTokenWallet;
... | /**
* @title The MINDToken contract
* @dev The MINDToken Token contract
* @dev inherite from StandardToken and Ownable by Zeppelin
* @author Request.network
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address _from, uint256 _value)
public
onlyWhenTransferEnabled
onlyOwner
returns(bool)
{
assert(transferFrom(_from, msg.sender, _value));
return burn(_value);
}
| /**
* @dev burn tokens in the behalf of someone
* @param _from The address of the owner of the token.
* @param _value The amount to be burned.
* @return always true (necessary in case of override)
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
3336,
3584
]
} | 14,990 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | MINDToken | contract MINDToken is StandardToken, Ownable {
string public constant name = "MIND Token";
string public constant symbol = "MIND";
uint8 public constant decimals = 18;
uint public transferableStartTime;
address public tokenSaleContract;
address public fullTokenWallet;
... | /**
* @title The MINDToken contract
* @dev The MINDToken Token contract
* @dev inherite from StandardToken and Ownable by Zeppelin
* @author Request.network
*/ | NatSpecMultiLine | enableTransferEarlier | function enableTransferEarlier ()
public
onlySaleContract
{
transferableStartTime = now + 3 days;
}
| /**
* enable transfer earlier (only presale contract can enable the sale earlier)
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
3688,
3829
]
} | 14,991 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | MINDToken | contract MINDToken is StandardToken, Ownable {
string public constant name = "MIND Token";
string public constant symbol = "MIND";
uint8 public constant decimals = 18;
uint public transferableStartTime;
address public tokenSaleContract;
address public fullTokenWallet;
... | /**
* @title The MINDToken contract
* @dev The MINDToken Token contract
* @dev inherite from StandardToken and Ownable by Zeppelin
* @author Request.network
*/ | NatSpecMultiLine | emergencyERC20Drain | function emergencyERC20Drain(ERC20 token, uint amount )
public
onlyOwner
{
token.transfer(owner, amount);
}
| /**
* @dev transfer to owner any tokens send by mistake on this contracts
* @param token The address of the token to transfer.
* @param amount The amount to be transfered.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
4038,
4188
]
} | 14,992 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | createTokenContract | function createTokenContract()
internal
returns(StandardToken)
{
return new StandardToken();
}
| // creates the token to be sold.
// Request Modification : change to StandardToken
// override this method to have crowdsale of a specific mintable token. | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
1534,
1673
]
} | 14,993 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | function ()
payable
{
buyTokens();
}
| // fallback function can be used to buy tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
1728,
1798
]
} | 14,994 | ||
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | buyTokens | function buyTokens()
public
payable
{
require(validPurchase());
uint256 weiAmount = msg.value;
// calculate token amount to be created
uint256 tokens = weiAmount.mul(rate);
tokens += getBonus(tokens);
// update state
weiRaised = weiRaised.add(weiAmount);
requi... | // low level token purchase function
// Request Modification : change to not mint but transfer from this contract | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
1925,
2519
]
} | 14,995 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | postBuyTokens | function postBuyTokens ()
internal
{
}
| // Action after buying tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2557,
2619
]
} | 14,996 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | 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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2732,
2830
]
} | 14,997 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | validPurchase | function validPurchase()
internal
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.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
2888,
3137
]
} | 14,998 | |
MINDTokenPreSale | MINDTokenPreSale.sol | 0x203a118122f4b61ae8d09d57fcffe99600262706 | Solidity | StandardCrowdsale | contract StandardCrowdsale {
using SafeMath for uint256;
// The token being sold
StandardToken public token; // Request Modification : change to not mintable
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
... | /**
* @title StandardCrowdsale
* @dev StandardCrowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wal... | NatSpecMultiLine | hasEnded | function hasEnded()
public
constant
returns(bool)
{
return now > endTime;
}
| // @return true if crowdsale event has ended | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29e619335ccf4ba9f569fb76b1721bd8f0c101202157583eb18f6014a738ac1d | {
"func_code_index": [
3190,
3320
]
} | 14,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.