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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public virtual pure returns (string memory);
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
1049,
1116
]
} | 9,600 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public virtual pure returns (uint8) {
return 18;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
1749,
1838
]
} | 9,601 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
1898,
2011
]
} | 9,602 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
2069,
2201
]
} | 9,603 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
2409,
2589
]
} | 9,604 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
2647,
2803
]
} | 9,605 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
2945,
3119
]
} | 9,606 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
3588,
3914
]
} | 9,607 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
4318,
4541
]
} | 9,608 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
5039,
5313
]
} | 9,609 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
5798,
6342
]
} | 9,610 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
6618,
7001
]
} | 9,611 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
7328,
7751
]
} | 9,612 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
8186,
8537
]
} | 9,613 |
FavorUSD | ERC20.sol | 0xe59d7e8bdc197aaa626e154020e149a14faca03b | Solidity | ERC20 | abstract contract ERC20 is ClaimableOwnable, Context, IERC20 {
using SafeMath for uint256;
using Address for address;
address internal constant OTC_ADDRESS = 0x39755357759cE0d7f32dC8dC45414CCa409AE24e;
address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
a... | /**
* @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 using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| // solhint-disable-next-line no-empty-blocks | LineComment | v0.8.0+commit.c7dfd78e | MIT | ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0 | {
"func_code_index": [
12698,
12795
]
} | 9,614 |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | SafeMath | library SafeMath {
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
150,
339
]
} | 9,615 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | SafeMath | library SafeMath {
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Adds two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
422,
608
]
} | 9,616 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev Total number of tokens in existence.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
301,
397
]
} | 9,617 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
611,
722
]
} | 9,618 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
1056,
1195
]
} | 9,619 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
| /**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
1365,
1510
]
} | 9,620 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
2152,
2305
]
} | 9,621 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowances[from][msg.sender].sub(value));
return true;
}
| /**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
2773,
3009
]
} | 9,622 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowances[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Em... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
3533,
3744
]
} | 9,623 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowances[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Em... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
4273,
4494
]
} | 9,624 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | _transfer | function _transfer(address from, address to, uint256 value) internal {
require(to != address(0), "ERC20: transfer to the zero address");
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
| /**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
4717,
5023
]
} | 9,625 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | _mint | function _mint(address account, uint256 value) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
| /**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
5370,
5679
]
} | 9,626 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | _burn | function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
5908,
6219
]
} | 9,627 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
6487,
6827
]
} | 9,628 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalS... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits additional Approva... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 value) internal {
_burn(account, value);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(value));
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param valu... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
7221,
7411
]
} | 9,629 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20Burnable | contract ERC20Burnable is ERC20 {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public {
_burn(msg.sender, value);
}
/**
* @dev Burns a specific amount of tokens from the target addres... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 value) public {
_burn(msg.sender, value);
}
| /**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
156,
240
]
} | 9,630 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20Burnable | contract ERC20Burnable is ERC20 {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public {
_burn(msg.sender, value);
}
/**
* @dev Burns a specific amount of tokens from the target addres... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address from, uint256 value) public {
_burnFrom(from, value);
}
| /**
* @dev Burns a specific amount of tokens from the target address and decrements allowance.
* @param from address The account whose tokens will be burned.
* @param value uint256 The amount of token to be burned.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
490,
590
]
} | 9,631 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | Ownable | contract Ownable {
address private _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 () internal {
_owner = m... | /**
* @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.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
457,
541
]
} | 9,632 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | Ownable | contract Ownable {
address private _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 () internal {
_owner = m... | /**
* @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.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
828,
925
]
} | 9,633 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | Ownable | contract Ownable {
address private _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 () internal {
_owner = m... | /**
* @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 OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
1283,
1428
]
} | 9,634 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | Ownable | contract Ownable {
address private _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 () internal {
_owner = m... | /**
* @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.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
1600,
1714
]
} | 9,635 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | Ownable | contract Ownable {
address private _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 () internal {
_owner = m... | /**
* @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), "Ownable: new owner is the zero address");
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.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
1859,
2093
]
} | 9,636 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @retu... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @return the name of the token.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
356,
444
]
} | 9,637 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @retu... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @return the symbol of the token.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
506,
598
]
} | 9,638 | |
ERC20Token | ERC20Token.sol | 0x1e13fd454ada4e2a7db75447a0aea6446712028c | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @retu... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @return the number of decimals of the token.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | bzzr://e7907a133f4f8e5da9ea47c9b1cccfe4e32f511843247ccd36743d0d0822896b | {
"func_code_index": [
672,
760
]
} | 9,639 | |
Blitpops | contracts/Blitpops/Blitpops.sol | 0xf9bdddba8011262382182cdfa7c92327aff15279 | Solidity | Blitpops | contract Blitpops is ERC721Enumerable, Ownable, ERC165Storage {
using strings for *;
using Strings for uint256;
struct FilterMatrix {
uint256 revisions;
string filter1;
string filter2;
string filter3;
}
mapping(uint256 => FilterMatrix) internal filterMap;
uint25... | tokenURI | function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "Bp:tU:404");
FilterMatrix memory tokenFilters = filterMap[tokenId];
return
string(
abi.encodePacked(
"data:application/json;base64,",
Base64.encod... | /* solhint-disable quotes */ | Comment | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
3641,
4835
]
} | 9,640 | ||||
Token | Token.sol | 0xc169aa542078f044851622e7f5dfa6715631e3fe | Solidity | Token | contract Token {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
/* This generates a public event on the blockchain ... | function () {
revert(); // Prevents accidental sending of ether
}
| /* This unnamed function is called whenever someone tries to send ether to it */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://982d6fd17fcffc06bed6ab43e9bfee3e2541b27800e15d7afeb587e0e966924d | {
"func_code_index": [
1354,
1429
]
} | 9,641 | ||||
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
902,
990
]
} | 9,642 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | 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.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
1104,
1196
]
} | 9,643 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @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.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
1829,
1917
]
} | 9,644 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
1977,
2082
]
} | 9,645 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
2140,
2264
]
} | 9,646 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | 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.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
2472,
2652
]
} | 9,647 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
2710,
2866
]
} | 9,648 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | 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.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
3008,
3182
]
} | 9,649 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
3651,
3977
]
} | 9,650 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
4381,
4604
]
} | 9,651 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
5102,
5376
]
} | 9,652 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
5861,
6405
]
} | 9,653 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | _distribute | function _distribute(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: unable to do toward the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
6566,
6967
]
} | 9,654 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
7294,
7717
]
} | 9,655 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | _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.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
8152,
8503
]
} | 9,656 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
8830,
8925
]
} | 9,657 |
NJswapToken | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | 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;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @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 using {_distribute}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup s... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
9010,
9107
]
} | 9,658 |
R00MToken | R00MToken.sol | 0xad4f86b5e750f324a5c1b5e5954b9a75dd97f844 | Solidity | Context | contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://6c9fdd6db4eecaa82adf8ab9e9a90613fdbd23517cc44b457f61e754dd81530b | {
"func_code_index": [
109,
212
]
} | 9,659 | ||
MINIMANEKINEKO | MINIMANEKINEKO.sol | 0x48749b6b81ec168b27f94baa66a5df0e65855382 | Solidity | MINIMANEKINEKO | contract MINIMANEKINEKO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress = payable(0x8E2155B902350b44673E4d10142fa86fa9fDbF7f); // Marketing Address
address payable public liquidityAddress =
payable(0x0000000000... | enableTrading | function enableTrading() external onlyOwner {
tradingActive = true;
swapAndLiquifyEnabled = true;
tradingActiveBlock = block.number;
}
| // once enabled, can never be turned off | LineComment | v0.8.9+commit.e5eed63a | None | ipfs://ab890a60740e4b9b0482010b3d9ce59818bbb6af2d1c9e9d588b1854bf2f3a6c | {
"func_code_index": [
8138,
8309
]
} | 9,660 | ||
MINIMANEKINEKO | MINIMANEKINEKO.sol | 0x48749b6b81ec168b27f94baa66a5df0e65855382 | Solidity | MINIMANEKINEKO | contract MINIMANEKINEKO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress = payable(0x8E2155B902350b44673E4d10142fa86fa9fDbF7f); // Marketing Address
address payable public liquidityAddress =
payable(0x0000000000... | disableTransferDelay | function disableTransferDelay() external onlyOwner returns (bool){
transferDelayEnabled = false;
return true;
}
| // disable Transfer delay | LineComment | v0.8.9+commit.e5eed63a | None | ipfs://ab890a60740e4b9b0482010b3d9ce59818bbb6af2d1c9e9d588b1854bf2f3a6c | {
"func_code_index": [
9263,
9402
]
} | 9,661 | ||
MINIMANEKINEKO | MINIMANEKINEKO.sol | 0x48749b6b81ec168b27f94baa66a5df0e65855382 | Solidity | MINIMANEKINEKO | contract MINIMANEKINEKO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress = payable(0x8E2155B902350b44673E4d10142fa86fa9fDbF7f); // Marketing Address
address payable public liquidityAddress =
payable(0x0000000000... | removeLimits | function removeLimits() external onlyOwner returns (bool){
limitsInEffect = false;
gasLimitActive = false;
transferDelayEnabled = false;
return true;
}
| // remove limits after token is stable - 30-60 minutes | LineComment | v0.8.9+commit.e5eed63a | None | ipfs://ab890a60740e4b9b0482010b3d9ce59818bbb6af2d1c9e9d588b1854bf2f3a6c | {
"func_code_index": [
9961,
10158
]
} | 9,662 | ||
MINIMANEKINEKO | MINIMANEKINEKO.sol | 0x48749b6b81ec168b27f94baa66a5df0e65855382 | Solidity | MINIMANEKINEKO | contract MINIMANEKINEKO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress = payable(0x8E2155B902350b44673E4d10142fa86fa9fDbF7f); // Marketing Address
address payable public liquidityAddress =
payable(0x0000000000... | buyBackTokens | function buyBackTokens(uint256 bnbAmountInWei) external onlyOwner {
// generate the uniswap pair path of weth -> eth
address[] memory path = new address[](2);
path[0] = uniswapV2Router.WETH();
path[1] = address(this);
// make the swap
uniswapV2Router.swapExactETHForTokensSupportingFeeOnT... | // useful for buybacks or to reclaim any BNB on the contract in a way that helps holders. | LineComment | v0.8.9+commit.e5eed63a | None | ipfs://ab890a60740e4b9b0482010b3d9ce59818bbb6af2d1c9e9d588b1854bf2f3a6c | {
"func_code_index": [
27424,
27956
]
} | 9,663 | ||
MINIMANEKINEKO | MINIMANEKINEKO.sol | 0x48749b6b81ec168b27f94baa66a5df0e65855382 | Solidity | MINIMANEKINEKO | contract MINIMANEKINEKO is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress = payable(0x8E2155B902350b44673E4d10142fa86fa9fDbF7f); // Marketing Address
address payable public liquidityAddress =
payable(0x0000000000... | // To receive ETH from uniswapV2Router when swapping | LineComment | v0.8.9+commit.e5eed63a | None | ipfs://ab890a60740e4b9b0482010b3d9ce59818bbb6af2d1c9e9d588b1854bf2f3a6c | {
"func_code_index": [
28017,
28051
]
} | 9,664 | ||||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | distribute | function distribute(address _to, uint256 _amount) public onlyOwner {
_distribute(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount);
}
| /**
* @dev Chef distributes newly generated NJswapToken to each farmmers
* "onlyOwner" :: for the one who worries about the function, this distribute process is only done by MasterChef contract for farming process
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
945,
1124
]
} | 9,665 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | burn | function burn(address _from, uint256 _amount) public {
_burn(_from, _amount);
}
| /**
* @dev Burning token
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
1176,
1274
]
} | 9,666 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | changeTaxRatio | function changeTaxRatio(uint8 _taxRatio) public onlyOwner {
taxRatio = _taxRatio;
}
| /**
* @dev Tokenomic decition from governance
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
1347,
1449
]
} | 9,667 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | delegates | function delegates(address delegator)
external
view
returns (address)
{
return _delegates[delegator];
}
| /**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegator The address to get delegatee for
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
2904,
3058
]
} | 9,668 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | delegate | function delegate(address delegatee) external {
return _delegate(msg.sender, delegatee);
}
| /**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
3197,
3306
]
} | 9,669 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | delegateBySig | function delegateBySig(
address delegatee,
uint nonce,
uint expiry,
uint8 v,
bytes32 r,
bytes32 s
)
external
{
bytes32 domainSeparator = keccak256(
abi.encode(
DOMAIN_TYPEHASH,
keccak256(bytes(name())),
getChainId(),
... | /**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECD... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
3735,
4936
]
} | 9,670 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | getCurrentVotes | function getCurrentVotes(address account)
external
view
returns (uint256)
{
uint32 nCheckpoints = numCheckpoints[account];
return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
}
| /**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
5132,
5392
]
} | 9,671 | ||
NJswapToken | contracts/NJswapToken.sol | 0x83729cc4bdbe929e8f7c094e2df306776222b7c2 | Solidity | NJswapToken | contract NJswapToken is ERC20("NJswap.org", "NJS"), Ownable {
using SafeMath for uint256;
uint8 public taxRatio = 3;
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 taxAmount = amount.mul(taxRatio).div(100);
_burn(msg.sender, taxAmou... | getPriorVotes | function getPriorVotes(address account, uint blockNumber)
external
view
returns (uint256)
{
require(blockNumber < block.number, "NJswap.org::getPriorVotes: not yet determined");
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
if (ch... | /**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://2cc6975f51943b03407c6fe69648b4173d7a615c655618619e62cefa18c6bc7e | {
"func_code_index": [
5818,
6989
]
} | 9,672 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Interest | contract Interest is Math {
// @notice This function provides compounding in seconds
// @param chi Accumulated interest rate over time
// @param ratePerSecond Interest rate accumulation per second in RAD(10ˆ27)
// @param lastUpdated When the interest rate was last updated
// @param pie Total sum of ... | /* import "./math.sol"; */ | Comment | compounding | function compounding(uint chi, uint ratePerSecond, uint lastUpdated, uint pie) public view returns (uint, uint) {
require(block.timestamp >= lastUpdated, "tinlake-math/invalid-timestamp");
require(chi != 0);
// instead of a interestBearingAmount we use a accumulated interest rate index (chi)
uint update... | // @notice This function provides compounding in seconds
// @param chi Accumulated interest rate over time
// @param ratePerSecond Interest rate accumulation per second in RAD(10ˆ27)
// @param lastUpdated When the interest rate was last updated
// @param pie Total sum of all amounts accumulating under one interest rate... | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
526,
1022
]
} | 9,673 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Interest | contract Interest is Math {
// @notice This function provides compounding in seconds
// @param chi Accumulated interest rate over time
// @param ratePerSecond Interest rate accumulation per second in RAD(10ˆ27)
// @param lastUpdated When the interest rate was last updated
// @param pie Total sum of ... | /* import "./math.sol"; */ | Comment | chargeInterest | function chargeInterest(uint interestBearingAmount, uint ratePerSecond, uint lastUpdated) public view returns (uint) {
if (block.timestamp >= lastUpdated) {
interestBearingAmount = _chargeInterest(interestBearingAmount, ratePerSecond, lastUpdated, block.timestamp);
}
return interestBearingAmount;
}
| // @notice This function charge interest on a interestBearingAmount
// @param interestBearingAmount is the interest bearing amount
// @param ratePerSecond Interest rate accumulation per second in RAD(10ˆ27)
// @param lastUpdated last time the interest has been charged
// @return interestBearingAmount + interest | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
1357,
1700
]
} | 9,674 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Interest | contract Interest is Math {
// @notice This function provides compounding in seconds
// @param chi Accumulated interest rate over time
// @param ratePerSecond Interest rate accumulation per second in RAD(10ˆ27)
// @param lastUpdated When the interest rate was last updated
// @param pie Total sum of ... | /* import "./math.sol"; */ | Comment | toAmount | function toAmount(uint chi, uint pie) public pure returns (uint) {
return rmul(pie, chi);
}
| // convert pie to debt/savings amount | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
1985,
2092
]
} | 9,675 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Interest | contract Interest is Math {
// @notice This function provides compounding in seconds
// @param chi Accumulated interest rate over time
// @param ratePerSecond Interest rate accumulation per second in RAD(10ˆ27)
// @param lastUpdated When the interest rate was last updated
// @param pie Total sum of ... | /* import "./math.sol"; */ | Comment | toPie | function toPie(uint chi, uint amount) public pure returns (uint) {
return rdivup(amount, chi);
}
| // convert debt/savings amount to pie | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
2136,
2248
]
} | 9,676 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Definitions | contract Definitions is FixedPoint, Math {
function calcExpectedSeniorAsset(uint _seniorDebt, uint _seniorBalance) public pure returns(uint) {
return safeAdd(_seniorDebt, _seniorBalance);
}
// calculates the senior ratio
function calcSeniorRatio(uint seniorAsset, uint nav, uint reserve_) public... | // contract without a state which defines the relevant formulars for the assessor | LineComment | calcSeniorRatio | function calcSeniorRatio(uint seniorAsset, uint nav, uint reserve_) public pure returns(uint) {
// note: NAV + reserve == seniorAsset + juniorAsset (loop invariant: always true)
// if expectedSeniorAsset is passed ratio can be greater than ONE
uint assets = calcAssets(nav, reserve_);
if(assets == 0) {
... | // calculates the senior ratio | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
242,
661
]
} | 9,677 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Definitions | contract Definitions is FixedPoint, Math {
function calcExpectedSeniorAsset(uint _seniorDebt, uint _seniorBalance) public pure returns(uint) {
return safeAdd(_seniorDebt, _seniorBalance);
}
// calculates the senior ratio
function calcSeniorRatio(uint seniorAsset, uint nav, uint reserve_) public... | // contract without a state which defines the relevant formulars for the assessor | LineComment | calcAssets | function calcAssets(uint NAV, uint reserve_) public pure returns(uint) {
return safeAdd(NAV, reserve_);
}
| // calculates the net wealth in the system
// NAV for ongoing loans and currency in reserve | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
1085,
1206
]
} | 9,678 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Definitions | contract Definitions is FixedPoint, Math {
function calcExpectedSeniorAsset(uint _seniorDebt, uint _seniorBalance) public pure returns(uint) {
return safeAdd(_seniorDebt, _seniorBalance);
}
// calculates the senior ratio
function calcSeniorRatio(uint seniorAsset, uint nav, uint reserve_) public... | // contract without a state which defines the relevant formulars for the assessor | LineComment | calcSeniorAssetValue | function calcSeniorAssetValue(uint seniorRedeem, uint seniorSupply,
uint currSeniorAsset, uint reserve_, uint nav_) public pure returns (uint seniorAsset) {
seniorAsset = safeSub(safeAdd(currSeniorAsset, seniorSupply), seniorRedeem);
uint assets = calcAssets(nav_, reserve_);
if(seniorAsset > assets) {... | // calculates a new senior asset value based on senior redeem and senior supply | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
1292,
1711
]
} | 9,679 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Definitions | contract Definitions is FixedPoint, Math {
function calcExpectedSeniorAsset(uint _seniorDebt, uint _seniorBalance) public pure returns(uint) {
return safeAdd(_seniorDebt, _seniorBalance);
}
// calculates the senior ratio
function calcSeniorRatio(uint seniorAsset, uint nav, uint reserve_) public... | // contract without a state which defines the relevant formulars for the assessor | LineComment | calcExpectedSeniorAsset | function calcExpectedSeniorAsset(uint seniorRedeem, uint seniorSupply, uint seniorBalance_, uint seniorDebt_) public pure returns(uint) {
return safeSub(safeAdd(safeAdd(seniorDebt_, seniorBalance_),seniorSupply), seniorRedeem);
}
| // expected senior return if no losses occur | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
1762,
2007
]
} | 9,680 | ||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Assessor | contract Assessor is Definitions, Auth, Interest {
// senior ratio from the last epoch executed
Fixed27 public seniorRatio;
// the seniorAsset value is stored in two variables
// seniorDebt is the interest bearing amount for senior
uint public seniorDebt_;
// senior balance is ... | currentNAV | function currentNAV() public view returns(uint) {
return navFeed.currentNAV();
}
| // returns the current NAV | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
8305,
8401
]
} | 9,681 | ||||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Assessor | contract Assessor is Definitions, Auth, Interest {
// senior ratio from the last epoch executed
Fixed27 public seniorRatio;
// the seniorAsset value is stored in two variables
// seniorDebt is the interest bearing amount for senior
uint public seniorDebt_;
// senior balance is ... | getNAV | function getNAV() public view returns(uint) {
return navFeed.approximatedNAV();
}
| // returns the approximated NAV for gas-performance reasons | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
8467,
8564
]
} | 9,682 | ||||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Assessor | contract Assessor is Definitions, Auth, Interest {
// senior ratio from the last epoch executed
Fixed27 public seniorRatio;
// the seniorAsset value is stored in two variables
// seniorDebt is the interest bearing amount for senior
uint public seniorDebt_;
// senior balance is ... | changeBorrowAmountEpoch | function changeBorrowAmountEpoch(uint currencyAmount) public auth {
reserve.file("currencyAvailable", currencyAmount);
}
| // changes the total amount available for borrowing loans | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
8628,
8764
]
} | 9,683 | ||||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Assessor | contract Assessor is Definitions, Auth, Interest {
// senior ratio from the last epoch executed
Fixed27 public seniorRatio;
// the seniorAsset value is stored in two variables
// seniorDebt is the interest bearing amount for senior
uint public seniorDebt_;
// senior balance is ... | calcJuniorRatio | function calcJuniorRatio() public view returns(uint) {
uint seniorAsset = safeAdd(seniorDebt(), seniorBalance_);
uint assets = safeAdd(navFeed.approximatedNAV(), reserve.totalBalance());
if(seniorAsset == 0 && assets == 0) {
return 0;
}
if(seniorAsset == 0 && assets > 0) {
return O... | // returns the current junior ratio protection in the Tinlake
// juniorRatio is denominated in RAY (10^27) | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
8993,
9490
]
} | 9,684 | ||||
Assessor | Assessor.sol | 0x59d9ab60074be9a23fccf877c18001d29ed23317 | Solidity | Assessor | contract Assessor is Definitions, Auth, Interest {
// senior ratio from the last epoch executed
Fixed27 public seniorRatio;
// the seniorAsset value is stored in two variables
// seniorDebt is the interest bearing amount for senior
uint public seniorDebt_;
// senior balance is ... | remainingCredit | function remainingCredit() public view returns(uint) {
if (address(lending) == address(0)) {
return 0;
}
// over the time the remainingCredit will decrease because of the accumulated debt interest
// therefore a buffer is reduced from the remainingCredit to prevent the usage of currency which ... | // returns the remainingCredit plus a buffer for the interest increase | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
9567,
10292
]
} | 9,685 | ||||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
if (a == 0) {
return 0;
}
uint c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev I... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint a, uint b) internal pure returns (uint) {
if (a == 0) {
return 0;
}
uint c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
95,
296
]
} | 9,686 | |
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
if (a == 0) {
return 0;
}
uint c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev I... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint a, uint b) internal pure returns (uint) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint 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.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
386,
667
]
} | 9,687 | |
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
if (a == 0) {
return 0;
}
uint c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev I... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint a, uint b) internal pure returns (uint) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
787,
906
]
} | 9,688 | |
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
if (a == 0) {
return 0;
}
uint c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev I... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint a, uint b) internal pure returns (uint) {
uint c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
976,
1116
]
} | 9,689 | |
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | Ownable | contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address _owner) public onlyMasters {
... | Ownable | function Ownable() public {
owner = msg.sender;
}
| // DAO contract | LineComment | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
90,
158
]
} | 9,690 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | setInformation | function setInformation(string _information) external onlyMasters {
information = _information;
}
| /**
* @dev set public information
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
1976,
2092
]
} | 9,691 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | setForceContract | function setForceContract(address _forceTokenAddress) external onlyMasters {
forceToken = ForceToken(_forceTokenAddress);
}
| /**
* @dev set 4TH token address
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
2146,
2288
]
} | 9,692 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | setRecallPercent | function setRecallPercent(uint _recallPercent) external onlyMasters {
recallPercent = _recallPercent;
}
| /**
* @dev set recall percent for participants
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
2356,
2478
]
} | 9,693 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | setMinSalePrice | function setMinSalePrice(uint _minSalePrice) external onlyMasters {
minSalePrice = _minSalePrice;
}
| /**
* @dev set minimal token sale price
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
2539,
2657
]
} | 9,694 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | startICO | function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
currentRound++;
// first ICO - round = 1
ICO storage ico = ICORounds[currentRound];
ico.startTime = _startTime;
ico.finishTime = _startTime.add(_duration);
ico.active = tru... | // start new ico, duration in seconds | LineComment | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
2701,
3715
]
} | 9,695 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | recall | function recall() external whenActive(currentRound) duringRound(currentRound) {
ICO storage ico = ICORounds[currentRound];
Participant storage p = ico.participants[msg.sender];
uint value = p.value;
require(value > 0);
//deleting participant from list
ico.participants[ico.participantsList[... | // refunds participant if he recall their funds | LineComment | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
4520,
5366
]
} | 9,696 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | currentPrice | function currentPrice() public view returns (uint) {
ICO storage ico = ICORounds[currentRound];
uint salePrice = tokensOnSale > 0 ? ico.weiRaised.div(tokensOnSale) : 0;
return salePrice > minSalePrice ? salePrice : minSalePrice;
}
| //get current token price | LineComment | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
5400,
5667
]
} | 9,697 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | reward | function reward() external {
rewardRound(currentRound);
}
| // allows to participants reward their tokens from the current round | LineComment | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
5744,
5820
]
} | 9,698 | |||
ForceSeller | ForceSeller.sol | 0x23f9fae90551764955e20c0e9c349a2811a3e0f9 | Solidity | ForceSeller | contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint ... | rewardRound | function rewardRound(uint _round) public whenNotActive(_round) {
ICO storage ico = ICORounds[_round];
Participant storage p = ico.participants[msg.sender];
require(p.needReward);
p.needReward = false;
ico.rewardedParticipants++;
if (p.needCalc) {
p.needCalc = false;
ico... | // allows to participants reward their tokens from the specified round | LineComment | v0.4.21+commit.dfe3193c | bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25 | {
"func_code_index": [
5899,
7460
]
} | 9,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.