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
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
KEKEcon
function KEKEcon(){ balanceOf[msg.sender] = 100000000000000000; // Give the creator all initial tokens totalSupply = 100000000000000000; // Update total supply name = "KEKEcon"; // Set the name for display purposes symbol = "KEKEcon"; ...
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 719, 1218 ] }
0
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
_transfer
function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balan...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 1287, 1888 ] }
1
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
transfer
function transfer(address _to, uint256 _value) { _transfer(msg.sender, _to, _value); }
/// @notice Send `_value` tokens to `_to` from your account /// @param _to The address of the recipient /// @param _value the amount to send
NatSpecSingleLine
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 2047, 2152 ] }
2
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require (_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/// @notice 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
NatSpecSingleLine
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 2362, 2657 ] }
3
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
approve
function approve(address _spender, uint256 _value) returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/// @notice 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
NatSpecSingleLine
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 2858, 3027 ] }
4
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it /// @param _spender The address authorized to spend /// @param _value the max amount they can spend /// @param _extraData some extra information to send to the approved contract
NatSpecSingleLine
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 3348, 3684 ] }
5
KEKEcon
KEKEcon.sol
0x3d7e4eb0facef2aaffaa07b7a61c7c1c49ffa2d4
Solidity
KEKEcon
contract KEKEcon{ /* Public variables of the token */ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address =...
burn
function burn(uint256 _value) 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 ...
/// @notice Remove `_value` tokens from the system irreversibly /// @param _value the amount of money to burn
NatSpecSingleLine
v0.4.23-nightly.2018.4.17+commit.5499db01
bzzr://1d3b178f91e40d136cf4e04a3ba2615aa41be6c40e35dec09e0f910960426751
{ "func_code_index": [ 3807, 4204 ] }
6
Presale
contracts/IPricingStrategy.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
IPricingStrategy
interface IPricingStrategy { function isPricingStrategy() public view returns (bool); /** Calculate the current price for buy in amount. */ function calculateTokenAmount(uint weiAmount, uint tokensSold) public view returns (uint tokenAmount); }
calculateTokenAmount
function calculateTokenAmount(uint weiAmount, uint tokensSold) public view returns (uint tokenAmount);
/** Calculate the current price for buy in amount. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 155, 262 ] }
7
ZCDistribution
contracts/ZCDistribution.sol
0x8c58694bffb6d61fc335c5ff7b6831df88a2961f
Solidity
ZCDistribution
contract ZCDistribution is Claimable { // Total amount of airdrops that happend uint256 public numDrops; // Total amount of tokens dropped uint256 public dropAmount; // Address of the Token address public tokenAddress; /** * @param _tokenAddr The Address of the Token *...
/** * @title ZCDistribution * * Used to distribute rewards to consumers * * (c) Philip Louw / Zero Carbon Project 2018. The MIT Licence. */
NatSpecMultiLine
multisend
function multisend(address[] dests, uint256[] values) public onlyOwner returns (uint256) { assert(dests.length == values.length); uint256 i = 0; while (i < dests.length) { assert(ERC20Basic(tokenAddress).transfer(dests[i], values[i])); emit RewardDistributed(dests[i], values[i]); ...
/** * @dev Distributes the rewards to the consumers. Returns the amount of customers that received tokens. Can only be called by Owner * @param dests Array of cosumer addresses * @param values Array of token amounts to distribute to each client */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://ddc4a1ebf9801a8697e26b95dec80d39d4c376a538bb3bf50597ec12a4b6ac8d
{ "func_code_index": [ 957, 1426 ] }
8
ZCDistribution
contracts/ZCDistribution.sol
0x8c58694bffb6d61fc335c5ff7b6831df88a2961f
Solidity
ZCDistribution
contract ZCDistribution is Claimable { // Total amount of airdrops that happend uint256 public numDrops; // Total amount of tokens dropped uint256 public dropAmount; // Address of the Token address public tokenAddress; /** * @param _tokenAddr The Address of the Token *...
/** * @title ZCDistribution * * Used to distribute rewards to consumers * * (c) Philip Louw / Zero Carbon Project 2018. The MIT Licence. */
NatSpecMultiLine
getSentAmount
function getSentAmount() external view returns (uint256) { return dropAmount; }
/** * @dev Returns the Amount of tokens issued to consumers */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://ddc4a1ebf9801a8697e26b95dec80d39d4c376a538bb3bf50597ec12a4b6ac8d
{ "func_code_index": [ 1510, 1608 ] }
9
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 64, 128 ] }
10
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 242, 319 ] }
11
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 566, 643 ] }
12
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 978, 1074 ] }
13
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 1368, 1449 ] }
14
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 1665, 1762 ] }
15
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Breakbits
contract Breakbits is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They ...
//name this contract whatever you'd like
LineComment
Breakbits
function Breakbits( ) { balances[msg.sender] = 900000; // Give the creator all initial tokens (100000 for example) totalSupply = 900000; // Update total supply (100000 for example) name = "Breakbits"; // Set the name for ...
//human 0.1 standard. Just an arbitrary versioning scheme. // // CHANGE THESE VALUES FOR YOUR TOKEN // //make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token
LineComment
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 1198, 1756 ] }
16
Breakbits
Breakbits.sol
0x89f3cda50198aca4adde4d2a1a32c6d378eef380
Solidity
Breakbits
contract Breakbits is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They ...
//name this contract whatever you'd like
LineComment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manu...
/* Approves and then calls the receiving contract */
Comment
v0.4.25+commit.59dbf8f1
bzzr://bcbbe5b08c4231f1a6e361f37f8464328618282025c98de5a51db7ecc95782b9
{ "func_code_index": [ 1821, 2642 ] }
17
Crowdsale
Crowdsale.sol
0x0069e491f2ed9e562a7c9c92ba40f73d946718e0
Solidity
SafeMath
contract SafeMath { //internals function safeMul(uint a, uint b) internal returns(uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeSub(uint a, uint b) internal returns(uint) { assert(b <= a); return a - b; } f...
safeMul
function safeMul(uint a, uint b) internal returns(uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; }
//internals
LineComment
v0.4.24+commit.e67f0147
bzzr://c98d29b66a132aa590ecef7727d8f421be44503e0c062933e4b703c914875cb1
{ "func_code_index": [ 40, 192 ] }
18
Crowdsale
Crowdsale.sol
0x0069e491f2ed9e562a7c9c92ba40f73d946718e0
Solidity
Crowdsale
contract Crowdsale is owned, SafeMath { address public beneficiary; uint public fundingGoal; uint public amountRaised; //The amount being raised by the crowdsale uint public deadline; /* the end date of the crowdsale*/ uint public rate; //rate for the crowdsale uint public tokenDecimals; ...
Crowdsale
function Crowdsale( ) { beneficiary = 0xe579891b98a3f58e26c4b2edb54e22250899363c; rate = 80000; // 8.000.000 TORC/Ether tokenDecimals=8; fundingGoal = 2500000000 * (10 ** tokenDecimals); start = 1536537600; // deadline = 1539129600; // bonusEndDate =1537156800; tokenR...
/** * Constrctor function * * Setup the owner */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c98d29b66a132aa590ecef7727d8f421be44503e0c062933e4b703c914875cb1
{ "func_code_index": [ 901, 1380 ] }
19
Crowdsale
Crowdsale.sol
0x0069e491f2ed9e562a7c9c92ba40f73d946718e0
Solidity
Crowdsale
contract Crowdsale is owned, SafeMath { address public beneficiary; uint public fundingGoal; uint public amountRaised; //The amount being raised by the crowdsale uint public deadline; /* the end date of the crowdsale*/ uint public rate; //rate for the crowdsale uint public tokenDecimals; ...
function () payable { uint amount = msg.value; //amount received by the contract uint numTokens; //number of token which will be send to the investor numTokens = getNumTokens(amount); //It will be true if the soft capital was reached require(numTokens>0 && !crowdsaleClosed && now > start && now <...
/* */
Comment
v0.4.24+commit.e67f0147
bzzr://c98d29b66a132aa590ecef7727d8f421be44503e0c062933e4b703c914875cb1
{ "func_code_index": [ 1573, 2439 ] }
20
Crowdsale
Crowdsale.sol
0x0069e491f2ed9e562a7c9c92ba40f73d946718e0
Solidity
Crowdsale
contract Crowdsale is owned, SafeMath { address public beneficiary; uint public fundingGoal; uint public amountRaised; //The amount being raised by the crowdsale uint public deadline; /* the end date of the crowdsale*/ uint public rate; //rate for the crowdsale uint public tokenDecimals; ...
getNumTokens
function getNumTokens(uint _value) internal returns(uint numTokens) { require(_value>=10000000000000000 * 1 wei); //Min amount to invest: 0.01 ETH numTokens = safeMul(_value,rate)/(10 ** tokenDecimals); //Number of tokens to give is equal to the amount received by the rate if(now <= bonusEndDa...
/* It calculates the amount of tokens to send to the investor */
Comment
v0.4.24+commit.e67f0147
bzzr://c98d29b66a132aa590ecef7727d8f421be44503e0c062933e4b703c914875cb1
{ "func_code_index": [ 2521, 3183 ] }
21
Crowdsale
Crowdsale.sol
0x0069e491f2ed9e562a7c9c92ba40f73d946718e0
Solidity
Crowdsale
contract Crowdsale is owned, SafeMath { address public beneficiary; uint public fundingGoal; uint public amountRaised; //The amount being raised by the crowdsale uint public deadline; /* the end date of the crowdsale*/ uint public rate; //rate for the crowdsale uint public tokenDecimals; ...
checkGoalReached
function checkGoalReached() afterDeadline { require(msg.sender == owner); //Checks if the one who executes the function is the owner of the contract if (tokensSold >=fundingGoal){ GoalReached(beneficiary, amountRaised); } tokenReward.burn(tokenReward.balanceOf(this)); //Burns all the remain...
/** * Check if goal was reached * * Checks if the goal or time limit has been reached and ends the campaign and burn the tokens */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://c98d29b66a132aa590ecef7727d8f421be44503e0c062933e4b703c914875cb1
{ "func_code_index": [ 3522, 3980 ] }
22
TangentStake
TangentStake.sol
0x5db4b520284049d7dcb21c6317664190791bb8e5
Solidity
TangentStake
contract TangentStake is Owned { // prevents overflows using SafeMath for uint; // represents a purchase object // addr is the buying address // amount is the number of wei in the purchase // sf is the sum of (purchase amount / sum of previous purchase amounts) struct Purchase {...
TangentStake
function TangentStake(address tokenAddress) public { tokenContract = Tangent(tokenAddress); multiplier = 1000; divisor = 1; acm = 10**18; netStakes = 0; }
// constructor, sets initial rate to 1000 TAN per 1 Ether
LineComment
v0.4.20+commit.3155dd80
bzzr://fd10ee54578c0b64fc35a5085b768db7aa513868eae12cd89826e489514eb8ef
{ "func_code_index": [ 1303, 1512 ] }
23
TangentStake
TangentStake.sol
0x5db4b520284049d7dcb21c6317664190791bb8e5
Solidity
TangentStake
contract TangentStake is Owned { // prevents overflows using SafeMath for uint; // represents a purchase object // addr is the buying address // amount is the number of wei in the purchase // sf is the sum of (purchase amount / sum of previous purchase amounts) struct Purchase {...
revalue
function revalue(uint newMul, uint newDiv) public onlyOwner { require( (newMul.div(newDiv)) <= (multiplier.div(divisor)) ); Revaluation(multiplier, divisor, newMul, newDiv); multiplier = newMul; divisor = newDiv; return; }
// decreases the rate of Tangents to Ether, the contract cannot be told // to give out more Tangents per Ether, only fewer.
LineComment
v0.4.20+commit.3155dd80
bzzr://fd10ee54578c0b64fc35a5085b768db7aa513868eae12cd89826e489514eb8ef
{ "func_code_index": [ 1653, 1930 ] }
24
TangentStake
TangentStake.sol
0x5db4b520284049d7dcb21c6317664190791bb8e5
Solidity
TangentStake
contract TangentStake is Owned { // prevents overflows using SafeMath for uint; // represents a purchase object // addr is the buying address // amount is the number of wei in the purchase // sf is the sum of (purchase amount / sum of previous purchase amounts) struct Purchase {...
getEarnings
function getEarnings(uint index) public constant returns (uint earnings, uint amount) { Purchase memory cpurchase; Purchase memory lpurchase; cpurchase = purchases[index]; amount = cpurchase.amount; if (cpurchase.addr == address(0)) { return (0, amount); } ...
// returns the current amount of wei that will be given for the purchase // at purchases[index]
LineComment
v0.4.20+commit.3155dd80
bzzr://fd10ee54578c0b64fc35a5085b768db7aa513868eae12cd89826e489514eb8ef
{ "func_code_index": [ 2044, 2660 ] }
25
TangentStake
TangentStake.sol
0x5db4b520284049d7dcb21c6317664190791bb8e5
Solidity
TangentStake
contract TangentStake is Owned { // prevents overflows using SafeMath for uint; // represents a purchase object // addr is the buying address // amount is the number of wei in the purchase // sf is the sum of (purchase amount / sum of previous purchase amounts) struct Purchase {...
cashOut
function cashOut(uint index) public { require(0 <= index && index < purchases.length); require(purchases[index].addr == msg.sender); uint earnings; uint amount; uint tangles; (earnings, amount) = getEarnings(index); purchases[index].addr = address(0); require(...
// Cash out Ether and Tangent at for the purchase at index "index". // All of the Ether and Tangent associated with with that purchase will // be sent to recipient, and no future withdrawals can be made for the // purchase.
LineComment
v0.4.20+commit.3155dd80
bzzr://fd10ee54578c0b64fc35a5085b768db7aa513868eae12cd89826e489514eb8ef
{ "func_code_index": [ 2911, 3636 ] }
26
TangentStake
TangentStake.sol
0x5db4b520284049d7dcb21c6317664190791bb8e5
Solidity
TangentStake
contract TangentStake is Owned { // prevents overflows using SafeMath for uint; // represents a purchase object // addr is the buying address // amount is the number of wei in the purchase // sf is the sum of (purchase amount / sum of previous purchase amounts) struct Purchase {...
function () public payable { require(msg.value != 0); uint index = purchases.length; uint sf; uint f; if (index == 0) { sf = 0; } else { f = msg.value.mul(acm).div(netStakes); sf = purchases[index-1].sf.add(f); } netStakes ...
// The fallback function used to purchase stakes // sf is the sum of the proportions of: // (ether of current purchase / sum of ether prior to purchase) // It is used to calculate earnings upon withdrawal.
LineComment
v0.4.20+commit.3155dd80
bzzr://fd10ee54578c0b64fc35a5085b768db7aa513868eae12cd89826e489514eb8ef
{ "func_code_index": [ 3875, 4462 ] }
27
StakingInfo
contracts/common/Registry.sol
0x3929ffab35937ab32f6ea0d9849174161d9d20c7
Solidity
Registry
contract Registry is Governable { // @todo hardcode constants bytes32 private constant WETH_TOKEN = keccak256("wethToken"); bytes32 private constant DEPOSIT_MANAGER = keccak256("depositManager"); bytes32 private constant STAKE_MANAGER = keccak256("stakeManager"); bytes32 private constant VALIDATOR_S...
mapToken
function mapToken( address _rootToken, address _childToken, bool _isERC721 ) external onlyGovernance { require(_rootToken != address(0x0) && _childToken != address(0x0), "INVALID_TOKEN_ADDRESS"); rootToChildToken[_rootToken] = _childToken; childToRootToken[_childToken] = _rootToken; isERC721...
/** * @dev Map root token to child token * @param _rootToken Token address on the root chain * @param _childToken Token address on the child chain * @param _isERC721 Is the token being mapped ERC721 */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
{ "func_code_index": [ 2159, 2682 ] }
28
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
TootyrTokenSale
function TootyrTokenSale() public { symbol = "TRT"; name = "TootyrToken"; decimals = 18; bonusEnds = now + 5 weeks; endDate = now + 10 weeks; }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 544, 744 ] }
29
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // 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.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 932, 1048 ] }
30
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // 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.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 1270, 1395 ] }
31
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // 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); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 1741, 2018 ] }
32
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // 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; 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 do...
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 2529, 2737 ] }
33
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // 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); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // 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...
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 3275, 3633 ] }
34
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // 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.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 3916, 4068 ] }
35
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 4431, 4748 ] }
36
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { require(now >= startDate && now <= endDate); uint tokens; if (now <= bonusEnds) { tokens = msg.value * 13000; } else { tokens = msg.value * 10000; } balances[msg.sender] = safeAdd(balances[msg.sender], tokens); _totalSupply = safeAdd(_tot...
// ------------------------------------------------------------------------ // 10,000 TRT Tokens per 1 ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 4949, 5422 ] }
37
TootyrTokenSale
TootyrTokenSale.sol
0x7150bf55144f12cb12ecde2064ae4a06e297bf37
Solidity
TootyrTokenSale
contract TootyrTokenSale is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address =...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://7b5223d85f714a55740dc3ecdf6fac5860d249631f7aab8beebd50be3ad70ef0
{ "func_code_index": [ 5657, 5846 ] }
38
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
totalSupply
function totalSupply() constant returns (uint supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 60, 121 ] }
39
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
balanceOf
function balanceOf(address _owner) constant returns (uint balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 229, 303 ] }
40
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
transfer
function transfer(address _to, uint _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 540, 614 ] }
41
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
transferFrom
function transferFrom(address _from, address _to, uint _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 937, 1030 ] }
42
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
approve
function approve(address _spender, uint _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 1314, 1392 ] }
43
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notic...
allowance
function allowance(address _owner, address _spender) constant returns (uint remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 1600, 1694 ] }
44
SunCoinToken
SunCoinToken.sol
0x606764b8eb3db766e0b3919dde491725d4a4a6c7
Solidity
UnboundedRegularToken
contract UnboundedRegularToken is RegularToken { uint constant MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _va...
transferFrom
function transferFrom(address _from, address _to, uint _value) public returns (bool) { uint allowance = allowed[_from][msg.sender]; if (balances[_from] >= _value && allowance >= _value && balances[_to] + _value >= balances[_to] ) { balances[_to] += _value; b...
/// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited amount. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
None
bzzr://8d743c49c918628e998dfcda38d2188530dc8958a8a16e1c95a7144ceee650c0
{ "func_code_index": [ 383, 1016 ] }
45
Huhu
contracts/Huhu.sol
0x1c69a454bd92974ffaf67a8a5203dd8223d8fd37
Solidity
Huhu
contract Huhu is ERC721A, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; uint256 public cost = 0.05 ether; uint256 public maxSupply = 2022; uint256 public maxMintAmount = 8; bool public paused = false; bool public revealed = true; string public n...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://dae1c1b32ad1698ff8dffd0a373c6677a953cacb1bc698f3db4e6576117eb95e
{ "func_code_index": [ 609, 714 ] }
46
Huhu
contracts/Huhu.sol
0x1c69a454bd92974ffaf67a8a5203dd8223d8fd37
Solidity
Huhu
contract Huhu is ERC721A, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; uint256 public cost = 0.05 ether; uint256 public maxSupply = 2022; uint256 public maxMintAmount = 8; bool public paused = false; bool public revealed = true; string public n...
mint
function mint(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); require(_mintAmount <= maxMintAmount); require(supply + _mintAmount <= maxSupply); if (msg.sender != owner()) { require(msg.value >= cost * _mintAmount); } _safe...
// public
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://dae1c1b32ad1698ff8dffd0a373c6677a953cacb1bc698f3db4e6576117eb95e
{ "func_code_index": [ 730, 1214 ] }
47
Huhu
contracts/Huhu.sol
0x1c69a454bd92974ffaf67a8a5203dd8223d8fd37
Solidity
Huhu
contract Huhu is ERC721A, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; uint256 public cost = 0.05 ether; uint256 public maxSupply = 2022; uint256 public maxMintAmount = 8; bool public paused = false; bool public revealed = true; string public n...
reveal
function reveal() public onlyOwner { revealed = true; }
//only owner
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://dae1c1b32ad1698ff8dffd0a373c6677a953cacb1bc698f3db4e6576117eb95e
{ "func_code_index": [ 2090, 2158 ] }
48
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
transfer
function transfer(address _to, uint _value) public returns (bool) { bytes memory empty; return transfer(_to, _value, empty); }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 1166, 1320 ] }
49
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
transfer
function transfer(address _to, uint _value, bytes _data) public whenActivated returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); require(!freezedList[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. * @param _data Optional metadata. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 1527, 2238 ] }
50
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
balanceOf
function balanceOf(address _owner) public view returns (uint balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 2451, 2568 ] }
51
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
transferFrom
function transferFrom(address _from, address _to, uint _value) public returns (bool) { bytes memory empty; return transferFrom(_from, _to, _value, empty); }
/** * @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 uint the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 2857, 3041 ] }
52
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
transferFrom
function transferFrom(address _from, address _to, uint _value, bytes _data) public whenActivated returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(!freezedList[_from]); balances[_from] = balances[_from].sub(...
/** * @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 uint the amount of tokens to be transferred * @param _data Optional metadata. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 3370, 4131 ] }
53
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
approve
function approve(address _spender, uint _value) public returns (bool) { require(_value == 0 || allowed[msg.sender][_spender] == 0); 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.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 4783, 5055 ] }
54
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
allowance
function allowance(address _owner, address _spender) public view returns (uint) { 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 uint specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 5388, 5524 ] }
55
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
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.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 6010, 6290 ] }
56
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 6781, 7231 ] }
57
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
mint
function mint(address _to, uint _amount, bool freeze) canMint onlyMinter external returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); if (freeze) { freezedList[_to] = true; } Mint(_to, _amount); Transfer(address(0), _to, _amount); ...
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 7486, 7866 ] }
58
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
finishMinting
function finishMinting() canMint onlyMinter external returns (bool) { mintingFinished = true; MintingFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 7991, 8155 ] }
59
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
setMinter
function setMinter(address _minter) external onlyMinter { require(_minter != 0x0); minter = _minter; }
/** * Minter can pass it's role to another address */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 8233, 8363 ] }
60
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
removeFromFreezedList
function removeFromFreezedList(address user) external onlyOwner { freezedList[user] = false; }
/** * Owner can unfreeze any address */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 8423, 8536 ] }
61
Presale
contracts/token/PlayHallToken.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
PlayHallToken
contract PlayHallToken is ERC223, Contactable { using SafeMath for uint; string constant public name = "PlayHall Token"; string constant public symbol = "PHT"; uint constant public decimals = 18; bool public isActivated = false; mapping (address => uint) balances; mapping (addre...
activate
function activate() external onlyOwner returns (bool) { isActivated = true; return true; }
/** * Activation of the token allows all tokenholders to operate with the token */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 8639, 8757 ] }
62
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
function () external payable { buyTokens(msg.sender); }
// fallback function can be used to buy tokens
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 3244, 3318 ] }
63
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
buyTokens
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) { uint weiAmount = msg.value; require(beneficiary != 0x0); require(weiAmount >= weiMinimumAmount); require(validPurchase(msg.value)); // calculate token amount to be created uint tokenAmount = prici...
// low level token purchase function
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 3363, 3918 ] }
64
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
validPurchase
function validPurchase(uint weiAmount) internal constant returns (bool) { bool withinPeriod = now >= startTime && now <= endTime; bool withinCap = weiRaised.add(weiAmount) <= weiMaximumGoal; return withinPeriod && withinCap; }
// return true if the transaction can buy tokens
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 4542, 4807 ] }
65
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
hasEnded
function hasEnded() public constant returns (bool) { bool capReached = weiRaised >= weiMaximumGoal; bool afterEndTime = now > endTime; return capReached || afterEndTime; }
// return true if crowdsale event has ended
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 4859, 5077 ] }
66
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
getWeiLeft
function getWeiLeft() external constant returns (uint) { return weiMaximumGoal - weiRaised; }
// get the amount of unsold tokens allocated to this contract;
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 5148, 5260 ] }
67
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
isMinimumGoalReached
function isMinimumGoalReached() public constant returns (bool) { return weiRaised >= weiMinimumGoal; }
// return true if the crowdsale has raised enough money to be a successful.
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 5344, 5465 ] }
68
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
setPricingStrategy
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) { pricingStrategy = _pricingStrategy; return true; }
// allows to update tokens rate for owner
LineComment
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 5519, 5696 ] }
69
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
loadRefund
function loadRefund() external payable { require(msg.sender == wallet); require(msg.value > 0); require(!isMinimumGoalReached()); loadedRefund = loadedRefund.add(msg.value); RefundLoaded(msg.value); }
/** * Allow load refunds back on the contract for the refunding. * * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached.. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 5902, 6169 ] }
70
Presale
contracts/SaleBase.sol
0x0062179227c03efc81301ade144f447f2561edd5
Solidity
SaleBase
contract SaleBase is Pausable, Contactable { using SafeMath for uint; // The token being sold PlayHallToken public token; // start and end timestamps where purchases are allowed (both inclusive) uint public startTime; uint public endTime; // address where funds are collect...
refund
function refund() external { require(!isMinimumGoalReached() && loadedRefund > 0); require(!isExternalBuyer[msg.sender]); uint weiValue = boughtAmountOf[msg.sender]; require(weiValue > 0); boughtAmountOf[msg.sender] = 0; weiRefunded = weiRefunded.add(weiValue); msg.sender.tr...
/** * Buyers can claim refund. * * Note that any refunds from proxy buyers should be handled separately, * and not through this contract. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://ba3c28fc7c70f348a38a5db1f33070032de92318ad1c5d463b543499c5492020
{ "func_code_index": [ 6343, 6761 ] }
71
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
Owned
contract Owned { // ------------------------------------------------------------------------ // Current owner, and proposed new owner // ------------------------------------------------------------------------ address public owner; address public newOwner; // --------------------------...
// ---------------------------------------------------------------------------- // Owned contract // ----------------------------------------------------------------------------
LineComment
Owned
function Owned() { owner = msg.sender; }
// ------------------------------------------------------------------------ // Constructor - assign creator as the owner // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 499, 558 ] }
72
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
Owned
contract Owned { // ------------------------------------------------------------------------ // Current owner, and proposed new owner // ------------------------------------------------------------------------ address public owner; address public newOwner; // --------------------------...
// ---------------------------------------------------------------------------- // Owned contract // ----------------------------------------------------------------------------
LineComment
transferOwnership
function transferOwnership(address _newOwner) onlyOwner { newOwner = _newOwner; }
// ------------------------------------------------------------------------ // Owner can initiate transfer of contract to a new owner // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 1113, 1213 ] }
73
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
Owned
contract Owned { // ------------------------------------------------------------------------ // Current owner, and proposed new owner // ------------------------------------------------------------------------ address public owner; address public newOwner; // --------------------------...
// ---------------------------------------------------------------------------- // Owned contract // ----------------------------------------------------------------------------
LineComment
acceptOwnership
function acceptOwnership() { require(msg.sender == newOwner); OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = 0x0; }
// ------------------------------------------------------------------------ // New owner has to accept transfer of contract // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 1434, 1616 ] }
74
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
SafeMath
library SafeMath { // ------------------------------------------------------------------------ // Add a number to another number, checking for overflows // ------------------------------------------------------------------------ function add(uint a, uint b) internal returns (uint) { uint ...
// ---------------------------------------------------------------------------- // Safe maths, borrowed from OpenZeppelin // ----------------------------------------------------------------------------
LineComment
add
function add(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c >= a && c >= b); return c; }
// ------------------------------------------------------------------------ // Add a number to another number, checking for overflows // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 247, 392 ] }
75
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
SafeMath
library SafeMath { // ------------------------------------------------------------------------ // Add a number to another number, checking for overflows // ------------------------------------------------------------------------ function add(uint a, uint b) internal returns (uint) { uint ...
// ---------------------------------------------------------------------------- // Safe maths, borrowed from OpenZeppelin // ----------------------------------------------------------------------------
LineComment
sub
function sub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; }
// ------------------------------------------------------------------------ // Subtract a number from another number, checking for underflows // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 628, 742 ] }
76
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
PhillionToken
function PhillionToken() Owned() { balances[owner] = totalSupply; }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 1187, 1273 ] }
77
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; }
// ------------------------------------------------------------------------ // Get the account balance of another account with address _owner // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 1511, 1625 ] }
78
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address _to, uint _amount) returns (bool success) { if (balances[msg.sender] >= _amount // User has balance && _amount > 0 // Non-zero transfer && balances[_to] + _amount > balances[_to] // Overflow check ) { balances[msg.s...
// ------------------------------------------------------------------------ // Transfer the balance from owner's account to another account // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 1861, 2444 ] }
79
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
approve
function approve( address _spender, uint _amount ) returns (bool success) { allowed[msg.sender][_spender] = _amount; Approval(msg.sender, _spender, _amount); return true; }
// ------------------------------------------------------------------------ // Allow _spender to withdraw from your account, multiple times, up to the // _value amount. If this function is called again it overwrites the // current allowance with _value. // ---------------------------------------------------------------...
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 2804, 3036 ] }
80
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom( address _from, address _to, uint _amount ) returns (bool success) { if (balances[_from] >= _amount // From a/c has balance && allowed[_from][msg.sender] >= _amount // Transfer approved && _amount > 0 // Non-ze...
// ------------------------------------------------------------------------ // Spender of tokens transfer an amount of tokens from the token owner's // balance to another account. The owner of the tokens must already // have approve(...)-d this transfer // ---------------------------------------------------------------...
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 3396, 4182 ] }
81
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
allowance
function allowance( address _owner, address _spender ) constant returns (uint remaining) { return allowed[_owner][_spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 4465, 4634 ] }
82
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
function () { }
// ------------------------------------------------------------------------ // Don't accept ethers - no payable modifier // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 4851, 4876 ] }
83
PhillionToken
PhillionToken.sol
0xfbba9060549f565e0ee102057b47db4d2284c2ad
Solidity
PhillionToken
contract PhillionToken is ERC20Interface, Owned { using SafeMath for uint; // ------------------------------------------------------------------------ // Token parameters // ------------------------------------------------------------------------ string public constant symbol = "PHN"; st...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint amount) onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, amount); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.11+commit.68ef5810
bzzr://6ed9fd6311099635f0b1b6902cf325fe2b8cc62829be4b03809a828d911b4ea1
{ "func_code_index": [ 5109, 5304 ] }
84
Shiboki
Shiboki.sol
0x542267d7802dd7b59bee57de8908463173f5ca23
Solidity
Shiboki
contract Shiboki is ERC721Enumerable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenId; uint256 public MAX_SUPPLY = 3333; uint256 public MAX_ALLOWED = 5; uint256 public OWNER_RESERVED = 333; uint256 public price = 50000000000000000; //0.05 Ether strin...
walletOfOwner
function walletOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i = 0; i < tokenCount; i++) { tokensId[i] = tokenOfOwnerByIndex(_owner, i); } ...
//Get token Ids of all tokens owned by _owner
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://602cadda2c7da950513581ae1d5dbb3f87abec345279cc2718928ee8fc9a18e4
{ "func_code_index": [ 586, 976 ] }
85
Shiboki
Shiboki.sol
0x542267d7802dd7b59bee57de8908463173f5ca23
Solidity
Shiboki
contract Shiboki is ERC721Enumerable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenId; uint256 public MAX_SUPPLY = 3333; uint256 public MAX_ALLOWED = 5; uint256 public OWNER_RESERVED = 333; uint256 public price = 50000000000000000; //0.05 Ether strin...
pauseSale
function pauseSale() public onlyOwner { saleOpen = false; }
//Close sale
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://602cadda2c7da950513581ae1d5dbb3f87abec345279cc2718928ee8fc9a18e4
{ "func_code_index": [ 1542, 1620 ] }
86
Shiboki
Shiboki.sol
0x542267d7802dd7b59bee57de8908463173f5ca23
Solidity
Shiboki
contract Shiboki is ERC721Enumerable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenId; uint256 public MAX_SUPPLY = 3333; uint256 public MAX_ALLOWED = 5; uint256 public OWNER_RESERVED = 333; uint256 public price = 50000000000000000; //0.05 Ether strin...
unpauseSale
function unpauseSale() public onlyOwner { saleOpen = true; }
//Open sale
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://602cadda2c7da950513581ae1d5dbb3f87abec345279cc2718928ee8fc9a18e4
{ "func_code_index": [ 1645, 1724 ] }
87
Shiboki
Shiboki.sol
0x542267d7802dd7b59bee57de8908463173f5ca23
Solidity
Shiboki
contract Shiboki is ERC721Enumerable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenId; uint256 public MAX_SUPPLY = 3333; uint256 public MAX_ALLOWED = 5; uint256 public OWNER_RESERVED = 333; uint256 public price = 50000000000000000; //0.05 Ether strin...
mintNFT
function mintNFT(uint256 _count) public payable { if (msg.sender != owner()) { require((saleOpen == true), "Sale is not open please try again later"); } require( _count > 0 && _count <= MAX_ALLOWED, "You have reached the NFT minting limit per transaction" ); ...
//mint NFT
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://602cadda2c7da950513581ae1d5dbb3f87abec345279cc2718928ee8fc9a18e4
{ "func_code_index": [ 1929, 3178 ] }
88
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AbstractToken
contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ constructor () public { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * ...
/** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return accounts [_owner]; }
/** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * owner of * @return number of tokens currently belonging to the owner of given address */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 421, 534 ] }
89
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AbstractToken
contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ constructor () public { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * ...
/** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { require(_to != address(0)); if (accounts [msg.sender] < _value) return false; if (_value > 0 && msg.sender != _to) { accounts [msg.sender] = safeSub (accounts [msg.sender], _value); accounts [_to] = safeAdd (accounts [_to]...
/** * Transfer given number of tokens from message sender to given recipient. * * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 951, 1370 ] }
90
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AbstractToken
contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ constructor () public { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * ...
/** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0)); if (allowances [_from][msg.sender] < _value) return false; if (accounts [_from] < _value) return false; if (_value > 0 && _from != _to) { allowances [_from][msg.sender] = safeS...
/** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if token...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 1867, 2436 ] }
91
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AbstractToken
contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ constructor () public { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * ...
/** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */
NatSpecMultiLine
approve
function approve (address _spender, uint256 _value) public returns (bool success) { allowances [msg.sender][_spender] = _value; emit Approval (msg.sender, _spender, _value); return true;
/** * Allow given spender to transfer given number of tokens from message sender. * @param _spender address to allow the owner of to transfer tokens from message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 2764, 2974 ] }
92
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AbstractToken
contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ constructor () public { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * ...
/** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowances [_owner][_spender]; }
/** * Tell how many tokens given spender is currently allowed to transfer from * given owner. * * @param _owner address to get number of tokens allowed to be transferred * from the owner of * @param _spender address to get number of tokens allowed to be transferred * by the owner of * @ret...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 3422, 3570 ] }
93
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AMC
contract AMC is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**18); /** * Address of the owner of this smart contract. */ address private own...
/** * Anymous Coin smart contract. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256 supply) { return tokenCount; }
/** * Get total number of tokens in circulation. * * @return total number of tokens in circulation */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 932, 1025 ] }
94
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AMC
contract AMC is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**18); /** * Address of the owner of this smart contract. */ address private own...
/** * Anymous Coin smart contract. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { require(!frozenAccount[msg.sender]); f (frozen) return false; else return AbstractToken.transfer (_to, _value); }
/** * Transfer given number of tokens from message sender to given recipient. * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 1470, 1681 ] }
95
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AMC
contract AMC is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**18); /** * Address of the owner of this smart contract. */ address private own...
/** * Anymous Coin smart contract. */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { equire(!frozenAccount[_from]); if (frozen) return false; else return AbstractToken.transferFrom (_from, _to, _value); }
/** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if token...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 2077, 2318 ] }
96
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AMC
contract AMC is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**18); /** * Address of the owner of this smart contract. */ address private own...
/** * Anymous Coin smart contract. */
NatSpecMultiLine
approve
function approve (address _spender, uint256 _value) public returns (bool success) { equire(allowance (msg.sender, _spender) == 0 || _value == 0); return AbstractToken.approve (_spender, _value); }
/** * Change how many tokens given spender is allowed to transfer from message * spender. In order to prevent double spending of allowance, * To change the approve amount you first have to reduce the addresses` * allowance to zero by calling `approve(_spender, 0)` if it is not * already 0 to mitigate the rac...
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 3004, 3219 ] }
97
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AMC
contract AMC is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**18); /** * Address of the owner of this smart contract. */ address private own...
/** * Anymous Coin smart contract. */
NatSpecMultiLine
createTokens
function createTokens(uint256 _value) public returns (bool success) { require (msg.sender == owner); if (_value > 0) { if (_value > safeSub (MAX_TOKEN_COUNT, tokenCount)) return false; accounts [msg.sender] = safeAdd (accounts [msg.sender], _value); tokenCount = safeAdd (tokenCount, _valu...
/** * Create _value new tokens and give new created tokens to msg.sender. * May only be called by smart contract owner. * * @param _value number of tokens to create * @return true if tokens were created successfully, false otherwise */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 3485, 4003 ] }
98
AMC
AMC.sol
0x4da7e3336b2c89812b0f4b6a04142cf487db005c
Solidity
AMC
contract AMC is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 10000000 * (10**18); /** * Address of the owner of this smart contract. */ address private own...
/** * Anymous Coin smart contract. */
NatSpecMultiLine
setOwner
function setOwner(address _newOwner) public { require (msg.sender == owner); owner = _newOwner; }
/** * Set new owner for the smart contract. * May only be called by smart contract owner. * * @param _newOwner address of new owner of the smart contract */
NatSpecMultiLine
v0.5.3+commit.10d17f24
bzzr://41df23959bb22a0fe404ddaac29b6cc0432eca9d7662d3fdc99d91e57a2a6beb
{ "func_code_index": [ 4194, 4309 ] }
99