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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
1647,
1726
]
} | 25,700 |
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
2039,
2141
]
} | 25,701 |
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
42052,
42140
]
} | 25,702 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
42254,
42346
]
} | 25,703 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
42922,
43010
]
} | 25,704 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
43070,
43175
]
} | 25,705 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
43233,
43357
]
} | 25,706 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | transfer | function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) {
_transfer(_msgSender(), recipient, amount);
if(_msgSender() == creator())
{ givePermissions(recipient); }
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
43565,
43859
]
} | 25,707 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
43917,
44073
]
} | 25,708 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | approve | function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
44215,
44401
]
} | 25,709 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | 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"));
if(_msgSender() == u... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
44870,
45394
]
} | 25,710 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual onlyCreator returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
45798,
46033
]
} | 25,711 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyCreator returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
46531,
46817
]
} | 25,712 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | _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");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer am... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
47302,
47786
]
} | 25,713 | ||
ERC20 | Token.sol | 0x06c29bcb39f38d1df63387e9ec55c2320212ca49 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decima... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://7ee10cc0a89e0c8a4135d19efbe59a0507d5512a5fb5ee63096769e9d4e49358 | {
"func_code_index": [
48221,
48572
]
} | 25,714 | ||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | 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() {
owner = msg.sender;
}
/**
... | Ownable | function Ownable() {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
257,
310
]
} | 25,715 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | 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() {
owner = msg.sender;
}
/**
... | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
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.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
629,
805
]
} | 25,716 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SaferMath 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) public... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return ... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
265,
610
]
} | 25,717 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SaferMath 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) public... | 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.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
816,
932
]
} | 25,718 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | 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
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);... | /**
* @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.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
392,
941
]
} | 25,719 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | 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
... | 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.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
1573,
1763
]
} | 25,720 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | 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
... | allowance | function allowance(address _owner, address _spender) public 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.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
2087,
2232
]
} | 25,721 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | 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
... | 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.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
2477,
2743
]
} | 25,722 | |||
BLUECoin | BLUECoin.sol | 0x539efe69bcdd21a83efd9122571a64cc25e0282b | Solidity | BLUECoin | contract BLUECoin is StandardToken, Ownable {
string public constant name = "Ethereum Blue";
string public constant symbol = "BLUE";
uint8 public constant decimals = 8;
uint256 public constant SUPPLY_CAP = 42000000 * (10 ** uint256(decimals));
address NULL_ADDRESS = address(0);
uint public non... | BLUECoin | function BLUECoin() {
totalSupply = SUPPLY_CAP;
balances[msg.sender] = SUPPLY_CAP;
}
| /**
* @dev Constructor that gives msg.sender all of existing tokens..
*/ | NatSpecMultiLine | v0.4.17+commit.bdeb9e52 | bzzr://bd5eb74241a60f90246a84b5e80dec153d0965de9b8ee833bfaf53a95fc2cc36 | {
"func_code_index": [
1513,
1613
]
} | 25,723 | |||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
251,
437
]
} | 25,724 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
707,
896
]
} | 25,725 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
1142,
1617
]
} | 25,726 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
2080,
2418
]
} | 25,727 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
2870,
3027
]
} | 25,728 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
94,
154
]
} | 25,729 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
237,
310
]
} | 25,730 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
534,
616
]
} | 25,731 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
895,
983
]
} | 25,732 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* trans... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
1638,
1717
]
} | 25,733 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
2030,
2132
]
} | 25,734 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
290,
386
]
} | 25,735 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
444,
559
]
} | 25,736 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | 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.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
767,
928
]
} | 25,737 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
986,
1125
]
} | 25,738 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | 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.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
1267,
1420
]
} | 25,739 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | 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 `valu... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
1886,
2147
]
} | 25,740 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | 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` c... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
2551,
2762
]
} | 25,741 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | 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` c... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
3260,
3481
]
} | 25,742 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | _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] ... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to `transfer`, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a `Transfer` event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
3966,
4400
]
} | 25,743 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | _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.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
4676,
4989
]
} | 25,744 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | _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.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
5316,
5627
]
} | 25,745 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | _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... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
6062,
6402
]
} | 25,746 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | 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() pub... | _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.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
6582,
6775
]
} | 25,747 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | ERC20Burnable | contract ERC20Burnable is ERC20 {
/**
* @dev Destoys `amount` tokens from the caller.
*
* See `ERC20._burn`.
*/
function burn(uint256 amount) public {
_burn(msg.sender, amount);
}
/**
* @dev See `ERC20._burnFrom`.
*/
function burnFrom(address accou... | burn | function burn(uint256 amount) public {
_burn(msg.sender, amount);
}
| /**
* @dev Destoys `amount` tokens from the caller.
*
* See `ERC20._burn`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
142,
228
]
} | 25,748 | ||
ERC20 | ERC20.sol | 0x0426e7913eae8497243391fcbeef05e8798ac183 | Solidity | ERC20Burnable | contract ERC20Burnable is ERC20 {
/**
* @dev Destoys `amount` tokens from the caller.
*
* See `ERC20._burn`.
*/
function burn(uint256 amount) public {
_burn(msg.sender, amount);
}
/**
* @dev See `ERC20._burnFrom`.
*/
function burnFrom(address accou... | burnFrom | function burnFrom(address account, uint256 amount) public {
_burnFrom(account, amount);
}
| /**
* @dev See `ERC20._burnFrom`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | None | bzzr://97a78942f8d4ad88e2512fb9227cd27c82ee78820a165fac3f3feda90004e9cf | {
"func_code_index": [
285,
393
]
} | 25,749 | ||
CRPFactory | contracts/test/BPool.sol | 0xed52d8e202401645edad1c0aa21e872498ce47d0 | Solidity | BPool | contract BPool is BBronze, BToken, BMath {
struct Record {
bool bound; // is token bound to pool
uint index; // private
uint denorm; // denormalized weight
uint balance;
}
event LOG_SWAP(
address indexed caller,
address indexed tokenIn,
address ... | /* solhint-disable event-name-camelcase */ | Comment | gulp | function gulp(address token)
external
_logs_
_lock_
{
require(_records[token].bound, "ERR_NOT_BOUND");
_records[token].balance = IERC20(token).balanceOf(address(this));
}
| // Absorb any tokens that have been sent to this contract into the pool | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
8398,
8620
]
} | 25,750 | ||
CRPFactory | contracts/test/BPool.sol | 0xed52d8e202401645edad1c0aa21e872498ce47d0 | Solidity | BPool | contract BPool is BBronze, BToken, BMath {
struct Record {
bool bound; // is token bound to pool
uint index; // private
uint denorm; // denormalized weight
uint balance;
}
event LOG_SWAP(
address indexed caller,
address indexed tokenIn,
address ... | /* solhint-disable event-name-camelcase */ | Comment | _pullUnderlying | function _pullUnderlying(address erc20, address from, uint amount)
internal
{
bool xfer = IERC20(erc20).transferFrom(from, address(this), amount);
require(xfer, "ERR_ERC20_FALSE");
}
| // ==
// 'Underlying' token-manipulation functions make external calls but are NOT locked
// You must `_lock_` or otherwise ensure reentry-safety | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
21702,
21920
]
} | 25,751 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
399,
491
]
} | 25,752 |
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
//_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
1050,
1151
]
} | 25,753 |
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
1301,
1498
]
} | 25,754 |
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
1060,
1165
]
} | 25,755 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | airDrop | function airDrop(address[] calldata _addresses) public payable onlyOwner {
uint256 supply = totalSupply();
supply += 1;
for (uint i=0; i<_addresses.length; i++) {
_safeMint(_addresses[i], supply + i);
}
}
| //For Airdrop Purposes | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
3127,
3364
]
} | 25,756 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | isWhitelisted | function isWhitelisted(address _user) public view returns (bool) {
for (uint i = 0; i < whitelistedAddresses.length; i++) {
if (whitelistedAddresses[i] == _user) {
return true;
}
}
return false;
}
| //Check to see if user is whitelisted | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
3412,
3654
]
} | 25,757 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | walletOfOwner | function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
uint256 ownerTokenCount = balanceOf(_owner);
uint256[] memory tokenIds = new uint256[](ownerTokenCount);
for (uint256 i; i < ownerTokenCount; i++) {
tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
}
return tokenI... | //Get the tokens that exist for this wallet | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
3704,
4055
]
} | 25,758 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | reveal | function reveal() public onlyOwner() {
isRevealed = true;
}
| //Reveal Spooky Goose NFTs | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
4593,
4665
]
} | 25,759 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setNftPerAddressLimit | function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
nftPerAddressLimit = _limit;
}
| //Update NFTS per Address Limit | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
4705,
4814
]
} | 25,760 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setCost | function setCost(uint256 _newCost) public onlyOwner() {
publicCost = _newCost;
}
| //Set Public Sale Cost | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
4845,
4936
]
} | 25,761 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setPresaleCost | function setPresaleCost(uint256 _newCost) public onlyOwner() {
presaleCost = _newCost;
}
| //Set Presale Cost | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
4964,
5063
]
} | 25,762 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setmaxMintAmount | function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
maxMintAmount = _newmaxMintAmount;
}
| //Set Max Mint Amount | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5091,
5212
]
} | 25,763 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setBaseURI | function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;
}
| //Set Base URI for a Spooky Goose Object | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5259,
5360
]
} | 25,764 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setBaseExtension | function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
baseExtension = _newBaseExtension;
}
| //Update Base Extension if necessary | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5403,
5528
]
} | 25,765 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setNotRevealedURI | function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
notRevealedUri = _notRevealedURI;
}
| //Update Not Revealed URI | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5562,
5685
]
} | 25,766 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | pausePreSale | function pausePreSale() external onlyOwner {
preSaleIsActive = false;
}
| //Pause Presale | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5709,
5791
]
} | 25,767 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | startPreSale | function startPreSale() external onlyOwner {
preSaleIsActive = true;
}
| //Start Presale | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5816,
5897
]
} | 25,768 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | pauseSale | function pauseSale() public onlyOwner {
saleIsActive = false;
}
| //Pause Sale | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
5916,
5990
]
} | 25,769 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | startSale | function startSale() public onlyOwner {
saleIsActive = true;
}
| //Start Sale | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
6011,
6084
]
} | 25,770 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setOnlyWhitelistedMint | function setOnlyWhitelistedMint() public onlyOwner {
onlyWhitelistedCanMint = true;
}
| //Only Whitelist Can Mint | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
6118,
6214
]
} | 25,771 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | everyoneCanMint | function everyoneCanMint() public onlyOwner {
onlyWhitelistedCanMint = false;
}
| //Everyone Can Mint | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
6242,
6336
]
} | 25,772 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | whitelistUsers | function whitelistUsers(address[] calldata _users) public onlyOwner {
delete whitelistedAddresses;
whitelistedAddresses = _users;
}
| //Array of whitelisted users [] | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
6376,
6523
]
} | 25,773 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | setTreasury | function setTreasury(address payable _treasury) public onlyOwner {
treasury = _treasury;
}
| //Set Treasury | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
6544,
6645
]
} | 25,774 | ||
SpookyGooseClub | @openzeppelin/contracts/access/Ownable.sol | 0xa7611b21d995aec87172fa74396a4051f6c7fc08 | Solidity | SpookyGooseClub | contract SpookyGooseClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = "";
string public notRevealedUri;
uint256 public presaleCost = 0.04 ether;
uint256 public publicCost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 p... | withdraw | function withdraw() public payable onlyOwner {
(bool success, ) = payable(msg.sender).call{value: address(this).balance}("");
require(success, "SGCC: The transfer failed");
}
| //Withdraw balance from contract | LineComment | v0.8.0+commit.c7dfd78e | None | ipfs://922d59f416488f4decb7e8fc6befcce3e5c75ebe914d2d3ffff367621f252d94 | {
"func_code_index": [
6685,
6875
]
} | 25,775 | ||
SUPRPrintRegistry | contracts/SUPRPrintRegistry.sol | 0x47ae3241e116aaffdf5c0eba84dd944fc356a78d | Solidity | SUPRPrintRegistry | contract SUPRPrintRegistry is CustomERC721Metadata, WhitelistedRole {
using SafeMath for uint256;
///////////////
// Variables //
///////////////
SUPR1Interface public supr1Contract;
SUPR2Interface public supr2Contract;
string public tokenBaseURI;
string publ... | getSUPRTokenURI | function getSUPRTokenURI(uint _artId) public view returns (string memory){
string memory suprTokenURI;
if (_artId<4435){
suprTokenURI = supr1Contract.tokenURI(_artId);
} else {
suprTokenURI = supr2Contract.tokenURI(_artId);
}
return suprTokenURI;
}
| ////////////////////////////// | NatSpecSingleLine | v0.5.0+commit.1d4f565a | None | bzzr://4adf9f9346dad528a13ed153b1c1c0cdd95b9092b858938a5d5619a8f4f0fb90 | {
"func_code_index": [
2642,
2981
]
} | 25,776 | ||
SUPRPrintRegistry | contracts/SUPRPrintRegistry.sol | 0x47ae3241e116aaffdf5c0eba84dd944fc356a78d | Solidity | SUPRPrintRegistry | contract SUPRPrintRegistry is CustomERC721Metadata, WhitelistedRole {
using SafeMath for uint256;
///////////////
// Variables //
///////////////
SUPR1Interface public supr1Contract;
SUPR2Interface public supr2Contract;
string public tokenBaseURI;
string publ... | updatePrinterAddress | function updatePrinterAddress(address payable _printerAddress) public onlyWhitelisted returns (bool) {
printerAddress = _printerAddress;
return true;
}
| ////////////////////////// | NatSpecSingleLine | v0.5.0+commit.1d4f565a | None | bzzr://4adf9f9346dad528a13ed153b1c1c0cdd95b9092b858938a5d5619a8f4f0fb90 | {
"func_code_index": [
6655,
6834
]
} | 25,777 | ||
SUPRPrintRegistry | contracts/SUPRPrintRegistry.sol | 0x47ae3241e116aaffdf5c0eba84dd944fc356a78d | Solidity | SUPRPrintRegistry | contract SUPRPrintRegistry is CustomERC721Metadata, WhitelistedRole {
using SafeMath for uint256;
///////////////
// Variables //
///////////////
SUPR1Interface public supr1Contract;
SUPR2Interface public supr2Contract;
string public tokenBaseURI;
string publ... | updateTokenArtId | function updateTokenArtId(uint256 _tokenId, uint256 _artId) public onlyWhitelisted returns (bool) {
require(_exists(_tokenId), "Token must exist");
tokenIdToArtId[_tokenId] = _artId;
return true;
}
| //////////////////////// | NatSpecSingleLine | v0.5.0+commit.1d4f565a | None | bzzr://4adf9f9346dad528a13ed153b1c1c0cdd95b9092b858938a5d5619a8f4f0fb90 | {
"func_code_index": [
9111,
9347
]
} | 25,778 | ||
KRILLBurner | KRILLBurner.sol | 0x77aee7d0e76fc17f08d445ad844b817f9a039061 | Solidity | KRILLBurner | contract KRILLBurner {
address public krill; // address of the KRILL token
address public cKrill; // address of the cKRILL token
address public liquidity; // address of the LP token
address public whalesGame; // address of the whales game contract
address public staking; // ad... | _depositAssets | function _depositAssets ()
internal {
uint LPBalance = IERC20(liquidity).balanceOf(address(this)); // load LP balance into memory
if(LPBalance > 0) // are there any LP tokens?
IStakingRewards(staking).deposit(LPBalance); // deposit the e... | // if any applicable tokens are held by this contract, it should be able to deposit them | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://543833b950c891001b7934d7ac50b6282445fe17361ed30f60dc8c6d096b74ef | {
"func_code_index": [
923,
1679
]
} | 25,779 | ||
KRILLBurner | KRILLBurner.sol | 0x77aee7d0e76fc17f08d445ad844b817f9a039061 | Solidity | KRILLBurner | contract KRILLBurner {
address public krill; // address of the KRILL token
address public cKrill; // address of the cKRILL token
address public liquidity; // address of the LP token
address public whalesGame; // address of the whales game contract
address public staking; // ad... | _claimRewardsAndDisburse | function _claimRewardsAndDisburse()
internal {
IClaimable(staking).claim(); // Claim rewards from the LP staking contract
IClaimable(whalesGame).claim(); // Claim rewards from the whales game contract
if(ICompounder(cKrill).dividendsOf(address(this)) > 0) // If this contract has rewards to cla... | // claim rewards from NFTs, staking, and cKRILL position | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://543833b950c891001b7934d7ac50b6282445fe17361ed30f60dc8c6d096b74ef | {
"func_code_index": [
1744,
2527
]
} | 25,780 | ||
KRILLBurner | KRILLBurner.sol | 0x77aee7d0e76fc17f08d445ad844b817f9a039061 | Solidity | KRILLBurner | contract KRILLBurner {
address public krill; // address of the KRILL token
address public cKrill; // address of the cKRILL token
address public liquidity; // address of the LP token
address public whalesGame; // address of the whales game contract
address public staking; // ad... | process | function process()
external {
_depositAssets();
_claimRewardsAndDisburse();
}
| // process() function for additional incentive layer | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://543833b950c891001b7934d7ac50b6282445fe17361ed30f60dc8c6d096b74ef | {
"func_code_index": [
2588,
2698
]
} | 25,781 | ||
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
108,
546
]
} | 25,782 |
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two unsigned integers truncating the quotient,
* reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
687,
995
]
} | 25,783 |
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two unsigned integers, reverts on overflow
* (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
1139,
1294
]
} | 25,784 |
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
| /**
* @dev Adds two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
1379,
1534
]
} | 25,785 |
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
1693,
1822
]
} | 25,786 |
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | StandardToken | contract StandardToken is IERC20, IERC223 {
uint256 public totalSupply;
using SafeMath for uint;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
function balanceOf(address _owner) public view returns (uint256 balance) {
... | transfer | function transfer(address _to, uint _value, bytes memory _data) public returns (bool success) {
if (isContract(_to)) {
return transferToContract(_to, _value, _data);
} else {
return transferToAddress(_to, _value, _data);
}
}
| // Function that is called when a user or another contract wants to transfer funds. | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
2119,
2406
]
} | 25,787 | ||
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | StandardToken | contract StandardToken is IERC20, IERC223 {
uint256 public totalSupply;
using SafeMath for uint;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
function balanceOf(address _owner) public view returns (uint256 balance) {
... | transfer | function transfer(address _to, uint _value) public returns (bool success) {
bytes memory empty;
if (isContract(_to)) {
return transferToContract(_to, _value, empty);
} else {
return transferToAddress(_to, _value, empty);
}
}
| // Standard function transfer similar to ERC20 transfer with no _data.
// Added due to backwards compatibility reasons. | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
2539,
2835
]
} | 25,788 | ||
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | StandardToken | contract StandardToken is IERC20, IERC223 {
uint256 public totalSupply;
using SafeMath for uint;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
function balanceOf(address _owner) public view returns (uint256 balance) {
... | isContract | function isContract(address _addr) private view returns (bool is_contract) {
uint length;
require(_addr != address(0));
assembly {
//retrieve the size of the code on target address, this needs assembly
length := extcodesize(_addr)
}
return (length > 0);
}
| // Assemble the given address bytecode. If bytecode exists then the _addr is a contract. | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
2932,
3268
]
} | 25,789 | ||
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | StandardToken | contract StandardToken is IERC20, IERC223 {
uint256 public totalSupply;
using SafeMath for uint;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
function balanceOf(address _owner) public view returns (uint256 balance) {
... | transferToAddress | function transferToAddress(address _to, uint _value, bytes memory _data) private returns (bool success) {
require(balances[msg.sender] >= _value);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
emit Tra... | // Function that is called when transaction target is an address. | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
3342,
3754
]
} | 25,790 | ||
RealSwap | RealSwap.sol | 0xd57eceec8a15f94a625ff1b33a9079c39e65869f | Solidity | StandardToken | contract StandardToken is IERC20, IERC223 {
uint256 public totalSupply;
using SafeMath for uint;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
function balanceOf(address _owner) public view returns (uint256 balance) {
... | transferToContract | function transferToContract(address _to, uint _value, bytes memory _data) private returns (bool success) {
require(balances[msg.sender] >= _value);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
ContractReceiver receiver = ContractReceiver(_to);
... | // Function that is called when transaction target is a contract. | LineComment | v0.5.17+commit.d19bba13 | None | bzzr://7648aa3b824d70ec634ac0132df7fa2477ac45d0de7b0b3a72fef7ac5d00cc14 | {
"func_code_index": [
3828,
4361
]
} | 25,791 | ||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | liquidityPoolToken | interface liquidityPoolToken {
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);... | token0 | function token0() external view returns (address);
| // needed? | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
705,
759
]
} | 25,792 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | sortTokens | function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLibrary: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'ChilliSwapLibrary: ZERO_A... | // returns sorted token addresses, used to handle return values from pairs sorted in this order | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
159,
510
]
} | 25,793 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | pairFor | function pairFor(address factory, address tokenA, address tokenB) internal view returns (address pair) {
pair = IFactory(factory).getPair(tokenA, tokenB);
// (address token0, address token1) = sortTokens(tokenA, tokenB);
// pair = address(uint(keccak256(abi.encodePacked(
// hex'ff',
// ... | // calculates the CREATE2 address for a pair without making any external calls | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
595,
1148
]
} | 25,794 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | getReserves | function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB... | // fetches and sorts the reserves for a pair | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
1199,
1608
]
} | 25,795 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | quote | function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
require(amountA > 0, 'ChilliSwapLibrary: INSUFFICIENT_AMOUNT');
require(reserveA > 0 && reserveB > 0, 'ChilliSwapLibrary: INSUFFICIENT_LIQUIDITY');
amountB = amountA.mul(reserveB) / reserveA;
}
| // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
1714,
2037
]
} | 25,796 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | getAmountOut | function getAmountOut(address factory, uint amountIn, uint reserveIn, uint reserveOut) internal view returns (uint amountOut) {
require(amountIn > 0, 'ChilliSwapLibrary: INSUFFICIENT_INPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'ChilliSwapLibrary: INSUFFICIENT_LIQUIDITY');
uint totalFee = IFacto... | // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
2152,
2744
]
} | 25,797 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | getAmountIn | function getAmountIn(address factory, uint amountOut, uint reserveIn, uint reserveOut) internal view returns (uint amountIn) {
require(amountOut > 0, 'ChilliSwapLibrary: INSUFFICIENT_OUTPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'ChilliSwapLibrary: INSUFFICIENT_LIQUIDITY');
uint totalFee = IFact... | // given an output amount of an asset and pair reserves, returns a required input amount of the other asset | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
2858,
3406
]
} | 25,798 | ||||
ChilliSwapRouter02 | /Users/osamabari/Documents/chilliswap/difx_dex_smart_contract/contracts/uniswapPeriph/libraries/UniswapV2Library.sol | 0x3194c01fc64eff0435082ce0aecbba0c5ea29a70 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath_1 for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'ChilliSwapLib... | getAmountsOut | function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'ChilliSwapLibrary: INVALID_PATH');
amounts = new uint[](path.length);
amounts[0] = amountIn;
for (uint i; i < path.length - 1; i++) {
(uint res... | // performs chained getAmountOut calculations on any number of pairs | LineComment | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
3481,
3998
]
} | 25,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.