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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1647,
1726
]
} | 8,700 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2039,
2141
]
} | 8,701 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
870,
958
]
} | 8,702 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1072,
1164
]
} | 8,703 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1797,
1885
]
} | 8,704 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1945,
2050
]
} | 8,705 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2108,
2232
]
} | 8,706 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2440,
2620
]
} | 8,707 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2678,
2834
]
} | 8,708 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2976,
3150
]
} | 8,709 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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 `... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
3627,
3953
]
} | 8,710 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
4357,
4580
]
} | 8,711 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
5078,
5352
]
} | 8,712 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
5837,
6381
]
} | 8,713 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
6658,
7041
]
} | 8,714 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
7369,
7792
]
} | 8,715 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
8225,
8576
]
} | 8,716 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
8903,
8998
]
} | 8,717 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @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.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
9596,
9693
]
} | 8,718 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
606,
1033
]
} | 8,719 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1963,
2365
]
} | 8,720 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
3121,
3299
]
} | 8,721 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
3524,
3724
]
} | 8,722 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
4094,
4325
]
} | 8,723 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disa... | /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
4576,
5111
]
} | 8,724 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
5291,
5495
]
} | 8,725 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | functionStaticCall | function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
5682,
6109
]
} | 8,726 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
6291,
6496
]
} | 8,727 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 ... | functionDelegateCall | function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.deleg... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
6685,
7113
]
} | 8,728 | ||
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
747,
1374
]
} | 8,729 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2393,
3159
]
} | 8,730 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
259,
445
]
} | 8,731 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
723,
864
]
} | 8,732 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1162,
1359
]
} | 8,733 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
1613,
2089
]
} | 8,734 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
2560,
2697
]
} | 8,735 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
3188,
3471
]
} | 8,736 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
3931,
4066
]
} | 8,737 |
Rug | Rug.sol | 0x64c8b0ec48328af632d2ee36ee3852ff98b4360c | 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 | MIT | ipfs://bfb9577c6cd5404043b49b2757b59e8486f69e2b2cc6adb970a9c7c8c7e6e4e5 | {
"func_code_index": [
4546,
4717
]
} | 8,738 |
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | /**
* @notice allow contract to receive Ether
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1799,
1833
]
} | 8,739 | ||||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | listMyHeroes | function listMyHeroes(address _owner)
external
view
returns (uint256[] memory)
{
uint256 nHeroes = balanceOf(_owner);
// if zero return an empty array
if (nHeroes == 0) {
return new uint256[](0);
} else {
uint256[] memory heroList = new uint256[](nHeroes);
... | /**
* @notice list the ids of all the heroes in _owner's wallet
* @param _owner is the wallet address of the hero owner
* */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2000,
2560
]
} | 8,740 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | mintHero | function mintHero(uint256 numHeroes) public payable saleIsLive {
require(
(numHeroes > 0) && (numHeroes <= MINT_MAX),
"you can mint between 1 and 100 heroes at once"
);
require(
msg.value >= (numHeroes * mintPrice),
"not enough Ether sent with tx"
);
//mint... | /**
* @notice mint brand new HunkyHero nfts
* @param numHeroes is the number of heroes to mint
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2698,
3139
]
} | 8,741 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | herolistMint | function herolistMint(
bytes calldata _sig,
uint256 _quota,
uint256 _num
)
public
presaleIsLive
{
require(_num > 0);
//overclaiming? already minted?
require(_num + minted[msg.sender] <= _quota,
"not enough WL mints left"
);
// check msg.sender is on the ... | /**
* @notice mint heroes from the whitelist
* @param _sig whitelist signature
* @param _quota wl quota awarded
* @param _num number of Heroes to mint!
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3332,
3943
]
} | 8,742 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | ultimateSacrifice | function ultimateSacrifice(uint256 _heroId) external {
require(
_isApprovedOrOwner(msg.sender, _heroId),
"you can't burn this hero"
);
_burn(_heroId);
//parent contract emits burn event
}
| /**
* @notice burn a hero, perhaps save a civilian
* @param _heroId the hero to burn
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4057,
4316
]
} | 8,743 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | setBaseURI | function setBaseURI(string memory newBaseURI)
public
onlyTeam
{
baseURI = newBaseURI;
}
| /**
* @param newBaseURI will be set as the new baseURI
* for token metadata access
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4454,
4575
]
} | 8,744 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | toggleSale | function toggleSale() public onlyTeam {
saleLive = !saleLive;
}
| /**
* @notice start or stop minting
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4634,
4716
]
} | 8,745 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | togglePresale | function togglePresale() public onlyTeam {
presaleLive = !presaleLive;
}
| /**
* @notice start or stop presale minting
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4783,
4874
]
} | 8,746 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | setMintPrice | function setMintPrice(uint256 newWeiPrice) public onlyTeam {
mintPrice = newWeiPrice;
}
| /**
* @notice set a new sale mintPrice in WEI
* @dev be sure to set the new mintPrice in WEI
* @param newWeiPrice the new mint mintPrice in WEI
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5053,
5159
]
} | 8,747 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | setMsgSigner | function setMsgSigner(address newSigner) public onlyTeam {
msgSigner = newSigner;
}
| /**
* @notice set a new msgSigner for whitelist validation
* @param newSigner is the new signer address
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5289,
5391
]
} | 8,748 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | airdropHeroes | function airdropHeroes(address to, uint256 num) public onlyTeam {
require(num > 0 && num <= MINT_MAX);
_mintHeroes(to, num);
}
| /**
* @notice airdrop heroes for prizes and community perks
* @param to is the destination address
* @param num is the number of heroes to airdrop
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5573,
5727
]
} | 8,749 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | transferMembership | function transferMembership(address to) public onlyTeam {
teamMap[msg.sender] = false;
teamMap[to] = true;
for (uint256 i = 0; i < 3; i++) {
if (teamList[i] == msg.sender) {
teamList[i] = to;
}
}
emit MembershipTransferred(msg.sender, to);
}
| /**
* @notice transfer team membership to a different address
* team members have admin rights with onlyTeam modifier
* @param to is the address to transfer admin rights to
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5935,
6276
]
} | 8,750 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | withdraw | function withdraw() public onlyTeam {
uint256 bal = address(this).balance;
payable(teamList[0]).send(bal * 2000 / 10000); //Panda
payable(teamList[1]).send(bal * 4000 / 10000); //Chief
payable(teamList[2]).send(bal * 4000 / 10000); //Mayor
}
| //withdraw to trusted addresses | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
6316,
6605
]
} | 8,751 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | _baseURI | function _baseURI()
internal
view
virtual
override
returns (string memory)
{
return baseURI;
}
| ///@notice override the _baseURI function in ERC721 | NatSpecSingleLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
6681,
6830
]
} | 8,752 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | _mintHeroes | function _mintHeroes(address _to, uint256 _num) private {
require(currentSupply + _num <= MAX_HEROES, "not enough Heroes left");
for (uint256 h = 0; h < _num; h++) {
currentSupply ++;
_safeMint(_to, currentSupply);
}
}
| /**
* @notice mint function called by multiple other functions
* @notice token IDs start at 1 (not 0)
* @param _to address to mint to
* @param _num number of heroes to mint
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
7059,
7342
]
} | 8,753 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | legitSigner | function legitSigner(bytes memory _sig, uint256 _numHashed)
private
view
returns (bool)
{
//hash the sender and this address
bytes32 checkHash = keccak256(abi.encodePacked(
msg.sender,
address(this),
_numHashed
));
//the _sig should be a signed version of checkHash
... | /**
* @notice does signature _sig contain a legit hash and
* was it signed by msgSigner?
* @param _sig the signature to inspect
* @dev the signer is recovered and compared to msgSigner
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
7569,
8124
]
} | 8,754 | ||||
HunkyHeroes | contracts/HunkyHeroes.sol | 0xd31bd18ec25abe415a4b238dc196a92c3201d13d | Solidity | HunkyHeroes | contract HunkyHeroes is ERC721Enumerable, ERC721Burnable {
uint256 public constant MAX_HEROES = 6500;
uint256 private constant MINT_MAX = 100;
uint256 public currentSupply = 0;
uint256 public mintPrice = 0.02 ether;
address public msgSigner = address(0x6395d64d6dD3577107c990777e23fEa7D43FC7Df);... | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId);
}
| /**
* @notice override parent hooks
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
8183,
8445
]
} | 8,755 | ||||
MarsLocker | contracts/MarsLocker.sol | 0x64200351e787b33cd7c518a93fc24d780092f727 | Solidity | MarsLocker | contract MarsLocker is Ownable, IERC721Receiver, ERC165, ERC721Holder {
using SafeMath for uint256;
uint256 private _releaseTimestamp;
Mars private _mars;
/**
* @dev Sets immutable values of contract.
*/
constructor (
uint256 releaseTimestamp_
) {
_releaseTimesta... | /**
* MarsLocker Contract
* @dev Locks Mars NFTs until a certain timestamp is reached.
*/ | NatSpecMultiLine | setMarsAddress | function setMarsAddress(address payable marsAddress_) public onlyOwner {
require(address(_mars) == address(0), "Already set");
_mars = Mars(marsAddress_);
}
| /**
* @dev Sets Mars contract address. Can only be called once by owner.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | {
"func_code_index": [
643,
832
]
} | 8,756 | ||
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Context | contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (addres... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending ... | Comment | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
265,
368
]
} | 8,757 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | 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. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
94,
154
]
} | 8,758 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | 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. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
237,
310
]
} | 8,759 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | 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. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
534,
616
]
} | 8,760 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | 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. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
895,
983
]
} | 8,761 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | 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. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1647,
1726
]
} | 8,762 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | 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. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
2039,
2141
]
} | 8,763 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
251,
437
]
} | 8,764 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
707,
848
]
} | 8,765 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, 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.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1180,
1377
]
} | 8,766 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1623,
2099
]
} | 8,767 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
2562,
2699
]
} | 8,768 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
3224,
3574
]
} | 8,769 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
4026,
4161
]
} | 8,770 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
4675,
4846
]
} | 8,771 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
307,
403
]
} | 8,772 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
461,
576
]
} | 8,773 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
784,
947
]
} | 8,774 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1005,
1144
]
} | 8,775 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1286,
1443
]
} | 8,776 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1910,
2219
]
} | 8,777 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
2623,
2838
]
} | 8,778 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
3336,
3602
]
} | 8,779 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc... | /**
* @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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
4087,
4563
]
} | 8,780 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
4839,
5152
]
} | 8,781 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amo... | /**
* @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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
5479,
5832
]
} | 8,782 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal {
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, amount);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
6267,
6610
]
} | 8,783 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function ... | /**
* @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 {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
}
| /**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
6791,
7028
]
} | 8,784 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
550,
638
]
} | 8,785 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
752,
844
]
} | 8,786 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | 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.
*
*... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1402,
1490
]
} | 8,787 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[accou... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | add | function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = true;
}
| /**
* @dev Give an account access to this role.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
156,
339
]
} | 8,788 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[accou... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | remove | function remove(Role storage role, address account) internal {
require(has(role, account), "Roles: account does not have role");
role.bearer[account] = false;
}
| /**
* @dev Remove an account's access to this role.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
414,
602
]
} | 8,789 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[accou... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | has | function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0), "Roles: account is the zero address");
return role.bearer[account];
}
| /**
* @dev Check if an account has this role.
* @return bool
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
692,
900
]
} | 8,790 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Pausable | contract Pausable is Context, PauserRole {
/**
* @dev Emitted when the pause is triggered by a pauser (`account`).
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by a pauser (`account`).
*/
event Unpaused(address account);
bool private ... | /**
* @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.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
614,
697
]
} | 8,791 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Pausable | contract Pausable is Context, PauserRole {
/**
* @dev Emitted when the pause is triggered by a pauser (`account`).
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by a pauser (`account`).
*/
event Unpaused(address account);
bool private ... | /**
* @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() public onlyPauser whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
| /**
* @dev Called by a pauser to pause, triggers stopped state.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1194,
1317
]
} | 8,792 |
RanchSacredBiz | RanchSacredBiz.sol | 0x115bee4b71d8f9d7354e40b9625ae0a74d522fb8 | Solidity | Pausable | contract Pausable is Context, PauserRole {
/**
* @dev Emitted when the pause is triggered by a pauser (`account`).
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by a pauser (`account`).
*/
event Unpaused(address account);
bool private ... | /**
* @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() public onlyPauser whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
| /**
* @dev Called by a pauser to unpause, returns to normal state.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://6f013b98ef50c6e5f53776ca21329fa621309c7f398c4471fa5dff13a0821fe3 | {
"func_code_index": [
1407,
1532
]
} | 8,793 |
STIM | STIM.sol | 0x1afa08a06e676cb82e2090964ed0af4b0bf62594 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://92305ba72c3f2359d11a448f5f72ad0051986eb48f8b5f38484418c629085b37 | {
"func_code_index": [
251,
437
]
} | 8,794 | ||
STIM | STIM.sol | 0x1afa08a06e676cb82e2090964ed0af4b0bf62594 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | 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.5.17+commit.d19bba13 | None | bzzr://92305ba72c3f2359d11a448f5f72ad0051986eb48f8b5f38484418c629085b37 | {
"func_code_index": [
707,
848
]
} | 8,795 | ||
STIM | STIM.sol | 0x1afa08a06e676cb82e2090964ed0af4b0bf62594 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | 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.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://92305ba72c3f2359d11a448f5f72ad0051986eb48f8b5f38484418c629085b37 | {
"func_code_index": [
1180,
1377
]
} | 8,796 | ||
STIM | STIM.sol | 0x1afa08a06e676cb82e2090964ed0af4b0bf62594 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | 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.5.17+commit.d19bba13 | None | bzzr://92305ba72c3f2359d11a448f5f72ad0051986eb48f8b5f38484418c629085b37 | {
"func_code_index": [
1623,
2099
]
} | 8,797 | ||
STIM | STIM.sol | 0x1afa08a06e676cb82e2090964ed0af4b0bf62594 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | 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.5.17+commit.d19bba13 | None | bzzr://92305ba72c3f2359d11a448f5f72ad0051986eb48f8b5f38484418c629085b37 | {
"func_code_index": [
2562,
2699
]
} | 8,798 | ||
STIM | STIM.sol | 0x1afa08a06e676cb82e2090964ed0af4b0bf62594 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
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.5.17+commit.d19bba13 | None | bzzr://92305ba72c3f2359d11a448f5f72ad0051986eb48f8b5f38484418c629085b37 | {
"func_code_index": [
3224,
3574
]
} | 8,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.