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
PuppyFrunk
PuppyFrunk.sol
0x5054288fbaf74fe608fd612300c4196d3370966b
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
lock
function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); }
//Locks the contract for owner for the amount of time provided
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://2da08609a5eaa22adc87cca9854667e5b89c57d7fa813e63a2a3fedff1868974
{ "func_code_index": [ 2109, 2352 ] }
2,607
PuppyFrunk
PuppyFrunk.sol
0x5054288fbaf74fe608fd612300c4196d3370966b
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the ...
unlock
function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; }
//Unlocks the contract for owner when _lockTime is exceeds
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://2da08609a5eaa22adc87cca9854667e5b89c57d7fa813e63a2a3fedff1868974
{ "func_code_index": [ 2431, 2753 ] }
2,608
PuppyFrunk
PuppyFrunk.sol
0x5054288fbaf74fe608fd612300c4196d3370966b
Solidity
PuppyFrunk
contract PuppyFrunk is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; ...
// Contract implementation
LineComment
manualSwap
function manualSwap() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); }
// We are exposing these functions to be able to manual swap and send // in case the token is highly valued and 5M becomes too much
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://2da08609a5eaa22adc87cca9854667e5b89c57d7fa813e63a2a3fedff1868974
{ "func_code_index": [ 12031, 12208 ] }
2,609
PuppyFrunk
PuppyFrunk.sol
0x5054288fbaf74fe608fd612300c4196d3370966b
Solidity
PuppyFrunk
contract PuppyFrunk is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; ...
// Contract implementation
LineComment
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://2da08609a5eaa22adc87cca9854667e5b89c57d7fa813e63a2a3fedff1868974
{ "func_code_index": [ 16569, 16607 ] }
2,610
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 94, 154 ] }
2,611
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 237, 310 ] }
2,612
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 534, 616 ] }
2,613
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 895, 983 ] }
2,614
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
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. * * 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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 1647, 1726 ] }
2,615
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 2039, 2141 ] }
2,616
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 100, 159 ] }
2,617
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 226, 287 ] }
2,618
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 363, 418 ] }
2,619
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { address msgSe...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 545, 629 ] }
2,620
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { address msgSe...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 1187, 1340 ] }
2,621
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { address msgSe...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 1490, 1776 ] }
2,622
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. * */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 917, 1022 ] }
2,623
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 1136, 1245 ] }
2,624
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
decimals
function decimals() public view virtual override returns (uint8) { return 9; }
/** * @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 9, imitating the relationship between * Ether and Wei. This is ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 1878, 1975 ] }
2,625
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 2035, 2148 ] }
2,626
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 2206, 2338 ] }
2,627
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 2546, 2726 ] }
2,628
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 2784, 2940 ] }
2,629
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 3082, 3256 ] }
2,630
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _ap...
/** * @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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 3733, 4160 ] }
2,631
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 4564, 4784 ] }
2,632
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - sub...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 5282, 5664 ] }
2,633
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
_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); uint256 sende...
/** * @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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 6149, 6758 ] }
2,634
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 7048, 7391 ] }
2,635
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
Burn
function Burn(address account, uint256 amount) public onlyOwner { _burn( account, amount); }
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 7844, 7955 ] }
2,636
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
_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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 8895, 9246 ] }
2,637
EthereumI
EthereumI.sol
0xce98bc63fd11525b515c597648000d3a1fe06091
Solidity
EthereumI
contract EthereumI is Ownable, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the value...
_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.8.4+commit.c7e474f2
MIT
ipfs://05f5d379e507b16572cee2478ee864c2afe2d5ec13ca219c58436e014df141d6
{ "func_code_index": [ 9853, 9950 ] }
2,638
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
IERC20
interface IERC20 { //Return total supply function totalSupply() external view returns (uint256); //Return amount of tokens owned by 'account' function balanceOf(address account) external view returns (uint256); //Moves 'amount' tokens from the caller's account to 'recipi...
totalSupply
function totalSupply() external view returns (uint256);
//Return total supply
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 51, 115 ] }
2,639
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
IERC20
interface IERC20 { //Return total supply function totalSupply() external view returns (uint256); //Return amount of tokens owned by 'account' function balanceOf(address account) external view returns (uint256); //Moves 'amount' tokens from the caller's account to 'recipi...
balanceOf
function balanceOf(address account) external view returns (uint256);
//Return amount of tokens owned by 'account'
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 172, 249 ] }
2,640
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
IERC20
interface IERC20 { //Return total supply function totalSupply() external view returns (uint256); //Return amount of tokens owned by 'account' function balanceOf(address account) external view returns (uint256); //Moves 'amount' tokens from the caller's account to 'recipi...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
//Moves 'amount' tokens from the caller's account to 'recipient'
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 326, 412 ] }
2,641
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
IERC20
interface IERC20 { //Return total supply function totalSupply() external view returns (uint256); //Return amount of tokens owned by 'account' function balanceOf(address account) external view returns (uint256); //Moves 'amount' tokens from the caller's account to 'recipi...
allowance
function allowance(address owner, address spender) external view returns (uint256);
//Returns a boolean value indicating whether the operation succeeded. //Returns the remaining number of tokens that 'spender' will be allowed to spend
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 584, 676 ] }
2,642
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
IERC20
interface IERC20 { //Return total supply function totalSupply() external view returns (uint256); //Return amount of tokens owned by 'account' function balanceOf(address account) external view returns (uint256); //Moves 'amount' tokens from the caller's account to 'recipi...
approve
function approve(address spender, uint256 amount) external returns (bool);
//Sets 'amount' as the allowance of 'spender' over the caller's tokens
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 761, 844 ] }
2,643
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
IERC20
interface IERC20 { //Return total supply function totalSupply() external view returns (uint256); //Return amount of tokens owned by 'account' function balanceOf(address account) external view returns (uint256); //Moves 'amount' tokens from the caller's account to 'recipi...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
//Moves 'ammount' of tokens from 'spender' to 'recipient'. Then deducts from callers allowance.
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 952, 1058 ] }
2,644
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); //Initializes the contract setting the deployer as the initial owner. ...
owner
function owner() public view returns (address) { return _owner; }
//Returns the address of the current owner.
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 562, 658 ] }
2,645
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); //Initializes the contract setting the deployer as the initial owner. ...
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * Leaves the contract without owner. It will not be possible to call * 'onlyOwner' functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 1229, 1398 ] }
2,646
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); //Initializes the contract setting the deployer as the initial owner. ...
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
//Transfers ownership of the contract to a new account ('newOwner'), Can only be called by the current owner.
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 1520, 1789 ] }
2,647
Boost2
Boost2.sol
0xa2eb4cd6bc9ba61571b12d3484a5688202851bbc
Solidity
Boost2
contract Boost2 is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; ...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.6.12+commit.27d51765
None
ipfs://3bb691eb61f86a19053c7d78c93a8918ff102569b9c6f9d39407202ca2e63af9
{ "func_code_index": [ 17205, 17243 ] }
2,648
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
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; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 257, 317 ] }
2,649
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
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; } ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 638, 814 ] }
2,650
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
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 ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 513, 604 ] }
2,651
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
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 ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 688, 781 ] }
2,652
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
Destructible
contract Destructible is Ownable { function Destructible() public payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. */ function destroy() onlyOwner public { selfdestruct(owner); } function destroyAndSend(address _recipient) onlyOwner public ...
/** * @title Destructible * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner. */
NatSpecMultiLine
destroy
function destroy() onlyOwner public { selfdestruct(owner); }
/** * @dev Transfers the current balance to the owner and terminates the contract. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 183, 254 ] }
2,653
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
BasicToken
contract BasicToken is ERC20Basic, Pausable { using SafeMath for uint256; uint256 public etherRaised; mapping(address => uint256) balances; address companyReserve; uint256 deployTime; modifier isUserAbleToTransferCheck(uint256 _value) { if(msg.sender == companyReserve){ uint256 balanceRe...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public isUserAbleToTransferCheck(_value) 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...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 1107, 1533 ] }
2,654
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
BasicToken
contract BasicToken is ERC20Basic, Pausable { using SafeMath for uint256; uint256 public etherRaised; mapping(address => uint256) balances; address companyReserve; uint256 deployTime; modifier isUserAbleToTransferCheck(uint256 _value) { if(msg.sender == companyReserve){ uint256 balanceRe...
/** * @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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 1745, 1861 ] }
2,655
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
BurnableToken
contract BurnableToken is BasicToken { using SafeMath for uint256; 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 <= balances[msg....
burn
function burn(uint256 _value) public { 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; balances[burner] = balances[bur...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 243, 668 ] }
2,656
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
StandardToken
contract StandardToken is ERC20, BurnableToken { 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 t...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public isUserAbleToTransferCheck(_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] = balan...
/** * @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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 406, 892 ] }
2,657
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
StandardToken
contract StandardToken is ERC20, BurnableToken { 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 t...
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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 1524, 1714 ] }
2,658
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
StandardToken
contract StandardToken is ERC20, BurnableToken { 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 t...
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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 2038, 2183 ] }
2,659
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
StandardToken
contract StandardToken is ERC20, BurnableToken { 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 t...
increaseApproval
function increaseApproval (address _spender, uint _addedValue) public 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.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 2428, 2701 ] }
2,660
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
POTENTIAM
contract POTENTIAM is StandardToken, Destructible { string public constant name = "POTENTIAM"; using SafeMath for uint256; uint public constant decimals = 18; string public constant symbol = "PTM"; uint public priceOfToken=250000000000000;//1 eth = 4000 PTM address[] allParticipants; ...
transferFundToAccount
function transferFundToAccount(address _accountByOwner) public onlyOwner { require(etherRaised > 0); _accountByOwner.transfer(etherRaised); etherRaised = 0; }
/** * Transfer entire balance to any account (by owner and admin only) **/
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 3632, 3827 ] }
2,661
POTENTIAM
POTENTIAM.sol
0x7c32db0645a259fae61353c1f891151a2e7f8c1e
Solidity
POTENTIAM
contract POTENTIAM is StandardToken, Destructible { string public constant name = "POTENTIAM"; using SafeMath for uint256; uint public constant decimals = 18; string public constant symbol = "PTM"; uint public priceOfToken=250000000000000;//1 eth = 4000 PTM address[] allParticipants; ...
transferLimitedFundToAccount
function transferLimitedFundToAccount(address _accountByOwner, uint256 balanceToTransfer) public onlyOwner { require(etherRaised > balanceToTransfer); _accountByOwner.transfer(balanceToTransfer); etherRaised -= balanceToTransfer; }
/** * Transfer part of balance to any account (by owner and admin only) **/
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://b7da2c0ee1b9c9627f2fa75268203ed421497f723571995e0d7e473408d1f2d8
{ "func_code_index": [ 4279, 4549 ] }
2,662
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
DCoin
function DCoin () public { owner = msg.sender; }
// constructor
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 578, 637 ] }
2,663
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
transfer
function transfer(address _to, uint _value) unfreezed(_to) unfreezed(msg.sender) noEmergencyFreeze() public returns (bool success) { require(_to != 0x0); require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Tran...
// functions // ------------------------------------------------------------------------ // Transfer Token // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 1371, 1757 ] }
2,664
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
mintToken
function mintToken (address _targetAddress, uint256 _mintedAmount) unfreezed(_targetAddress) noEmergencyFreeze() public onlyOwner returns(bool res) { require(_targetAddress != 0x0); // use burn instead require(_mintedAmount != 0); require (totalSupply.add(_mintedAmount) <= maxCoinCap); balances[_targetAddre...
// ------------------------------------------------------------------------ // Mint Token (Uncapped Minting) // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 1954, 2519 ] }
2,665
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
approve
function approve(address _spender, uint _value) unfreezed(_spender) unfreezed(msg.sender) noEmergencyFreeze() public returns (bool success) { require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/* While changing approval, the allowed must be changed to 0 than then to updated value The smart contract doesn't enforces this due to backward competibility but requires frontend to do the validations */
Comment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 2949, 3280 ] }
2,666
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }...
// ------------------------------------------------------------------------ // Approve and call : If approve returns true, it calls receiveApproval method of contract // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 3535, 3872 ] }
2,667
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
transferFrom
function transferFrom(address _from, address _to, uint _value) unfreezed(_to) unfreezed(_from) unfreezed(msg.sender) noEmergencyFreeze() public returns (bool success) { require(_value <= allowed[_from][msg.sender]); require (_value <= balances[_from]); balances[_from] = balances[_from].sub(_value); allowed[...
// ------------------------------------------------------------------------ // Transferred approved amount from other's account // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 4088, 4590 ] }
2,668
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
burn
function burn(uint256 _value) unfreezed(msg.sender) public returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] -= _value; totalSupply -= _value; emit Burn(msg.sender, _value); return true; }
// ------------------------------------------------------------------------ // Burn (Destroy tokens) // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 4781, 5037 ] }
2,669
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0)); owner = _newOwner; emit OwnershipTransferred(owner, _newOwner); }
// ------------------------------------------------------------------------ // ONLYOWNER METHODS // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // Transfer Ownership // ---...
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 5452, 5637 ] }
2,670
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
freezeAccount
function freezeAccount (address _target, bool _freeze) public onlyOwner returns(bool res) { require(_target != 0x0); frozen[_target] = _freeze; emit Freezed(_target, _freeze); return true; }
// ------------------------------------------------------------------------ // Freeze account - onlyOwner // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 5831, 6047 ] }
2,671
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
emergencyFreezeAllAccounts
function emergencyFreezeAllAccounts (bool _freeze) public onlyOwner returns(bool res) { emergencyFreeze = _freeze; emit EmerygencyFreezed(_freeze); return true; }
// ------------------------------------------------------------------------ // Emerygency freeze - onlyOwner // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 6244, 6427 ] }
2,672
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
allowance
function allowance(address _tokenOwner, address _spender) public constant returns (uint remaining) { return allowed[_tokenOwner][_spender]; }
// ------------------------------------------------------------------------ // CONSTANT METHODS // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // Check Allowance : Constant // -------------------------...
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 6824, 6976 ] }
2,673
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
balanceOf
function balanceOf(address _tokenOwner) public constant returns (uint balance) { return balances[_tokenOwner]; }
// ------------------------------------------------------------------------ // Check Balance : Constant // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 7168, 7291 ] }
2,674
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
totalSupply
function totalSupply() public constant returns (uint) { return totalSupply; }
// ------------------------------------------------------------------------ // Total supply : Constant // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 7482, 7570 ] }
2,675
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
isFreezed
function isFreezed(address _targetAddress) public constant returns (bool) { return frozen[_targetAddress]; }
// ------------------------------------------------------------------------ // Get Freeze Status : Constant // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 7766, 7886 ] }
2,676
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Prevents contract from accepting ETH // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 8094, 8145 ] }
2,677
DCoin
DCoin.sol
0x64391a1f01c49ae731e258b451afe387f6f57df4
Solidity
DCoin
contract DCoin is ERC20Interface { using SafeMath for uint; // State variables string public name = "D'Coin"; string public symbol = 'DCO'; uint public decimals = 6; address public owner; uint public maxCoinCap = 200000000 * (10 ** 6); uint public totalSupply; bool public emergencyFreeze; ...
transferAnyERC20Token
function transferAnyERC20Token(address _tokenAddress, uint _value) public onlyOwner returns (bool success) { return ERC20Interface(_tokenAddress).transfer(owner, _value); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.22+commit.4cb486ee
bzzr://2c7240096b5ace985c6921c4b1d87e469ce0f2f422435654187b798132a69c70
{ "func_code_index": [ 8370, 8555 ] }
2,678
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 1002, 1169 ] }
2,679
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
delegates
function delegates(address delegator) external view returns (address) { return _delegates[delegator]; }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 3267, 3389 ] }
2,680
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
delegate
function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 3532, 3641 ] }
2,681
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
delegateBySig
function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), ...
/** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECD...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 4070, 5173 ] }
2,682
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
getCurrentVotes
function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; }
/** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 5369, 5610 ] }
2,683
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
getPriorVotes
function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) { require( blockNumber < block.number, "YFBTC::getPriorVotes: not yet determined" ); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { retur...
/** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 6036, 7335 ] }
2,684
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
updateCap
function updateCap(uint256 _cap) external onlyOwner { cap = _cap; }
/** * @dev update the cap. * * Requirements: * * - Should only be called by the owner(Governace) */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 10195, 10281 ] }
2,685
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); if (from == address(0)) { // When minting tokens require(totalSupply().add(amount) <= cap, "YFBTC:: cap exceeded"); } } ...
/** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - minted tokens must not cause the total supply to go over the cap. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 10463, 10827 ] }
2,686
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
_updateClaimCondtions
function _updateClaimCondtions( address[] memory _canClaimIfHasTokens, uint256[] memory _canClaimIfHasThisMuchTokens ) internal { require( _canClaimIfHasTokens.length == _canClaimIfHasThisMuchTokens.length, "YFBTC:: Invalid Input" ); canClaimIfHasTokens = _canClaimIfHasTokens...
/** * @dev update claim condtions * * Requirements: * * - Should only be called by the owner(Governace) */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 10978, 11412 ] }
2,687
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
canClaim
function canClaim(address _who) public view returns (bool) { for (uint8 i = 0; i < canClaimIfHasTokens.length; i++) { if ( IERC20(canClaimIfHasTokens[i]).balanceOf(_who) >= canClaimIfHasThisMuchTokens[i] ) { return true; } } return false; ...
/** * @dev checks if an account is able to claim the tokens * * Requirements: * * - Should only be called by the owner(Governace) */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 11589, 11956 ] }
2,688
YFEBitcoin
contracts/YFBitcoin.sol
0xd6c3a0978b544f650240e83ee3421895e13fa19a
Solidity
YFEBitcoin
contract YFEBitcoin is ERC20("YFBitcoin", "YFBTC"), Ownable { uint256 public immutable startTime; uint256 public immutable endTime; uint256[] public canClaimIfHasThisMuchTokens; address[] public canClaimIfHasTokens; mapping(address => bool) public isClaimed; uint256 public totalClaim...
// YFEToken with Governance.
LineComment
claim
function claim() external { if (!(isClaimed[msg.sender] || now < startTime || now >= endTime)) { if (canClaim(msg.sender) && totalClaimed <= maximumToBeClaimed) { _mint(msg.sender, claimAmount); _moveDelegates(address(0), _delegates[msg.sender], claimAmount); totalCl...
/** * @dev claim 0.1 YFBTC * */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://e478236553da8942ed3fc35cee4655dd7e21d966c9ffaba54db90b489b3c4d17
{ "func_code_index": [ 12014, 12477 ] }
2,689
Unipool
@openzeppelin/contracts/utils/Address.sol
0x9481922b14a4c34794c1af2f43128b138dd7da9a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This KAFIR is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is u...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // According to EIP-1052, 0x0 is the value returned for not-yet crea...
/** * @dev Returns true if `account` is a contract. * * This KAFIR is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to assume that an address for which this * ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://e763bcdbedaee01a9f7ddcded2e67076137a6105ef34a70ed96679800cb03332
{ "func_code_index": [ 473, 1288 ] }
2,690
Unipool
@openzeppelin/contracts/utils/Address.sol
0x9481922b14a4c34794c1af2f43128b138dd7da9a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This KAFIR is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is u...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
toPayable
function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); }
/** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://e763bcdbedaee01a9f7ddcded2e67076137a6105ef34a70ed96679800cb03332
{ "func_code_index": [ 1500, 1632 ] }
2,691
Unipool
@openzeppelin/contracts/utils/Address.sol
0x9481922b14a4c34794c1af2f43128b138dd7da9a
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * This KAFIR is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is u...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, re...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://e763bcdbedaee01a9f7ddcded2e67076137a6105ef34a70ed96679800cb03332
{ "func_code_index": [ 2604, 2980 ] }
2,692
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
init
function init() public { initMaxExpArray(); initLambertArray(); }
/** * @dev should be executed after construction (too large for the constructor) */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 16428, 16521 ] }
2,693
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
purchaseTargetAmount
function purchaseTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) internal view returns (uint256) { // validate input require(_supply > 0, "ERR_INVALID_SUPPLY"); require(_reserveBalance > 0, "ERR_INVALID_RESERVE_BALANCE"); require(...
/** * @dev given a token supply, reserve balance, weight and a deposit amount (in the reserve token), * calculates the target amount for a given conversion (in the main token) * * Formula: * return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1) * * @param _supply l...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 17149, 18105 ] }
2,694
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
quoteTargetAmount
function quoteTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) internal view returns (uint256) { // validate input require(_supply > 0, "ERR_INVALID_SUPPLY"); require(_reserveBalance > 0, "ERR_INVALID_RESERVE_BALANCE"); require(_re...
/** * @dev given a token supply, reserve balance, weight, calculate the total cost to purchase * n tokens * * Formula: * return = _reserveBalance * ((1 + _amount / _supply) ^ (1000000 / _reserveWeight) - 1) * * @param _supply liquid token supply * @param _reserveBalance reserve balance * @pa...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 18663, 19620 ] }
2,695
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
saleTargetAmount
function saleTargetAmount( uint256 _supply, uint256 _reserveBalance, uint32 _reserveWeight, uint256 _amount ) internal view returns (uint256) { // validate input require(_supply > 0, "ERR_INVALID_SUPPLY"); require(_reserveBalance > 0, "ERR_INVALID_RESERVE_BALANCE"); require(_res...
/** * @dev given a token supply, reserve balance, weight and a sell amount (in the main token), * calculates the target amount for a given conversion (in the reserve token) * * Formula: * return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight)) * * @param _supply liqu...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 20258, 21426 ] }
2,696
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
power
function power( uint256 _baseN, uint256 _baseD, uint32 _expN, uint32 _expD ) internal view returns (uint256, uint8) { require(_baseN < MAX_NUM); uint256 baseLog; uint256 base = (_baseN * FIXED_1) / _baseD; if (base < OPT_LOG_MAX_VAL) { baseLog = optimalLog(base); ...
/** * @dev General Description: * Determine a value of precision. * Calculate an integer approximation of (_baseN / _baseD) ^ (_expN / _expD) * 2 ^ precision. * Return the result along with the precision used. * * Detailed Description: * Instead of calculating "base ^ exp", we calculate "e...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 22996, 23821 ] }
2,697
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
generalLog
function generalLog(uint256 x) internal pure returns (uint256) { uint256 res = 0; // If x >= 2, then we compute the integer part of log2(x), which is larger than 0. if (x >= FIXED_2) { uint8 count = floorLog2(x / FIXED_1); x >>= count; // now x < 2 res = count * FIXED_1; ...
/** * @dev computes log(x / FIXED_1) * FIXED_1. * This functions assumes that "x >= FIXED_1", because the output would be negative otherwise. */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 23992, 24822 ] }
2,698
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
floorLog2
function floorLog2(uint256 _n) internal pure returns (uint8) { uint8 res = 0; if (_n < 256) { // At most 8 iterations while (_n > 1) { _n >>= 1; res += 1; } } else { // Exactly 8 iterations for (uint8 s = 128; s > 0; s >>= 1) { ...
/** * @dev computes the largest integer smaller than or equal to the binary logarithm of the input. */
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 24945, 25483 ] }
2,699
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
findPositionInMaxExpArray
function findPositionInMaxExpArray(uint256 _x) internal view returns (uint8 precision) { uint8 lo = MIN_PRECISION; uint8 hi = MAX_PRECISION; while (lo + 1 < hi) { uint8 mid = (lo + hi) / 2; if (maxExpArray[mid] >= _x) lo = mid; else hi = mid; } if (maxExpArray[hi]...
/** * @dev the global "maxExpArray" is sorted in descending order, and therefore the following statements are equivalent: * - This function finds the position of [the smallest value in "maxExpArray" larger than or equal to "x"] * - This function finds the highest position of [a value in "maxExpArray" larger than ...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 25849, 26305 ] }
2,700
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
generalExp
function generalExp(uint256 _x, uint8 _precision) internal pure returns (uint256) { uint256 xi = _x; uint256 res = 0; xi = (xi * _x) >> _precision; res += xi * 0x3442c4e6074a82f1797f72ac0000000; // add x^02 * (33! / 02!) xi = (xi * _x) >> _precision; res += xi * 0x116b96f757c380fb287fd0e...
/** * @dev this function can be auto-generated by the script 'PrintFunctionGeneralExp.py'. * it approximates "e ^ x" via maclaurin summation: "(x^0)/0! + (x^1)/1! + ... + (x^n)/n!". * it returns "e ^ (x / 2 ^ precision) * 2 ^ precision", that is, the result is upshifted for accuracy. * the global "maxExpArray" ...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 26868, 31025 ] }
2,701
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
optimalLog
function optimalLog(uint256 x) internal pure returns (uint256) { uint256 res = 0; uint256 y; uint256 z; uint256 w; if (x >= 0xd3094c70f034de4b96ff7d5b6f99fcd8) { res += 0x40000000000000000000000000000000; x = (x * FIXED_1) / 0xd3094c70f034de4b96ff7d5b6f99fcd8; } // ad...
/** * @dev computes log(x / FIXED_1) * FIXED_1 * Input range: FIXED_1 <= x <= OPT_LOG_MAX_VAL - 1 * Auto-generated via 'PrintFunctionOptimalLog.py' * Detailed description: * - Rewrite the input as a product of natural exponents and a single residual r, such that 1 < r < 2 * - The natural logarithm of each (...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 31754, 34943 ] }
2,702
Quadron
contracts/ReserveFormula.sol
0x14b3fe5772e973b7cd410d0c1549a18414f5f6db
Solidity
ReserveFormula
contract ReserveFormula { uint256 private constant ONE = 1; uint32 private constant MAX_WEIGHT = 1000000; uint8 private constant MIN_PRECISION = 32; uint8 private constant MAX_PRECISION = 127; // Auto-generated via 'PrintIntScalingFactors.py' uint256 private constant FIXED_1 = 0x08000000...
optimalExp
function optimalExp(uint256 x) internal pure returns (uint256) { uint256 res = 0; uint256 y; uint256 z; z = y = x % 0x10000000000000000000000000000000; // get the input modulo 2^(-3) z = (z * y) / FIXED_1; res += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!) z = (z * y) / FIXE...
/** * @dev computes e ^ (x / FIXED_1) * FIXED_1 * input range: 0 <= x <= OPT_EXP_MAX_VAL - 1 * auto-generated via 'PrintFunctionOptimalExp.py' * Detailed description: * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible * - The exponentiation of each binary expone...
NatSpecMultiLine
v0.8.11+commit.d7f03943
MIT
ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b
{ "func_code_index": [ 35627, 39162 ] }
2,703
BitcoinTeddyBear
BitcoinTeddyBear.sol
0x578d6b82abcc9e8d17525d4b0ee134e028b09ef2
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://598d13f4e286d8d37b02f2d877708427cf4f07dac4c8053cda3ae87956b3a5e8
{ "func_code_index": [ 105, 207 ] }
2,704
Tiger
contracts/token/RhapsodyCreator.sol
0xeb6600e62c24d17734c1807414a9159b116c9520
Solidity
RhapsodyCreator
contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard { /// ============ Libraries ============ /// @notice safe math for arithmetic operations using SafeMath for uint256; /// ============ Immutable storage ============ /// @notice promotional nfts count uint256 public immutable amoun...
presaleMint
function presaleMint( uint256 invocations, uint256 maxInvocation, bytes32[] calldata proof ) external payable isMintValid(invocations, maxInvocation) isMintLive(presaleTime) { require(_mintOf(msg.sender) == 0, "RhapsodyCreator/invalid-double-mint"); require( MerkleProof.verify(proof, presale...
/// =========== Sale =========== /// @notice Allows presale minting of tokens if address is part of merkle tree /// @param invocations number of tokens to mint /// @param maxInvocation max number of invocations of the user /// @param proof merkle proof to prove address and token mint count are in tree
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 2462, 3042 ] }
2,705
Tiger
contracts/token/RhapsodyCreator.sol
0xeb6600e62c24d17734c1807414a9159b116c9520
Solidity
RhapsodyCreator
contract RhapsodyCreator is ERC721A, Ownable, ReentrancyGuard { /// ============ Libraries ============ /// @notice safe math for arithmetic operations using SafeMath for uint256; /// ============ Immutable storage ============ /// @notice promotional nfts count uint256 public immutable amoun...
publicMint
function publicMint(uint256 invocations) external payable isMintValid(invocations, maxPublicBatchPerAddress) isMintLive(publicTime) { _safeMint(msg.sender, invocations); emit Created(msg.sender, invocations); }
/// @notice Allows public minting of tokens /// @param invocations number of tokens to mint /// @dev user can only mint less than maxPublicBatchPerAddress of tokens
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3221, 3491 ] }
2,706