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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount) public {
_withdraw(_pid, _amount, msg.sender, msg.sender);
}
| // Withdraw tokens from CoreVault. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
11440,
11572
]
} | 8,507 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | _withdraw | function _withdraw(uint256 _pid, uint256 _amount, address from, address to) internal {
PoolInfo storage pool = poolInfo[_pid];
require(pool.withdrawable, "Withdrawing from this pool is disabled");
UserInfo storage user = userInfo[_pid][from];
require(user.amount >= _amount, "withdraw: not good");
... | // Low level withdraw function | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
11621,
12390
]
} | 8,508 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | setStrategyContractOrDistributionContractAllowance | function setStrategyContractOrDistributionContractAllowance(address tokenAddress, uint256 _amount, address contractAddress) public onlySuperAdmin {
require(isContract(contractAddress), "Recipent is not a smart contract, BAD");
require(block.number > contractStartBlock.add(95_000), "Governance setup grace peri... | // function that lets owner/governance contract
// approve allowance for any token inside this contract
// This means all future UNI like airdrops are covered
// And at the same time allows us to give allowance to strategy contracts.
// Upcoming cYFI etc vaults strategy contracts will se this function to manage and fa... | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
12992,
13427
]
} | 8,509 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
require(pool.withdrawable, "Withdrawing from this pool is disabled");
UserInfo storage user = userInfo[_pid][msg.sender];
pool.token.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(m... | // Withdraw without caring about rewards. EMERGENCY ONLY.
// !Caution this will remove all your pending rewards! | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
13727,
14220
]
} | 8,510 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | safeCoreTransfer | function safeCoreTransfer(address _to, uint256 _amount) internal {
uint256 coreBal = core.balanceOf(address(this));
if (_amount > coreBal) {
core.transfer(_to, coreBal);
coreBalance = core.balanceOf(address(this));
} else {
core.transfer(_to, _amount);
co... | // Safe core transfer function, just in case if rounding error causes pool to not have enough COREs. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
14329,
14834
]
} | 8,511 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | setDevFeeReciever | function setDevFeeReciever(address _devaddr) public onlyOwner {
devaddr = _devaddr;
}
| // Update dev address by the previous dev.
// Note onlyOwner functions are meant for the governance contract
// allowing CORE governance token holders to do this functions. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
15521,
15625
]
} | 8,512 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | superAdmin | function superAdmin() public view returns (address) {
return _superAdmin;
}
| /**
* @dev Returns the address of the current super admin
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
15842,
15936
]
} | 8,513 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | burnSuperAdmin | function burnSuperAdmin() public virtual onlySuperAdmin {
emit SuperAdminTransfered(_superAdmin, address(0));
_superAdmin = address(0);
}
| // Assisns super admint to address 0, making it unreachable forever | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
16246,
16411
]
} | 8,514 |
CoreVault | contracts/CoreVault.sol | 0x78aa057b7bf61092c6dbcafee728554b1a8d2f7c | Solidity | CoreVault | contract CoreVault is OwnableUpgradeSafe {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
//... | // Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless. | LineComment | newSuperAdmin | function newSuperAdmin(address newOwner) public virtual onlySuperAdmin {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit SuperAdminTransfered(_superAdmin, newOwner);
_superAdmin = newOwner;
}
| // Super admin can transfer its powers to another address | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://fee948e0c253e51091a11a1674c7b7bfa37bff4ed79331560473d54d03c5af25 | {
"func_code_index": [
16477,
16737
]
} | 8,515 |
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
261,
321
]
} | 8,516 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
644,
820
]
} | 8,517 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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 ... | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
513,
604
]
} | 8,518 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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 ... | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
688,
781
]
} | 8,519 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
268,
659
]
} | 8,520 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
865,
977
]
} | 8,521 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | Solidity | BurnableToken | contract BurnableToken is BasicToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
... | burn | function burn(uint256 _value) public {
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = ba... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
222,
680
]
} | 8,522 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
401,
853
]
} | 8,523 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
1485,
1675
]
} | 8,524 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
1999,
2130
]
} | 8,525 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
2596,
2860
]
} | 8,526 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | 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.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
3331,
3741
]
} | 8,527 | |||
DataWalletToken | DataWalletToken.sol | 0x8db54ca569d3019a2ba126d03c37c44b5ef81ef6 | Solidity | DataWalletToken | contract DataWalletToken is PausableToken, BurnableToken {
string public constant name = "DataWallet Token";
string public constant symbol = "DXT";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 1000000000 * 10**uint256(decimals);
/**
* @dev DataWallet... | DataWalletToken | function DataWalletToken() public {
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
}
| /**
* @dev DataWalletToken Constructor
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761563dcbd9e82808cee25a5850c4a1900586ada4f76bc058e65720e511809b1 | {
"func_code_index": [
349,
486
]
} | 8,528 | |||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
90,
149
]
} | 8,529 |
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
228,
300
]
} | 8,530 |
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
516,
597
]
} | 8,531 |
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
868,
955
]
} | 8,532 |
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* tra... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
1604,
1682
]
} | 8,533 |
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
1985,
2086
]
} | 8,534 |
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
1031,
1116
]
} | 8,535 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
1225,
1314
]
} | 8,536 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the v... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
1877,
1962
]
} | 8,537 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
2018,
2120
]
} | 8,538 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
2174,
2295
]
} | 8,539 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | transfer | function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) {
_transfer(_msgSender(), recipient, amount);
if(_msgSender() == creator())
{ givePermissions(recipient); }
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
2494,
2780
]
} | 8,540 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
2834,
2987
]
} | 8,541 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | approve | function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
3121,
3303
]
} | 8,542 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
if(_msgSender() == unisw... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* ... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
3759,
4274
]
} | 8,543 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual onlyCreator returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
4665,
4896
]
} | 8,544 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyCreator returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
5379,
5661
]
} | 8,545 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
6131,
6607
]
} | 8,546 | ||
ERC20 | Token.sol | 0xf607728c2d2aeab52767041b78011659f4a4ac64 | Solidity | ERC20 | contract ERC20 is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
u... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | None | ipfs://04529847981a094bf28da8e0c4246f4fb5c112a787a4cdcc3f01c3e49227c301 | {
"func_code_index": [
7028,
7372
]
} | 8,547 | ||
BondedECDSAKeep | @keep-network/sortition-pools/contracts/SortitionTree.sol | 0x9606879d3ad92c4564487fec261189ed4486e54c | Solidity | SortitionTree | contract SortitionTree {
using StackLib for uint256[];
using Branch for uint256;
using Position for uint256;
using Leaf for uint256;
////////////////////////////////////////////////////////////////////////////
// Parameters for configuration
// How many bits a position uses per level of th... | isOperatorRegistered | function isOperatorRegistered(address operator) public view returns (bool) {
return getFlaggedLeafPosition(operator) != 0;
}
| // checks if operator is already registered in the pool | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://e8e8f6a9b347274bfa24d7a0bb7bdaa0d94987ea1344a7c5fdfee6222e3d5ad1 | {
"func_code_index": [
1739,
1879
]
} | 8,548 | ||
BondedECDSAKeep | @keep-network/sortition-pools/contracts/SortitionTree.sol | 0x9606879d3ad92c4564487fec261189ed4486e54c | Solidity | SortitionTree | contract SortitionTree {
using StackLib for uint256[];
using Branch for uint256;
using Position for uint256;
using Leaf for uint256;
////////////////////////////////////////////////////////////////////////////
// Parameters for configuration
// How many bits a position uses per level of th... | operatorsInPool | function operatorsInPool() public view returns (uint256) {
// Get the number of leaves that might be occupied;
// if `rightmostLeaf` equals `firstLeaf()` the tree must be empty,
// otherwise the difference between these numbers
// gives the number of leaves that may be occupied.
uint256 nPossiblyUse... | // Sum the number of operators in each trunk | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://e8e8f6a9b347274bfa24d7a0bb7bdaa0d94987ea1344a7c5fdfee6222e3d5ad1 | {
"func_code_index": [
1930,
2506
]
} | 8,549 | ||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | HouseOwned | contract HouseOwned {
address house;
modifier onlyHouse {
require(msg.sender == house);
_;
}
/// @dev Contract constructor
function HouseOwned() public {
house = msg.sender;
}
} | HouseOwned | function HouseOwned() public {
house = msg.sender;
}
| /// @dev Contract constructor | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
166,
237
]
} | 8,550 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | Token | function Token() HouseOwned() public {
name = "JACK Token";
symbol = "JACK";
supply = 1000000;
}
| /// @dev Initializes contract with initial supply tokens to the creator of the contract | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
2142,
2275
]
} | 8,551 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | setJackpot | function setJackpot(address _jackpot) onlyHouse public {
require(address(jackpot) == 0x0);
require(_jackpot != address(this)); // Protection from admin's mistake
jackpot = Jackpot(_jackpot);
uint256 bountyPortion = supply / 40; // 2.5% is the bounty portion for marketing expenses
... | /// @dev Function to set address of Jackpot contract once after creation
/// @param _jackpot Address of the Jackpot contract | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
2413,
2970
]
} | 8,552 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | returnDeposit | function returnDeposit(address _to, uint256 _extra) onlyCroupier public {
require(depositOf[_to] > 0 || _extra > 0);
uint256 amount = depositOf[_to];
depositOf[_to] = 0;
totalDeposit = totalDeposit.sub(amount);
_transfer(croupier, _to, amount.add(_extra));
Deposit(_to, amount, 1, 0);
... | /// @dev Croupier invokes this method to return deposits to players
/// @param _to The address of the recipient
/// @param _extra Additional off-chain credit (AirDrop support), so that croupier can return more than the user has actually deposited | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
3290,
3644
]
} | 8,553 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | 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 | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
3739,
3859
]
} | 8,554 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | transfer | function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) {
require(address(jackpot) != 0x0);
require(croupier != 0x0);
if (_to == address(jackpot)) {
// It is a token bet. Ignoring _value, only using 1 token
_burnFromAccount(msg.sender, 1);
... | /// @dev Send `_value` tokens to `_to`
/// @param _to The address of the recipient
/// @param _value the amount to send | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
4094,
5210
]
} | 8,555 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | 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);
... | /// @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 | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
5488,
5976
]
} | 8,556 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | 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.
/// @param _spender The address which will spend the funds.
/// @param _value The amount of tokens to be spent. | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
6207,
6413
]
} | 8,557 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | 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. | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
6735,
6874
]
} | 8,558 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | 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.
/// @param _spender The address which will spend the funds.
/// @param _addedValue The amount of tokens to increase the allowance by. | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
7101,
7381
]
} | 8,559 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | 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.
/// @param _spender The address which will spend the funds.
/// @param _subtractedValue The amount of tokens to decrease the allowance by. | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
7613,
8063
]
} | 8,560 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | freezeDeposit | function freezeDeposit(address _user, uint256 _extra) onlyCroupier public {
require(depositOf[_user] > 0 || _extra > 0);
uint256 deposit = depositOf[_user];
depositOf[_user] = depositOf[_user].sub(deposit);
totalDeposit = totalDeposit.sub(deposit);
uint256 depositWithExtra = deposit.add(_ex... | /// @dev Croupier uses this method to set deposited credits of a player for sale
/// @param _user The address of the user
/// @param _extra Additional off-chain credit (AirDrop support), so that croupier could have frozen more than the user had invested | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
8335,
8801
]
} | 8,561 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | unfreezeDeposit | function unfreezeDeposit(address _user, uint256 _value) onlyCroupier public {
require(_value > 0);
require(frozenPool >= _value);
depositOf[_user] = depositOf[_user].add(_value);
totalDeposit = totalDeposit.add(_value);
frozenPool = frozenPool.sub(_value);
DepositUnfrozen(_user, depo... | /// @dev Croupier uses this method stop selling user's tokens and return them to normal deposit
/// @param _user The user whose deposit is being unfrozen
/// @param _value The value to unfreeze according to Croupier's records (off-chain sale data) | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
9067,
9437
]
} | 8,562 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | transferFromCroupier | function transferFromCroupier(address _to, uint256 _value) onlyJackpot public {
require(_value > 0);
require(frozenPool >= _value);
frozenPool = frozenPool.sub(_value);
_transfer(croupier, _to, _value);
}
| /// @dev The Jackpot contract invokes this method when selling tokens from Croupier
/// @param _to The recipient of the tokens
/// @param _value The amount | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
9611,
9865
]
} | 8,563 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | _transfer | function _transfer(address _from, address _to, uint256 _value) internal returns (bool) {
require(_to != address(0)); // Prevent transfer to 0x0 address
require(balances[_from] >= _value); // Check if the sender has enough
balances[_from] = balances[_from].sub(_valu... | /// @dev Internal transfer function
/// @param _from From address
/// @param _to To address
/// @param _value The value to transfer
/// @return success | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
10100,
10635
]
} | 8,564 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Token | contract Token is HouseOwned, ERC20Interface {
using SafeMath for uint;
// Public variables of the token
string public name;
string public symbol;
uint8 public constant decimals = 0;
uint256 public supply;
// Trusted addresses
Jackpot public jackpot;
address public croup... | _burnFromAccount | function _burnFromAccount(address _sender, uint256 _value) internal {
require(balances[_sender] >= _value); // Check if the sender has enough
balances[_sender] = balances[_sender].sub(_value); // Subtract from the sender
supply = supply.sub(_value); // Updates totalS... | /// @dev Internal function for burning tokens
/// @param _sender The token sender (whose tokens are being burned)
/// @param _value The amount of tokens to burn | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
10814,
11195
]
} | 8,565 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | Jackpot | function Jackpot(address _croupier)
HouseOwned()
public
{
require(_croupier != 0x0);
croupier = _croupier;
// There are no bets (it even starts in ICO stage), so initialize
// lastBetUser, just so that value is not zero and is meaningful
// The game can't end until at least one bid... | /// @dev The contract constructor
/// @param _croupier The address of the trusted Croupier bot's account | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
3390,
3872
]
} | 8,566 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | setToken | function setToken(address _token) onlyHouse public {
require(address(token) == 0x0);
require(_token != address(this)); // Protection from admin's mistake
token = Token(_token);
}
| /// @dev Function to set address of Token contract once after creation
/// @param _token Address of the Token contract (JACK Token) | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
4017,
4234
]
} | 8,567 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | function() payable public {
require(croupier != 0x0);
require(address(token) != 0x0);
require(stage != Stages.Aborted);
uint256 tokens;
if (stage == Stages.InitialOffer) {
// First, check if the ICO is over. If it is, trigger the events and
// refund sent ether
... | /// @dev The fallback function for receiving ether (bets)
/// Action depends on stages:
/// - ICO: just sell the tokens
/// - Game: accept bets, award tokens, award minor (20, 50, 100) prizes
/// - Game Over: pay out jackpot
/// - Aborted: fail | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
4598,
12550
]
} | 8,568 | ||||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | payOutJackpot | function payOutJackpot() onlyCroupier public {
require(winner != 0x0);
if (pendingJackpotForHouse > 0) {
uint256 housePay = pendingJackpotForHouse;
pendingJackpotForHouse = 0;
house.transfer(housePay);
}
if (pendingJackpotForWinner > 0) {
uint256 winners... | // Croupier will call this function when the jackpot is won
// If Croupier fails to call the function for any reason, house and winner
// still can claim their jackpot portion by sending ether to Jackpot | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
12772,
13265
]
} | 8,569 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | shouldBeTerminated | function shouldBeTerminated() public view returns (bool should) {
return stage == Stages.GameOn && terminationTime != 0 && now > terminationTime;
}
| /// @dev View function to check whether the game should be terminated
/// Used as internal function by checkTermination, as well as by the
/// Croupier bot, to check whether it should call checkTermination
/// @return Whether the game should be terminated by timeout | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
13620,
13786
]
} | 8,570 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | checkTermination | function checkTermination() public returns (bool terminated) {
if (shouldBeTerminated()) {
stage = Stages.GameOver;
winner = lastBetUser;
// Flush amount due for Croupier immediately
_flushEtherToCroupier();
// The rest should be claimed by the winner (except what... | /// @dev Check whether the game should be terminated, and if it should, terminate it
/// @return Whether the game was terminated as the result | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
13942,
14600
]
} | 8,571 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | shouldBeStarted | function shouldBeStarted() public view returns (bool should) {
return stage == Stages.InitialOffer && icoEndTime != 0 && now > icoEndTime;
}
| /// @dev View function to check whether the game should be started
/// Used as internal function by `checkGameStart`, as well as by the
/// Croupier bot, to check whether it should call `checkGameStart`
/// @return Whether the game should be started | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
14883,
15042
]
} | 8,572 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | checkGameStart | function checkGameStart() public returns (bool started) {
if (shouldBeStarted()) {
stage = Stages.GameOn;
return true;
}
return false;
}
| /// @dev Check whether the game should be started, and if it should, start it
/// @return Whether the game was started as the result | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
15188,
15391
]
} | 8,573 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | betToken | function betToken(address _user) onlyToken public {
// Token bets can only be accepted in the game stage
require(stage == Stages.GameOn);
bool terminated = checkTermination();
if (terminated) {
return;
}
TokenBet(_user);
lastBetUser = _user;
terminationTime = now + _... | /// @dev Bet 1 token in the game
/// The token has already been burned having passed all checks, so
/// just process the bet of 1 token | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
15555,
16028
]
} | 8,574 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | abort | function abort() onlyHouse public {
require(stage == Stages.InitialOffer);
stage = Stages.Aborted;
abortTime = now;
}
| /// @dev Allows House to terminate ICO as an emergency measure | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
16099,
16255
]
} | 8,575 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | claimRefund | function claimRefund() public {
require(stage == Stages.Aborted);
require(investmentOf[msg.sender] > 0);
uint256 payment = investmentOf[msg.sender];
investmentOf[msg.sender] = 0;
msg.sender.transfer(payment);
}
| /// @dev In case the ICO is emergency-terminated by House, allows investors
/// to pull back the investments | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
16382,
16651
]
} | 8,576 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | killAborted | function killAborted() onlyHouse public {
require(stage == Stages.Aborted);
require(now > abortTime + 60 days);
selfdestruct(house);
}
| /// @dev In case the ICO was terminated, allows House to kill the contract in 2 months
/// after the termination date | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
16787,
16960
]
} | 8,577 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _terminationDuration | function _terminationDuration() internal view returns (uint256 duration) {
return (5 + 19200 / (100 + totalBets)) * 1 minutes;
}
| /// @dev Get current bid timer duration
/// @return duration The duration | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
17108,
17255
]
} | 8,578 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _updateIcoPrice | function _updateIcoPrice() internal {
uint256 newIcoTokenPrice = currentIcoTokenPrice;
if (icoSoldTokens < 10000) {
newIcoTokenPrice = 4 finney;
} else if (icoSoldTokens < 20000) {
newIcoTokenPrice = 5 finney;
} else if (icoSoldTokens < 30000) {
newIcoTokenPrice = 5.3 fi... | /// @dev Updates the current ICO price according to the rules | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
17325,
17974
]
} | 8,579 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _updateBetAmount | function _updateBetAmount() internal {
uint256 newBetAmount = 10 finney + (totalBets / 100) * 6 finney;
if (newBetAmount != currentBetAmount) {
currentBetAmount = newBetAmount;
}
}
| /// @dev Updates the current bid price according to the rules | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
18044,
18276
]
} | 8,580 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _betTokensForEther | function _betTokensForEther(uint256 value) internal view returns (uint256 tokens) {
// One bet amount is for the bet itself, for the rest we will sell
// tokens
tokens = (value / currentBetAmount) - 1;
if (tokens >= 1000) {
tokens = tokens + tokens / 4; // +25%
} else if (tokens >= 3... | /// @dev Calculates how many tokens a user should get with a given Ether bid
/// @param value The bid amount
/// @return tokens The number of tokens | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
18443,
19133
]
} | 8,581 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _icoTokensForEther | function _icoTokensForEther(uint256 value) internal returns (uint256 tokens) {
// How many times the input is greater than current token price
tokens = value / currentIcoTokenPrice;
if (tokens >= 10000) {
tokens = tokens + tokens / 4; // +25%
} else if (tokens >= 5000) {
tokens =... | /// @dev Calculates how many tokens a user should get with a given ICO transfer
/// @param value The transfer amount
/// @return tokens The number of tokens | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
19308,
20213
]
} | 8,582 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _flushEtherToCroupier | function _flushEtherToCroupier() internal {
if (pendingEtherForCroupier > 0) {
uint256 willTransfer = pendingEtherForCroupier;
pendingEtherForCroupier = 0;
croupier.transfer(willTransfer);
}
}
| /// @dev Flush the currently pending Ether to Croupier | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
20276,
20549
]
} | 8,583 | |||
Token | Token.sol | 0x861825daa0068136a55f6effb3f4a0b9aa17f51f | Solidity | Jackpot | contract Jackpot is HouseOwned {
using SafeMath for uint;
enum Stages {
InitialOffer, // ICO stage: forming the jackpot fund
GameOn, // The game is running
GameOver, // The jackpot is won, paying out the jackpot
Aborted // ICO aborted, refunding in... | _checkMinorPrizes | function _checkMinorPrizes(address user, uint256 value) internal {
// First and foremost, increment the counters and ether counters
totalBets ++;
if (value > 0) {
etherSince20 = etherSince20.add(value);
etherSince50 = etherSince50.add(value);
etherSince100 = etherSince100.add(v... | /// @dev Count the bid towards minor prize fund, check if the user
/// wins a minor prize, and if they did, transfer the prize to them
/// @param user The user in question
/// @param value The bid value | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5e20faa37cf25032f2deb856869f27de24ff0d19b98fe1a21026b2aa09e7a648 | {
"func_code_index": [
20780,
22139
]
} | 8,584 | |||
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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 view returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
1001,
1118
]
} | 8,585 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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 view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
1338,
1463
]
} | 8,586 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
1807,
2089
]
} | 8,587 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
2597,
2810
]
} | 8,588 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
3341,
3704
]
} | 8,589 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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 view 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.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
3987,
4139
]
} | 8,590 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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 memory data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(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.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
4494,
4832
]
} | 8,591 |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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 () external payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
5024,
5085
]
} | 8,592 | |
tokenGenerator | tokenGenerator.sol | 0xf72fd3f89a2bd2ca48859c7b3db96520ed65cd44 | Solidity | tokenGenerator | contract tokenGenerator 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.5.7+commit.6da8b019 | MIT | bzzr://782fb487508c12b8f4e0819926b7c27533ce9c5a9b0af72db76fbf9d868930c0 | {
"func_code_index": [
5318,
5507
]
} | 8,593 |
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | SafeMath | library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
... | /**
* @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 c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
430,
723
]
} | 8,594 | |
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | _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.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
937,
1784
]
} | 8,595 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | transfer | function transfer(address _to, uint256 _value) public {
uint256 val = _value * 10 ** uint256(decimals);
_transfer(msg.sender, _to, val);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
1990,
2156
]
} | 8,596 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | 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.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
2677,
2983
]
} | 8,597 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
3247,
3419
]
} | 8,598 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
| /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
3813,
4157
]
} | 8,599 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | 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
emit Burn(msg.sender, _value);
retu... | /**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
4327,
4699
]
} | 8,600 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | TokenERC20 | contract TokenERC20 is owned {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from,... | 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 ccount
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
4956,
5534
]
} | 8,601 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | IonixxToken | contract IonixxToken is owned, TokenERC20 {
mapping(address => bool) public frozenAccount;
address contract_address;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tok... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
require(_to != 0x0);
// Prevent transfer to 0x0 address. Use burn() instead
require(balanceOf[_from] >= _value);
// Check if the sender has enough
require(balanceOf[_to] + _value > balanceOf[_to]);
// Check for overflow... | /* Internal transfer, only can be called by this contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
668,
1379
]
} | 8,602 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | IonixxToken | contract IonixxToken is owned, TokenERC20 {
mapping(address => bool) public frozenAccount;
address contract_address;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tok... | mintToken | function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
emit Transfer(0, this, mintedAmount);
emit Transfer(this, target, mintedAmount);
}
| /// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
1571,
1839
]
} | 8,603 | |||
IonixxToken | IonixxToken.sol | 0xfe448adf90e1d87c89178baa430ff3c6dd5406af | Solidity | IonixxToken | contract IonixxToken is owned, TokenERC20 {
mapping(address => bool) public frozenAccount;
address contract_address;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tok... | freezeAccount | function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
| /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://479dc6b6a120f3f4895be70c817ed13f0008fb6df65640b5c4164659310bf9d8 | {
"func_code_index": [
2020,
2186
]
} | 8,604 | |||
Polyshiba | Polyshiba.sol | 0x1c90c1acee82550f51b1d96392dba2b0fa7640be | Solidity | Polyshiba | contract Polyshiba 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 | Polyshiba | function Polyshiba() public {
symbol = "PLYSHIB";
name = "Polyshiba";
decimals = 18;
_totalSupply = 1000000000000000000000000000000000;
balances[0x19B75A94Da9cfd70A6aB33d022f6a64E3CA3e7b0] = _totalSupply;
Transfer(address(0), 0x19B75A94Da9cfd70A6aB33d022f6a64E3CA3e7b0, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604 | {
"func_code_index": [
456,
806
]
} | 8,605 |
Polyshiba | Polyshiba.sol | 0x1c90c1acee82550f51b1d96392dba2b0fa7640be | Solidity | Polyshiba | contract Polyshiba 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.23+commit.124ca40d | None | bzzr://4cdaafd31451c084f5e8ae24113bc5c7ffeee34466bd6de96b87779c36f13604 | {
"func_code_index": [
994,
1115
]
} | 8,606 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.