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
CoalitionCrew
CoalitionCrew.sol
0x529a4e15b3ce13523417f945ecd0959ff71e0a9e
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_transfer
function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); //...
/** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://cd75f2b24ba4df97a9f8e86dd1338eb11171136878dcd55a6363260d602d5e44
{ "func_code_index": [ 10155, 10738 ] }
6,507
CoalitionCrew
CoalitionCrew.sol
0x529a4e15b3ce13523417f945ecd0959ff71e0a9e
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_approve
function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); }
/** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://cd75f2b24ba4df97a9f8e86dd1338eb11171136878dcd55a6363260d602d5e44
{ "func_code_index": [ 10851, 11030 ] }
6,508
CoalitionCrew
CoalitionCrew.sol
0x529a4e15b3ce13523417f945ecd0959ff71e0a9e
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_checkOnERC721Received
function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721...
/** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param to...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://cd75f2b24ba4df97a9f8e86dd1338eb11171136878dcd55a6363260d602d5e44
{ "func_code_index": [ 11590, 12394 ] }
6,509
CoalitionCrew
CoalitionCrew.sol
0x529a4e15b3ce13523417f945ecd0959ff71e0a9e
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {}
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://cd75f2b24ba4df97a9f8e86dd1338eb11171136878dcd55a6363260d602d5e44
{ "func_code_index": [ 12961, 13092 ] }
6,510
Workwares
contracts/Workwares.sol
0x2f69dedd3f47968c504b8e853131a54662a34b98
Solidity
Workwares
contract Workwares is AbstractERC1155 { uint256 constant MAX_SUPPLY_WHITE = 323; uint256 constant MAX_SUPPLY_GOLD = 10; uint256 constant MAX_RESERVED = 5; uint256 public presalePrice = 0.1 ether; uint256 public mintPrice = 0.28 ether; uint256 public presaleActive = 0; uint256 public...
presalePurchase
function presalePurchase() external payable { require(presaleActive == 1, "Presale closed"); require(whitelist[msg.sender] == 1, "Address not on whitelist"); require(msg.value == presalePrice, "Incorrect payment"); uint256 nonce = 0; uint256 mintIndex = uint(keccak256(abi.encodePacked(block.t...
// presale mint
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://f4d2e2633e639767bd36185738906d933d649ba9241fbcde25b4b84fe6c096c3
{ "func_code_index": [ 2151, 2893 ] }
6,511
Workwares
contracts/Workwares.sol
0x2f69dedd3f47968c504b8e853131a54662a34b98
Solidity
Workwares
contract Workwares is AbstractERC1155 { uint256 constant MAX_SUPPLY_WHITE = 323; uint256 constant MAX_SUPPLY_GOLD = 10; uint256 constant MAX_RESERVED = 5; uint256 public presalePrice = 0.1 ether; uint256 public mintPrice = 0.28 ether; uint256 public presaleActive = 0; uint256 public...
purchase
function purchase() external payable { require(saleActive == 1, "Sale currently closed"); require(numMints[msg.sender] < 10 , "max tx amount exceeded"); require(numWhiteMints < MAX_SUPPLY_WHITE || numGoldMints < MAX_SUPPLY_GOLD, "Transaction would exceed maximum supply"); require(msg.value == mintPr...
// public mint
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://f4d2e2633e639767bd36185738906d933d649ba9241fbcde25b4b84fe6c096c3
{ "func_code_index": [ 2916, 4120 ] }
6,512
Workwares
contracts/Workwares.sol
0x2f69dedd3f47968c504b8e853131a54662a34b98
Solidity
Workwares
contract Workwares is AbstractERC1155 { uint256 constant MAX_SUPPLY_WHITE = 323; uint256 constant MAX_SUPPLY_GOLD = 10; uint256 constant MAX_RESERVED = 5; uint256 public presalePrice = 0.1 ether; uint256 public mintPrice = 0.28 ether; uint256 public presaleActive = 0; uint256 public...
burn
function burn( address account, uint256 id, uint256 value ) public virtual override { require(account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); }
// burn function
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://f4d2e2633e639767bd36185738906d933d649ba9241fbcde25b4b84fe6c096c3
{ "func_code_index": [ 4611, 4932 ] }
6,513
TEST365
TEST365.sol
0x4c51ff20f1fd17732344daa97207cc728cb5b28d
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; } function div(uint256 a, uint256 b) internal pur...
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.5.0+commit.1d4f565a
bzzr://319500f9d32948c6fd279da92253229331d61f406ccdd50d610bdcf45cb4f197
{ "func_code_index": [ 89, 268 ] }
6,514
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 992, 1113 ] }
6,515
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 1289, 1418 ] }
6,516
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 1512, 1794 ] }
6,517
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
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 // // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 2080, 2293 ] }
6,518
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 2466, 2829 ] }
6,519
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 3112, 3268 ] }
6,520
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
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; }
// ------------------------------------------------------------------------ // // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 3444, 3766 ] }
6,521
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 3859, 3918 ] }
6,522
BlocksizeCapital
BlocksizeCapital.sol
0xcfd2f2d1f786b2c2f3e14379ae57fb52979196b3
Solidity
BlocksizeCapital
contract BlocksizeCapital 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 // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
None
bzzr://f29d8cf52b473c24cb157329a4bbc329897dc3e0f24dd379ddc36d58ec74505b
{ "func_code_index": [ 4013, 4202 ] }
6,523
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 89, 476 ] }
6,524
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
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.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 560, 840 ] }
6,525
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
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.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 954, 1070 ] }
6,526
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
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.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1134, 1264 ] }
6,527
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 815, 932 ] }
6,528
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_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.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1097, 1205 ] }
6,529
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1343, 1521 ] }
6,530
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
add
function add(Role storage role, address addr) internal { role.bearer[addr] = true; }
/** * @dev give an address access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 141, 244 ] }
6,531
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
remove
function remove(Role storage role, address addr) internal { role.bearer[addr] = false; }
/** * @dev remove an address' access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 311, 418 ] }
6,532
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
check
function check(Role storage role, address addr) view internal { require(has(role, addr)); }
/** * @dev check if an address has this role * // reverts */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 497, 612 ] }
6,533
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
has
function has(Role storage role, address addr) view internal returns (bool) { return role.bearer[addr]; }
/** * @dev check if an address has this role * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 693, 826 ] }
6,534
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token...
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 199, 287 ] }
6,535
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token...
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 445, 777 ] }
6,536
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token...
balanceOf
function balanceOf(address _owner) public view returns (uint256) { 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.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 983, 1087 ] }
6,537
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
MultiSigTransfer
contract MultiSigTransfer is Ownable { string public name = "MultiSigTransfer"; string public symbol = "MST"; bool public complete = false; bool public denied = false; uint32 public quantity; address public targetAddress; address public requesterAddress; /** * @dev The multisig transfer con...
approveTransfer
function approveTransfer() public onlyOwner { require(denied == false, "cannot approve a denied transfer"); require(complete == false, "cannot approve a complete transfer"); complete = true; }
/** * @dev Mark the transfer as approved / complete */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 893, 1106 ] }
6,538
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
MultiSigTransfer
contract MultiSigTransfer is Ownable { string public name = "MultiSigTransfer"; string public symbol = "MST"; bool public complete = false; bool public denied = false; uint32 public quantity; address public targetAddress; address public requesterAddress; /** * @dev The multisig transfer con...
denyTransfer
function denyTransfer() public onlyOwner { require(denied == false, "cannot deny a transfer that is already denied"); denied = true; }
/** * @dev Mark the transfer as denied */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1160, 1310 ] }
6,539
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
MultiSigTransfer
contract MultiSigTransfer is Ownable { string public name = "MultiSigTransfer"; string public symbol = "MST"; bool public complete = false; bool public denied = false; uint32 public quantity; address public targetAddress; address public requesterAddress; /** * @dev The multisig transfer con...
isPending
function isPending() public view returns (bool) { return !complete; }
/** * @dev Determine if the transfer is pending */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1373, 1453 ] }
6,540
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param _...
checkRole
function checkRole(address _operator, string _role) view public { roles[_role].check(_operator); }
/** * @dev reverts if addr does not have role * @param _operator address * @param _role the name of the role * // reverts */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 371, 493 ] }
6,541
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param _...
hasRole
function hasRole(address _operator, string _role) view public returns (bool) { return roles[_role].has(_operator); }
/** * @dev determine if addr has role * @param _operator address * @param _role the name of the role * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 638, 783 ] }
6,542
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param _...
addRole
function addRole(address _operator, string _role) internal { roles[_role].add(_operator); emit RoleAdded(_operator, _role); }
/** * @dev add a role to an address * @param _operator address * @param _role the name of the role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 907, 1056 ] }
6,543
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param _...
removeRole
function removeRole(address _operator, string _role) internal { roles[_role].remove(_operator); emit RoleRemoved(_operator, _role); }
/** * @dev remove a role from an address * @param _operator address * @param _role the name of the role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1185, 1342 ] }
6,544
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
isOwner
function isOwner(address _address) public view returns (bool) { return owner == _address; }
/** * @dev Determine if the address is the owner of the contract * @param _address The address to determine of ownership */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 772, 874 ] }
6,545
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
getTransfers
function getTransfers() public view returns (address[]) { return transfers; }
/** * @dev Returns the list of MultiSig transfers */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 939, 1027 ] }
6,546
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
isAdmin
function isAdmin(address _address) public view returns (bool) { return hasRole(_address, ADMIN_ROLE); }
/** * @dev The KVT ERC20 token uses adminstrators to handle transfering to the crowdsale, vesting and pre-purchasers */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1159, 1273 ] }
6,547
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
setAdmin
function setAdmin(address _newAdmin) public onlyOwner { return addRole(_newAdmin, ADMIN_ROLE); }
/** * @dev Set an administrator as the owner, using Open Zepplin RBAC implementation */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1373, 1480 ] }
6,548
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
removeAdmin
function removeAdmin(address _oldAdmin) public onlyOwner { return removeRole(_oldAdmin, ADMIN_ROLE); }
/** * @dev Remove an administrator as the owner, using Open Zepplin RBAC implementation */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1583, 1696 ] }
6,549
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
setTransferable
function setTransferable(bool _toState) public onlyRole(ADMIN_ROLE) { require(isTransferable != _toState, "to init a transfer toggle, the toState must change"); toggleTransferablePending = true; transferToggleRequester = msg.sender; }
/** * @dev As an administrator, request the token is made transferable * @param _toState The transfer state being requested */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 1838, 2093 ] }
6,550
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
approveTransferableToggle
function approveTransferableToggle() public onlyRole(ADMIN_ROLE) { require(toggleTransferablePending == true, "transfer toggle not in pending state"); require(transferToggleRequester != msg.sender, "the requester cannot approve the transfer toggle"); isTransferable = !isTransferable; toggleTransferablePendi...
/** * @dev As an administrator who did not make the request, approve the transferable state change */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 2207, 2597 ] }
6,551
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
_transfer
function _transfer(address _to, address _from, uint256 _value) private returns (bool) { require(_value <= balances[_from], "the balance in the from address is smaller than the tx value"); // SafeMath.sub will throw if there is not enough balance. balances[_from] = balances[_from].sub(_value); balances[_to...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 2755, 3179 ] }
6,552
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0), "cannot transfer to the zero address"); /* We allow holders to return their Tokens to the contract owner at any point */ if (_to != owner && msg.sender != crowdsale) { require(isTransferable == true, "kvt i...
/** * @dev Public transfer token function. This wrapper ensures the token is transferable * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 3377, 3962 ] }
6,553
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
adminTransfer
function adminTransfer(address _to, uint32 _quantity) public onlyRole(ADMIN_ROLE) { address newTransfer = new MultiSigTransfer(_quantity, _to, msg.sender); transfers.push(newTransfer); }
/** * @dev Request an administrative transfer. This does not move tokens * @param _to The address to transfer to. * @param _quantity The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 4146, 4348 ] }
6,554
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
approveTransfer
function approveTransfer(address _approvedTransfer) public onlyRole(ADMIN_ROLE) returns (bool) { MultiSigTransfer transferToApprove = MultiSigTransfer(_approvedTransfer); uint32 transferQuantity = transferToApprove.quantity(); address deliveryAddress = transferToApprove.targetAddress(); address requesterA...
/** * @dev Approve an administrative transfer. This moves the tokens if the requester * is an admin, but not the same admin as the one who made the request * @param _approvedTransfer The contract address of the multisignature transfer. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 4605, 5192 ] }
6,555
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
denyTransfer
function denyTransfer(address _approvedTransfer) public onlyRole(ADMIN_ROLE) returns (bool) { MultiSigTransfer transferToApprove = MultiSigTransfer(_approvedTransfer); transferToApprove.denyTransfer(); }
/** * @dev Deny an administrative transfer. This ensures it cannot be approved. * @param _approvedTransfer The contract address of the multisignature transfer. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 5370, 5589 ] }
6,556
KinesisVelocityToken
KinesisVelocityToken.sol
0x3a859b9ea4998d344547283c7ce8ebc4abb77656
Solidity
KinesisVelocityToken
contract KinesisVelocityToken is BasicToken, Ownable, RBAC { string public name = "KinesisVelocityToken"; string public symbol = "KVT"; uint8 public decimals = 0; string public constant ADMIN_ROLE = "ADMIN"; address[] public transfers; uint public constant INITIAL_SUPPLY = 300000; uint public t...
setCrowdsaleAddress
function setCrowdsaleAddress(address _crowdsaleAddress) public onlyRole(ADMIN_ROLE) { crowdsale = _crowdsaleAddress; }
/** * @dev Any admin can set the current crowdsale address, to allows transfers * from the crowdsale to the purchaser */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://e627866e043cf4da56f8c79cec5a79ae3e0ab147c534df8d16f19fe0b4d13b9c
{ "func_code_index": [ 5769, 5898 ] }
6,557
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
encode
function encode(uint112 x) internal pure returns (uq112x112 memory) { return uq112x112(uint224(x) << RESOLUTION); }
// encode a uint112 as a UQ112x112
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 450, 584 ] }
6,558
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
encode144
function encode144(uint144 x) internal pure returns (uq144x112 memory) { return uq144x112(uint256(x) << RESOLUTION); }
// encodes a uint144 as a UQ144x112
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 628, 765 ] }
6,559
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
div
function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) { require(x != 0, 'FixedPoint: DIV_BY_ZERO'); return uq112x112(self._x / uint224(x)); }
// divide a UQ112x112 by a uint112, returning a UQ112x112
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 831, 1034 ] }
6,560
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
mul
function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) { uint z; require(y == 0 || (z = uint(self._x) * y) / y == uint(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW"); return uq144x112(z); }
// multiply a UQ112x112 by a uint, returning a UQ144x112 // reverts on overflow
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 1127, 1385 ] }
6,561
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
fraction
function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) { require(denominator > 0, "FixedPoint: DIV_BY_ZERO"); return uq112x112((uint224(numerator) << RESOLUTION) / denominator); }
// returns a UQ112x112 which represents the ratio of the numerator to the denominator // equivalent to encode(numerator).div(denominator)
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 1536, 1787 ] }
6,562
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
decode
function decode(uq112x112 memory self) internal pure returns (uint112) { return uint112(self._x >> RESOLUTION); }
// decode a UQ112x112 into a uint112 by truncating after the radix point
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 1868, 2000 ] }
6,563
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
decode144
function decode144(uq144x112 memory self) internal pure returns (uint144) { return uint144(self._x >> RESOLUTION); }
// decode a UQ144x112 into a uint144 by truncating after the radix point
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 2081, 2216 ] }
6,564
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
reciprocal
function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) { require(self._x != 0, 'FixedPoint: ZERO_RECIPROCAL'); return uq112x112(uint224(Q224 / self._x)); }
// take the reciprocal of a UQ112x112
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 2262, 2474 ] }
6,565
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
FixedPoint
library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private consta...
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
LineComment
sqrt
function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) { return uq112x112(uint224(Babylonian.sqrt(uint256(self._x)) << 56)); }
// square root of a UQ112x112
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 2512, 2680 ] }
6,566
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
sortTokens
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES'); (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), 'UniswapV2Library: ZERO_...
// returns sorted token addresses, used to handle return values from pairs sorted in this order
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 161, 515 ] }
6,567
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
pairFor
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address(uint(keccak256(abi.encodePacked( hex'ff', factory, keccak256(abi.encodePacked(token0, to...
// calculates the CREATE2 address for a pair without making any external calls
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 602, 1085 ] }
6,568
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
getReserves
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) { (address token0,) = sortTokens(tokenA, tokenB); (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves(); (reserveA, reserveB) = tokenA == t...
// fetches and sorts the reserves for a pair
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 1138, 1534 ] }
6,569
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
quote
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) { require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT'); require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); amountB = amountA.mul(reserveB) / reserveA; }
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 1642, 1968 ] }
6,570
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
getAmountOut
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) { require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); uint amountInWithFee = amountIn.mul(99...
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 2085, 2607 ] }
6,571
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
getAmountIn
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) { require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY'); uint numerator = reserveIn.mul(amount...
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 2723, 3200 ] }
6,572
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
getAmountsOut
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'UniswapV2Library: INVALID_PATH'); amounts = new uint[](path.length); amounts[0] = amountIn; for (uint i; i < path.length - 1; i++) { (uint...
// performs chained getAmountOut calculations on any number of pairs
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 3277, 3793 ] }
6,573
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2Library
library UniswapV2Library { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2L...
getAmountsIn
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'UniswapV2Library: INVALID_PATH'); amounts = new uint[](path.length); amounts[amounts.length - 1] = amountOut; for (uint i = path.length - 1; i > 0;...
// performs chained getAmountIn calculations on any number of pairs
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 3869, 4406 ] }
6,574
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2OracleLibrary
library UniswapV2OracleLibrary { using FixedPoint for *; // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1] function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2 ** 32); } // prod...
// library with helper methods for oracles that are concerned with computing average prices
LineComment
currentBlockTimestamp
function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2 ** 32); }
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 178, 306 ] }
6,575
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
UniswapV2OracleLibrary
library UniswapV2OracleLibrary { using FixedPoint for *; // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1] function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2 ** 32); } // prod...
// library with helper methods for oracles that are concerned with computing average prices
LineComment
currentCumulativePrices
function currentCumulativePrices( address pair ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) { blockTimestamp = currentBlockTimestamp(); price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast(); price1Cumulative = IUniswapV2Pair(pair).price1Cumu...
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 407, 1470 ] }
6,576
ExampleOracleSimple
ExampleOracleSimple.sol
0x77c5d6f22b8a6765e33da91e349b9844b79854f3
Solidity
ExampleOracleSimple
contract ExampleOracleSimple { using FixedPoint for *; uint public constant PERIOD = 10 minutes; IUniswapV2Pair immutable pair; address public immutable token0; address public immutable token1; uint public price0CumulativeLast; uint public price1CumulativeLast; uint32...
// fixed window oracle that recomputes the average price for the entire period once every period // note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period
LineComment
consult
function consult(address token, uint amountIn) external view returns (uint amountOut) { if (token == token0) { amountOut = price0Average.mul(amountIn).decode144(); } else { require(token == token1, 'ExampleOracleSimple: INVALID_TOKEN'); amountOut = price1Average.mul(amountIn).decode...
// note this will always return 0 before update has been called successfully for the first time.
LineComment
v0.6.6+commit.6c089d02
GNU GPLv3
ipfs://fef9da001588a96274ede1aa60922ee3ff5fe22773b20f60c61f7df9ffeb9265
{ "func_code_index": [ 2324, 2693 ] }
6,577
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
LimitedTransferToken
contract LimitedTransferToken is ERC20 { /** * @dev Checks whether it can transfer or otherwise throws. */ modifier canTransfer(address _sender, uint _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } /** * @dev Checks modifier and allows transfer if tokens ...
/** * @title LimitedTransferToken * @dev LimitedTransferToken defines the generic interface and the implementation to limit token * transferability for different events. It is intended to be used as a base class for other token * contracts. * LimitedTransferToken has been designed to allow for different li...
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) canTransfer(msg.sender, _value) { return super.transfer(_to, _value); }
/** * @dev Checks modifier and allows transfer if tokens are not locked. * @param _to The address that will recieve the tokens. * @param _value The amount of tokens to be transferred. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 463, 588 ] }
6,578
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
LimitedTransferToken
contract LimitedTransferToken is ERC20 { /** * @dev Checks whether it can transfer or otherwise throws. */ modifier canTransfer(address _sender, uint _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } /** * @dev Checks modifier and allows transfer if tokens ...
/** * @title LimitedTransferToken * @dev LimitedTransferToken defines the generic interface and the implementation to limit token * transferability for different events. It is intended to be used as a base class for other token * contracts. * LimitedTransferToken has been designed to allow for different li...
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint _value) canTransfer(_from, _value) { return super.transferFrom(_from, _to, _value); }
/** * @dev Checks modifier and allows transfer if tokens are not locked. * @param _from The address that will send the tokens. * @param _to The address that will recieve the tokens. * @param _value The amount of tokens to be transferred. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 850, 1000 ] }
6,579
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
LimitedTransferToken
contract LimitedTransferToken is ERC20 { /** * @dev Checks whether it can transfer or otherwise throws. */ modifier canTransfer(address _sender, uint _value) { if (_value > transferableTokens(_sender, uint64(now))) throw; _; } /** * @dev Checks modifier and allows transfer if tokens ...
/** * @title LimitedTransferToken * @dev LimitedTransferToken defines the generic interface and the implementation to limit token * transferability for different events. It is intended to be used as a base class for other token * contracts. * LimitedTransferToken has been designed to allow for different li...
NatSpecMultiLine
transferableTokens
function transferableTokens(address holder, uint64 time) constant public returns (uint256) { return balanceOf(holder); }
/** * @dev Default transferable tokens function returns all tokens for a holder (no limit). * @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the * specific logic for limiting token transferability for a holder over time. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 1287, 1418 ] }
6,580
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { throw; } _; } /** * @dev transfer toke...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 446, 673 ] }
6,581
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { throw; } _; } /** * @dev transfer toke...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 877, 983 ] }
6,582
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * ...
/** * @title Standard ERC20 token * * @dev Implemantation of the basic standart 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, uint _value) onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; balances[_to] = balances[_to].ad...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amout of tokens to be transfered */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 384, 875 ] }
6,583
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * ...
/** * @title Standard ERC20 token * * @dev Implemantation of the basic standart 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, uint _value) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issueco...
/** * @dev Aprove the passed address to spend the specified amount of tokens on beahlf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 1110, 1624 ] }
6,584
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * ...
/** * @title Standard ERC20 token * * @dev Implemantation of the basic standart 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) constant returns (uint remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint specifing the amount of tokens still avaible for the spender. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 1942, 2077 ] }
6,585
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
grantVestedTokens
function grantVestedTokens( address _to, uint256 _value, uint64 _start, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke ) public { // Check for date inconsistencies that may cause unexpected behavior if (_cliff < _start || _vesting < _cliff) { throw; } if ...
/** * @dev Grant tokens to a specified address * @param _to address The address which the tokens will be granted to. * @param _value uint256 The amount of tokens to be granted. * @param _start uint64 Time of the beginning of the grant. * @param _cliff uint64 Time of the cliff period. * @param _vesting uint6...
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 954, 1949 ] }
6,586
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
revokeTokenGrant
function revokeTokenGrant(address _holder, uint _grantId) public { TokenGrant grant = grants[_holder][_grantId]; if (!grant.revokable) { // Check if grant was revokable throw; } if (grant.granter != msg.sender) { // Only granter can revoke it throw; } address receiver = grant.burnsOnRe...
/** * @dev Revoke the grant of tokens of a specifed address. * @param _holder The address which will have its tokens revoked. * @param _grantId The id of the token grant. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 2145, 2937 ] }
6,587
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
transferableTokens
function transferableTokens(address holder, uint64 time) constant public returns (uint256) { uint256 grantIndex = tokenGrantsCount(holder); if (grantIndex == 0) return balanceOf(holder); // shortcut for holder without grants // Iterate through all the grants the holder has, and add all non-vested tokens ...
/** * @dev Calculate the total amount of transferable tokens of a holder at a given time * @param holder address The address of the holder * @param time uint64 The specific time. * @return An uint representing a holder's total amount of transferable tokens. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 3226, 4157 ] }
6,588
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
tokenGrantsCount
function tokenGrantsCount(address _holder) constant returns (uint index) { return grants[_holder].length; }
/** * @dev Check the amount of grants that an address has. * @param _holder The holder of the grants. * @return A uint representing the total amount of grants. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 4342, 4460 ] }
6,589
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
calculateVestedTokens
function calculateVestedTokens( uint256 tokens, uint256 time, uint256 start, uint256 cliff, uint256 vesting) constant returns (uint256) { // Shortcuts for before cliff and after vesting cases. if (time < cliff) return 0; if (time >= vesting) return tokens; // Interpolate all vest...
/** * @dev Calculate amount of vested tokens at a specifc time. * @param tokens uint256 The amount of tokens grantted. * @param time uint64 The time to be checked * @param start uint64 A time representing the begining of the grant * @param cliff uint64 The cliff period. * @param vesting uint64 The vesting p...
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 5387, 6344 ] }
6,590
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
tokenGrant
function tokenGrant(address _holder, uint _grantId) constant returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) { TokenGrant grant = grants[_holder][_grantId]; granter = grant.granter; value = grant.value; start = grant....
/** * @dev Get all information about a specifc grant. * @param _holder The address which will have its tokens revoked. * @param _grantId The id of the token grant. * @return Returns all the values that represent a TokenGrant(address, value, start, cliff, * revokability, burnsOnRevoke, and vesting) plus the ve...
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 6719, 7243 ] }
6,591
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
vestedTokens
function vestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) { return calculateVestedTokens( grant.value, uint256(time), uint256(grant.start), uint256(grant.cliff), uint256(grant.vesting) ); }
/** * @dev Get the amount of vested tokens at a specific time. * @param grant TokenGrant The grant to be checked. * @param time The time to be checked * @return An uint representing the amount of vested tokens of a specific grant at a specific time. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 7522, 7792 ] }
6,592
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
nonVestedTokens
function nonVestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) { return grant.value.sub(vestedTokens(grant, time)); }
/** * @dev Calculate the amount of non vested tokens at a specific time. * @param grant TokenGrant The grant to be checked. * @param time uint64 The time to be checked * @return An uint representing the amount of non vested tokens of a specifc grant on the * passed time frame. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 8104, 8260 ] }
6,593
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
VestedToken
contract VestedToken is StandardToken, LimitedTransferToken { uint256 MAX_GRANTS_PER_ADDRESS = 20; struct TokenGrant { address granter; // 20 bytes uint256 value; // 32 bytes uint64 cliff; uint64 vesting; uint64 start; // 3 * 8 = 24 bytes bool revokable; boo...
/** * @title Vested token * @dev Tokens that can be vested for a group of addresses. */
NatSpecMultiLine
lastTokenIsTransferableDate
function lastTokenIsTransferableDate(address holder) constant public returns (uint64 date) { date = uint64(now); uint256 grantIndex = grants[holder].length; for (uint256 i = 0; i < grantIndex; i++) { date = SafeMath.max64(grants[holder][i].vesting, date); } }
/** * @dev Calculate the date when the holder can trasfer all its tokens * @param holder address The address of the holder * @return An uint representing the date of the last transferable tokens. */
NatSpecMultiLine
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 8481, 8773 ] }
6,594
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
CDTToken
contract CDTToken is VestedToken { using SafeMath for uint; //FIELDS //CONSTANTS uint public constant decimals = 18; // 18 decimal places, the same as ETH. string public constant name = "CoinDash Token"; string public constant symbol = "CDT"; //ASSIGNED IN INITIALIZATION address public creator; /...
CDTToken
function CDTToken(uint supply) { totalSupply = supply; creator = msg.sender; balances[msg.sender] = supply; MAX_GRANTS_PER_ADDRESS = 2; }
// Initialization contract assigns address of crowdfund contract and end time.
LineComment
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 575, 734 ] }
6,595
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
CDTToken
contract CDTToken is VestedToken { using SafeMath for uint; //FIELDS //CONSTANTS uint public constant decimals = 18; // 18 decimal places, the same as ETH. string public constant name = "CoinDash Token"; string public constant symbol = "CDT"; //ASSIGNED IN INITIALIZATION address public creator; /...
function() { throw; }
// Fallback function throws when called.
LineComment
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 780, 808 ] }
6,596
CDTToken
CDTToken.sol
0x8fd36e8ec5b55ac2412e593175b41fd1566e81b3
Solidity
CDTToken
contract CDTToken is VestedToken { using SafeMath for uint; //FIELDS //CONSTANTS uint public constant decimals = 18; // 18 decimal places, the same as ETH. string public constant name = "CoinDash Token"; string public constant symbol = "CDT"; //ASSIGNED IN INITIALIZATION address public creator; /...
drain
function drain() only_owner { if (!creator.send(this.balance)) throw; }
//failsafe drain
LineComment
v0.4.8+commit.60cc1668
bzzr://cda948482ca91b403feb47c3d04aa6b66f868fe80ea247b0dbf908d9ad4e61f3
{ "func_code_index": [ 977, 1060 ] }
6,597
BelottoCoin
BelottoCoin.sol
0x4c1ed91da2edd5f86c0f4adb8562466f202f0a0a
Solidity
BelottoCoin
contract BelottoCoin is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------...
BelottoCoin
function BelottoCoin(address _owner) public{ symbol = "BEL"; name = "Belotto"; decimals = 18; owner = _owner; _totalSupply = totalSupply(); balances[owner] = _totalSupply; emit Transfer(address(0),owner,_totalSupply); }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
bzzr://ab867b62e3b6617cca98eada6291654947614b1abf7b62bcbb0ac94842af649b
{ "func_code_index": [ 478, 770 ] }
6,598
BelottoCoin
BelottoCoin.sol
0x4c1ed91da2edd5f86c0f4adb8562466f202f0a0a
Solidity
BelottoCoin
contract BelottoCoin is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------...
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
bzzr://ab867b62e3b6617cca98eada6291654947614b1abf7b62bcbb0ac94842af649b
{ "func_code_index": [ 1209, 1338 ] }
6,599
BelottoCoin
BelottoCoin.sol
0x4c1ed91da2edd5f86c0f4adb8562466f202f0a0a
Solidity
BelottoCoin
contract BelottoCoin is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------...
transfer
function transfer(address to, uint tokens) public returns (bool success) { // prevent transfer to 0x0, use burn instead require(to != 0x0); require(balances[msg.sender] >= tokens ); require(balances[to] + tokens >= balances[to]); balances[msg.sender] = balances[msg.sender].sub(tokens); bal...
// ------------------------------------------------------------------------ // 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://ab867b62e3b6617cca98eada6291654947614b1abf7b62bcbb0ac94842af649b
{ "func_code_index": [ 1682, 2143 ] }
6,600
BelottoCoin
BelottoCoin.sol
0x4c1ed91da2edd5f86c0f4adb8562466f202f0a0a
Solidity
BelottoCoin
contract BelottoCoin is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------...
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 // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
bzzr://ab867b62e3b6617cca98eada6291654947614b1abf7b62bcbb0ac94842af649b
{ "func_code_index": [ 2427, 2637 ] }
6,601
BelottoCoin
BelottoCoin.sol
0x4c1ed91da2edd5f86c0f4adb8562466f202f0a0a
Solidity
BelottoCoin
contract BelottoCoin is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------...
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success){ require(tokens <= allowed[from][msg.sender]); //check allowance require(balances[from] >= tokens); balances[from] = balances[from].sub(tokens); balances[to] = balances[to].add(tokens); allowed[from][msg....
// ------------------------------------------------------------------------ // 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://ab867b62e3b6617cca98eada6291654947614b1abf7b62bcbb0ac94842af649b
{ "func_code_index": [ 3174, 3636 ] }
6,602
BelottoCoin
BelottoCoin.sol
0x4c1ed91da2edd5f86c0f4adb8562466f202f0a0a
Solidity
BelottoCoin
contract BelottoCoin is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------...
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.23+commit.124ca40d
bzzr://ab867b62e3b6617cca98eada6291654947614b1abf7b62bcbb0ac94842af649b
{ "func_code_index": [ 3915, 4071 ] }
6,603
DiemlibreFaucet
DiemlibreFaucet.sol
0x46c8f3059145e1b69acf2f926a5bcc1d1ad82129
Solidity
DiemlibreFaucet
contract DiemlibreFaucet { struct State { bool isInit; address self; address owner; address holder; uint256 faucetAmount; // In smallest unit WEI uint256 maxPageBuffer; } IERC20 DLB; address[] savedAddresses; mapping(address => b...
diemlibreFaucet
function diemlibreFaucet(address _faucetAddress) external returns(bool) { require(sentAddresses[_faucetAddress] == false, "Error 501: Address has already been fauced with DLB."); require(currentState.isInit, "Error 500: Contract Not Initialized or Contract Turned Off."); uint256 tokenAllowance ...
/** * Method: faucet * Des: To send a speicific amout of $DLB to addresses and you pay for gas. **/
NatSpecMultiLine
v0.8.4+commit.c7e474f2
None
ipfs://cbb3ffbcc2acb76972873f4b1685f9ec2d863fb3c3973062e5e7ec769bce748b
{ "func_code_index": [ 1461, 2297 ] }
6,604
DiemlibreFaucet
DiemlibreFaucet.sol
0x46c8f3059145e1b69acf2f926a5bcc1d1ad82129
Solidity
DiemlibreFaucet
contract DiemlibreFaucet { struct State { bool isInit; address self; address owner; address holder; uint256 faucetAmount; // In smallest unit WEI uint256 maxPageBuffer; } IERC20 DLB; address[] savedAddresses; mapping(address => b...
init
function init(address _selfAddress) external returns(bool) { require(msg.sender == currentState.owner, "Error 401: Unauthorized Access."); currentState.self = _selfAddress; currentState.isInit = true; return true; }
// Owner Functions
LineComment
v0.8.4+commit.c7e474f2
None
ipfs://cbb3ffbcc2acb76972873f4b1685f9ec2d863fb3c3973062e5e7ec769bce748b
{ "func_code_index": [ 2344, 2615 ] }
6,605
BBT
BBT.sol
0x4b2cc07661c7b69a4707277647727aa8898ffbde
Solidity
BBT
contract BBT 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; modifier onlyWhitelist() { ...
// ---------------------------------------------------------------------------- // 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://f60236597425deaccb71e97847747c533f20c62a038dc91faefc0b2722993aca
{ "func_code_index": [ 2053, 2172 ] }
6,606