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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LERC20 | LERC20.sol | 0x42baf1f659d765c65ade5bb7e08eb2c680360d9d | Solidity | LERC20 | contract LERC20 is Context, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
address public recoveryAdmin;
address private recov... | name | function name() public view virtual returns (string memory) {
return _name;
}
| // --- ERC20 methods --- | LineComment | v0.8.7+commit.e28d00a7 | Unlicense | ipfs://2c036cefcadec49b77455a5cade43b8e5852046ab878cb2de8ba868e63465f0e | {
"func_code_index": [
5269,
5365
]
} | 5,200 | ||
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | add | function add(
uint256 _allocPoint,
IERC20 _token,
bool _withUpdate,
uint256 _lastRewardTime
) public onlyOperator {
checkPoolDuplicate(_token);
if (_withUpdate) {
massUpdatePools();
}
if (block.timestamp < poolStartTime) {
// chef is sleeping
if (_last... | // Add a new token to the pool. Can only be called by the owner. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
2813,
3990
]
} | 5,201 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | set | function set(uint256 _pid, uint256 _allocPoint) public onlyOperator {
massUpdatePools();
PoolInfo storage pool = poolInfo[_pid];
if (pool.isStarted) {
totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint);
}
pool.allocPoint = _allocPoint;
}
| // Update the given pool's Ape allocation point. Can only be called by the owner. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
4080,
4406
]
} | 5,202 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | getGeneratedReward | function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) {
for (uint8 epochId = 2; epochId >= 1; --epochId) {
if (_toTime >= epochEndTimes[epochId - 1]) {
if (_fromTime >= epochEndTimes[epochId - 1]) {
return _toTime.sub(_fromTime).mul(epo... | // Return accumulate rewards over the given _fromTime to _toTime. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
4480,
5810
]
} | 5,203 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | pendingAPE | function pendingAPE(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accApePerShare = pool.accApePerShare;
uint256 tokenSupply = pool.token.balanceOf(address(this));
if (block.timestamp ... | // View function to see pending Apes on frontend. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
5868,
6636
]
} | 5,204 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward variables for all pools. Be careful of gas spending! | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
6714,
6899
]
} | 5,205 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.timestamp <= pool.lastRewardTime) {
return;
}
uint256 tokenSupply = pool.token.balanceOf(address(this));
if (tokenSupply == 0) {
pool.lastRewardTime = block.timestamp;
return;... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
6970,
7879
]
} | 5,206 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | deposit | function deposit(uint256 _pid, uint256 _amount) public {
address _sender = msg.sender;
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 _pending = user.amount.mul(pool.accApePerShare).div(1e18).sub... | // Deposit LP tokens. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
7909,
8737
]
} | 5,207 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
address _sender = msg.sender;
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 _pending = user.amount.mul(pool.... | // Withdraw LP tokens. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
8768,
9580
]
} | 5,208 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 _amount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
pool.token.safeTransfer(msg.sender, _amount);
emit EmergencyWithdraw(msg.s... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
9646,
10028
]
} | 5,209 |
ApeRewardPool | contracts/rewardPools/RewardPool.sol | 0xb9dd436aa27e48db0bb0cf2d3665e18572e44a04 | Solidity | ApeRewardPool | contract ApeRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Rewards already claimed ... | // Note that this pool has no minter key of vApe (rewards).
// Instead, the governance will call vApe distributeReward method and send reward to this pool at the beginning. | LineComment | safeApeTransfer | function safeApeTransfer(address _to, uint256 _amount) internal {
uint256 _apeBal = ape.balanceOf(address(this));
if (_apeBal > 0) {
if (_amount > _apeBal) {
ape.safeTransfer(_to, _apeBal);
} else {
ape.safeTransfer(_to, _amount);
}
}
}
| // Safe ape transfer function, just in case if rounding error causes pool to not have enough Apes. | LineComment | v0.8.1+commit.df193b15 | MIT | ipfs://7b13ce9ee4873a36e089a679a74d4cc9693616200bde0dd0ff6bcf55eb778d10 | {
"func_code_index": [
10135,
10481
]
} | 5,210 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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 virtual returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
864,
960
]
} | 5,211 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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 virtual returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
1074,
1174
]
} | 5,212 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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 virtual 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.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
1808,
1904
]
} | 5,213 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
1964,
2077
]
} | 5,214 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
2135,
2317
]
} | 5,215 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
2525,
2744
]
} | 5,216 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
2802,
3008
]
} | 5,217 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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(msg.sender, spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
3323,
3536
]
} | 5,218 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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) {
uint256 currentAllowance = _allowances[sender][msg.sender];
if (currentAllowance != type(uint256).max) {
require(
currentAllowance >= amount,
"... | /**
* @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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `s... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
4124,
4747
]
} | 5,219 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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(
msg.sender,
spender,
_allowances[msg.sender][spender] + addedValue
);
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
5151,
5449
]
} | 5,220 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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)
{
uint256 currentAllowance = _allowances[msg.sender][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
... | /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
5947,
6430
]
} | 5,221 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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);
... | /**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
6915,
7690
]
} | 5,222 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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 += amount;
_balances[account] += 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:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
7972,
8376
]
} | 5,223 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds ba... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
8704,
9300
]
} | 5,224 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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(own... | /**
* @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.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
9733,
10118
]
} | 5,225 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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 transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - wh... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
10713,
10843
]
} | 5,226 |
RewardDistributor | contracts/libraries/ERC20.sol | 0x4946360377d7d3b73df887ada347c1dc4cb5aace | Solidity | ERC20 | contract ERC20 is IERC20 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values ... | /**
* @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 | _afterTokenTransfer | function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
| /**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | GNU GPLv3 | ipfs://21e636f54da20693e22b08f7621069f45e8d7b90edb10b9216a2d6d7d23eb464 | {
"func_code_index": [
11442,
11571
]
} | 5,227 |
EscrowFactory | mathlib.sol | 0xd03a329e6a1f05d0c797215a82e8f0e14f241d4b | Solidity | mathlib | library mathlib
{
// --- Math functions as implemented in DAI ERC20 Token---
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x);
}
func... | add | function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
| // --- Math functions as implemented in DAI ERC20 Token--- | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://b80b0d3a2f6700979825fe5f689f9982ac6146fbc93c527521f6eebb19e80b32 | {
"func_code_index": [
88,
194
]
} | 5,228 | ||
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
905,
1324
]
} | 5,229 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an ... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
1495,
2920
]
} | 5,230 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
3001,
3135
]
} | 5,231 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
3216,
3330
]
} | 5,232 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
3679,
3804
]
} | 5,233 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _values | function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
| /**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
4349,
4465
]
} | 5,234 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
4714,
4844
]
} | 5,235 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
5015,
5151
]
} | 5,236 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
5232,
5377
]
} | 5,237 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
5458,
5580
]
} | 5,238 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
5929,
6065
]
} | 5,239 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | values | function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
| /**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
6610,
6741
]
} | 5,240 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
6990,
7147
]
} | 5,241 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
7318,
7481
]
} | 5,242 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
7562,
7734
]
} | 5,243 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
7815,
7937
]
} | 5,244 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
8286,
8449
]
} | 5,245 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | values | function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
| /**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
8994,
9265
]
} | 5,246 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
9508,
9644
]
} | 5,247 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
9815,
9957
]
} | 5,248 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
10038,
10189
]
} | 5,249 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
10270,
10389
]
} | 5,250 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
10738,
10880
]
} | 5,251 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | values | function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
| /**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
11425,
11693
]
} | 5,252 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// 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;
assembly {
size := extcodesize(account)
... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
606,
998
]
} | 5,253 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
| /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
1928,
2250
]
} | 5,254 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
3007,
3187
]
} | 5,255 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
3412,
3646
]
} | 5,256 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
4016,
4281
]
} | 5,257 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
4532,
5047
]
} | 5,258 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
5227,
5431
]
} | 5,259 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallRe... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
5618,
6018
]
} | 5,260 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
6200,
6405
]
} | 5,261 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionDelegateCall | function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
6594,
6995
]
} | 5,262 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | verifyCallResult | function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
... | /**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
7218,
7935
]
} | 5,263 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
100,
159
]
} | 5,264 | ||
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
226,
287
]
} | 5,265 | ||
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
363,
418
]
} | 5,266 | ||
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | SafeERC20 | library SafeERC20 {
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... | /**
* @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'
require(
... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
791,
1412
]
} | 5,267 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | SafeERC20 | library SafeERC20 {
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... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
2628,
3349
]
} | 5,268 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
399,
491
]
} | 5,269 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
1050,
1149
]
} | 5,270 |
Treasury | Treasury.sol | 0xcb9bdf8390b088e78b4ba1c5cacd0b843a83d216 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://ad646d5e85cf5ea6c220a5d545c69cc180fcb4f72aeb6ba9e501b8108fcddaf4 | {
"func_code_index": [
1299,
1496
]
} | 5,271 |
OGCards | contracts/OGCards.sol | 0x96aaf5008913c3ae12541f6ea7717c9a0dd74f4d | Solidity | OGCards | contract OGCards is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using SafeMath for uint8;
address private immutable _ogCardDescriptor;
address private immutable _ensHelpers;
address private immutable _cryptoPunks; // 0xb47e3cd837ddf8e4c57f05d70ab865de6e193... | baseURI | function baseURI() public pure returns (string memory) {}
| // save bytecode by removing implementation of unused method | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2459,
2520
]
} | 5,272 | ||||
OGCards | contracts/OGCards.sol | 0x96aaf5008913c3ae12541f6ea7717c9a0dd74f4d | Solidity | OGCards | contract OGCards is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using SafeMath for uint8;
address private immutable _ogCardDescriptor;
address private immutable _ensHelpers;
address private immutable _cryptoPunks; // 0xb47e3cd837ddf8e4c57f05d70ab865de6e193... | withdraw | function withdraw() public onlyOwner {
uint256 balance = address(this).balance;
payable(msg.sender).transfer(balance);
}
| // Withdraw all funds in the contract | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2673,
2817
]
} | 5,273 | ||||
OGCards | contracts/OGCards.sol | 0x96aaf5008913c3ae12541f6ea7717c9a0dd74f4d | Solidity | OGCards | contract OGCards is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using SafeMath for uint8;
address private immutable _ogCardDescriptor;
address private immutable _ensHelpers;
address private immutable _cryptoPunks; // 0xb47e3cd837ddf8e4c57f05d70ab865de6e193... | claim | function claim() external claimOpened remainsSupply(baseCardsLeft) {
require(!hasClaimedBase[msg.sender], "OGCards: you already claimed a base card");
hasClaimedBase[msg.sender] = true;
baseCardsLeft--;
_claim(msg.sender, 0, 0);
}
| // Claim OGCards | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3101,
3371
]
} | 5,274 | ||||
OGCards | contracts/OGCards.sol | 0x96aaf5008913c3ae12541f6ea7717c9a0dd74f4d | Solidity | OGCards | contract OGCards is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using SafeMath for uint8;
address private immutable _ogCardDescriptor;
address private immutable _ensHelpers;
address private immutable _cryptoPunks; // 0xb47e3cd837ddf8e4c57f05d70ab865de6e193... | tokensOfOwner | function tokensOfOwner(address _owner) public view returns (uint256[] memory) {
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](tokenCount);
uint256 index;
for (index = 0; index < tokenCo... | // List every tokens an owner owns | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4816,
5308
]
} | 5,275 | ||||
OGCards | contracts/OGCards.sol | 0x96aaf5008913c3ae12541f6ea7717c9a0dd74f4d | Solidity | OGCards | contract OGCards is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using SafeMath for uint8;
address private immutable _ogCardDescriptor;
address private immutable _ensHelpers;
address private immutable _cryptoPunks; // 0xb47e3cd837ddf8e4c57f05d70ab865de6e193... | addOG | function addOG(address _og, string memory _name) public onlyOwner {
require(bytes(_name).length > 0, "OGCards: You must define a name for this OG");
require(_og != address(0), "OGCards: Invalid address");
if (isOG(_og)) {
_ogName[_og] = _name;
emit OGAdded(_og, _name);
} else {
... | // OGs | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5321,
5750
]
} | 5,276 | ||||
OGCards | contracts/OGCards.sol | 0x96aaf5008913c3ae12541f6ea7717c9a0dd74f4d | Solidity | OGCards | contract OGCards is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using SafeMath for uint8;
address private immutable _ogCardDescriptor;
address private immutable _ensHelpers;
address private immutable _cryptoPunks; // 0xb47e3cd837ddf8e4c57f05d70ab865de6e193... | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
// Save the holder only once per token
if (!_alreadyHoldToken[tokenId][to]) {
cardInfo[tokenId].holders.push(to);
_alreadyHoldToken[tokenId][to... | // Before any transfer, add the new owner to the holders list of this token | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
8181,
8550
]
} | 5,277 | ||||
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
374,
455
]
} | 5,278 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
719,
798
]
} | 5,279 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
944,
1021
]
} | 5,280 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
1733,
1850
]
} | 5,281 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If th... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
2376,
2489
]
} | 5,282 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
2962,
3022
]
} | 5,283 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) external view returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
3176,
3260
]
} | 5,284 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool _approved) external;
| /**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
3587,
3662
]
} | 5,285 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) external view returns (bool);
| /**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
3813,
3906
]
} | 5,286 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {appro... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
4483,
4630
]
} | 5,287 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
184,
912
]
} | 5,288 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
1017,
1362
]
} | 5,289 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT ... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
1485,
1941
]
} | 5,290 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
399,
491
]
} | 5,291 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
1050,
1149
]
} | 5,292 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
1299,
1496
]
} | 5,293 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other valu... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
528,
698
]
} | 5,294 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the token collection name.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
106,
165
]
} | 5,295 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the token collection symbol.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
236,
297
]
} | 5,296 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory);
| /**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
398,
476
]
} | 5,297 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// 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;
assembly {
size := extcodesize(account)
... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
606,
998
]
} | 5,298 |
BlootGirls | BlootGirls.sol | 0x9fc1b82c8ba212b9b9620da2cf36cf5be3d0082a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
| /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://267db3da4d019dcc427677bfa7ea8a946dd9be19cf9938022a079d01375b142b | {
"func_code_index": [
1928,
2250
]
} | 5,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.