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
Fider
contracts/Fider.sol
0x715079d8285d91baab59055b47c17de4c5a378ac
Solidity
Fider
contract Fider is ERC20Detailed, ERC20Burnable, ERC20Capped, ERC20Pausable, AdminRole, SpenderRole, RecipientRole { using SafeERC20 for IERC20; address private root; modifier onlyRoot() { require(msg.sender == root, "This operation can only be performed by root account"); _; } ...
reclaimEther
function reclaimEther() external onlyRoot { root.transfer(address(this).balance); }
/** * @dev Transfer all Ether held by the contract to the root. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://0263f906d97e70bd1cb272121de9b39a9911143a89b3fba8e94bdad599b0af36
{ "func_code_index": [ 11875, 11977 ] }
4,007
Fider
contracts/Fider.sol
0x715079d8285d91baab59055b47c17de4c5a378ac
Solidity
Fider
contract Fider is ERC20Detailed, ERC20Burnable, ERC20Capped, ERC20Pausable, AdminRole, SpenderRole, RecipientRole { using SafeERC20 for IERC20; address private root; modifier onlyRoot() { require(msg.sender == root, "This operation can only be performed by root account"); _; } ...
reclaimERC20Token
function reclaimERC20Token(IERC20 _token) external onlyRoot { uint256 balance = _token.balanceOf(this); _token.safeTransfer(root, balance); }
/** * @dev Reclaim all IERC20 compatible tokens * @param _token IERC20 The address of the token contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://0263f906d97e70bd1cb272121de9b39a9911143a89b3fba8e94bdad599b0af36
{ "func_code_index": [ 12108, 12277 ] }
4,008
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. //...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring '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; ...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 96, 534 ] }
4,009
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. //...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 652, 951 ] }
4,010
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. //...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1072, 1227 ] }
4,011
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. //...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1298, 1453 ] }
4,012
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. //...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1596, 1725 ] }
4,013
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() intern...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
owner
function owner() public view returns(address) { return _owner; }
/** * @return the address of the owner. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 481, 564 ] }
4,014
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() intern...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
isOwner
function isOwner() public view returns(bool) { return msg.sender == _owner; }
/** * @return true if `msg.sender` is the owner of the contract. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 815, 911 ] }
4,015
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() intern...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _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://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1192, 1337 ] }
4,016
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() intern...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) 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://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1509, 1623 ] }
4,017
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() intern...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) 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://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1768, 1960 ] }
4,018
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
function() external payable { }
/// Default function
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1242, 1285 ] }
4,019
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
beginGame
function beginGame() public payable { address player = msg.sender; uint bet = msg.value; require(player != address(0)); require(gamesInProgress[player].state == GameState.None || gamesInProgress[player].state == GameState.Finished); require(gameRunning); require(bet >= minBet && bet <= g...
// begins a game
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 1388, 2395 ] }
4,020
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
finishGame
function finishGame(BetDirection direction) public { address player = msg.sender; require(player != address(0)); require(gamesInProgress[player].state != GameState.None && gamesInProgress[player].state != GameState.Finished); if (!random.generateRandomNumber(player, NUM_DICE_SIDES)) { r...
// finishes a game that is in progress
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 2442, 2998 ] }
4,021
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
getGameState
function getGameState(address player) public view returns (GameState, uint, BetDirection, uint, uint8, uint8, uint) { return ( gamesInProgress[player].state, gamesInProgress[player].id, gamesInProgress[player].direction, gamesInProgress[player].bet, gamesInProg...
// returns current game state
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 3036, 3525 ] }
4,022
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
getMinBet
function getMinBet() public view returns (uint) { return minBet; }
// Returns the minimum bet
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 3560, 3645 ] }
4,023
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
getMaxBet
function getMaxBet() public view returns (uint) { return SafeMath.div(SafeMath.div(SafeMath.mul(this.balance - balanceInPlay, maxBetThresholdPct), 100), 12); }
// Returns the maximum bet
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 3680, 3858 ] }
4,024
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
calculateWinnings
function calculateWinnings(uint bet, uint percent) public pure returns (uint) { return SafeMath.div(SafeMath.mul(bet, percent), 100); }
// calculates winnings for the given bet and percent
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 3919, 4073 ] }
4,025
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
getLowWinPercent
function getLowWinPercent(uint number) public pure returns (uint) { require(number >= 2 && number <= NUM_DICE_SIDES); if (number == 2) { return 1200; } else if (number == 3) { return 500; } else if (number == 4) { return 300; } else if (number == 5) { return ...
// Returns the win percent when going low on the given number
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 4143, 5010 ] }
4,026
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
getHighWinPercent
function getHighWinPercent(uint number) public pure returns (uint) { require(number >= 1 && number < NUM_DICE_SIDES); if (number == 1) { return 100; } else if (number == 2) { return 110; } else if (number == 3) { return 120; } else if (number == 4) { return 1...
// Returns the win percent when going high on the given number
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 5081, 5947 ] }
4,027
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
incomingRandomNumberError
function incomingRandomNumberError(address player) public { require(msg.sender == address(random)); Game storage game = gamesInProgress[player]; if (game.bet > 0) { game.player.transfer(game.bet); } delete gamesInProgress[player]; GameError(player, game.id); }
/// ======================= /// RANDOM NUMBER CALLBACKS
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 6020, 6361 ] }
4,028
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
transferBalance
function transferBalance(address to, uint amount) public onlyOwner { to.transfer(amount); }
// fail safe for balance transfer
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 8619, 8729 ] }
4,029
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
cleanupAbandonedGame
function cleanupAbandonedGame(address player) public onlyOwner { require(player != address(0)); Game storage game = gamesInProgress[player]; require(game.player != address(0)); game.player.transfer(game.bet); delete gamesInProgress[game.player]; }
// cleans up a player abandoned game, but only if it's // greater than 24 hours old.
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 8827, 9133 ] }
4,030
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
setMinBet
function setMinBet(uint bet) public onlyOwner { minBet = bet; }
// set the minimum bet
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 9301, 9383 ] }
4,031
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
setGameRunning
function setGameRunning(bool v) public onlyOwner { gameRunning = v; }
// set whether or not the game is running
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 9433, 9521 ] }
4,032
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
setMaxBetThresholdPct
function setMaxBetThresholdPct(uint v) public onlyOwner { maxBetThresholdPct = v; }
// set the max bet threshold percent
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 9566, 9668 ] }
4,033
EtherHiLo
EtherHiLo.sol
0xa4a777d2a44b43f7eb814b67cb8f1e7c9b21aa1f
Solidity
EtherHiLo
contract EtherHiLo is Ownable, EtherHiLoRandomNumberRequester { uint8 constant NUM_DICE_SIDES = 13; uint public minBet; uint public maxBetThresholdPct; bool public gameRunning; uint public balanceInPlay; EtherHiLoRandomNumberGenerator private random; mapping(address => Game) pri...
/// @title EtherHiLo /// @dev the contract than handles the EtherHiLo app
NatSpecSingleLine
destroyAndSend
function destroyAndSend(address _recipient) public onlyOwner { selfdestruct(_recipient); }
// Transfers the current balance to the recepient and terminates the contract.
LineComment
v0.4.24+commit.e67f0147
bzzr://d7dd15eab0599182f4209804ee6564396b6e731d99c3911dcf2a8f64c8e46065
{ "func_code_index": [ 9755, 9864 ] }
4,034
UniSwap_ETH_CHAIZap
browser/UniSwap_ETH_CHAIZapV3.sol
0xd17cda470bd0237fae82ef254c84d06d0e4cc02f
Solidity
UniSwap_ETH_CHAIZap
contract UniSwap_ETH_CHAIZap is Ownable, ReentrancyGuard { using SafeMath for uint; // events event ERC20TokenHoldingsOnConversionDaiChai(uint); event ERC20TokenHoldingsOnConversionEthDai(uint); event LiquidityTokens(uint); // state variables uint public balance = addres...
withdrawERC20Token
function withdrawERC20Token (address _TokenContractAddress) public onlyOwner { IERC20 ERC20TokenAddress = IERC20(_TokenContractAddress); uint StuckERC20Holdings = ERC20TokenAddress.balanceOf(address(this)); ERC20TokenAddress.transfer(_owner, StuckERC20Holdings); }
// incase of half-way error
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://5ca8c35f7c5c292742ccc40363dcab8ab150c57ad3d136af1bcfffe0d665cc9e
{ "func_code_index": [ 4220, 4521 ] }
4,035
UniSwap_ETH_CHAIZap
browser/UniSwap_ETH_CHAIZapV3.sol
0xd17cda470bd0237fae82ef254c84d06d0e4cc02f
Solidity
UniSwap_ETH_CHAIZap
contract UniSwap_ETH_CHAIZap is Ownable, ReentrancyGuard { using SafeMath for uint; // events event ERC20TokenHoldingsOnConversionDaiChai(uint); event ERC20TokenHoldingsOnConversionEthDai(uint); event LiquidityTokens(uint); // state variables uint public balance = addres...
depositETH
function depositETH() public payable onlyOwner { balance += msg.value; }
// fx in relation to ETH held by the contract sent by the owner // - this function lets you deposit ETH into this wallet
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://5ca8c35f7c5c292742ccc40363dcab8ab150c57ad3d136af1bcfffe0d665cc9e
{ "func_code_index": [ 4883, 4975 ] }
4,036
UniSwap_ETH_CHAIZap
browser/UniSwap_ETH_CHAIZapV3.sol
0xd17cda470bd0237fae82ef254c84d06d0e4cc02f
Solidity
UniSwap_ETH_CHAIZap
contract UniSwap_ETH_CHAIZap is Ownable, ReentrancyGuard { using SafeMath for uint; // events event ERC20TokenHoldingsOnConversionDaiChai(uint); event ERC20TokenHoldingsOnConversionEthDai(uint); event LiquidityTokens(uint); // state variables uint public balance = addres...
function() external payable { if (msg.sender == _owner) { depositETH(); } else { LetsInvest(address(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee), msg.sender, 3); } }
// - fallback function let you / anyone send ETH to this wallet without the need to call any function
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://5ca8c35f7c5c292742ccc40363dcab8ab150c57ad3d136af1bcfffe0d665cc9e
{ "func_code_index": [ 5089, 5318 ] }
4,037
UniSwap_ETH_CHAIZap
browser/UniSwap_ETH_CHAIZapV3.sol
0xd17cda470bd0237fae82ef254c84d06d0e4cc02f
Solidity
UniSwap_ETH_CHAIZap
contract UniSwap_ETH_CHAIZap is Ownable, ReentrancyGuard { using SafeMath for uint; // events event ERC20TokenHoldingsOnConversionDaiChai(uint); event ERC20TokenHoldingsOnConversionEthDai(uint); event LiquidityTokens(uint); // state variables uint public balance = addres...
withdraw
function withdraw() public onlyOwner { _owner.transfer(address(this).balance); }
// - to withdraw any ETH balance sitting in the contract
LineComment
v0.5.13+commit.5b0b510c
GNU GPLv2
bzzr://5ca8c35f7c5c292742ccc40363dcab8ab150c57ad3d136af1bcfffe0d665cc9e
{ "func_code_index": [ 5395, 5494 ] }
4,038
SCHTSub
SCHTSub.sol
0x705417e415b41a1ec1b0c363679145ac4c0f24d4
Solidity
Ownable
contract Ownable { address public ctOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == ctOwner); _; } /** * @dev The Ownab...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { ctOwner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender account. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
bzzr://acb735468f87355d1e4cab85b0c08d95cd431fe096f9449c4f6e80af3ca9aaec
{ "func_code_index": [ 408, 470 ] }
4,039
SCHTSub
SCHTSub.sol
0x705417e415b41a1ec1b0c363679145ac4c0f24d4
Solidity
Ownable
contract Ownable { address public ctOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == ctOwner); _; } /** * @dev The Ownab...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(ctOwner, newOwner); ctOwner = 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.21+commit.dfe3193c
bzzr://acb735468f87355d1e4cab85b0c08d95cd431fe096f9449c4f6e80af3ca9aaec
{ "func_code_index": [ 634, 819 ] }
4,040
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
fromInt
function fromInt(int256 x) internal pure returns (bytes16) { unchecked { if (x == 0) return bytes16(0); else { // We rely on overflow behavior here uint256 result = uint256(x > 0 ? x : -x); uint256 msb = mostSignificantBit(result); if (msb < 112) resu...
/** * Convert signed 256-bit integer number into quadruple precision number. * * @param x signed 256-bit integer number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 816, 1530 ] }
4,041
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
toInt
function toInt(bytes16 x) internal pure returns (int256) { unchecked { uint256 exponent = (uint128(x) >> 112) & 0x7FFF; require(exponent <= 16638); // Overflow if (exponent < 16383) return 0; // Underflow uint256 result = (uint256(uint128(x)) & 0xFFFFFFFFFFFFFFFFFFFFFFF...
/** * Convert quadruple precision number into signed 256-bit integer number * rounding towards zero. Revert on overflow. * * @param x quadruple precision number * @return signed 256-bit integer number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 1771, 2902 ] }
4,042
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
fromUInt
function fromUInt(uint256 x) internal pure returns (bytes16) { unchecked { if (x == 0) return bytes16(0); else { uint256 result = x; uint256 msb = mostSignificantBit(result); if (msb < 112) result <<= 112 - msb; else if (msb > 112) result >>= msb - 11...
/** * Convert unsigned 256-bit integer number into quadruple precision number. * * @param x unsigned 256-bit integer number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 3097, 3665 ] }
4,043
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
toUInt
function toUInt(bytes16 x) internal pure returns (uint256) { unchecked { uint256 exponent = (uint128(x) >> 112) & 0x7FFF; if (exponent < 16383) return 0; // Underflow require(uint128(x) < 0x80000000000000000000000000000000); // Negative require(exponent <= 16638); // Overflow ...
/** * Convert quadruple precision number into unsigned 256-bit integer number * rounding towards zero. Revert on underflow. Note, that negative floating * point numbers in range (-1.0 .. 0.0) may be converted to unsigned integer * without error, because they are rounded to zero. * * @param x quadruple precision...
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 4078, 4744 ] }
4,044
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
from128x128
function from128x128(int256 x) internal pure returns (bytes16) { unchecked { if (x == 0) return bytes16(0); else { // We rely on overflow behavior here uint256 result = uint256(x > 0 ? x : -x); uint256 msb = mostSignificantBit(result); if (msb < 112) ...
/** * Convert signed 128.128 bit fixed point number into quadruple precision * number. * * @param x signed 128.128 bit fixed point number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 4958, 5676 ] }
4,045
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
to128x128
function to128x128(bytes16 x) internal pure returns (int256) { unchecked { uint256 exponent = (uint128(x) >> 112) & 0x7FFF; require(exponent <= 16510); // Overflow if (exponent < 16255) return 0; // Underflow uint256 result = (uint256(uint128(x)) & 0xFFFFFFFFFFFFFFFFFFF...
/** * Convert quadruple precision number into signed 128.128 bit fixed point * number. Revert on overflow. * * @param x quadruple precision number * @return signed 128.128 bit fixed point number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 5911, 7046 ] }
4,046
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
from64x64
function from64x64(int128 x) internal pure returns (bytes16) { unchecked { if (x == 0) return bytes16(0); else { // We rely on overflow behavior here uint256 result = uint128(x > 0 ? x : -x); uint256 msb = mostSignificantBit(result); if (msb < 112) re...
/** * Convert signed 64.64 bit fixed point number into quadruple precision * number. * * @param x signed 64.64 bit fixed point number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 7256, 7972 ] }
4,047
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
to64x64
function to64x64(bytes16 x) internal pure returns (int128) { unchecked { uint256 exponent = (uint128(x) >> 112) & 0x7FFF; require(exponent <= 16446); // Overflow if (exponent < 16319) return 0; // Underflow uint256 result = (uint256(uint128(x)) & 0xFFFFFFFFFFFFFFFFFFFFF...
/** * Convert quadruple precision number into signed 64.64 bit fixed point * number. Revert on overflow. * * @param x quadruple precision number * @return signed 64.64 bit fixed point number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 8203, 9164 ] }
4,048
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
fromOctuple
function fromOctuple(bytes32 x) internal pure returns (bytes16) { unchecked { bool negative = x & 0x8000000000000000000000000000000000000000000000000000000000000000 > 0; uint256 exponent = (uint256(x) >> 236) & 0x7FFFF; uint256 significand = uint256(x) & ...
/** * Convert octuple precision number into quadruple precision number. * * @param x octuple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 9345, 10734 ] }
4,049
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
toOctuple
function toOctuple(bytes16 x) internal pure returns (bytes32) { unchecked { uint256 exponent = (uint128(x) >> 112) & 0x7FFF; uint256 result = uint128(x) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF; if (exponent == 0x7FFF) exponent = 0x7FFFF; // Infinity or NaN else if (exponent ==...
/** * Convert quadruple precision number into octuple precision number. * * @param x quadruple precision number * @return octuple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 10915, 11949 ] }
4,050
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
fromDouble
function fromDouble(bytes8 x) internal pure returns (bytes16) { unchecked { uint256 exponent = (uint64(x) >> 52) & 0x7FF; uint256 result = uint64(x) & 0xFFFFFFFFFFFFF; if (exponent == 0x7FF) exponent = 0x7FFF; // Infinity or NaN else if (exponent == 0) { if ...
/** * Convert double precision number into quadruple precision number. * * @param x double precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 12128, 13062 ] }
4,051
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
toDouble
function toDouble(bytes16 x) internal pure returns (bytes8) { unchecked { bool negative = uint128(x) >= 0x80000000000000000000000000000000; uint256 exponent = (uint128(x) >> 112) & 0x7FFF; uint256 significand = uint128(x) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF; if (exponent == 0x7FFF) { ...
/** * Convert quadruple precision number into double precision number. * * @param x quadruple precision number * @return double precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 13241, 14853 ] }
4,052
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
isNaN
function isNaN(bytes16 x) internal pure returns (bool) { unchecked { return uint128(x) & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF > 0x7FFF0000000000000000000000000000; } }
/** * Test whether given quadruple precision number is NaN. * * @param x quadruple precision number * @return true if x is NaN, false otherwise */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 15031, 15264 ] }
4,053
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
isInfinity
function isInfinity(bytes16 x) internal pure returns (bool) { unchecked { return uint128(x) & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF == 0x7FFF0000000000000000000000000000; } }
/** * Test whether given quadruple precision number is positive or negative * infinity. * * @param x quadruple precision number * @return true if x is positive or negative infinity, false otherwise */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 15501, 15740 ] }
4,054
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
sign
function sign(bytes16 x) internal pure returns (int8) { unchecked { uint128 absoluteX = uint128(x) & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; require(absoluteX <= 0x7FFF0000000000000000000000000000); // Not NaN if (absoluteX == 0) return 0; else if (uint128(x) >= 0x800000000000000000000...
/** * Calculate sign of x, i.e. -1 if x is negative, 0 if x if zero, and 1 if x * is positive. Note that sign (-0) is zero. Revert if x is NaN. * * @param x quadruple precision number * @return sign of x */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 15985, 16411 ] }
4,055
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
cmp
function cmp(bytes16 x, bytes16 y) internal pure returns (int8) { unchecked { uint128 absoluteX = uint128(x) & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; require(absoluteX <= 0x7FFF0000000000000000000000000000); // Not NaN uint128 absoluteY = uint128(y) & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; ...
/** * Calculate sign (x - y). Revert if either argument is NaN, or both * arguments are infinities of the same sign. * * @param x quadruple precision number * @param y quadruple precision number * @return sign (x - y) */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 16674, 17815 ] }
4,056
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
eq
function eq(bytes16 x, bytes16 y) internal pure returns (bool) { unchecked { if (x == y) { return uint128(x) & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF < 0x7FFF0000000000000000000000000000; } else return false; } }
/** * Test whether x equals y. NaN, infinity, and -infinity are not equal to * anything. * * @param x quadruple precision number * @param y quadruple precision number * @return true if x equals to y, false otherwise */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 18076, 18388 ] }
4,057
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
add
function add(bytes16 x, bytes16 y) internal pure returns (bytes16) { unchecked { uint256 xExponent = (uint128(x) >> 112) & 0x7FFF; uint256 yExponent = (uint128(y) >> 112) & 0x7FFF; if (xExponent == 0x7FFF) { if (yExponent == 0x7FFF) { if (x == y) return x; ...
/** * Calculate x + y. Special values behave in the following way: * * NaN + x = NaN for any x. * Infinity + x = Infinity for any finite x. * -Infinity + x = -Infinity for any finite x. * Infinity + Infinity = Infinity. * -Infinity + -Infinity = -Infinity. * Infinity + -Infinity = -Infinity + Infinity = NaN. ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 18888, 24922 ] }
4,058
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
sub
function sub(bytes16 x, bytes16 y) internal pure returns (bytes16) { unchecked { return add(x, y ^ 0x80000000000000000000000000000000); } }
/** * Calculate x - y. Special values behave in the following way: * * NaN - x = NaN for any x. * Infinity - x = Infinity for any finite x. * -Infinity - x = -Infinity for any finite x. * Infinity - -Infinity = Infinity. * -Infinity - Infinity = -Infinity. * Infinity - Infinity = -Infinity - -Infinity = NaN. ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 25422, 25597 ] }
4,059
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
mul
function mul(bytes16 x, bytes16 y) internal pure returns (bytes16) { unchecked { uint256 xExponent = (uint128(x) >> 112) & 0x7FFF; uint256 yExponent = (uint128(y) >> 112) & 0x7FFF; if (xExponent == 0x7FFF) { if (yExponent == 0x7FFF) { if (x == y) ...
/** * Calculate x * y. Special values behave in the following way: * * NaN * x = NaN for any x. * Infinity * x = Infinity for any finite positive x. * Infinity * x = -Infinity for any finite negative x. * -Infinity * x = -Infinity for any finite positive x. * -Infinity * x = Infinity for any finite negative x. ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 26311, 29683 ] }
4,060
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
div
function div(bytes16 x, bytes16 y) internal pure returns (bytes16) { unchecked { uint256 xExponent = (uint128(x) >> 112) & 0x7FFF; uint256 yExponent = (uint128(y) >> 112) & 0x7FFF; if (xExponent == 0x7FFF) { if (yExponent == 0x7FFF) return NaN; else return x ^ (y & 0...
/** * Calculate x / y. Special values behave in the following way: * * NaN / x = NaN for any x. * x / NaN = NaN for any x. * Infinity / x = Infinity for any finite non-negative x. * Infinity / x = -Infinity for any finite negative x including -0. * -Infinity / x = -Infinity for any finite non-negative x. * -In...
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 31005, 34931 ] }
4,061
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
neg
function neg(bytes16 x) internal pure returns (bytes16) { unchecked { return x ^ 0x80000000000000000000000000000000; } }
/** * Calculate -x. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 35062, 35218 ] }
4,062
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
abs
function abs(bytes16 x) internal pure returns (bytes16) { unchecked { return x & 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; } }
/** * Calculate |x|. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 35350, 35506 ] }
4,063
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
sqrt
function sqrt(bytes16 x) internal pure returns (bytes16) { unchecked { if (uint128(x) > 0x80000000000000000000000000000000) return NaN; else { uint256 xExponent = (uint128(x) >> 112) & 0x7FFF; if (xExponent == 0x7FFF) return x; else { uint256 xSign...
/** * Calculate square root of x. Return NaN on negative x excluding -0. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 35691, 38258 ] }
4,064
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
log_2
function log_2(bytes16 x) internal pure returns (bytes16) { unchecked { if (uint128(x) > 0x80000000000000000000000000000000) return NaN; else if (x == 0x3FFF0000000000000000000000000000) return _POSITIVE_ZERO; else { uint256 xExponent = (uint128(x) >> 112) & 0x7FFF; ...
/** * Calculate binary logarithm of x. Return NaN on negative x excluding -0. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 38448, 41633 ] }
4,065
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
ln
function ln(bytes16 x) internal pure returns (bytes16) { unchecked { return mul(log_2(x), 0x3FFE62E42FEFA39EF35793C7673007E5); } }
/** * Calculate natural logarithm of x. Return NaN on negative x excluding -0. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 41824, 41990 ] }
4,066
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
pow_2
function pow_2(bytes16 x) internal pure returns (bytes16) { unchecked { bool xNegative = uint128(x) > 0x80000000000000000000000000000000; uint256 xExponent = (uint128(x) >> 112) & 0x7FFF; uint256 xSignifier = uint128(x) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF; if (xExponent == 0x7FFF && xS...
/** * Calculate 2^x. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 42122, 74236 ] }
4,067
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
exp
function exp(bytes16 x) internal pure returns (bytes16) { unchecked { return pow_2(mul(x, 0x3FFF71547652B82FE1777D0FFDA0D23A)); } }
/** * Calculate e^x. * * @param x quadruple precision number * @return quadruple precision number */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 74368, 74535 ] }
4,068
BondingShareV2
contracts/libs/ABDKMathQuad.sol
0x2da07859613c14f6f05c97efe37b9b4f212b5ef5
Solidity
ABDKMathQuad
library ABDKMathQuad { /* * 0. */ bytes16 private constant _POSITIVE_ZERO = 0x00000000000000000000000000000000; /* * -0. */ bytes16 private constant _NEGATIVE_ZERO = 0x80000000000000000000000000000000; /* * +Infinity. */ bytes16 private constant _P...
/** * Smart contract library of mathematical functions operating with IEEE 754 * quadruple-precision binary floating-point numbers (quadruple precision * numbers). As long as quadruple precision numbers are 16-bytes long, they are * represented by bytes16 type. */
NatSpecMultiLine
mostSignificantBit
function mostSignificantBit(uint256 x) private pure returns (uint256) { unchecked { require(x > 0); uint256 result = 0; if (x >= 0x100000000000000000000000000000000) { x >>= 128; result += 128; } if (x >= 0x10000000000000000) { x >>= 64; ...
/** * Get index of the most significant non-zero bit in binary representation of * x. Reverts if x is zero. * * @return index of the most significant non-zero bit in binary representation * of x */
NatSpecMultiLine
v0.8.3+commit.8d00100c
MIT
none
{ "func_code_index": [ 74778, 75793 ] }
4,069
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
TurtleToken
function TurtleToken( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens na...
/** * Constructor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 842, 1388 ] }
4,070
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value >= balanceOf[_to]...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 1472, 2320 ] }
4,071
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 2526, 2638 ] }
4,072
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` on behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 2913, 3214 ] }
4,073
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 3478, 3654 ] }
4,074
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 4048, 4400 ] }
4,075
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender,...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 4570, 4949 ] }
4,076
TurtleToken
TurtleToken.sol
0x7d41b9575611704daddf1e66af745055f076c1c8
Solidity
TurtleToken
contract TurtleToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addr...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://1ae8876f7d95baa35b5a40baeec84407dd96f73f226f6f45500ad6213382e570
{ "func_code_index": [ 5207, 5823 ] }
4,077
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 180, 248 ] }
4,078
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { if (newOwner != address(0)) { owner = newOwner; } }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 592, 748 ] }
4,079
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
BasicToken
contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev Fix for the ERC20 sho...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) { uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].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.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 626, 1204 ] }
4,080
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
BasicToken
contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev Fix for the ERC20 sho...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public 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.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 1417, 1538 ] }
4,081
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @par...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint _value) public 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; uint fee = (_valu...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 451, 1357 ] }
4,082
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @par...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { // 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://git...
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 1599, 2177 ] }
4,083
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
StandardToken
contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @par...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public 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 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 2505, 2655 ] }
4,084
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 513, 604 ] }
4,085
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 688, 781 ] }
4,086
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
BlackList
contract BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external constant returns (bool) { return isBlackListed[_maker]; } function getOwner...
getBlackListStatus
function getBlackListStatus(address _maker) external constant returns (bool) { return isBlackListed[_maker]; }
/////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) ///////
NatSpecSingleLine
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 167, 296 ] }
4,087
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
UpgradedStandardToken
contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint value) public; function transferFromByLegacy(address sender, address from, addres...
transferByLegacy
function transferByLegacy(address from, address to, uint value) public;
// those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 173, 249 ] }
4,088
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
HBToken
function HBToken(uint _initialSupply, string _name, string _symbol, uint _decimals) public { _totalSupply = _initialSupply; name = _name; symbol = _symbol; decimals = _decimals; balances[owner] = _initialSupply; deprecated = false; }
// The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 502, 799 ] }
4,089
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
transfer
function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 879, 1210 ] }
4,090
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
transferFrom
function transferFrom(address _from, address _to, uint _value) public whenNotPaused { require(!isBlackListed[_from]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_from, _to, _val...
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 1290, 1657 ] }
4,091
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
balanceOf
function balanceOf(address who) public constant returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 1737, 1986 ] }
4,092
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
approve
function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 2066, 2373 ] }
4,093
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
allowance
function allowance(address _owner, address _spender) public constant returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } }
// Forward ERC20 methods to upgraded contract if this one is deprecated
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 2453, 2751 ] }
4,094
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
deprecate
function deprecate(address _upgradedAddress) public onlyOwner { deprecated = true; upgradedAddress = _upgradedAddress; Deprecate(_upgradedAddress); }
// deprecate current contract in favour of a new one
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 2812, 2998 ] }
4,095
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
totalSupply
function totalSupply() public constant returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } }
// deprecate current contract if favour of a new one
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 3059, 3282 ] }
4,096
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
issue
function issue(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balances[owner] + amount > balances[owner]); balances[owner] += amount; _totalSupply += amount; Issue(amount); }
// Issue a new amount of tokens // these tokens are deposited into the owner address // // @param _amount Number of tokens to be issued
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 3441, 3712 ] }
4,097
HBToken
HBToken.sol
0x978e6eb7ef39bf7bc809c61aa89a495e1a3041be
Solidity
HBToken
contract HBToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owne...
redeem
function redeem(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balances[owner] >= amount); _totalSupply -= amount; balances[owner] -= amount; Redeem(amount); }
// Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued
LineComment
v0.4.17+commit.bdeb9e52
bzzr://4abc1cdd6dc575aef683af58cdb5b3b79f412195568a4f40a7ab082727cf0c72
{ "func_code_index": [ 3938, 4180 ] }
4,098
TokenTestToken
contracts/OctusNetworkGoldenToken.sol
0x85d736760743b5380bf15c3e78b112bac8de6473
Solidity
TokenTestToken
contract TokenTestToken is StandardToken, Ownable { string public constant name = "Token Test token"; string public constant symbol = "3T"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 10000000 * (10 ** uint256(decimals)); uint256 public constant MAXIMUM_SUPPLY = ...
/** * @title OctusNetworkGoldenToken * @dev DistributableToken contract is based on a simple initial supply token, with an API for the owner to perform bulk distributions. * transactions to the distributeTokens function should be paginated to avoid gas limits or computational time restrictions. */
NatSpecMultiLine
mintToken
function mintToken(address target, uint256 mintedAmount)public onlyOwner returns(bool){ ((totalSupply + mintedAmount)>MAXIMUM_SUPPLY){ eturn false; lse{ alances[target] += mintedAmount; otalSupply += mintedAmount; mit Transfer(address(0), address(this), mintedAmount); mit Transfer(address(this), target, mintedA...
/// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://79f581617745f2cc74c09e9f244d9bd2a063c57fb01e7978db74eb0c8c1af282
{ "func_code_index": [ 1195, 1584 ] }
4,099
TokenTestToken
contracts/OctusNetworkGoldenToken.sol
0x85d736760743b5380bf15c3e78b112bac8de6473
Solidity
TokenTestToken
contract TokenTestToken is StandardToken, Ownable { string public constant name = "Token Test token"; string public constant symbol = "3T"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 10000000 * (10 ** uint256(decimals)); uint256 public constant MAXIMUM_SUPPLY = ...
/** * @title OctusNetworkGoldenToken * @dev DistributableToken contract is based on a simple initial supply token, with an API for the owner to perform bulk distributions. * transactions to the distributeTokens function should be paginated to avoid gas limits or computational time restrictions. */
NatSpecMultiLine
freezeAccount
function freezeAccount(address target, bool freeze) public onlyOwner{ frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); }
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://79f581617745f2cc74c09e9f244d9bd2a063c57fb01e7978db74eb0c8c1af282
{ "func_code_index": [ 1762, 1928 ] }
4,100
LibertyTaler
LibertyTaler.sol
0x46bc872506c0bb6e634166a2c2375e4926db80ae
Solidity
LibertyTaler
contract LibertyTaler is ERC20, Owned { using SafeMath for uint256; address owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; string public constant name = "LibertyTaler"; string public constant symbol = "L...
totalSupply
function totalSupply() public constant returns (uint) { return totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://9f4bba4f4000000d18f76aef123e2d4e616628a49bc6bd17e0880d8884027bf8
{ "func_code_index": [ 3764, 3884 ] }
4,101
MEMORYCOIN
MEMORYCOIN.sol
0xaf99b6de45260d0ac522b299a67a0ef0c7cd292a
Solidity
MEMORYCOIN
contract MEMORYCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://d20ab5c17263d942517824888ef8cf23f6c763053fccfa01d50e322cd7868112
{ "func_code_index": [ 983, 1104 ] }
4,102
MEMORYCOIN
MEMORYCOIN.sol
0xaf99b6de45260d0ac522b299a67a0ef0c7cd292a
Solidity
MEMORYCOIN
contract MEMORYCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://d20ab5c17263d942517824888ef8cf23f6c763053fccfa01d50e322cd7868112
{ "func_code_index": [ 1324, 1453 ] }
4,103
MEMORYCOIN
MEMORYCOIN.sol
0xaf99b6de45260d0ac522b299a67a0ef0c7cd292a
Solidity
MEMORYCOIN
contract MEMORYCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://d20ab5c17263d942517824888ef8cf23f6c763053fccfa01d50e322cd7868112
{ "func_code_index": [ 1797, 2079 ] }
4,104
MEMORYCOIN
MEMORYCOIN.sol
0xaf99b6de45260d0ac522b299a67a0ef0c7cd292a
Solidity
MEMORYCOIN
contract MEMORYCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://d20ab5c17263d942517824888ef8cf23f6c763053fccfa01d50e322cd7868112
{ "func_code_index": [ 2587, 2800 ] }
4,105
MEMORYCOIN
MEMORYCOIN.sol
0xaf99b6de45260d0ac522b299a67a0ef0c7cd292a
Solidity
MEMORYCOIN
contract MEMORYCOIN is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://d20ab5c17263d942517824888ef8cf23f6c763053fccfa01d50e322cd7868112
{ "func_code_index": [ 3331, 3694 ] }
4,106