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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AugustusSwapper | contracts/AugustusSwapper.sol | 0x66152a2a538644ae125570de522adeac9e41d865 | Solidity | AugustusSwapper | contract AugustusSwapper is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Address for address;
//Ether token address used when to or from in swap is Ether
address constant private ETH_ADDRESS = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeee... | /**
* @dev The contract will allow swap of one token for another across multiple exchanges in one atomic transaction
* Kyber, Uniswap and Bancor are supported in phase-01
*/ | NatSpecMultiLine | freeGasTokens | function freeGasTokens(uint256 tokens) private {
uint256 tokensToFree = tokens;
uint256 safeNumTokens = 0;
uint256 gas = gasleft();
if (gas >= 27710) {
safeNumTokens = gas.sub(27710).div(1148 + 5722 + 150);
}
if (tokensToFree > safeNumTokens) {
tokensToFree = safeNu... | /**
* @dev Helper method to free gas tokens
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | BSD-3-Clause | bzzr://a414e7ebbd4e22e20905576e075c51708f507cc3b4782f370cdcb29302473dd4 | {
"func_code_index": [
14913,
15491
]
} | 8,200 |
AugustusSwapper | contracts/AugustusSwapper.sol | 0x66152a2a538644ae125570de522adeac9e41d865 | Solidity | AugustusSwapper | contract AugustusSwapper is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Address for address;
//Ether token address used when to or from in swap is Ether
address constant private ETH_ADDRESS = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeee... | /**
* @dev The contract will allow swap of one token for another across multiple exchanges in one atomic transaction
* Kyber, Uniswap and Bancor are supported in phase-01
*/ | NatSpecMultiLine | transferTokens | function transferTokens(
address token,
address payable destination,
uint256 amount
)
private
{
if (token == ETH_ADDRESS) {
destination.transfer(amount);
}
else {
IERC20(token).safeTransfer(destination, amount);
}
}
| /**
* @dev Helper function to transfer tokens to the destination
* @dev token Address of the token to be transferred
* @dev destination Recepient of the token
* @dev amount Amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | BSD-3-Clause | bzzr://a414e7ebbd4e22e20905576e075c51708f507cc3b4782f370cdcb29302473dd4 | {
"func_code_index": [
15735,
16064
]
} | 8,201 |
AugustusSwapper | contracts/AugustusSwapper.sol | 0x66152a2a538644ae125570de522adeac9e41d865 | Solidity | AugustusSwapper | contract AugustusSwapper is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Address for address;
//Ether token address used when to or from in swap is Ether
address constant private ETH_ADDRESS = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeee... | /**
* @dev The contract will allow swap of one token for another across multiple exchanges in one atomic transaction
* Kyber, Uniswap and Bancor are supported in phase-01
*/ | NatSpecMultiLine | calculateFee | function calculateFee(
address sourceToken,
uint256 receivedAmount,
uint256 calleesLength
)
private
view
returns (uint256)
{
uint256 fee = 0;
if (sourceToken == ETH_ADDRESS && calleesLength == 1) {
return 0;
}
else if (sourceToken != ETH_ADDRESS && calleesLength == 2) ... | /**
* @dev Helper method to calculate fees
* @param receivedAmount Received amount of tokens
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | BSD-3-Clause | bzzr://a414e7ebbd4e22e20905576e075c51708f507cc3b4782f370cdcb29302473dd4 | {
"func_code_index": [
16183,
16717
]
} | 8,202 |
AugustusSwapper | contracts/AugustusSwapper.sol | 0x66152a2a538644ae125570de522adeac9e41d865 | Solidity | AugustusSwapper | contract AugustusSwapper is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Address for address;
//Ether token address used when to or from in swap is Ether
address constant private ETH_ADDRESS = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeee... | /**
* @dev The contract will allow swap of one token for another across multiple exchanges in one atomic transaction
* Kyber, Uniswap and Bancor are supported in phase-01
*/ | NatSpecMultiLine | externalCall | function externalCall(
address destination,
uint256 value,
uint256 dataOffset,
uint dataLength,
bytes memory data
)
private
returns (bool)
{
bool result = false;
assembly {
let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stor... | /**
* @dev Source take from GNOSIS MultiSigWallet
* @dev https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | BSD-3-Clause | bzzr://a414e7ebbd4e22e20905576e075c51708f507cc3b4782f370cdcb29302473dd4 | {
"func_code_index": [
16882,
18047
]
} | 8,203 |
AugustusSwapper | contracts/AugustusSwapper.sol | 0x66152a2a538644ae125570de522adeac9e41d865 | Solidity | AugustusSwapper | contract AugustusSwapper is ReentrancyGuard, Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using Address for address;
//Ether token address used when to or from in swap is Ether
address constant private ETH_ADDRESS = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeee... | /**
* @dev The contract will allow swap of one token for another across multiple exchanges in one atomic transaction
* Kyber, Uniswap and Bancor are supported in phase-01
*/ | NatSpecMultiLine | tokenBalance | function tokenBalance(
address token,
address account
)
private
view
returns (uint256)
{
if (token == ETH_ADDRESS) {
return account.balance;
} else {
return IERC20(token).balanceOf(account);
}
}
| /**
* @dev Helper function to returns balance of a user for a token
* @param token Tokend address
* @param account Account whose balances has to be returned
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | BSD-3-Clause | bzzr://a414e7ebbd4e22e20905576e075c51708f507cc3b4782f370cdcb29302473dd4 | {
"func_code_index": [
18235,
18535
]
} | 8,204 |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
278,
371
]
} | 8,205 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
425,
537
]
} | 8,206 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public 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.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
736,
893
]
} | 8,207 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
947,
1083
]
} | 8,208 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
1217,
1366
]
} | 8,209 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
| /**
* @dev See `IERC20.transferFrom`.
*
* Emits an `Approval` event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of `ERC20`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `value`.
* -... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
1819,
2075
]
} | 8,210 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
2466,
2673
]
} | 8,211 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
3156,
3373
]
} | 8,212 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _ba... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to `transfer`, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a `Transfer` event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
3843,
4269
]
} | 8,213 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a `Transfer` event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
4535,
4841
]
} | 8,214 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | _burn | function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Destoys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a `Transfer` event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
5156,
5460
]
} | 8,215 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an `Approval` event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
5881,
6214
]
} | 8,216 | |
SmartInvoiceWallet | ERC20.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view ret... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implem... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
| /**
* @dev Destoys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See `_burn` and `_approve`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
6387,
6576
]
} | 8,217 | |
BEANSHARES | BEANSHARES.sol | 0xc360a1651d903020c6f8392853fb2ffe52bf0595 | Solidity | Context | contract Context {
constructor() internal {}
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns(address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns(address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://8ba3c7a9f5c6cef597a6f9b9bb623c5cdadfe2a6fcff9ac386138609eff86424 | {
"func_code_index": [
105,
207
]
} | 8,218 | ||
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
268,
659
]
} | 8,219 | |
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
865,
981
]
} | 8,220 | |
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][m... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
392,
837
]
} | 8,221 | |
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) returns (bool) {
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs... | /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
1073,
1621
]
} | 8,222 | |
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
1945,
2083
]
} | 8,223 | |
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
2328,
2599
]
} | 8,224 | |
SPCAToken | SPCAToken.sol | 0x7dc69e8d98dd1e2b876cda39e50312dcd47ea7c7 | Solidity | SPCAToken | contract SPCAToken is StandardToken {
string public constant name = "SPCA";
string public constant symbol = "SPCA";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 1600000000 * (10 ** uint256(decimals));
/**
* @dev Constructor that gives msg.sender all of existing ... | /**
* @title SPCAToken
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
* Note they can later distribute these tokens as they wish using `transfer` and other
* `StandardToken` functions.
*/ | NatSpecMultiLine | SPCAToken | function SPCAToken() {
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
}
| /**
* @dev Constructor that gives msg.sender all of existing tokens.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://cce38ed929497ca27dd9c7a07c6c1afff5e8b9f6651672e9ddf4d7bb54692257 | {
"func_code_index": [
336,
445
]
} | 8,225 | |
BabyCatGirl | BabyCatGirl.sol | 0x06e04bbfa6a53c57ebfc17e1aeed8e2686640ecd | Solidity | BabyCatGirl | contract BabyCatGirl is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable private marketingWallet = payable(0x0c8b5DD2eb9b5b0B8090FF03Af575Db9613B8A90); // Marketing Wallet
address payable private ecosystemWallet = payable(0xf1e106aADd3CDfC960727... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://d1d4502fa977d0a131365405f8b6a8769d93327da69a43d0a9de9af15f71c0e0 | {
"func_code_index": [
24723,
24757
]
} | 8,226 | ||||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
261,
321
]
} | 8,227 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
644,
820
]
} | 8,228 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
513,
604
]
} | 8,229 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
688,
781
]
} | 8,230 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
268,
659
]
} | 8,231 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
865,
977
]
} | 8,232 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
401,
853
]
} | 8,233 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
1485,
1675
]
} | 8,234 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
1999,
2130
]
} | 8,235 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
2375,
2639
]
} | 8,236 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | BurnableToken | contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_valu... | burn | function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
225,
713
]
} | 8,237 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | function () external payable {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
1940,
2014
]
} | 8,238 | ||||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | buyTokens | function buyTokens(address beneficiary) internal {
require(beneficiary != 0x0);
require(whitelist[beneficiary]);
require(validPurchase());
//derive amount in wei to buy
uint256 weiAmount = msg.value;
// check if contribution is in the first 24h hours
if (getBlockTimestamp() <= fi... | //low level function to buy tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
2057,
3531
]
} | 8,239 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | claimRefund | function claimRefund() nonReentrant external {
require(isFinalized);
require(!goalReached());
vault.refund(msg.sender);
}
| // contributors can claim refund if the goal is not reached | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
3737,
3895
]
} | 8,240 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | claimUnsold | function claimUnsold() onlyOwner {
require(endTime <= getBlockTimestamp());
uint256 unsold = token.balanceOf(this);
if (unsold > 0) {
require(token.transferTokens(msg.sender, unsold));
}
}
| //in case of endTime before the reach of the cap, the owner can claim the unsold tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
3991,
4240
]
} | 8,241 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | updateWhitelist | function updateWhitelist(address[] addresses, bool status) public onlyOwner {
for (uint256 i = 0; i < addresses.length; i++) {
address contributorAddress = addresses[i];
whitelist[contributorAddress] = status;
}
}
| // add/remove to whitelist array of addresses based on boolean status | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
4318,
4585
]
} | 8,242 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | finalize | function finalize() onlyOwner {
require(!isFinalized);
require(hasEnded());
if (goalReached()) {
//Close the vault
vault.close();
//Unpause the token
token.unpause();
//give ownership back to deployer
token.transferOwnership(owner);
} else {
... | //Only owner can manually finalize the sale | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
4637,
5237
]
} | 8,243 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | forwardFunds | function forwardFunds(uint256 weiAmount) internal {
vault.deposit.value(weiAmount)(msg.sender);
}
| // send ether to the fund collection wallet, the vault in this case | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
5313,
5429
]
} | 8,244 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | hasEnded | function hasEnded() public constant returns (bool) {
bool passedEndTime = getBlockTimestamp() > endTime;
return passedEndTime || capReached();
}
| // @return true if crowdsale event has ended or cap reached | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
5497,
5669
]
} | 8,245 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | AgiCrowdsale | contract AgiCrowdsale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
// We have a window in the first 24hrs that permits to allocate all whitelist
// participants with an equal distribution => firstDayCap = cap / whitelist participants.
uint256 public firstDayCap;
uint256 public c... | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinPeriod = getBlockTimestamp() >= startTime && getBlockTimestamp() <= endTime;
bool nonZeroPurchase = msg.value != 0;
bool capNotReached = weiRaised < cap;
return withinPeriod && nonZeroPurchase && capNotReached;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
6066,
6395
]
} | 8,246 | |||
AgiCrowdsale | AgiCrowdsale.sol | 0xc4aad17558fa95c8937d0856b2dad74c1a7a095f | Solidity | SingularityNetToken | contract SingularityNetToken is PausableToken, BurnableToken {
string public constant name = "SingularityNET Token";
string public constant symbol = "AGI";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 1000000000 * 10**uint256(decimals);
/**
* @dev Si... | SingularityNetToken | function SingularityNetToken() {
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
}
| /**
* @dev SingularityNetToken Constructor
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://ca70fc0eb065e27d0d13415ef9df8d8294d2ccd9740cd183d80c81a82ce6e441 | {
"func_code_index": [
361,
495
]
} | 8,247 | |||
SmartInvoiceWallet | SmartInvoiceWallet.sol | 0x9f7c7ec1d32262911c19b257841eda5d0ffaaf5a | Solidity | SmartInvoiceWallet | contract SmartInvoiceWallet {
using SafeMath for uint256;
address public owner;
IERC20 public assetToken;
//internal book keeping. Needed so that we only pay invoices we know we explicitly committed to pay
mapping(address => SmartInvoice.Status) private _smartInvoiceStatus;
modifier isOwner() {
requi... | commit | function commit(SmartInvoice smartInvoice) external isOwner returns (bool) {
require(smartInvoice.payer() == address(this), "not smart invoice payer");
require(smartInvoice.status() == SmartInvoice.Status.UNCOMMITTED, "smart invoice already committed");
require(smartInvoice.assetToken() == this.assetToken(), "sm... | //Note: owner (or their advocate) is expected to have audited what they commit to,
// including confidence that the terms are guaranteed not to change. i.e. the smartInvoice is trusted | LineComment | v0.5.0+commit.1d4f565a | bzzr://7af97b9d816714361b682d9edb3ac49f66a5cf2353dd676f68b0e50721b0c411 | {
"func_code_index": [
2067,
2693
]
} | 8,248 | |||
HTTERC20 | contracts/access/Ownable.sol | 0xa7c0ed95a3ff2080a8d0c538088d29dd9317bc13 | Solidity | Ownable | abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(msg.sender);
}
/**
* @dev... | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | MIT | ipfs://a230f7f137f88a8b92cc61ccfcadf5d2a4bdaf5aac4c7852e16a401d6fa74227 | {
"func_code_index": [
371,
460
]
} | 8,249 | ||
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view virtual returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
874,
970
]
} | 8,250 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view virtual returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
1084,
1184
]
} | 8,251 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view 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.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
1817,
1913
]
} | 8,252 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
1973,
2086
]
} | 8,253 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
2144,
2276
]
} | 8,254 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
2484,
2664
]
} | 8,255 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
2722,
2878
]
} | 8,256 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
3020,
3194
]
} | 8,257 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
3671,
3997
]
} | 8,258 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
4401,
4624
]
} | 8,259 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
5122,
5396
]
} | 8,260 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
5881,
6425
]
} | 8,261 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
6702,
7085
]
} | 8,262 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
7413,
7836
]
} | 8,263 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
8269,
8620
]
} | 8,264 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
8947,
9050
]
} | 8,265 |
ERC20Token | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x59a9ad833d55783a266e098290e679ce987204da | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _dec... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.7.4+commit.3f05b770 | MIT | ipfs://fc0e758bcb97eb1763c50b6ce9b8458387aaeb7b495232f91a6b2efa378ee070 | {
"func_code_index": [
9648,
9745
]
} | 8,266 |
XHouses | contracts/Xhouses.sol | 0x5dda9c8093b776f4b0583aba4f22131dca890179 | Solidity | XHouses | contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @... | xhouseID | function xhouseID(uint256 _id) public view returns (uint256 houseID) {
for (uint256 i = 1; i <= SEASON_COUNT; i++) {
if (_id < seasons[i].unit_count) {
return (_id + seasons[i].tokenOffset) % seasons[i].unit_count;
}
}
}
| // @dev convinence function for returning the offset token ID | LineComment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1716,
2000
]
} | 8,267 | ||||
XHouses | contracts/Xhouses.sol | 0x5dda9c8093b776f4b0583aba4f22131dca890179 | Solidity | XHouses | contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @... | addSeason | function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
require(seasons[_seasonNum].unit_count == 0, "Season Already exists");
seasons[_seasonNum] = Season(
_seasonNum,
... | // onlyOwner functions | LineComment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
4986,
5834
]
} | 8,268 | ||||
XHouses | contracts/Xhouses.sol | 0x5dda9c8093b776f4b0583aba4f22131dca890179 | Solidity | XHouses | contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @... | fulfillRandomness | function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
uint256 offset = randomness %
seasons[season_randIDs[requestId]].unit_count;
seasons[season_randIDs[requestId]].tokenOffset = offset;
}
| // @dev chainlink callback function for requestRandomness | LineComment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
6611,
6889
]
} | 8,269 | ||||
XHouses | contracts/Xhouses.sol | 0x5dda9c8093b776f4b0583aba4f22131dca890179 | Solidity | XHouses | contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @... | gift | function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
require(
_recipients.length + season_minted[_season] <=
seasons[_season].unit_count,
"Number of gifts exceeds season supply"
);
for (uint256 i = 0; i < _recipients.length; i++) {
... | // @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to | LineComment | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
7780,
8392
]
} | 8,270 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | _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;
return true;
} else {
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.7.5+commit.eb77ed08 | {
"func_code_index": [
831,
1187
]
} | 8,271 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | _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 element from the _values... | /**
* @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.7.5+commit.eb77ed08 | {
"func_code_index": [
1339,
2723
]
} | 8,272 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | _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.7.5+commit.eb77ed08 | {
"func_code_index": [
2794,
2917
]
} | 8,273 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | _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.7.5+commit.eb77ed08 | {
"func_code_index": [
2988,
3091
]
} | 8,274 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
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.7.5+commit.eb77ed08 | {
"func_code_index": [
3419,
3612
]
} | 8,275 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | _insert | function _insert(Set storage set_, uint256 index_, bytes32 valueToInsert_ ) private returns ( bool ) {
require( set_._values.length > index_ );
require( !_contains( set_, valueToInsert_ ), "Remove value you wish to insert if you wish to reorder array." );
bytes32 existingValue_ = _at( set_, index_ );
set_._val... | /**
* Inserts new value by moving existing value at provided index to end of array and setting provided value at provided index
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
3971,
4374
]
} | 8,276 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | add | function add(Bytes4Set storage set, bytes4 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.7.5+commit.eb77ed08 | {
"func_code_index": [
4570,
4687
]
} | 8,277 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | remove | function remove(Bytes4Set storage set, bytes4 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.7.5+commit.eb77ed08 | {
"func_code_index": [
4839,
4962
]
} | 8,278 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | contains | function contains(Bytes4Set storage set, bytes4 value) internal view returns (bool) {
return _contains(set._inner, value);
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
5033,
5165
]
} | 8,279 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | length | function length(Bytes4Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
5236,
5346
]
} | 8,280 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | at | function at(Bytes4Set storage set, uint256 index) internal view returns ( bytes4 ) {
return bytes4( _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.7.5+commit.eb77ed08 | {
"func_code_index": [
5664,
5801
]
} | 8,281 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
6516,
6643
]
} | 8,282 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
6807,
6940
]
} | 8,283 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
7017,
7159
]
} | 8,284 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | length | function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
7236,
7355
]
} | 8,285 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
7693,
7828
]
} | 8,286 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(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.7.5+commit.eb77ed08 | {
"func_code_index": [
8544,
8681
]
} | 8,287 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(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.7.5+commit.eb77ed08 | {
"func_code_index": [
8833,
8976
]
} | 8,288 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
9047,
9199
]
} | 8,289 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
9270,
9381
]
} | 8,290 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(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.7.5+commit.eb77ed08 | {
"func_code_index": [
9699,
9842
]
} | 8,291 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | getValues | function getValues( AddressSet storage set_ ) internal view returns ( address[] memory ) {
address[] memory addressArray;
for( uint256 iteration_ = 0; _length(set_._inner) >= iteration_; iteration_++ ){
addressArray[iteration_] = at( set_, iteration_ );
}
return addressArray;
}
| /**
* TODO Might require explicit conversion of bytes32[] to address[].
* Might require iteration.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
9958,
10265
]
} | 8,292 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
10690,
10823
]
} | 8,293 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
10987,
11126
]
} | 8,294 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
11203,
11351
]
} | 8,295 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
11428,
11544
]
} | 8,296 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
11872,
12011
]
} | 8,297 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | add | function add(UInt256Set 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.7.5+commit.eb77ed08 | {
"func_code_index": [
12228,
12364
]
} | 8,298 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | 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 just wrappers... | remove | function remove(UInt256Set 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.7.5+commit.eb77ed08 | {
"func_code_index": [
12528,
12670
]
} | 8,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.