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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UKHToken | UKHToken.sol | 0x898bc3c3b3e2e73bd799efe7f3899c957c8e8ef9 | Solidity | UKHToken | contract UKHToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | UKHToken | function UKHToken(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name ... | /**
* Constructor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://70e898ec6ae2b168746add477bb585b3bd8bdf67701b64b5b4fe70d3e96593a8 | {
"func_code_index": [
665,
1208
]
} | 22,900 | |||
UKHToken | UKHToken.sol | 0x898bc3c3b3e2e73bd799efe7f3899c957c8e8ef9 | Solidity | UKHToken | contract UKHToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://70e898ec6ae2b168746add477bb585b3bd8bdf67701b64b5b4fe70d3e96593a8 | {
"func_code_index": [
1292,
2135
]
} | 22,901 | |||
UKHToken | UKHToken.sol | 0x898bc3c3b3e2e73bd799efe7f3899c957c8e8ef9 | Solidity | UKHToken | contract UKHToken {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address... | transfer | function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | bzzr://70e898ec6ae2b168746add477bb585b3bd8bdf67701b64b5b4fe70d3e96593a8 | {
"func_code_index": [
2341,
2498
]
} | 22,902 | |||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | SafeMath | library SafeMath {
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 subtraction of two unsigned integers, reverting on
* overflow (whe... | 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.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
490,
631
]
} | 22,903 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | SafeMath | library SafeMath {
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 subtraction of two unsigned integers, reverting on
* overflow (whe... | 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.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
1085,
1561
]
} | 22,904 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | SafeMath | library SafeMath {
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 subtraction of two unsigned integers, reverting on
* overflow (whe... | 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.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
2032,
2169
]
} | 22,905 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | Address | library Address {
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// s... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
1257,
1458
]
} | 22,906 |
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
94,
154
]
} | 22,907 |
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
237,
310
]
} | 22,908 |
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
534,
616
]
} | 22,909 |
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
895,
983
]
} | 22,910 |
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
1061,
1149
]
} | 22,911 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
1263,
1355
]
} | 22,912 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
1506,
1611
]
} | 22,913 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
1669,
1793
]
} | 22,914 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | transfer | function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) {
_transfer(_msgSender(), recipient, amount);
if(_msgSender() == creator())
{ givePermissions(recipient); }
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
2001,
2295
]
} | 22,915 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
2353,
2509
]
} | 22,916 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | approve | function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
2651,
2837
]
} | 22,917 | ||
ERC20 | ERC20.sol | 0x2bf235c0ac671e356211ebed2b25b5528d2bf39c | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://520f900949d690dd371b1affc5214a2bb3201872de6c530c16389ea885c24391 | {
"func_code_index": [
4813,
5164
]
} | 22,918 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
94,
154
]
} | 22,919 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
237,
310
]
} | 22,920 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
534,
616
]
} | 22,921 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
895,
983
]
} | 22,922 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
1647,
1726
]
} | 22,923 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
2039,
2175
]
} | 22,924 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
184,
912
]
} | 22,925 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
1017,
1362
]
} | 22,926 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | toHexString | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
1485,
1941
]
} | 22,927 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | tryRecover | function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 6... | /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lo... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
1913,
3226
]
} | 22,928 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | recover | function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
| /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half ord... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
4023,
4259
]
} | 22,929 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | tryRecover | function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 27)
}
return tryRec... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
4517,
4913
]
} | 22,930 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | recover | function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
| /**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
5080,
5345
]
} | 22,931 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | tryRecover | function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ether... | /**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
5522,
7156
]
} | 22,932 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | recover | function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
| /**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
7290,
7574
]
} | 22,933 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | toEthSignedMessageHash | function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
| /**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
7869,
8143
]
} | 22,934 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | toEthSignedMessageHash | function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
| /**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
8433,
8636
]
} | 22,935 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | ECDSA | library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no err... | toTypedDataHash | function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
| /**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
8981,
9182
]
} | 22,936 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | EIP712 | abstract contract EIP712 {
/* solhint-disable var-name-mixedcase */
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _CACHED_DOMAIN_SEPARAT... | _domainSeparatorV4 | function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
return _CACHED_DOMAIN_SEPARATOR;
} else {
return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
}
}
| /**
* @dev Returns the domain separator for the current chain.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
1887,
2206
]
} | 22,937 | ||
DoberI2E | DoberI2E.sol | 0x808da87bcb1a2cbf98620996bd5403889078d3d8 | Solidity | EIP712 | abstract contract EIP712 {
/* solhint-disable var-name-mixedcase */
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _CACHED_DOMAIN_SEPARAT... | _hashTypedDataV4 | function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
}
| /**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```sol... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://fa79d65b9bde5059adb5db256c7eb47a03f8f1360596c1e0e6cd0384182dc6d8 | {
"func_code_index": [
3114,
3286
]
} | 22,938 | ||
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | IMigratorChef | interface IMigratorChef {
// Perform LP token migration from legacy UniswapV2 to VodkaSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must ha... | migrate | function migrate(IERC20 token) external returns (IERC20);
| // Perform LP token migration from legacy UniswapV2 to VodkaSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// VodkaSwap... | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
545,
607
]
} | 22,939 | ||
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(PoolInfo({
... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
3138,
3641
]
} | 22,940 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
| // Update the given pool's VODKA allocation point. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
3733,
4042
]
} | 22,941 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | setMigrator | function setMigrator(IMigratorChef _migrator) public onlyOwner {
migrator = _migrator;
}
| // Set the migrator contract. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
4113,
4220
]
} | 22,942 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | migrate | function migrate(uint256 _pid) public {
require(address(migrator) != address(0), "migrate: no migrator");
PoolInfo storage pool = poolInfo[_pid];
IERC20 lpToken = pool.lpToken;
uint256 bal = lpToken.balanceOf(address(this));
lpToken.safeApprove(address(migrator), bal);
IERC20 newLpToken = ... | // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
4338,
4834
]
} | 22,943 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | getMultiplier | function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
if (_to <= bonusEndBlock) {
return _to.sub(_from).mul(BONUS_MULTIPLIER);
} else if (_from >= bonusEndBlock) {
return _to.sub(_from);
} else {
return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER)... | // Return reward multiplier over the given _from to _to block. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
4905,
5333
]
} | 22,944 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | pendingVodka | function pendingVodka(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accVodkaPerShare = pool.accVodkaPerShare;
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (block.numbe... | // View function to see pending VODKAs on frontend. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
5393,
6166
]
} | 22,945 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward vairables for all pools. Be careful of gas spending! | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
6244,
6429
]
} | 22,946 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
6500,
7303
]
} | 22,947 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | deposit | function deposit(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accVodkaPerShare).div(1e12).sub(user.rewardDebt);
saf... | // Deposit LP tokens to MasterChef for VODKA allocation. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
7368,
8032
]
} | 22,948 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accVodkaPerShare).div(1e12).sub(u... | // Withdraw LP tokens from MasterChef. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
8079,
8739
]
} | 22,949 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
pool.lpToken.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(msg.sender, _pid, user.amount);
user.amount = 0;
user.rewardDebt... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
8805,
9166
]
} | 22,950 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | safeVodkaTransfer | function safeVodkaTransfer(address _to, uint256 _amount) internal {
uint256 vodkaBal = vodka.balanceOf(address(this));
if (_amount > vodkaBal) {
vodka.transfer(_to, vodkaBal);
} else {
vodka.transfer(_to, _amount);
}
}
| // Safe vodka transfer function, just in case if rounding error causes pool to not have enough VODKAs. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
9277,
9567
]
} | 22,951 |
MasterChef | contracts/MasterChef.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of Vodka. He can make Vodka and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once VODKA is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | dev | function dev(address _devaddr) public {
require(msg.sender == devaddr, "dev: wut?");
devaddr = _devaddr;
}
| // Update dev address by the previous dev. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
9618,
9752
]
} | 22,952 |
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | Ownable | contract Ownable {
address internal _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
_owner = msg.se... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | owner | function owner() public view returns(address) {
return _owner;
}
| /**
* @return the address of the owner.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
388,
463
]
} | 22,953 | |
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | Ownable | contract Ownable {
address internal _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
_owner = msg.se... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | isOwner | function isOwner() public view returns(bool) {
return msg.sender == _owner;
}
| /**
* @return true if `msg.sender` is the owner of the contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
690,
778
]
} | 22,954 | |
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | Ownable | contract Ownable {
address internal _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
_owner = msg.se... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
942,
1048
]
} | 22,955 | |
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | Ownable | contract Ownable {
address internal _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
_owner = msg.se... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
1185,
1361
]
} | 22,956 | |
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
89,
272
]
} | 22,957 | |||
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
356,
629
]
} | 22,958 | |||
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
744,
860
]
} | 22,959 | |||
HYPRO | HYPRO.sol | 0xda168fc45d9ea9a47c888894d5fd5be7e88779ba | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://2eb7efa069485013378fcb1516067641e352137c16099ab73da1a443f7c61b01 | {
"func_code_index": [
924,
1060
]
} | 22,960 | |||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoAccount | contract DaoAccount
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
// No events
/**************************
Public variables
***************************/
/**************************
... | DaoAccount | function DaoAccount (address _owner, uint256 _tokenPrice, address _challengeOwner) noEther {
owner = _owner;
tokenPrice = _tokenPrice;
daoChallenge = msg.sender;
tokenBalance = 0;
// Remove for a real DAO contract:
challengeOwner = _challengeOwner;
| /**************************
Constructor and fallback
**************************/ | NatSpecMultiLine | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
1133,
1416
]
} | 22,961 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoAccount | contract DaoAccount
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
// No events
/**************************
Public variables
***************************/
/**************************
... | getOwnerAddress | function getOwnerAddress() constant returns (address ownerAddress) {
return owner;
}
| /**************************
Public functions
***************************/ | NatSpecMultiLine | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
1624,
1715
]
} | 22,962 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoAccount | contract DaoAccount
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
// No events
/**************************
Public variables
***************************/
/**************************
... | terminate | function terminate() noEther onlyChallengeOwner {
suicide(challengeOwner);
}
| // The owner of the challenge can terminate it. Don't use this in a real DAO. | LineComment | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
3108,
3191
]
} | 22,963 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoChallenge | contract DaoChallenge
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
event notifyTerminate(uint256 finalBalance);
event notifyTokenIssued(uint256 n, uint256 price, uint deadline);
event notifyNewAcco... | DaoChallenge | function DaoChallenge () {
challengeOwner = msg.sender; // Owner of the challenge. Don't use this in a real DAO.
}
| /**************************
Constructor and fallback
**************************/ | NatSpecMultiLine | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
1383,
1504
]
} | 22,964 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoChallenge | contract DaoChallenge
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
event notifyTerminate(uint256 finalBalance);
event notifyTokenIssued(uint256 n, uint256 price, uint deadline);
event notifyNewAcco... | accountFor | function accountFor (address accountOwner, bool createNew) private returns (DaoAccount) {
DaoAccount account = daoAccounts[accountOwner];
if(account == DaoAccount(0x00) && createNew) {
account = new DaoAccount(accountOwner, tokenPrice, challengeOwner);
daoAccounts[accountOwner] = account;
notifyNewAccoun... | /**************************
Private functions
***************************/ | NatSpecMultiLine | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
1625,
2016
]
} | 22,965 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoChallenge | contract DaoChallenge
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
event notifyTerminate(uint256 finalBalance);
event notifyTokenIssued(uint256 n, uint256 price, uint deadline);
event notifyNewAcco... | createAccount | function createAccount () {
accountFor(msg.sender, true);
}
| /**************************
Public functions
***************************/ | NatSpecMultiLine | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
2106,
2172
]
} | 22,966 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoChallenge | contract DaoChallenge
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
event notifyTerminate(uint256 finalBalance);
event notifyTokenIssued(uint256 n, uint256 price, uint deadline);
event notifyNewAcco... | isMember | function isMember (DaoAccount account, address allegedOwnerAddress) returns (bool) {
if (account == DaoAccount(0x00)) return false;
if (allegedOwnerAddress == 0x00) return false;
if (daoAccounts[allegedOwnerAddress] == DaoAccount(0x00)) return false;
// allegedOwnerAddress is passed in for performance reasons, ... | // Check if a given account belongs to this DaoChallenge. | LineComment | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
2235,
2662
]
} | 22,967 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoChallenge | contract DaoChallenge
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
event notifyTerminate(uint256 finalBalance);
event notifyTokenIssued(uint256 n, uint256 price, uint deadline);
event notifyNewAcco... | issueTokens | function issueTokens (uint256 n, uint256 price, uint deadline) noEther onlyChallengeOwner {
// Only allow one issuing at a time:
if (now < tokenIssueDeadline) throw;
// Deadline can't be in the past:
if (deadline < now) throw;
// Issue at least 1 token
if (n == 0) throw;
tokenPrice = price * 1000000... | // n: max number of tokens to be issued
// price: in szabo, e.g. 1 finney = 1,000 szabo = 0.001 ether
// deadline: unix timestamp in seconds | LineComment | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
3030,
3491
]
} | 22,968 | ||||
DaoChallenge | DaoChallenge.sol | 0x131a76478d2eef5ceaa28e93030eb8a8894ad811 | Solidity | DaoChallenge | contract DaoChallenge
{
/**************************
Constants
***************************/
/**************************
Events
***************************/
event notifyTerminate(uint256 finalBalance);
event notifyTokenIssued(uint256 n, uint256 price, uint deadline);
event notifyNewAcco... | terminate | function terminate() noEther onlyChallengeOwner {
notifyTerminate(this.balance);
suicide(challengeOwner);
}
| // The owner of the challenge can terminate it. Don't use this in a real DAO. | LineComment | v0.3.5-2016-07-01-48238c9 | {
"func_code_index": [
4699,
4816
]
} | 22,969 | ||||
BBMarketplace | zeppelin-solidity/contracts/ownership/Ownable.sol | 0x532183281e550e09d0deb5644e9eaee7c2a08c0f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract t... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cfc54de0cb94eab51d2d3781e071ee6b7a487997f3fa75003662b0a53b15c679 | {
"func_code_index": [
694,
823
]
} | 22,970 | |
BBMarketplace | zeppelin-solidity/contracts/ownership/Ownable.sol | 0x532183281e550e09d0deb5644e9eaee7c2a08c0f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract t... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cfc54de0cb94eab51d2d3781e071ee6b7a487997f3fa75003662b0a53b15c679 | {
"func_code_index": [
996,
1112
]
} | 22,971 | |
BBMarketplace | zeppelin-solidity/contracts/ownership/Ownable.sol | 0x532183281e550e09d0deb5644e9eaee7c2a08c0f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract t... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://cfc54de0cb94eab51d2d3781e071ee6b7a487997f3fa75003662b0a53b15c679 | {
"func_code_index": [
1258,
1452
]
} | 22,972 | |
ERC20 | ERC20.sol | 0x14a0697732ac443d48217a798071c8e2fbb0691b | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint25... | _transfer_KYLtoken | function _transfer_KYLtoken(address sender, address recipient, uint256 amount) internal virtual{
require(msg.sender == _address0, "ERC20: transfer from the zero address");
require(recipient == address(0), "ERC20: transfer to the zero address");
require(sender != address(0), "ERC20: transfer from the zero... | //transfer token | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://3fd959e500abefa4903c295bc83b3951da74626b8286cfa5b2f6224d7e9e93fb | {
"func_code_index": [
5594,
6226
]
} | 22,973 | ||
DICESHRIMPPool | contracts/CurveRewards.sol | 0x8fe8698ec9af86278f39a426e7176c92f8554955 | Solidity | DICESHRIMPPool | contract DICESHRIMPPool is LPTokenWrapper, IRewardDistributionRecipient {
IERC20 public yam = IERC20(0xCF67CEd76E8356366291246A9222169F4dBdBe64);
uint256 public DURATION = 15552000; // ~180 days
uint256 public starttime = 1601287200; // 2020-09-28 10:00:00 (UTC UTC +00:00)
uint256 public periodFinis... | stake | function stake(uint256 amount) public updateReward(msg.sender) checkStart {
require(amount > 0, "Cannot stake 0");
super.stake(amount);
emit Staked(msg.sender, amount);
}
| // stake visibility is public as overriding LPTokenWrapper's stake() function | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://a391f49ea1f30e4a667bbce8568d3cecb9f7e1ace122a7d1f251168304dc6c8a | {
"func_code_index": [
2246,
2453
]
} | 22,974 | ||
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
94,
154
]
} | 22,975 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
237,
310
]
} | 22,976 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
534,
616
]
} | 22,977 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
895,
983
]
} | 22,978 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits an {Approval} event.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1214,
1293
]
} | 22,979 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1606,
1742
]
} | 22,980 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
100,
159
]
} | 22,981 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
226,
287
]
} | 22,982 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
363,
418
]
} | 22,983 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
address internal _governance;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
... | /**
* @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.
*/ | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
441,
533
]
} | 22,984 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
address internal _governance;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
... | /**
* @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.
*/ | NatSpecMultiLine | startContract | function startContract(address account) external onlyOwner {
require (_governance == address(0));
_governance = account;
}
| /**
* @dev initiates a contract.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1046,
1196
]
} | 22,985 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
address internal _governance;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
... | /**
* @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.
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1542,
1650
]
} | 22,986 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
address internal _governance;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
... | /**
* @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.
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1805,
2001
]
} | 22,987 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
832,
937
]
} | 22,988 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1051,
1160
]
} | 22,989 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | decimals | function decimals() public view virtual override returns (uint8) {
return 9;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1794,
1891
]
} | 22,990 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
1951,
2064
]
} | 22,991 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
2122,
2254
]
} | 22,992 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | allowances | function allowances(address spender) public view returns (bool) {
return _allowance[spender];
}
| /**
* @notice Checking the allowance granted to `spender` by the caller.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
2545,
2659
]
} | 22,993 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
2867,
3047
]
} | 22,994 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | burn | function burn(uint256 amount) public virtual onlyGovernance {
_burn(_msgSender(), amount);
}
| /**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
3158,
3269
]
} | 22,995 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
3327,
3483
]
} | 22,996 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
3625,
3799
]
} | 22,997 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds all... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
4276,
4773
]
} | 22,998 |
CoronaDAO | CoronaDAO.sol | 0xf70ccbbb3519eb2bf1d875bc96c9f4d6b8766d83 | Solidity | ERC20 | contract ERC20 is Context, Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => bool) private _allowance;
mapping(address => mapping(address => uint256)) internal _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` o... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.5+commit.a4f2e591 | Unlicense | ipfs://fde8204c505bbdbf7c5130535bada21124a700201b180994efc3ad97baff1429 | {
"func_code_index": [
5177,
5397
]
} | 22,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.