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
KinesisVelocityToken
KinesisVelocityToken.sol
0x9f376b37c27209b8ed048710345d8e490555ab47
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495
{ "func_code_index": [ 4510, 4832 ] }
3,900
KinesisVelocityToken
KinesisVelocityToken.sol
0x9f376b37c27209b8ed048710345d8e490555ab47
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495
{ "func_code_index": [ 5024, 5083 ] }
3,901
KinesisVelocityToken
KinesisVelocityToken.sol
0x9f376b37c27209b8ed048710345d8e490555ab47
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ----------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://b274496aceedddc6062389ba132d71dbf83990ace7a529bcbe96fe0a75c6a495
{ "func_code_index": [ 5316, 5505 ] }
3,902
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
Solidity
Ownable
contract Ownable { address public owner; //address public txsender; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 672, 848 ] }
3,903
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
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) {} /// @notice s...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 57, 120 ] }
3,904
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
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) {} /// @notice s...
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
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 225, 301 ] }
3,905
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
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) {} /// @notice s...
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
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 533, 609 ] }
3,906
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
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) {} /// @notice s...
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
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 926, 1021 ] }
3,907
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
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) {} /// @notice s...
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
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 1300, 1380 ] }
3,908
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
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) {} /// @notice s...
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
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 1584, 1680 ] }
3,909
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
Solidity
StockMintToken
contract StockMintToken is StandardToken, Ownable { event StockMint(address indexed to, uint256 amount); event Burn(address indexed burner, uint256 value); event MintFinished(); using SafeMath for uint256; bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } ...
/** * @title Mintable token * @dev ERC20 mintable token creation */
NatSpecMultiLine
stockmint
function stockmint( address _to, uint256 _amount ) public hasMintPermission canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit StockMint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; }
/** * @dev Function STORAGE stock-in and 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.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 651, 973 ] }
3,910
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
Solidity
StockMintToken
contract StockMintToken is StandardToken, Ownable { event StockMint(address indexed to, uint256 amount); event Burn(address indexed burner, uint256 value); event MintFinished(); using SafeMath for uint256; bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } ...
/** * @title Mintable token * @dev ERC20 mintable token creation */
NatSpecMultiLine
finishMinting
function finishMinting() public onlyOwner canMint returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 1085, 1227 ] }
3,911
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
Solidity
StockMintToken
contract StockMintToken is StandardToken, Ownable { event StockMint(address indexed to, uint256 amount); event Burn(address indexed burner, uint256 value); event MintFinished(); using SafeMath for uint256; bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } ...
/** * @title Mintable token * @dev ERC20 mintable token creation */
NatSpecMultiLine
burn
function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); }
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 1347, 1659 ] }
3,912
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
Solidity
RepaymentToken
contract RepaymentToken is StandardToken, Ownable { event Repayment(address indexed _debit_contract, uint256 amount); using SafeMath for uint256; modifier hasRepaymentPermission() { require(msg.sender == note_contract); _; } /** * @dev Function to repayment tokens * @param _amount The amou...
/** * @title Repayment token * @dev ERC20 with Repay Tokens */
NatSpecMultiLine
repayment
function repayment( uint256 _amount ) public hasRepaymentPermission returns (bool) { totalSupply = totalSupply.add(_amount); balances[owner] = balances[owner].add(_amount); emit Repayment(msg.sender, _amount); emit Paidto(owner, _amount); return true; }
/** * @dev Function to repayment tokens * @param _amount The amount of tokens to repay. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 421, 718 ] }
3,913
AuroraT0Test
AuroraT0Test.sol
0x0e08496eecf5bbbb9360c0e1dc5744f976f6f384
Solidity
AuroraT0Test
contract AuroraT0Test is CreditableToken, RepaymentToken, StockMintToken { constructor() public { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } function connectContract(address _note_address ) public onlyOwner { note_contract = _note_address; } ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually ...
/* Approves and then calls the receiving contract */
Comment
v0.4.25+commit.59dbf8f1
None
bzzr://495b67667baaae1caa73ae39c61ec564c0ae9264ab91253fba65df055ea46159
{ "func_code_index": [ 3750, 4550 ] }
3,914
BUZZYfinance
BUZZYfinance.sol
0xf7da74a1edfce761f2e3bbc2b52efcdab0d7971e
Solidity
Context
contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } }
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.16+commit.9c3226ce
MIT
bzzr://405559357398b8a03c3b38342d56d0da93a1e1fbb6c726ef08a6490ead079a28
{ "func_code_index": [ 109, 212 ] }
3,915
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
Pausable
contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function cal...
// ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ----------------------------------------------------------------------------
LineComment
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 510, 606 ] }
3,916
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
Pausable
contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function cal...
// ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ----------------------------------------------------------------------------
LineComment
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 690, 788 ] }
3,917
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
StandardToken
contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balanc...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint256) { return _totalSupply.sub(balances[address(0)]); }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 836, 962 ] }
3,918
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
StandardToken
contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balanc...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint256 balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 1184, 1316 ] }
3,919
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
StandardToken
contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balanc...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint256 tokens) public returns (bool success) { //allow trading in tokens only if sale fhined or by token creator (for bounty program) if (msg.sender != owner) require(!paused); require(to != address(0)); require(tokens > 0); require(tokens <= balances[msg...
// ------------------------------------------------------------------------ // 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.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 1662, 2214 ] }
3,920
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
StandardToken
contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balanc...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint256 tokens) public returns (bool success) { require(spender != address(0)); allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 2724, 2981 ] }
3,921
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
StandardToken
contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balanc...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint256 tokens) public returns (bool success) { //allow trading in token only if sale fhined if (msg.sender != owner) require(!paused); require(tokens > 0); require(to != address(0)); require(from != address(0)); require(tokens <= ba...
// ------------------------------------------------------------------------ // 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 transfe...
LineComment
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 3524, 4199 ] }
3,922
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
StandardToken
contract StandardToken is ERC20Interface, Pausable { using SafeMath for uint256; string public constant symbol = "AST-NET"; string public constant name = "AllStocks Token"; uint256 public constant decimals = 18; uint256 public _totalSupply = 0; mapping(address => uint256) public balanc...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and an // initial fixed supply // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint256 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.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 4482, 4641 ] }
3,923
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
MintableToken
contract MintableToken is StandardToken { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receiv...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { require(_to != address(0)); require(_amount > 0); _totalSupply = _totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true...
/** * @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.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 472, 815 ] }
3,924
AllstocksToken
AllstocksToken.sol
0x2d95a6174bc8e6c9550afcdd5a71c584b0f3d08d
Solidity
MintableToken
contract MintableToken is StandardToken { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receiv...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://01189c41c9b0d76cb400854546d50881e184f73d6ffdec2502656e76dd8a6761
{ "func_code_index": [ 932, 1079 ] }
3,925
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 941, 1060 ] }
3,926
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
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://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 1282, 1407 ] }
3,927
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 1753, 2025 ] }
3,928
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.4.24+commit.e67f0147
bzzr://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 2537, 2750 ] }
3,929
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } ...
// ------------------------------------------------------------------------ // 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 transfe...
LineComment
v0.4.24+commit.e67f0147
bzzr://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 3289, 3637 ] }
3,930
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
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://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 3920, 4072 ] }
3,931
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 4435, 4757 ] }
3,932
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 4949, 5008 ] }
3,933
TokentradeToken
TokentradeToken.sol
0xcc983356bd1b451bbf45386414407aea7a746c25
Solidity
TokentradeToken
contract TokentradeToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
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://483ec5ec8c5bbe7f094c9b8a9d854c21e5fe53b57ad6bc4ec25406cbe40831b2
{ "func_code_index": [ 5241, 5430 ] }
3,934
SunriseHaiku
contracts/SunriseHaiku.sol
0x3db6e21086632a01a38a73aa3e6dce7817c4f039
Solidity
SunriseHaiku
contract SunriseHaiku is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; // Reserved Haiku minting variables uint256 public reservedCurrentSupply = 53; // Pre Mint variables uint256 public preMintCost = 0.0575 ether; ...
pausePreMint
function pausePreMint() public onlyOwner { preMintPaused = true; }
// // Pre-mint helper functions //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://4f9fcf8b187d49ee214080ea7dc5284491113c7a2429cf3294ceafaf23b0fb53
{ "func_code_index": [ 3632, 3709 ] }
3,935
SunriseHaiku
contracts/SunriseHaiku.sol
0x3db6e21086632a01a38a73aa3e6dce7817c4f039
Solidity
SunriseHaiku
contract SunriseHaiku is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; // Reserved Haiku minting variables uint256 public reservedCurrentSupply = 53; // Pre Mint variables uint256 public preMintCost = 0.0575 ether; ...
pauseMint
function pauseMint() public onlyOwner { paused = true; }
// // Mint helper functions //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://4f9fcf8b187d49ee214080ea7dc5284491113c7a2429cf3294ceafaf23b0fb53
{ "func_code_index": [ 4395, 4462 ] }
3,936
SunriseHaiku
contracts/SunriseHaiku.sol
0x3db6e21086632a01a38a73aa3e6dce7817c4f039
Solidity
SunriseHaiku
contract SunriseHaiku is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; // Reserved Haiku minting variables uint256 public reservedCurrentSupply = 53; // Pre Mint variables uint256 public preMintCost = 0.0575 ether; ...
setBaseURI
function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; }
// // Owner setter functions //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://4f9fcf8b187d49ee214080ea7dc5284491113c7a2429cf3294ceafaf23b0fb53
{ "func_code_index": [ 4585, 4686 ] }
3,937
SunriseHaiku
contracts/SunriseHaiku.sol
0x3db6e21086632a01a38a73aa3e6dce7817c4f039
Solidity
SunriseHaiku
contract SunriseHaiku is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; // Reserved Haiku minting variables uint256 public reservedCurrentSupply = 53; // Pre Mint variables uint256 public preMintCost = 0.0575 ether; ...
withdraw
function withdraw() public payable onlyOwner { require(payable(payment_splitter).send(address(this).balance)); }
// // Withdraw functions //
LineComment
v0.8.6+commit.11564f7e
MIT
ipfs://4f9fcf8b187d49ee214080ea7dc5284491113c7a2429cf3294ceafaf23b0fb53
{ "func_code_index": [ 4858, 4981 ] }
3,938
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 95, 308 ] }
3,939
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 398, 691 ] }
3,940
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 812, 940 ] }
3,941
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 1010, 1162 ] }
3,942
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 211, 307 ] }
3,943
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_va...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 475, 903 ] }
3,944
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 1119, 1239 ] }
3,945
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 410, 898 ] }
3,946
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; 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.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 1541, 1747 ] }
3,947
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 2078, 2217 ] }
3,948
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); 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.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 2694, 2974 ] }
3,949
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 3456, 3906 ] }
3,950
DragonCoin
DragonCoin.sol
0xc5807256e2e2fe85ca94c3617c4bc5ff2bd9cfb6
Solidity
DragonCoin
contract DragonCoin is StandardToken, Usable { using SafeMath for uint256; event Mint(address indexed to, uint256 value); event Burn(address indexed burner, uint256 value); string public name = "DragonSeriesToken"; string public symbol = "DST"; uint public decimals = 18; ...
setUseAddr
function setUseAddr(address addr) external onlyCOO{ useAddr = UseInterface(addr); }
// Useable
LineComment
v0.4.23+commit.124ca40d
bzzr://25d64928a9e84a37b1a36928a032255f2e84bdb7f10120a82bf30e4f28ae2185
{ "func_code_index": [ 2258, 2360 ] }
3,951
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
DOO
function DOO() public { owner = msg.sender; balances[owner] = _totalSupply; }
/// @dev Constructor
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 984, 1098 ] }
3,952
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
totalSupply
function totalSupply() public constant returns (uint256) { return _totalSupply; }
/// @dev Gets totalSupply /// @return Total supply
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 1162, 1289 ] }
3,953
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
balanceOf
function balanceOf(address _addr) public constant returns (uint256) { return balances[_addr]; }
/// @dev Gets account's balance /// @param _addr Address of the account /// @return Account balance
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 1409, 1550 ] }
3,954
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
isApprovedInvestor
function isApprovedInvestor(address _addr) public constant returns (bool) { return approvedInvestorList[_addr]; }
/// @dev check address is approved investor /// @param _addr address
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 1632, 1791 ] }
3,955
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
getDeposit
function getDeposit(address _addr) public constant returns(uint256){ return deposit[_addr];
/// @dev get ETH deposit /// @param _addr address get deposit /// @return amount deposit of an buyer
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 1910, 2046 ] }
3,956
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
transfer
function transfer(address _to, uint256 _amount) public returns (bool) { // if sender's balance has enough unit and amount >= 0, // and the sum is not overflow, // then DOO transfer if ( (balances[msg.sender] >= _amount) && (_amount >= 0) && (balances[_to] + _amou...
/// @dev Transfers the balance from msg.sender to an account /// @param _to Recipient address /// @param _amount Transfered amount in unit /// @return Transfer status
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 2238, 2843 ] }
3,957
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
transferFrom
function transferFrom( address _from, address _to, uint256 _amount ) public returns (bool success) { if (balances[_from] >= _amount && _amount > 0 && allowed[_from][msg.sender] >= _amount) { balances[_from] -= _amount; allowed[_from][msg.sender] -= _amount; balances[_...
// Send _value amount of tokens from address _from to address _to // The transferFrom method is used for a withdraw workflow, allowing contracts to send // tokens on your behalf, for example to "deposit" to a contract address and/or to charge // fees in sub-currencies; the command should fail unless the _from account h...
LineComment
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 3324, 3837 ] }
3,958
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
approve
function approve(address _spender, uint256 _amount) public returns (bool success) { require((_amount == 0) || (allowed[msg.sender][_spender] == 0)); 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.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 4025, 4336 ] }
3,959
DOO
DOO.sol
0xd204125771ad37e7d1b31d20dde79ea4d683cbaa
Solidity
DOO
contract DOO is ERC20Interface { uint256 public constant decimals = 8; string public constant symbol = "DOO"; string public constant name = "docoin"; uint256 public _totalSupply = 10 ** 19; // Owner of this contract address public owner; // Balances DOO for each account ...
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
// get allowance
LineComment
v0.4.24+commit.e67f0147
bzzr://535e7b33bde96885fd69526814e8a398f7a528f44203b6b34c88ba640bf2906e
{ "func_code_index": [ 4361, 4541 ] }
3,960
OnChainMonsters
/contracts/OnChainMonsters.sol
0xaa5d0f2e6d008117b16674b0f00b6fca46e3efc4
Solidity
OnChainMonsters
contract OnChainMonsters is ERC721Enumerable { using OnChainMonstersLib for uint8; struct Trait { string name; string data; } mapping(uint256 => Trait[]) public allTraits; mapping(bytes8 => bool) traitsHashToIsMinted; bytes8[10000] internal _tokenIdToTraitsHash; ...
rarityIndexForNumber
function rarityIndexForNumber(uint256 number, uint8 traitType) internal view returns (bytes1) { uint16 lowerBound = 0; for (uint8 i = 0; i < rarities[traitType].length; i++) { uint16 upperBound = lowerBound + rarities[traitType][i]; if (number >= lowerBound && number < upperBound) ...
// ######## MINTING
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 2357, 2799 ] }
3,961
OnChainMonsters
/contracts/OnChainMonsters.sol
0xaa5d0f2e6d008117b16674b0f00b6fca46e3efc4
Solidity
OnChainMonsters
contract OnChainMonsters is ERC721Enumerable { using OnChainMonstersLib for uint8; struct Trait { string name; string data; } mapping(uint256 => Trait[]) public allTraits; mapping(bytes8 => bool) traitsHashToIsMinted; bytes8[10000] internal _tokenIdToTraitsHash; ...
charToNumber
function charToNumber(uint8 char) internal view returns (uint8) { for(uint8 i = 0; i < CHARS.length; i++) { if(char == CHARS[i]) return i; } revert(); }
// ######## READING
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 5108, 5327 ] }
3,962
OnChainMonsters
/contracts/OnChainMonsters.sol
0xaa5d0f2e6d008117b16674b0f00b6fca46e3efc4
Solidity
OnChainMonsters
contract OnChainMonsters is ERC721Enumerable { using OnChainMonstersLib for uint8; struct Trait { string name; string data; } mapping(uint256 => Trait[]) public allTraits; mapping(bytes8 => bool) traitsHashToIsMinted; bytes8[10000] internal _tokenIdToTraitsHash; ...
clearTraits
function clearTraits() public onlyOwner { for (uint256 i = 0; i < 8; i++) { delete allTraits[i]; } }
// ######## Owner
LineComment
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 11519, 11660 ] }
3,963
LCTMI
lctmi.sol
0xd7002383c41238bdcc0279b70aa84170ff969924
Solidity
LCTMI
contract LCTMI is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) pr...
setTradingStatus
function setTradingStatus(bool _status, uint256 _deadBlocks) public onlyOwner { tradingOpen = _status; if (tradingOpen && launchedAt == 0) { launchedAt = block.number; deadBlocks = _deadBlocks; } }
// enable trading
LineComment
v0.8.12+commit.f00d7308
{ "func_code_index": [ 9830, 10113 ] }
3,964
LCTMI
lctmi.sol
0xd7002383c41238bdcc0279b70aa84170ff969924
Solidity
LCTMI
contract LCTMI is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) pr...
setHotelCaliforniaMode
function setHotelCaliforniaMode(bool _status) public onlyOwner { hotelCaliforniaMode = _status; }
// lobby management
LineComment
v0.8.12+commit.f00d7308
{ "func_code_index": [ 10141, 10257 ] }
3,965
LCTMI
lctmi.sol
0xd7002383c41238bdcc0279b70aa84170ff969924
Solidity
LCTMI
contract LCTMI is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) pr...
_tokenTransfer
function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _is...
// this method is responsible for taking all fees, if takeFee is true
LineComment
v0.8.12+commit.f00d7308
{ "func_code_index": [ 19659, 20502 ] }
3,966
yums
yums.sol
0x9ab6c2d19a2f89624c05f8b06b3c691871579734
Solidity
yums
contract yums { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (addre...
yums
function yums() { initialSupply = 1000000000000000000000000000; name ="Yums"; decimals = 18; symbol = "YUMS"; balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens totalSupply = initialSupply; // Update total supply ...
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.18+commit.9cf6e910
bzzr://d86555c29e04e4457eef01c712d44d09248b8588df7f8e3df8208593e1136f04
{ "func_code_index": [ 523, 914 ] }
3,967
yums
yums.sol
0x9ab6c2d19a2f89624c05f8b06b3c691871579734
Solidity
yums
contract yums { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (addre...
transfer
function transfer(address _to, uint256 _value) { if (balanceOf[msg.sender] < _value) revert(); // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) revert(); // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender b...
/* Send coins */
Comment
v0.4.18+commit.9cf6e910
bzzr://d86555c29e04e4457eef01c712d44d09248b8588df7f8e3df8208593e1136f04
{ "func_code_index": [ 939, 1379 ] }
3,968
yums
yums.sol
0x9ab6c2d19a2f89624c05f8b06b3c691871579734
Solidity
yums
contract yums { /* Public variables of the token */ string public standard = 'Token 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public initialSupply; uint256 public totalSupply; /* This creates an array with all balances */ mapping (addre...
function () { revert(); // Prevents accidental sending of ether }
/* This unnamed function is called whenever someone tries to send ether to it */
Comment
v0.4.18+commit.9cf6e910
bzzr://d86555c29e04e4457eef01c712d44d09248b8588df7f8e3df8208593e1136f04
{ "func_code_index": [ 1468, 1556 ] }
3,969
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 903, 991 ] }
3,970
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1105, 1197 ] }
3,971
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1830, 1918 ] }
3,972
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1978, 2083 ] }
3,973
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2141, 2265 ] }
3,974
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2473, 2653 ] }
3,975
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2711, 2867 ] }
3,976
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3009, 3183 ] }
3,977
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3652, 3978 ] }
3,978
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4382, 4605 ] }
3,979
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 5103, 5377 ] }
3,980
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 5862, 6406 ] }
3,981
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 6682, 7065 ] }
3,982
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 7392, 7815 ] }
3,983
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 8250, 8601 ] }
3,984
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 8928, 9023 ] }
3,985
MGToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xedc518f5fba01d4a4e5d51a1555a718bec74d683
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 9621, 9718 ] }
3,986
ULUDevRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x2bd4afb991dc4f0cb4e4bd0055bdbeb01339fa98
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://84fcbde012910af69258c1010084b068c84486b47563d1b75bdc0661039afefe
{ "func_code_index": [ 94, 154 ] }
3,987
ULUDevRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x2bd4afb991dc4f0cb4e4bd0055bdbeb01339fa98
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://84fcbde012910af69258c1010084b068c84486b47563d1b75bdc0661039afefe
{ "func_code_index": [ 237, 310 ] }
3,988
ULUDevRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x2bd4afb991dc4f0cb4e4bd0055bdbeb01339fa98
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://84fcbde012910af69258c1010084b068c84486b47563d1b75bdc0661039afefe
{ "func_code_index": [ 534, 616 ] }
3,989
ULUDevRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x2bd4afb991dc4f0cb4e4bd0055bdbeb01339fa98
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://84fcbde012910af69258c1010084b068c84486b47563d1b75bdc0661039afefe
{ "func_code_index": [ 1000, 1088 ] }
3,990
ULUDevRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x2bd4afb991dc4f0cb4e4bd0055bdbeb01339fa98
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://84fcbde012910af69258c1010084b068c84486b47563d1b75bdc0661039afefe
{ "func_code_index": [ 1752, 1831 ] }
3,991
ULUDevRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x2bd4afb991dc4f0cb4e4bd0055bdbeb01339fa98
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://84fcbde012910af69258c1010084b068c84486b47563d1b75bdc0661039afefe
{ "func_code_index": [ 2144, 2246 ] }
3,992
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 95, 302 ] }
3,993
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 392, 692 ] }
3,994
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 812, 940 ] }
3,995
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 1010, 1156 ] }
3,996
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // How many token units a buyer gets per wei uint256 public rate; // Amount of wei raised uint256 public weiRaised...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
Crowdsale
function Crowdsale(uint256 _rate, address _wallet, ERC20 _token) public { require(_rate > 0); require(_wallet != address(0)); require(_token != address(0)); rate = _rate; wallet = _wallet; token = _token; }
/** * @param _rate Number of token units a buyer gets per wei * @param _wallet Address where collected funds will be forwarded to * @param _token Address of the token being sold */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 897, 1169 ] }
3,997
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // How many token units a buyer gets per wei uint256 public rate; // Amount of wei raised uint256 public weiRaised...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
function () external payable { buyTokens(msg.sender); }
/** * @dev fallback function ***DO NOT OVERRIDE*** */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 1382, 1456 ] }
3,998
HexanCoinCrowdsale
HexanCoinCrowdsale.sol
0x585d501245bf86c92aa940310bc401a9f5af38a1
Solidity
Crowdsale
contract Crowdsale { using SafeMath for uint256; // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // How many token units a buyer gets per wei uint256 public rate; // Amount of wei raised uint256 public weiRaised...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
buyTokens
function buyTokens(address _beneficiary) public payable { uint256 weiAmount = msg.value; _preValidatePurchase(_beneficiary, weiAmount); // calculate token amount to be created uint256 tokens = 0; // update state weiRaised = weiRaised.add(weiAmount); _processPurchase(_beneficia...
/** * @dev low level token purchase ***DO NOT OVERRIDE*** * @param _beneficiary Address performing the token purchase */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c515f47b85b01f2ce748781c7accac860d93b75097d265d2d96f807dfc9bc942
{ "func_code_index": [ 1603, 2241 ] }
3,999