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
GroupBuyContract
GroupBuyContract.sol
0x6f4dcbb16f72853c7382e7100a0713a68e53d9be
Solidity
CelebrityToken
contract CelebrityToken is ERC721 { /*** EVENTS ***/ /// @dev The Birth event is fired whenever a new person comes into existence. event Birth(uint256 tokenId, string name, address owner); /// @dev The TokenSold event is fired whenever a token is sold. event TokenSold(uint256 tokenId, uint256 oldPr...
_payout
function _payout(address _to) private;
/// For paying out balance on contract
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://3c7145beb8dd3ec20d09d90c8823e283d3e88c519aeb52819089d5cb7b2ba797
{ "func_code_index": [ 5757, 5798 ] }
26,700
GroupBuyContract
GroupBuyContract.sol
0x6f4dcbb16f72853c7382e7100a0713a68e53d9be
Solidity
CelebrityToken
contract CelebrityToken is ERC721 { /*** EVENTS ***/ /// @dev The Birth event is fired whenever a new person comes into existence. event Birth(uint256 tokenId, string name, address owner); /// @dev The TokenSold event is fired whenever a token is sold. event TokenSold(uint256 tokenId, uint256 oldPr...
_transfer
function _transfer(address _from, address _to, uint256 _tokenId) private;
/// @dev Assigns ownership of a specific Person to an address.
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://3c7145beb8dd3ec20d09d90c8823e283d3e88c519aeb52819089d5cb7b2ba797
{ "func_code_index": [ 5867, 5943 ] }
26,701
GroupBuyContract
GroupBuyContract.sol
0x6f4dcbb16f72853c7382e7100a0713a68e53d9be
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3c7145beb8dd3ec20d09d90c8823e283d3e88c519aeb52819089d5cb7b2ba797
{ "func_code_index": [ 87, 270 ] }
26,702
GroupBuyContract
GroupBuyContract.sol
0x6f4dcbb16f72853c7382e7100a0713a68e53d9be
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3c7145beb8dd3ec20d09d90c8823e283d3e88c519aeb52819089d5cb7b2ba797
{ "func_code_index": [ 354, 627 ] }
26,703
GroupBuyContract
GroupBuyContract.sol
0x6f4dcbb16f72853c7382e7100a0713a68e53d9be
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3c7145beb8dd3ec20d09d90c8823e283d3e88c519aeb52819089d5cb7b2ba797
{ "func_code_index": [ 742, 858 ] }
26,704
GroupBuyContract
GroupBuyContract.sol
0x6f4dcbb16f72853c7382e7100a0713a68e53d9be
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://3c7145beb8dd3ec20d09d90c8823e283d3e88c519aeb52819089d5cb7b2ba797
{ "func_code_index": [ 922, 1058 ] }
26,705
StakingBalancer
StakingBalancer.sol
0x15f5257a73d08d0d7c94b5b22f45511a0b7a62d1
Solidity
StakingBalancer
contract StakingBalancer is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private i...
unchangeable
function unchangeable() public view returns (bool){ return _unchangeable; }
//If true, no changes can be made
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://278907ad275e7926720492ddef65e6cc2d12307c01f503ded7a7ea4f5fa3ed31
{ "func_code_index": [ 1396, 1490 ] }
26,706
StakingBalancer
StakingBalancer.sol
0x15f5257a73d08d0d7c94b5b22f45511a0b7a62d1
Solidity
StakingBalancer
contract StakingBalancer is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private i...
makeUnchangeable
function makeUnchangeable() public { _unchangeable = true; }
//THE ONLY ADMIN FUNCTIONS vvvv //After this is called, no changes can be made
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://278907ad275e7926720492ddef65e6cc2d12307c01f503ded7a7ea4f5fa3ed31
{ "func_code_index": [ 1685, 1764 ] }
26,707
StakingBalancer
StakingBalancer.sol
0x15f5257a73d08d0d7c94b5b22f45511a0b7a62d1
Solidity
StakingBalancer
contract StakingBalancer is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private i...
setTokenAddress
function setTokenAddress(address input) public { require(!_tokenAddressGiven, "Function was already called"); _tokenAddressGiven = true; corbV2Address = input; }
//Can only be called once to set token address
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://278907ad275e7926720492ddef65e6cc2d12307c01f503ded7a7ea4f5fa3ed31
{ "func_code_index": [ 1823, 2021 ] }
26,708
StakingBalancer
StakingBalancer.sol
0x15f5257a73d08d0d7c94b5b22f45511a0b7a62d1
Solidity
StakingBalancer
contract StakingBalancer is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private i...
updateRewardValue
function updateRewardValue(uint input) public { require(!unchangeable(), "makeUnchangeable() function was already called"); _rewardValue = input; }
//Set reward value that has high APY, can't be called if makeUnchangeable() was called
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://278907ad275e7926720492ddef65e6cc2d12307c01f503ded7a7ea4f5fa3ed31
{ "func_code_index": [ 2120, 2296 ] }
26,709
StakingBalancer
StakingBalancer.sol
0x15f5257a73d08d0d7c94b5b22f45511a0b7a62d1
Solidity
StakingBalancer
contract StakingBalancer is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private i...
capPrice
function capPrice(bool input) public { require(!unchangeable(), "makeUnchangeable() function was already called"); priceCapped = input; }
//Cap token price at 1 eth, can't be called if makeUnchangeable() was called
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://278907ad275e7926720492ddef65e6cc2d12307c01f503ded7a7ea4f5fa3ed31
{ "func_code_index": [ 2379, 2545 ] }
26,710
StakingBalancer
StakingBalancer.sol
0x15f5257a73d08d0d7c94b5b22f45511a0b7a62d1
Solidity
StakingBalancer
contract StakingBalancer is Poolable{ using SafeMath for uint256; uint constant internal DECIMAL = 10**18; uint constant public INF = 33136721748; uint private _rewardValue = 10**21; mapping (address => uint256) public timePooled; mapping (address => uint256) private i...
sqrt
function sqrt(uint y) public pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } }
//THE ONLY ADMIN FUNCTIONS ^^^^
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://278907ad275e7926720492ddef65e6cc2d12307c01f503ded7a7ea4f5fa3ed31
{ "func_code_index": [ 2589, 2895 ] }
26,711
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
token
function token() external view returns (address) { return address(_getToken()); }
/// @notice Returns address of the token being vested
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1565, 1662 ] }
26,712
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
vestingPools
function vestingPools() external view returns (address) { return address(_getVestingPools()); }
/// @notice Returns address of the {VestingPool} smart contract
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1732, 1843 ] }
26,713
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
releasableAmount
function releasableAmount(address holder) external view returns (uint256) { Stake memory stake = _getStake(holder); return _releasableAmount(stake, uint256(factor)); }
/// @notice Returns token amount the specified stakeholder may withdraw now
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1925, 2116 ] }
26,714
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
unclaimedShare
function unclaimedShare(address holder) external view returns (uint256) { Stake memory stake = _getStake(holder); uint256 unclaimed = _getVestingPools().releasableAmount(poolId); return (unclaimed * uint256(stake.allocated)) / allocation; }
/// @notice Returns token amount the specified stakeholder may withdraw now /// on top of the {releasableAmount} should {claimVesting} be called
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2271, 2543 ] }
26,715
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
claimVesting
function claimVesting() external { _claimVesting(); }
/// @notice Claims vesting to this contract from the vesting pool
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2615, 2684 ] }
26,716
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
withdraw
function withdraw() external { _withdraw(msg.sender); // throws if msg.sender is not a stakeholder }
///////////////////// //// StakeHolder //// ///////////////////// /// @notice Sends the releasable amount to the message sender /// @dev Stakeholder only may call
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2870, 2986 ] }
26,717
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
claimAndWithdraw
function claimAndWithdraw() external { _claimVesting(); _withdraw(msg.sender); // throws if msg.sender is not a stakeholder }
/// @notice Calls {claimVesting} and sends the releasable amount to the message sender /// @dev Stakeholder only may call
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3118, 3267 ] }
26,718
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
splitStake
function splitStake(address newHolder, uint256 newAmount) external { address holder = msg.sender; require(newHolder != holder, "PStakes: duplicated address"); Stake memory stake = _getStake(holder); require(newAmount <= stake.allocated, "PStakes: too large allocated"); uint256 updAmount = uint256(...
/// @notice Allots a new stake out of the stake of the message sender /// @dev Stakeholder only may call
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3382, 4201 ] }
26,719
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
addStakes
function addStakes( uint256 _poolId, address[] calldata holders, uint256[] calldata allocations, uint256 unallocated ) external onlyOwner { if (allocation == 0) { _init(_poolId); } else { require(_poolId == poolId, "PStakes: pool mismatch"); } uint256 nEntries = holders....
////////////////// //// Owner //// ////////////////// /// @notice Inits the contract and adds stakes /// @dev Owner only may call on a proxy (but not on the implementation)
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 4397, 5548 ] }
26,720
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
massWithdraw
function massWithdraw(address[] calldata holders) external onlyOwner { _claimVesting(); for (uint256 i = 0; i < holders.length; i++) { _withdraw(holders[i]); } }
/// @notice Calls {claimVesting} and sends releasable tokens to specified stakeholders /// @dev Owner may call only
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 5674, 5879 ] }
26,721
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
claimErc20
function claimErc20( address claimedToken, address to, uint256 amount ) external onlyOwner nonReentrant { IERC20 vestedToken = IERC20(address(_getToken())); if (claimedToken == address(vestedToken)) { uint256 balance = vestedToken.balanceOf(address(this)); require( balanc...
/// @notice Withdraws accidentally sent token from this contract /// @dev Owner may call only
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 5983, 6499 ] }
26,722
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
removeContract
function removeContract() external onlyOwner { // avoid accidental removing of the implementation _throwImplementation(); require(allocation == released, "PStakes: unpaid stakes"); IERC20 vestedToken = IERC20(address(_getToken())); uint256 balance = vestedToken.balanceOf(address(this)); requir...
/// @notice Removes the contract from blockchain when tokens are released /// @dev Owner only may call on a proxy (but not on the implementation)
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 6655, 7098 ] }
26,723
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_defaultOwner
function _defaultOwner() internal view virtual override returns (address) { return address(DefaultOwnerAddress); }
// (declared `view` rather than `pure` to facilitate testing)
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 7290, 7420 ] }
26,724
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_getToken
function _getToken() internal view virtual returns (IERC20) { return IERC20(address(TokenAddress)); }
// (declared `view` rather than `pure` to facilitate testing)
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 7532, 7649 ] }
26,725
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_getVestingPools
function _getVestingPools() internal view virtual returns (IVestingPools) { return IVestingPools(address(VestingPoolsAddress)); }
// (declared `view` rather than `pure` to facilitate testing)
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 7768, 7913 ] }
26,726
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_getStake
function _getStake(address holder) internal view returns (Stake memory) { _throwZeroHolderAddress(holder); Stake memory stake = stakes[holder]; require(stake.allocated != 0, "PStakes: unknown stake"); return stake; }
/// @dev Returns the stake of the specified stakeholder reverting on errors
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 7995, 8251 ] }
26,727
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_init
function _init(uint256 _poolId) internal { _throwImplementation(); require(_poolId < 2**16, "PStakes:unsafePoolId"); IVestingPools pools = _getVestingPools(); address wallet = pools.getWallet(_poolId); require(wallet == address(this), "PStakes:invalidPool"); PoolParams memory pool = pools.getPo...
/// @notice Initialize the contract /// @dev May be called on a proxy only (but not on the implementation)
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 8368, 8894 ] }
26,728
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_releasableAmount
function _releasableAmount(Stake memory stake, uint256 _factor) internal pure returns (uint256) { uint256 share = (_factor * uint256(stake.allocated)) / SCALE; if (share > stake.allocated) { // imprecise division safeguard share = uint256(stake.allocated); } return share - ui...
/// @dev Returns amount that may be released for the given stake and factor
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 8976, 9368 ] }
26,729
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_claimVesting
function _claimVesting() internal { // (reentrancy attack impossible - known contract called) uint256 justVested = _getVestingPools().release(poolId, 0); factor += uint160((justVested * SCALE) / uint256(allocation)); emit VestingClaimed(justVested); }
/// @dev Claims vesting to this contract from the vesting pool
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 9437, 9728 ] }
26,730
PoolStakes
contracts/PoolStakes.sol
0x40e92e8c3d2a5bacded54af444caf820a9f480b0
Solidity
PoolStakes
contract PoolStakes is Claimable, SafeUints, ProxyFactory, DefaultOwnable, Constants { // @dev "Stake" of a "stakeholder" in the "vesting pool" struct Stake { // token amount allocated for the stakeholder uint96 allocated; // token amount released to the stakeholder s...
/** * @title PoolStakes * @notice The contract claims (ERC-20) token from the "VestingPools" contract * and then let "stakeholders" withdraw token amounts prorate to their stakes. * @dev A few copy of this contract (i.e. proxies created via the {createProxy} * method) are supposed to run. Every proxy distributes i...
NatSpecMultiLine
_withdraw
function _withdraw(address holder) internal { Stake memory stake = _getStake(holder); uint256 releasable = _releasableAmount(stake, uint256(factor)); require(releasable > 0, "PStakes: nothing to withdraw"); stakes[holder].released = _safe96(uint256(stake.released) + releasable); released = _safe96(...
/// @dev Sends the releasable amount of the specified placeholder
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 9800, 10365 ] }
26,731
ITE
ITE.sol
0x3b43bb04c6006c4798585e6bdff65a1eb971a82c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://f266baca08ac44afcd2ba55c635b5f958be5ef563e65743c697e42e150a54f21
{ "func_code_index": [ 261, 321 ] }
26,732
ITE
ITE.sol
0x3b43bb04c6006c4798585e6bdff65a1eb971a82c
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://f266baca08ac44afcd2ba55c635b5f958be5ef563e65743c697e42e150a54f21
{ "func_code_index": [ 644, 820 ] }
26,733
ITE
ITE.sol
0x3b43bb04c6006c4798585e6bdff65a1eb971a82c
Solidity
ITE
contract ITE is ERC20,Ownable{ using SafeMath for uint256; string public constant name="Intelligent Travel Chain"; string public symbol="ITE"; string public constant version = "1.0"; uint256 public constant decimals = 18; uint256 public totalSupply; uint256 public constant MAX_SUPPLY=10000000000*10**d...
ITE
function ITE(){ totalSupply=MAX_SUPPLY; balances[msg.sender] = MAX_SUPPLY; Transfer(0x0, msg.sender, MAX_SUPPLY); }
//owner一次性获取代币
LineComment
v0.4.21+commit.dfe3193c
bzzr://f266baca08ac44afcd2ba55c635b5f958be5ef563e65743c697e42e150a54f21
{ "func_code_index": [ 513, 641 ] }
26,734
ITE
ITE.sol
0x3b43bb04c6006c4798585e6bdff65a1eb971a82c
Solidity
ITE
contract ITE is ERC20,Ownable{ using SafeMath for uint256; string public constant name="Intelligent Travel Chain"; string public symbol="ITE"; string public constant version = "1.0"; uint256 public constant decimals = 18; uint256 public totalSupply; uint256 public constant MAX_SUPPLY=10000000000*10**d...
function () payable external { GetETH(msg.sender,msg.value); }
//允许用户往合约账户打币
LineComment
v0.4.21+commit.dfe3193c
bzzr://f266baca08ac44afcd2ba55c635b5f958be5ef563e65743c697e42e150a54f21
{ "func_code_index": [ 660, 731 ] }
26,735
babyLunaFOX
babyLunaFOX.sol
0xf91f2164b0b7689ee3233bcb96c5c94e2db57c21
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as th...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://dcdda7d32ea7bc22eb4a66f90a20413ece095c20e1e0a0a21c643eba327c27a3
{ "func_code_index": [ 581, 665 ] }
26,736
babyLunaFOX
babyLunaFOX.sol
0xf91f2164b0b7689ee3233bcb96c5c94e2db57c21
Solidity
babyLunaFOX
contract babyLunaFOX is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bo...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://dcdda7d32ea7bc22eb4a66f90a20413ece095c20e1e0a0a21c643eba327c27a3
{ "func_code_index": [ 9915, 9949 ] }
26,737
babyLunaFOX
babyLunaFOX.sol
0xf91f2164b0b7689ee3233bcb96c5c94e2db57c21
Solidity
babyLunaFOX
contract babyLunaFOX is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bo...
_tokenTransfer
function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _is...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://dcdda7d32ea7bc22eb4a66f90a20413ece095c20e1e0a0a21c643eba327c27a3
{ "func_code_index": [ 19758, 20601 ] }
26,738
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
STLcoin
function STLcoin( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = token...
/** * Constrctor function * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 823, 1321 ] }
26,739
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 1403, 2245 ] }
26,740
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * Send `_value` tokens to `_to` from your account * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 2430, 2542 ] }
26,741
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * Send `_value` tokens to `_to` in behalf of `_from` * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 2795, 3101 ] }
26,742
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * Allows `_spender` to spend no more than `_value` tokens in your behalf * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 3344, 3516 ] }
26,743
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to t...
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 3888, 4232 ] }
26,744
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return tr...
/** * Destroy tokens * Remove `_value` tokens from the system irreversibly * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 4382, 4749 ] }
26,745
STLcoin
STLcoin.sol
0x2d4a785a729737d348da8b4f2e1a138f43338402
Solidity
STLcoin
contract STLcoin { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping(address =...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted bal...
/** * Destroy tokens from other account * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.20+commit.3155dd80
None
bzzr://0ea6ab106c03ca113d5fa1e86869d8019af3742164cd55594925743ac30229cc
{ "func_code_index": [ 4986, 5559 ] }
26,746
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 979, 1100 ] }
26,747
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 1320, 1449 ] }
26,748
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 1793, 2075 ] }
26,749
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 2583, 2796 ] }
26,750
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 3327, 3690 ] }
26,751
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 3973, 4129 ] }
26,752
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 4484, 4806 ] }
26,753
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 4998, 5057 ] }
26,754
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 5290, 5479 ] }
26,755
DigitalWorldToken
DigitalWorldToken.sol
0x9d290ac3f91c070e773e6a8d6f92e8e915a669b9
Solidity
DigitalWorldToken
contract DigitalWorldToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
burn
function burn(uint256 _value) public onlyOwner returns (bool success){ require(balances[msg.sender] >= _value); balances[msg.sender] -= _value; _totalSupply -= _value; return true; }
//burn function for client
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://930f066b06923f897381ff5134e9349eb0fe0c2a317a0c25a01d860d197fc1b1
{ "func_code_index": [ 5524, 5772 ] }
26,756
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
parseInt
function parseInt(string _a) internal returns (uint) { return parseInt(_a, 0); }
// parseInt
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 27456, 27555 ] }
26,757
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
parseInt
function parseInt(string _a, uint _b) internal returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; ...
// parseInt(parseFloat*10^_b)
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 27593, 28202 ] }
26,758
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
copyBytes
function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal returns (bytes) { uint minLength = length + toOffset; if (to.length < minLength) { // Buffer too small throw; // Should be a better way? } // NOTE: the offset 32 is added to skip the ...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 41396, 42113 ] }
26,759
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
safer_ecrecover
function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) { // We do our own memory management here. Solidity uses memory offset // 0x40 to store the current end of memory. We write past it (as // writes are memory extensions), but don't update the offset so ...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license // Duplicate Solidity's ecrecover, but catching the CALL return value
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 42310, 43313 ] }
26,760
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
ecrecovery
function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) { bytes32 r; bytes32 s; uint8 v; if (sig.length != 65) return (false, 0); // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded t...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 43435, 44861 ] }
26,761
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
Lottery
contract Lottery is usingOraclize{ uint8 public player_count; //keep track of how many people are signed up. uint public ante; //how big is the bet per person (in ether) uint8 public required_number_players; //how many sign ups trigger the lottery uint public winner_percentage; // how much doe...
// </ORACLIZE_API> // Contract that: // Lets anyone bet with 0.054 ethers // When it reaches 2 bets, it chooses a player at random based on oraclize and sends z% of the ethers received. other v% goes to GiveDirectly
LineComment
Lottery
function Lottery() public{ owner = msg.sender; player_count = 0; ante = 0.054 ether; required_number_players = 2; winner_percentage = 98; oraclize_setProof(proofType_Ledger); oracle_price = 0.003 ether; oraclize_gas = 285000; private_rooms_index=0; paused = false; ...
//A mapping to store the player pairs in private rooms based on keccak256 ids generated locally //constructor
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 1335, 1747 ] }
26,762
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
Lottery
contract Lottery is usingOraclize{ uint8 public player_count; //keep track of how many people are signed up. uint public ante; //how big is the bet per person (in ether) uint8 public required_number_players; //how many sign ups trigger the lottery uint public winner_percentage; // how much doe...
// </ORACLIZE_API> // Contract that: // Lets anyone bet with 0.054 ethers // When it reaches 2 bets, it chooses a player at random based on oraclize and sends z% of the ethers received. other v% goes to GiveDirectly
LineComment
__callback
function __callback(bytes32 _queryId, string _result, bytes _proof) public { require (msg.sender == oraclize_cbAddress()); ShowProof (_proof); if (oraclize_randomDS_proofVerify__returnCode(_queryId, _result, _proof) != 0) { // the proof verification has failed send ante to players ...
// the callback function is called by Oraclize when the result is ready // the oraclize_randomDS_proofVerify modifier prevents an invalid proof to execute this function code: // the proof validity is fully verified on-chain
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 3975, 5309 ] }
26,763
Lottery
Lottery.sol
0xc7eae23c737b5c53ea661a2110e6c60402036445
Solidity
Lottery
contract Lottery is usingOraclize{ uint8 public player_count; //keep track of how many people are signed up. uint public ante; //how big is the bet per person (in ether) uint8 public required_number_players; //how many sign ups trigger the lottery uint public winner_percentage; // how much doe...
// </ORACLIZE_API> // Contract that: // Lets anyone bet with 0.054 ethers // When it reaches 2 bets, it chooses a player at random based on oraclize and sends z% of the ethers received. other v% goes to GiveDirectly
LineComment
buy
function buy() whenNotPaused payable public{ // No arguments are necessary, all // information is already part of // the transaction. The keyword payable // is required for the function to // be able to receive Ether. // If the bet is not equal to the ante + the oracle price, /...
// function when someone gambles a.k.a sends ether to the contract
LineComment
v0.4.21+commit.dfe3193c
bzzr://869ef9ee481bded66cdede7644a71d4d226c78c2715731390938ff5c4ef992de
{ "func_code_index": [ 7209, 8290 ] }
26,764
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @dev ERC20 Token standard: https://github.com/ethereum/EIPs/issues/20. * Reference the openzeppelin-solidity: * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/StandardToken.sol */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 89, 272 ] }
26,765
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @dev ERC20 Token standard: https://github.com/ethereum/EIPs/issues/20. * Reference the openzeppelin-solidity: * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/StandardToken.sol */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 356, 629 ] }
26,766
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @dev ERC20 Token standard: https://github.com/ethereum/EIPs/issues/20. * Reference the openzeppelin-solidity: * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/StandardToken.sol */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 744, 860 ] }
26,767
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @dev ERC20 Token standard: https://github.com/ethereum/EIPs/issues/20. * Reference the openzeppelin-solidity: * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/StandardToken.sol */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 924, 1060 ] }
26,768
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 199, 287 ] }
26,769
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 445, 836 ] }
26,770
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 1042, 1154 ] }
26,771
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 401, 853 ] }
26,772
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 1485, 1675 ] }
26,773
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 1999, 2130 ] }
26,774
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 2596, 2860 ] }
26,775
NotusToken
NotusToken.sol
0xd682bb54ae24df2a90b70e630becae8edc1473f9
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://062e0c4bef40d20b777eb46016e733e965c80187ac978ce9ac26ff37dfc1c0cc
{ "func_code_index": [ 3331, 3741 ] }
26,776
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 89, 266 ] }
26,777
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 350, 630 ] }
26,778
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 744, 860 ] }
26,779
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 924, 1054 ] }
26,780
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 199, 287 ] }
26,781
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 445, 777 ] }
26,782
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 983, 1087 ] }
26,783
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_v...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 401, 891 ] }
26,784
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 1523, 1718 ] }
26,785
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 2042, 2207 ] }
26,786
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 2673, 2980 ] }
26,787
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 3451, 3894 ] }
26,788
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 710, 891 ] }
26,789
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 983, 1100 ] }
26,790
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 513, 609 ] }
26,791
SCTC
SCTC.sol
0x837159999b1962e0e83a0c8e5a4727ff1eec2cd8
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://5a7be22bec8b61339d7ab363559f017e0eb818977e84ac5b00245ba103c95c2d
{ "func_code_index": [ 693, 791 ] }
26,792
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg....
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner;
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 685, 882 ] }
26,793
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause();
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 575, 684 ] }
26,794
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause();
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 777, 888 ] }
26,795
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Whitelist
contract Whitelist is Pausable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); /** * @dev Throws if called by any account that's not whitelisted. */ modifier onlyWhitelisted() { ...
/** * @title Whitelist * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. * @dev This simplifies the implementation of "user permissions". */
NatSpecMultiLine
addAddressToWhitelist
function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) { if (!whitelist[addr]) { whitelist[addr] = true; emit WhitelistedAddressAdded(addr); success = true; }
/** * @dev add an address to the whitelist * @param addr address * @return true if the address was added to the whitelist, false if the address was already in the whitelist */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 584, 832 ] }
26,796
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Whitelist
contract Whitelist is Pausable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); /** * @dev Throws if called by any account that's not whitelisted. */ modifier onlyWhitelisted() { ...
/** * @title Whitelist * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. * @dev This simplifies the implementation of "user permissions". */
NatSpecMultiLine
addAddressesToWhitelist
function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) { for (uint256 i = 0; i < addrs.length; i++) { if (addAddressToWhitelist(addrs[i])) { success = true; } }
/** * @dev add addresses to the whitelist * @param addrs addresses * @return true if at least one address was added to the whitelist, * false if all addresses were already in the whitelist */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 1066, 1323 ] }
26,797
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Whitelist
contract Whitelist is Pausable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); /** * @dev Throws if called by any account that's not whitelisted. */ modifier onlyWhitelisted() { ...
/** * @title Whitelist * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. * @dev This simplifies the implementation of "user permissions". */
NatSpecMultiLine
removeAddressFromWhitelist
function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) { if (whitelist[addr]) { whitelist[addr] = false; emit WhitelistedAddressRemoved(addr); success = true; }
/** * @dev remove an address from the whitelist * @param addr address * @return true if the address was removed from the whitelist, * false if the address wasn't in the whitelist in the first place */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 1566, 1821 ] }
26,798
EmaToken
EmaToken.sol
0xc3ee57fa8ed253e3f214048879977265967ae745
Solidity
Whitelist
contract Whitelist is Pausable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); /** * @dev Throws if called by any account that's not whitelisted. */ modifier onlyWhitelisted() { ...
/** * @title Whitelist * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. * @dev This simplifies the implementation of "user permissions". */
NatSpecMultiLine
removeAddressesFromWhitelist
function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) { for (uint256 i = 0; i < addrs.length; i++) { if (removeAddressFromWhitelist(addrs[i])) { success = true; } }
/** * @dev remove addresses from the whitelist * @param addrs addresses * @return true if at least one address was removed from the whitelist, * false if all addresses weren't in the whitelist in the first place */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54
{ "func_code_index": [ 2078, 2345 ] }
26,799