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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1829,
1917
]
} | 17,500 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1977,
2082
]
} | 17,501 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
2140,
2264
]
} | 17,502 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
2472,
2652
]
} | 17,503 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
2710,
2866
]
} | 17,504 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
3008,
3182
]
} | 17,505 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
3651,
3977
]
} | 17,506 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
4381,
4604
]
} | 17,507 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
5102,
5376
]
} | 17,508 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
5861,
6405
]
} | 17,509 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
6681,
7064
]
} | 17,510 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
7391,
7814
]
} | 17,511 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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 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 a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
8247,
8598
]
} | 17,512 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
8925,
9020
]
} | 17,513 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | 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 {_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 { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
9618,
9715
]
} | 17,514 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
497,
581
]
} | 17,515 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1139,
1292
]
} | 17,516 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1442,
1691
]
} | 17,517 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | mul | function mul(int256 a, int256 b)
internal
pure
returns (int256)
{
int256 c = a * b;
// Detect overflow when multiplying MIN_INT256 with -1
require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
require((b == 0) || (c / b == a));
return c;
}
| /**
* @dev Multiplies two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
234,
574
]
} | 17,518 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | div | function div(int256 a, int256 b)
internal
pure
returns (int256)
{
// Prevent overflow when dividing MIN_INT256 by -1
require(b != -1 || a != MIN_INT256);
// Solidity already throws when dividing by 0.
return a / b;
}
| /**
* @dev Division of two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
664,
960
]
} | 17,519 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | sub | function sub(int256 a, int256 b)
internal
pure
returns (int256)
{
int256 c = a - b;
require((b >= 0 && c <= a) || (b < 0 && c > a));
return c;
}
| /**
* @dev Subtracts two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1048,
1261
]
} | 17,520 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | add | function add(int256 a, int256 b)
internal
pure
returns (int256)
{
int256 c = a + b;
require((b >= 0 && c >= a) || (b < 0 && c < a));
return c;
}
| /**
* @dev Adds two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1344,
1557
]
} | 17,521 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b)
internal
pure
returns ... | /**
* @title SafeMathInt
* @dev Math operations for int256 with overflow safety checks.
*/ | NatSpecMultiLine | abs | function abs(int256 a)
internal
pure
returns (int256)
{
require(a != MIN_INT256);
return a < 0 ? -a : a;
}
| /**
* @dev Converts to absolute value, and fails on overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
1642,
1808
]
} | 17,522 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | UInt256Lib | library UInt256Lib {
uint256 private constant MAX_INT256 = ~(uint256(1) << 255);
/**
* @dev Safely converts a uint256 to an int256.
*/
function toInt256Safe(uint256 a)
internal
pure
returns (int256)
{
require(a <= MAX_INT256);
return int25... | /**
* @title Various utilities useful for uint256.
*/ | NatSpecMultiLine | toInt256Safe | function toInt256Safe(uint256 a)
internal
pure
returns (int256)
{
require(a <= MAX_INT256);
return int256(a);
}
| /**
* @dev Safely converts a uint256 to an int256.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
162,
333
]
} | 17,523 |
UnbasedAMPL | UnbasedAMPL.sol | 0x5455dd3eb3c65dc038de3873c7e92f0a5a8fa028 | Solidity | UFragmentsPolicy | contract UFragmentsPolicy is Ownable {
using SafeMath for uint256;
using SafeMathInt for int256;
using UInt256Lib for uint256;
event LogRebase(
uint256 indexed epoch,
uint256 exchangeRate,
uint256 cpi,
int256 requestedSupplyAdjustment,
uint256 timestamp... | // Dependency file: src/ampleforth/UFragmentsPolicy.sol
// pragma solidity ^0.6.0;
// import "@openzeppelin/contracts/access/Ownable.sol";
// import "@openzeppelin/contracts/math/SafeMath.sol";
// import "src/math/SafeMathInt.sol";
// import "src/math/UInt256Lib.sol"; | LineComment | inRebaseWindow | function inRebaseWindow() public view returns (bool) {
return (
now.mod(minRebaseTimeIntervalSec) >= rebaseWindowOffsetSec &&
now.mod(minRebaseTimeIntervalSec) < (rebaseWindowOffsetSec.add(rebaseWindowLengthSec))
);
}
| /**
* @return If the latest block timestamp is within the rebase time window it, returns true.
* Otherwise, returns false.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f7baaa7bb99ed27520570834ea2828a8398287cd229040d4ece8469e0a7d8486 | {
"func_code_index": [
2345,
2616
]
} | 17,524 |
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | TokenERC20 | function TokenERC20(uint256 initialSupply, string tokenName, string tokenSymbol) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name = tokenName; ... | /**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
849,
1360
]
} | 17,525 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | _transfer | function _transfer(address _from, address _to, uint256 _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_t... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
1444,
2292
]
} | 17,526 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
2498,
2610
]
} | 17,527 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
2885,
3186
]
} | 17,528 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
require(_spender != address(0));
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
3450,
3659
]
} | 17,529 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
4053,
4387
]
} | 17,530 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(msg.sender, _val... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
4557,
4931
]
} | 17,531 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | TokenERC20 | contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 constant public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mappi... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
5189,
5800
]
} | 17,532 | |||
CTToken | CTToken.sol | 0x0509a863569f2e9253a1fc8d4bc90a7a0cf9d2e4 | Solidity | CTToken | contract CTToken is StoppableToken {
// Token constants
uint256 constant CTTOKEN_TOTAL_SUPLY = 20000000000; // total 20 billion
string constant CTTOKEN_NAME = "CrypTube";
string constant CTTOKEN_SYMBOL = "CT";
// Lock constants
uint256 constant OWNER_LOCKED_BALANCE_RELEASE_PERIOD_LEN_IN_SE... | function () public {
revert();
}
| // refuse any payment | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://6dc5f3b578ae020255602008e6526a052d6914c24a0beb9358d161fd73863bb4 | {
"func_code_index": [
1016,
1067
]
} | 17,533 | ||||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | tryAdd | function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
161,
376
]
} | 17,534 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | trySub | function trySub(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
if (b > a) return (false, 0);
return (true, a - b);
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
524,
715
]
} | 17,535 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | tryMul | function tryMul(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) ... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
865,
1345
]
} | 17,536 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | tryDiv | function tryDiv(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
if (b == 0) return (false, 0);
return (true, a / b);
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
1496,
1688
]
} | 17,537 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | tryMod | function tryMod(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
if (b == 0) return (false, 0);
return (true, a % b);
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
1849,
2041
]
} | 17,538 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
2283,
2467
]
} | 17,539 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
2745,
2908
]
} | 17,540 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
3162,
3387
]
} | 17,541 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to re... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
3860,
4018
]
} | 17,542 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consu... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
4480,
4636
]
} | 17,543 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | sub | function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterp... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
5110,
5315
]
} | 17,544 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | div | function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
5984,
6188
]
} | 17,545 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b)
internal
pure
returns (bool, uint256)
{
uint256 c = a + b;
if (c < ... | mod | function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
6846,
7050
]
} | 17,546 | ||
MferCribs | MferCribs.sol | 0xfeb0755878e299153e49748878f38b46443d04db | Solidity | MferCribs | contract MferCribs is ERC721URIStorage, Ownable, AccessControl {
using SafeMath for uint256;
bytes32 public constant PRE_SALE_ROLE = keccak256("PRE_SALE_ROLE");
string private contractUri;
string private baseUri;
uint8 private platformRoyalty;
mapping(uint256 => uint256) tokenSalePrices;... | flipSaleState | function flipSaleState() public onlyOwner {
saleIsActive = !saleIsActive;
}
| /*
* Pause sale if active, make active if paused
*/ | Comment | v0.8.4+commit.c7e474f2 | None | ipfs://329b167f9c3886ff568515431868ba9c03b7dc568e6432ca042051b6ebb0582a | {
"func_code_index": [
3237,
3331
]
} | 17,547 | ||
Kingdom | @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol | 0xf8a033d41e72d6a641268146236aa0f7b7b441a5 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to ... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the total amount of tokens stored by the contract.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
128,
187
]
} | 17,548 | ||
Kingdom | @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol | 0xf8a033d41e72d6a641268146236aa0f7b7b441a5 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to ... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
| /**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
365,
468
]
} | 17,549 | ||
Kingdom | @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol | 0xf8a033d41e72d6a641268146236aa0f7b7b441a5 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to ... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) external view returns (uint256);
| /**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
639,
712
]
} | 17,550 | ||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | Opacity | function Opacity() public payable {
director = msg.sender;
name = "Opacity";
symbol = "OPQ";
decimals = 18;
directorLock = false;
funds = 0;
totalSupply = 130000000 * 10 ** uint256(decimals);
// Assign reserved OPQ supply to the director
balances[director] = totalSupply;
// Define defa... | /**
* Constructor function
*
* Initializes contract
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
1289,
1981
]
} | 17,551 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* ERC20 balance function
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
2027,
2143
]
} | 17,552 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | transferDirector | function transferDirector(address newDirector) public onlyDirectorForce {
director = newDirector;
}
| /**
* Transfers the director to a new address
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
2655,
2765
]
} | 17,553 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | withdrawFunds | function withdrawFunds() public onlyDirectorForce {
director.transfer(this.balance);
}
| /**
* Withdraw funds from the contract
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
2821,
2918
]
} | 17,554 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | selfLock | function selfLock() public payable onlyDirector {
// Prevents accidental lockout
require(msg.value == 10 ether);
// Permanently lock out the director
directorLock = true;
}
| /**
* Permanently lock out the director to decentralize Opacity
* Invocation is discretionary because Opacity might be better suited to
* transition to an artificially intelligent smart contract director
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
3147,
3349
]
} | 17,555 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | amendClaim | function amendClaim(uint8 claimAmountSet, uint8 payAmountSet, uint8 feeAmountSet, uint8 accuracy) public onlyDirector returns (bool success) {
require(claimAmountSet == (payAmountSet + feeAmountSet));
require(payAmountSet < claimAmountSet);
require(feeAmountSet < claimAmountSet);
require(claimAmountSet > 0)... | /**
* Director can alter the storage-peg and broker fees
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
3423,
4058
]
} | 17,556 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | amendEpoch | function amendEpoch(uint256 epochSet) public onlyDirector returns (bool success) {
// Set the epoch
epoch = epochSet;
return true;
}
| /**
* Director can alter the epoch time
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
4115,
4268
]
} | 17,557 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | amendRetention | function amendRetention(uint8 retentionSet, uint8 accuracy) public onlyDirector returns (bool success) {
// Set retentionMax
retentionMax = retentionSet * 10 ** (uint256(decimals) - accuracy);
return true;
}
| /**
* Director can alter the maximum time of storage retention
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
4348,
4576
]
} | 17,558 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | bury | function bury() public returns (bool success) {
// The address must be previously unburied
require(!buried[msg.sender]);
// An address must have at least claimAmount to be buried
require(balances[msg.sender] >= claimAmount);
// Prevent addresses with large balances from getting buried
require(bala... | /**
* Bury an address
*
* When an address is buried; only claimAmount can be withdrawn once per epoch
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
4703,
5334
]
} | 17,559 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | claim | function claim(address _payout, address _fee) public returns (bool success) {
// The claimed address must have already been buried
require(buried[msg.sender]);
// The payout and fee addresses must be different
require(_payout != _fee);
// The claimed address cannot pay itself
require(msg.sender !=... | /**
* Claim OPQ from a buried address
*
* If a prior claim wasn't made during the current epoch, then claimAmount can be withdrawn
*
* @param _payout the address of the website owner
* @param _fee the address of the broker node
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
5599,
7235
]
} | 17,560 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Sending addresses cannot be buried
require(!buried[_from]);
// If the receiving address is buried, it cannot exceed retentionMax
if (buried[_to]) {
require(balances[_to] + _value <= retentionMax);
}
// Prevent transfer ... | /**
* Internal transfer, can be called by this contract only
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
7313,
8292
]
} | 17,561 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to the address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
8482,
8586
]
} | 17,562 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
// Check allowance
require(_value <= allowance[_from][msg.sender]);
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from the address of the sender
* @param _to the address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
8843,
9125
]
} | 17,563 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
// Buried addresses cannot be approved
require(!buried[msg.sender]);
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender the address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
9373,
9659
]
} | 17,564 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender the address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
10035,
10341
]
} | 17,565 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | burn | function burn(uint256 _value) public returns (bool success) {
// Buried addresses cannot be burnt
require(!buried[msg.sender]);
// Check if the sender has enough
require(balances[msg.sender] >= _value);
// Subtract from the sender
balances[msg.sender] -= _value;
// Updates totalSupply
tota... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
10497,
10913
]
} | 17,566 | |||
Opacity | Opacity.sol | 0x77599d2c6db170224243e255e6669280f11f1473 | Solidity | Opacity | contract Opacity {
// Public variables of OPQ
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public funds;
address public director;
bool public directorLock;
uint256 public claimAmount;
uint256 public payAmount;
uint256 public feeAmo... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
// Buried addresses cannot be burnt
require(!buried[_from]);
// Check if the targeted balance is enough
require(balances[_from] >= _value);
// Check allowance
require(_value <= allowance[_from][msg.sender]);
// S... | /**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://cfecf20d7c390211a42a13ea9c1d89c021333fd6a06220d527c063af7b5b90f4 | {
"func_code_index": [
11155,
11760
]
} | 17,567 | |||
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
497,
581
]
} | 17,568 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1139,
1292
]
} | 17,569 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1442,
1691
]
} | 17,570 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
94,
154
]
} | 17,571 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
237,
310
]
} | 17,572 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
534,
616
]
} | 17,573 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
895,
983
]
} | 17,574 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1647,
1726
]
} | 17,575 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
2039,
2141
]
} | 17,576 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
259,
445
]
} | 17,577 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
723,
864
]
} | 17,578 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1162,
1359
]
} | 17,579 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1613,
2089
]
} | 17,580 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
2560,
2697
]
} | 17,581 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
3188,
3471
]
} | 17,582 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
3931,
4066
]
} | 17,583 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
4546,
4717
]
} | 17,584 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
606,
1230
]
} | 17,585 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
2160,
2562
]
} | 17,586 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
3318,
3496
]
} | 17,587 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
3721,
3922
]
} | 17,588 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
4292,
4523
]
} | 17,589 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
4774,
5095
]
} | 17,590 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
747,
1374
]
} | 17,591 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
2393,
3159
]
} | 17,592 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Pausable | contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev I... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | paused | function paused() public view returns (bool) {
return _paused;
}
| /**
* @dev Returns true if the contract is paused, and false otherwise.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
531,
614
]
} | 17,593 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Pausable | contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev I... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | _pause | function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
| /**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1321,
1444
]
} | 17,594 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | Pausable | contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev I... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | _unpause | function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
| /**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1580,
1705
]
} | 17,595 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
904,
992
]
} | 17,596 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1106,
1198
]
} | 17,597 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | 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.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1831,
1919
]
} | 17,598 |
ChadsToken | ChadsToken.sol | 0x69692d3345010a207b759a7d1af6fc7f38b35c5e | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 internal _totalSupply;
string private _name;
string privat... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://77ced8d6f42a6b872d46d5530095aa13fef82ea459af00f3c9fcacbb758e86f9 | {
"func_code_index": [
1979,
2084
]
} | 17,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.