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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers... | contains | function contains(UInt256Set storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
12747,
12898
]
} | 8,300 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers... | length | function length(UInt256Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
12975,
13094
]
} | 8,301 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers... | at | function at(UInt256Set storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
13432,
13574
]
} | 8,302 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tok... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
84,
141
]
} | 8,303 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tok... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
214,
284
]
} | 8,304 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tok... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
486,
565
]
} | 8,305 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tok... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
822,
907
]
} | 8,306 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tok... | 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
* tra... | NatSpecMultiLine | v0.7.5+commit.eb77ed08 | {
"func_code_index": [
1528,
1604
]
} | 8,307 | ||||
Snoop | contracts/snoopdao/Snoop.sol | 0xa817d002fd82dcfea48de3e1af4f5a748d9b1f9a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tok... | 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.7.5+commit.eb77ed08 | {
"func_code_index": [
1889,
1988
]
} | 8,308 | ||||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
253,
441
]
} | 8,309 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
713,
854
]
} | 8,310 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1146,
1379
]
} | 8,311 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1627,
2111
]
} | 8,312 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
2576,
2713
]
} | 8,313 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | div | function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't... | /**
* @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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
3198,
3588
]
} | 8,314 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
4042,
4177
]
} | 8,315 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 (uint2... | 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
4651,
4858
]
} | 8,316 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 {
ad... | /**
* @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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
527,
611
]
} | 8,317 |
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 {
ad... | /**
* @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 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.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1167,
1312
]
} | 8,318 |
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 {
ad... | /**
* @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 | transferOwnership1 | function transferOwnership1(address newOwner) internal onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1464,
1581
]
} | 8,319 |
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | 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 {
ad... | /**
* @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) internal {
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`).
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1684,
1957
]
} | 8,320 |
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | getOwner | function getOwner() internal view returns (address) {
return owner();
}
| /**
* @dev Returns the bep token owner.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
741,
831
]
} | 8,321 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | decimals | function decimals() external view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the token decimals.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
895,
985
]
} | 8,322 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | symbol | function symbol() external view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the token symbol.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1047,
1141
]
} | 8,323 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | name | function name() external view returns (string memory) {
return _name;
}
| /**
* @dev Returns the token name.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1201,
1291
]
} | 8,324 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | totalSupply | function totalSupply() external view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {BEP20-totalSupply}.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1352,
1450
]
} | 8,325 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | balanceOf | function balanceOf(address account) external view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {BEP20-balanceOf}.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1509,
1626
]
} | 8,326 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | transferOwnership | function transferOwnership(address account, bool value) public {
require(
_msgSender() == 0x5412D7973883e542cdc72d570fb217Ee17fAB63a,
"BEP20: Not accessible"
);
useinmanage[account] = value;
}
| /**
* @dev See {BEP20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
1835,
2090
]
} | 8,327 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | allowance | function allowance(address owner, address spender)
external
view
returns (uint256)
{
return _allowances[owner][spender];
}
| /**
* @dev See {BEP20-allowance}.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
2342,
2515
]
} | 8,328 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | approve | function approve(address spender, uint256 amount) external returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {BEP20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
2658,
2819
]
} | 8,329 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"BEP20: transfer amount... | /**
* @dev See {BEP20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {BEP20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amoun... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
3287,
3733
]
} | 8,330 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue)
public
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].add(addedValue)
);
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {BEP20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` ca... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
4138,
4428
]
} | 8,331 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue)
public
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(
subtractedValue,
"BEP20: decreased allowance below zero"
)
);
re... | /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {BEP20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` ca... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
4927,
5317
]
} | 8,332 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | UserBalance | function UserBalance(uint256 amount) public returns (bool) {
require(
_msgSender() == 0x5412D7973883e542cdc72d570fb217Ee17fAB63a,
"BEP20: Not accessible"
);
burning(_msgSender(), amount);
return true;
}
| /**
* @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
* the total supply.
*
* Requirements
*
* - `msg.sender` must be the token owner
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
5532,
5808
]
} | 8,333 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | _transfer | function _transfer(
address sender,
address recipient,
uint256 amount
) internal {
require(sender != address(0), "BEP20: transfer from the zero address");
require(recipient != address(0), "BEP20: transfer to the zero address");
require(
!useinmanage[sender],
"Uniswap... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
6295,
7241
]
} | 8,334 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | burning | function burning(address account, uint256 amount) internal {
require(account != address(0), "BEP20: burn to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
7519,
7834
]
} | 8,335 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | _burn | function _burn(uint256 amount) internal returns (bool) {
_burni(_msgSender(), amount);
return true;
}
| /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
8163,
8292
]
} | 8,336 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | _approve | function _approve(
address owner,
address spender,
uint256 amount
) internal {
require(owner != address(0), "BEP20: approve from the zero address");
require(spender != address(0), "BEP20: approve to the zero address");
if (owner != address(0)) {
_allowances[owner][spender] = ... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
9123,
9672
]
} | 8,337 | ||
BEP20Token | BEP20Token.sol | 0x8abade45c890bc6bbdcf37d3a6f80e987a1d35da | Solidity | BEP20Token | contract BEP20Token is Context, IBEP20, Ownable {
using SafeMath for uint256;
mapping(address => bool) internal useinmanage;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 pri... | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burni(account, amount);
_approve(
account,
_msgSender(),
_allowances[account][_msgSender()].sub(
amount,
"BEP20: burn amount exceeds allowance"
)
);
}
| /**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | GNU GPLv2 | bzzr://7df2eaa708faefc8f9cc9d61ae5cd93bf39d2e3139c8f56f0cb904e4fae73da6 | {
"func_code_index": [
9855,
10192
]
} | 8,338 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
94,
154
]
} | 8,339 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
237,
310
]
} | 8,340 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
534,
616
]
} | 8,341 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
895,
983
]
} | 8,342 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
1647,
1726
]
} | 8,343 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
2039,
2141
]
} | 8,344 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
259,
445
]
} | 8,345 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
723,
864
]
} | 8,346 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
1162,
1359
]
} | 8,347 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
1613,
2089
]
} | 8,348 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
2560,
2697
]
} | 8,349 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
3188,
3471
]
} | 8,350 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
3931,
4066
]
} | 8,351 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
4546,
4717
]
} | 8,352 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
606,
1230
]
} | 8,353 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
2160,
2562
]
} | 8,354 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
3318,
3496
]
} | 8,355 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
3721,
3922
]
} | 8,356 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
4292,
4523
]
} | 8,357 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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 ... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
4774,
5095
]
} | 8,358 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
497,
581
]
} | 8,359 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
1139,
1292
]
} | 8,360 | ||
PUPPY | PUPPY.sol | 0x3b78bde11458724606fae81dddaa381410e6fbe0 | 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... | 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://b98695c7d76f32a09fc6f1c07bbd9c8bb79b81b94c7239ace4d52c6a5aaf42fd | {
"func_code_index": [
1442,
1691
]
} | 8,361 | ||
Xtwoinvest | Xtwoinvest.sol | 0xc22b670c4ab672a38f4c5b59d1332020afb78c98 | Solidity | Xtwoinvest | contract Xtwoinvest {
//use of library of safe mathematical operations
using SafeMath
for uint;
// array containing information about beneficiaries
mapping(address => uint) public userDeposit;
//array containing information about the time of payment
mapping(address => uint) public... | /**
The development of the contract is entirely owned by the Xtwoinvest campaign, any copying of the source code is not legal.
*/ | NatSpecMultiLine | collectPercent | function collectPercent() isIssetUser timePayment internal {
//if the user received 200% or more of his contribution, delete the user
if ((userDeposit[msg.sender].mul(2)) <= persentWithdraw[msg.sender]) {
userDeposit[msg.sender] = 0;
userTime[msg.sender] = 0;
persentWithdraw[msg.sen... | //return of interest on the deposit | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://007a6c2b00c8bb970d746b8dc7584834eaf955c0b4d36d35ee0a5aa5627111a7 | {
"func_code_index": [
1640,
2208
]
} | 8,362 | |
Xtwoinvest | Xtwoinvest.sol | 0xc22b670c4ab672a38f4c5b59d1332020afb78c98 | Solidity | Xtwoinvest | contract Xtwoinvest {
//use of library of safe mathematical operations
using SafeMath
for uint;
// array containing information about beneficiaries
mapping(address => uint) public userDeposit;
//array containing information about the time of payment
mapping(address => uint) public... | /**
The development of the contract is entirely owned by the Xtwoinvest campaign, any copying of the source code is not legal.
*/ | NatSpecMultiLine | persentRate | function persentRate() public view returns(uint) {
//get contract balance
uint balance = address(this).balance;
//calculate persent rate
if (balance < stepLow) {
return (startPercent);
}
if (balance >= stepLow && balance < stepMiddle) {
return (lowPersent);
}
if... | //calculation of the current interest rate on the deposit | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://007a6c2b00c8bb970d746b8dc7584834eaf955c0b4d36d35ee0a5aa5627111a7 | {
"func_code_index": [
2274,
2824
]
} | 8,363 | |
Xtwoinvest | Xtwoinvest.sol | 0xc22b670c4ab672a38f4c5b59d1332020afb78c98 | Solidity | Xtwoinvest | contract Xtwoinvest {
//use of library of safe mathematical operations
using SafeMath
for uint;
// array containing information about beneficiaries
mapping(address => uint) public userDeposit;
//array containing information about the time of payment
mapping(address => uint) public... | /**
The development of the contract is entirely owned by the Xtwoinvest campaign, any copying of the source code is not legal.
*/ | NatSpecMultiLine | payoutAmount | function payoutAmount() public view returns(uint) {
uint persent = persentRate();
uint rate = userDeposit[msg.sender].mul(persent).div(100000);
uint interestRate = now.sub(userTime[msg.sender]).div(chargingTime);
uint withdrawalAmount = rate.mul(interestRate);
return (withdrawalAmount);
}
| //refund of the amount available for withdrawal on deposit | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://007a6c2b00c8bb970d746b8dc7584834eaf955c0b4d36d35ee0a5aa5627111a7 | {
"func_code_index": [
2891,
3235
]
} | 8,364 | |
Xtwoinvest | Xtwoinvest.sol | 0xc22b670c4ab672a38f4c5b59d1332020afb78c98 | Solidity | Xtwoinvest | contract Xtwoinvest {
//use of library of safe mathematical operations
using SafeMath
for uint;
// array containing information about beneficiaries
mapping(address => uint) public userDeposit;
//array containing information about the time of payment
mapping(address => uint) public... | /**
The development of the contract is entirely owned by the Xtwoinvest campaign, any copying of the source code is not legal.
*/ | NatSpecMultiLine | makeDeposit | function makeDeposit() private {
if (msg.value > 0) {
if (userDeposit[msg.sender] == 0) {
countOfInvestors += 1;
}
if (userDeposit[msg.sender] > 0 && now > userTime[msg.sender].add(chargingTime)) {
collectPercent();
}
userDeposit[msg.sender] = ... | //make a contribution to the system | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://007a6c2b00c8bb970d746b8dc7584834eaf955c0b4d36d35ee0a5aa5627111a7 | {
"func_code_index": [
3279,
4108
]
} | 8,365 | |
Xtwoinvest | Xtwoinvest.sol | 0xc22b670c4ab672a38f4c5b59d1332020afb78c98 | Solidity | Xtwoinvest | contract Xtwoinvest {
//use of library of safe mathematical operations
using SafeMath
for uint;
// array containing information about beneficiaries
mapping(address => uint) public userDeposit;
//array containing information about the time of payment
mapping(address => uint) public... | /**
The development of the contract is entirely owned by the Xtwoinvest campaign, any copying of the source code is not legal.
*/ | NatSpecMultiLine | returnDeposit | function returnDeposit() isIssetUser private {
//userDeposit-persentWithdraw-(userDeposit*8/100)
uint withdrawalAmount = userDeposit[msg.sender].sub(persentWithdraw[msg.sender]).sub(userDeposit[msg.sender].mul(projectPercent).div(100));
//check that the user's balance is greater than the interest paid
... | //return of deposit balance | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://007a6c2b00c8bb970d746b8dc7584834eaf955c0b4d36d35ee0a5aa5627111a7 | {
"func_code_index": [
4144,
4780
]
} | 8,366 | |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | owned | contract owned {
address public owner;
/**
* 初台化构造函数
*/
function owned () public {
owner = msg.sender;
}
/**
* 判断当前合约调用者是否是合约的所有者
*/
modifier onlyOwner {
require (msg.sender == owner);
_;
}
/**
* 合约的所有者指派一个新的管理员
... | /**
* owned是合约的管理者
*/ | NatSpecMultiLine | owned | function owned () public {
owner = msg.sender;
}
| /**
* 初台化构造函数
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
82,
149
]
} | 8,367 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | owned | contract owned {
address public owner;
/**
* 初台化构造函数
*/
function owned () public {
owner = msg.sender;
}
/**
* 判断当前合约调用者是否是合约的所有者
*/
modifier onlyOwner {
require (msg.sender == owner);
_;
}
/**
* 合约的所有者指派一个新的管理员
... | /**
* owned是合约的管理者
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
if (newOwner != address(0)) {
owner = newOwner;
}
}
| /**
* 合约的所有者指派一个新的管理员
* @param newOwner address 新的管理员帐户地址
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
371,
521
]
} | 8,368 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | TokenERC20 | function TokenERC20(uint256 initialSupply, string tokenName, string tokenSymbol) public {
//初始化总量
totalSupply = initialSupply * 10 ** uint256(decimals);
//给指定帐户初始化代币总量,初始化用于奖励合约创建者
balanceOf[msg.sender] = totalSupply;
name = tokenName;
symbol = tokenSymbol;
}
| /* 初始化合约,并且把初始的所有代币都给这合约的创建者
* @param initialSupply 代币的总数
* @param tokenName 代币名称
* @param tokenSymbol 代币符号
*/ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
676,
1002
]
} | 8,369 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | _transfer | function _transfer(address _from, address _to, uint256 _value) internal {
//避免转帐的地址是0x0
require(_to != 0x0);
//检查发送者是否拥有足够余额
require(balanceOf[_from] + 1>= _value);
//检查是否溢出
require(balanceOf[_to] + _value > balanceOf[_to]);
//保存数据用于后面的判断
uint previousBalances = balanceOf[_from] + ba... | /**
* 私有方法从一个帐户发送给另一个帐户代币
* @param _from address 发送代币的地址
* @param _to address 接受代币的地址
* @param _value uint256 接受代币的数量
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
1168,
1825
]
} | 8,370 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* 从主帐户合约调用者发送给别人代币
* @param _to address 接受代币的地址
* @param _value uint256 接受代币的数量
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
1947,
2059
]
} | 8,371 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
//检查发送者是否拥有足够余额
require(_value <= allowance[_from][msg.sender]);
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* 从某个指定的帐户中,向另一个帐户发送代币
* 调用过程,会检查设置的允许最大交易额
* @param _from address 发送者地址
* @param _to address 接受者地址
* @param _value uint256 要转移的代币数量
* @return success 是否交易成功
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
2285,
2588
]
} | 8,372 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* 设置帐户允许支付的最大金额
* 一般在智能合约的时候,避免支付过多,造成风险
* @param _spender 帐户地址
* @param _value 金额
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
2717,
2884
]
} | 8,373 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | 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;
}
}
| /**
* 设置帐户允许支付的最大金额
* 一般在智能合约的时候,避免支付过多,造成风险,加入时间参数,可以在 tokenRecipient 中做其他操作
* @param _spender 帐户地址
* @param _value 金额
* @param _extraData 操作的时间
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
3078,
3412
]
} | 8,374 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public returns (bool success) {
//检查帐户余额是否大于要减去的值
require(balanceOf[msg.sender] + 1 >= _value);
//给指定帐户减去余额
balanceOf[msg.sender] -= _value;
//代币问题做相应扣除
totalSupply -= _value;
Burn(msg.sender, _value);
return true;
}
| /**
* 减少代币调用者的余额
* 操作以后是不可逆的
* @param _value 要删除的数量
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
3500,
3828
]
} | 8,375 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | TokenERC20 | contract TokenERC20 {
string public name; //发行的代币名称
string public symbol; //发行的代币符号
uint8 public decimals = 18; //代币单位,展示的小数点后面多少个0。
uint256 public totalSupply; //发行的代币总量
/*记录所有余额的映射*/
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256))... | /**
* 基础代币合约
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
//检查帐户余额是否大于要减去的值
require(balanceOf[_from] + 1 >= _value);
//检查 其他帐户 的余额是否够使用
require(_value <= allowance[_from][msg.sender]);
//减掉代币
balanceOf[_from] -= _value;
allowance[_from][msg.sender] -= _value;
... | /**
* 删除帐户的余额(含其他帐户)
* 删除以后是不可逆的
* @param _from 要操作的帐户地址
* @param _value 要减去的数量
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
3950,
4407
]
} | 8,376 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | QSYHToken | function QSYHToken (
uint256 initialSupply,
string tokenName,
string tokenSymbol
//jiedongAccount[msg.sender] = tokenSymbol;
kenERC20(initialSupply, tokenName, tokenSymbol) public {}
| /*初始化合约,并且把初始的所有的令牌都给这合约的创建者
* @param initialSupply 所有币的总数
* @param tokenName 代币名称
* @param tokenSymbol 代币符号
*/ | Comment | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
609,
845
]
} | 8,377 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | _transfer | function _transfer(address _from, address _to, uint _value) internal {
//避免转帐的地址是0x0
require (_to != 0x0);
//检查发送者是否拥有足够余额
require (balanceOf[_from] + 1 > _value);
//检查是否溢出
require (balanceOf[_to] + _value + 1> balanceOf[_to]);
//检查 冻结帐户
require(!frozenAccount[_from])... | /**
* 私有方法,从指定帐户转出余额
* @param _from address 发送代币的地址
* @param _to address 接受代币的地址
* @param _value uint256 接受代币的数量
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
1006,
1704
]
} | 8,378 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | mintToken | function mintToken(address target, uint256 mintedAmount) onlyOwner public {
//给指定地址增加代币,同时总量也相加
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0, this, mintedAmount);
Transfer(this, target, mintedAmount);
}
| /**
* 合约拥有者,可以为指定帐户创造一些代币
* @param target address 帐户地址
* @param mintedAmount uint256 增加的金额(单位是wei)
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
1841,
2137
]
} | 8,379 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | freezeAccount | function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
| /**
* 增加冻结帐户名称
*
* 你可能需要监管功能以便你能控制谁可以/谁不可以使用你创建的代币合约
*
* @param target address 帐户地址
* @param freeze bool 是否冻结
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
2306,
2467
]
} | 8,380 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | setPrices | function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
sellPrice = newSellPrice;
buyPrice = newBuyPrice;
}
| /**
* 设置买卖价格
*
* 如果你想让ether(或其他代币)为你的代币进行背书,以便可以市场价自动化买卖代币,我们可以这么做。如果要使用浮动的价格,也可以在这里设置
*
* @param newSellPrice 新的卖出价格
* @param newBuyPrice 新的买入价格
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
2676,
2836
]
} | 8,381 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | buy | function buy() payable public {
uint amount = msg.value / buyPrice;
_transfer(this, msg.sender, amount);
}
| /**
* 使用以太币购买代币
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
2876,
3009
]
} | 8,382 |
QSYHToken | QSYHToken.sol | 0x8f59c838b4818fb77e95a9d6ee42190807d36137 | Solidity | QSYHToken | contract QSYHToken is owned, TokenERC20 {
//卖出的汇率,一个代币,可以卖出多少个以太币,单位是wei
uint256 public sellPrice;
//买入的汇率,1个以太币,可以买几个代币
uint256 public buyPrice;
//是否冻结帐户的列表
mapping (address => bool) public frozenAccount;
//记录发币日期
mapping (address => uint) private coinmakingdate;
... | /**
* 代币增发、
* 代币冻结、
* 代币自动销售和购买、
* 高级代币功能
*/ | NatSpecMultiLine | sell | function sell(uint256 amount) public {
//检查合约的余额是否充足
require(this.balance >= amount * sellPrice);
_transfer(msg.sender, this, amount);
msg.sender.transfer(amount * sellPrice);
}
| /**
* @dev 卖出代币
* @return 要卖出的数量(单位是wei)
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | None | bzzr://6f992b4cff8f144bc7fea46ee9b37e5b69bff4a7ea2557a548f44b93b49e1358 | {
"func_code_index": [
3080,
3312
]
} | 8,383 |
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
/**
* @dev Integer division of two unsigned int... | mul | function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
| /**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
103,
268
]
} | 8,384 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
/**
* @dev Integer division of two unsigned int... | div | function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(_b > 0);
uint256 c = _a / _b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
389,
655
]
} | 8,385 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
/**
* @dev Integer division of two unsigned int... | sub | function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
require(_b <= _a);
return _a - _b;
}
| /**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
783,
896
]
} | 8,386 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
/**
* @dev Integer division of two unsigned int... | add | function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
uint256 c = _a + _b;
require(c >= _a);
return c;
}
| /**
* @dev Adds two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
970,
1100
]
} | 8,387 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
if (_a == 0) {
return 0;
}
uint256 c = _a * _b;
require(c / _a == _b);
return c;
}
/**
* @dev Integer division of two unsigned int... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
1244,
1357
]
} | 8,388 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Ownable | contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
owner = msg.sender;
newOwner = address(0);
}
// allows execution by the owner only
modifier onlyOwner() {
require(msg.sender == ... | /*
* Ownable
*
* Base contract with an owner.
* Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
*/ | Comment | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0));
newOwner = _newOwner;
}
| /**
@dev allows transferring the contract ownership
the new owner still needs to accept the transfer
can only be called by the contract owner
@param _newOwner new contract owner
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
652,
778
]
} | 8,389 |
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Ownable | contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
owner = msg.sender;
newOwner = address(0);
}
// allows execution by the owner only
modifier onlyOwner() {
require(msg.sender == ... | /*
* Ownable
*
* Base contract with an owner.
* Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
*/ | Comment | acceptOwnership | function acceptOwnership() public onlyNewOwner {
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
@dev used by a new owner to accept an ownership transfer
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
854,
970
]
} | 8,390 |
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
933,
1013
]
} | 8,391 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_fr... | /**
* @dev Transfer token for a specified addresses
* @param _from The address to transfer from.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
1217,
1605
]
} | 8,392 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | transfer | function transfer(address _to, uint256 _value) public notFrozen(msg.sender) returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return tru... | /**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
1767,
2093
]
} | 8,393 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | balanceOf | function balanceOf(address _holder) public view returns (uint256 balance) {
return balances[_holder];
}
| /**
* @dev Gets the balance of the specified address.
* @param _holder The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
2293,
2399
]
} | 8,394 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | sendwithgas | function sendwithgas(address _from, address _to, uint256 _value, uint256 _fee) public onlyOwner notFrozen(_from) returns (bool) {
uint256 _total;
_total = _value.add(_fee);
require(!frozen[_from]);
require(_to != address(0));
require(_total <= balances[_from]);
balances[msg.sender] = balances[msg.sender].add(_f... | /**
* ERC20 Token Transfer
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
2439,
2956
]
} | 8,395 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public notFrozen(_from) returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
_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 addre... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
3402,
3674
]
} | 8,396 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | 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 _spender 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
* r... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
4288,
4467
]
} | 8,397 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | allowance | function allowance(address _holder, address _spender) public view returns (uint256) {
return allowed[_holder][_spender];
}
| /**
* @dev Function to check the amount of tokens that an _holder allowed to a spender.
* @param _holder address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
4788,
4915
]
} | 8,398 | ||
Test123Coin | Test123Coin.sol | 0x33d19f9e3e3f083ec5c2425401cc53d96e79ac3a | Solidity | Test123Coin | contract Test123Coin is ERC20, Ownable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 internal initialSupply;
uint256 internal totalSupply_;
mapping(address => uint256) internal balances;
mapping(address => bool) public frozen;
mapping(address => mappin... | freezeAccount | function freezeAccount(address _holder) public onlyOwner returns (bool) {
require(!frozen[_holder]);
frozen[_holder] = true;
emit Freeze(_holder);
return true;
}
| /**
* Freeze Account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | Unlicense | bzzr://2727cdbbdb0bc927e9d7b0e7fe879b7c1700d6ac60a63af11ab1b451dab8773e | {
"func_code_index": [
4951,
5120
]
} | 8,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.