Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
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
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
44