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
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
finishICO
function finishICO() external whenActive(currentRound) onlyMasters { ICO storage ico = ICORounds[currentRound]; //avoid mistake with date in a far future //require(now > ico.finishTime); ico.finalPrice = currentPrice(); tokensOnSale = 0; ico.active = false; if (ico.totalParticipants =...
// finish current round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 7492, 8015 ] }
9,700
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
calcICO
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters { ICO storage ico = ICORounds[_round == 0 ? currentRound : _round]; require(ico.totalParticipants > ico.calcedParticipants); require(_toIndex <= ico.totalParticipants); ...
// calculate participants in ico round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 8062, 9555 ] }
9,701
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
valueFromPercent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { uint _amount = _value.mul(_percent).div(100); return (_amount); }
// get value percent
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 9584, 9769 ] }
9,702
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
availableFunds
function availableFunds() external view returns (uint amount) { return address(this).balance.sub(reservedFunds); }
// available funds to withdraw
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 9808, 9941 ] }
9,703
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
participantRoundValue
function participantRoundValue(address _address, uint _round) external view returns (uint) { ICO storage ico = ICORounds[_round == 0 ? currentRound : _round]; Participant storage p = ico.participants[_address]; return p.value; }
//get ether amount payed by participant in specified round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 10008, 10273 ] }
9,704
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
participantRoundAmount
function participantRoundAmount(address _address, uint _round) external view returns (uint) { ICO storage ico = ICORounds[_round == 0 ? currentRound : _round]; Participant storage p = ico.participants[_address]; return p.amount; }
//get token amount rewarded to participant in specified round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 10343, 10610 ] }
9,705
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
participantRoundRewarded
function participantRoundRewarded(address _address, uint _round) external view returns (bool) { ICO storage ico = ICORounds[_round == 0 ? currentRound : _round]; Participant storage p = ico.participants[_address]; return !p.needReward; }
//is participant rewarded in specified round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 10663, 10937 ] }
9,706
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
participantRoundCalced
function participantRoundCalced(address _address, uint _round) external view returns (bool) { ICO storage ico = ICORounds[_round == 0 ? currentRound : _round]; Participant storage p = ico.participants[_address]; return !p.needCalc; }
//is participant calculated in specified round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 10992, 11262 ] }
9,707
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
participantRoundChange
function participantRoundChange(address _address, uint _round) external view returns (uint) { ICO storage ico = ICORounds[_round == 0 ? currentRound : _round]; Participant storage p = ico.participants[_address]; return p.change; }
//get participant's change in specified round
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 11316, 11583 ] }
9,708
ForceSeller
ForceSeller.sol
0x23f9fae90551764955e20c0e9c349a2811a3e0f9
Solidity
ForceSeller
contract ForceSeller is Ownable { using SafeMath for uint; ForceToken public forceToken; uint public currentRound; uint public tokensOnSale;// current tokens amount on sale uint public reservedTokens; uint public reservedFunds; uint public minSalePrice = 1000000000000000; uint ...
withdrawFunds
function withdrawFunds(address _to, uint _value) external onlyMasters { require(address(this).balance.sub(reservedFunds) >= _value); _to.transfer(_value); emit Withdrawal(_value); }
// withdraw available funds from contract
LineComment
v0.4.21+commit.dfe3193c
bzzr://be658cbd39f977f7ee81fcbd380d6ecf5600321c2cc238da44122d1375825b25
{ "func_code_index": [ 11633, 11851 ] }
9,709
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
ERC721
contract ERC721 { // Required methods function totalSupply() public view returns (uint256 total); function balanceOf(address _owner) public view returns (uint256 balance); function ownerOf(uint256 _tokenId) external view returns (address owner); function approve(address _to, uint256 _tokenId) e...
totalSupply
function totalSupply() public view returns (uint256 total);
// Required methods
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 44, 108 ] }
9,710
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
ERC721
contract ERC721 { // Required methods function totalSupply() public view returns (uint256 total); function balanceOf(address _owner) public view returns (uint256 balance); function ownerOf(uint256 _tokenId) external view returns (address owner); function approve(address _to, uint256 _tokenId) e...
supportsInterface
function supportsInterface(bytes4 _interfaceID) external view returns (bool);
// Optional // function name() public view returns (string name); // function symbol() public view returns (string symbol); // function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds); // function tokenMetadata(uint256 _tokenId, string _preferredTransport) public view returns (string infoUrl); ...
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 1054, 1136 ] }
9,711
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
LogicBase
contract LogicBase is HasNoContracts { /// The ERC-165 interface signature for ERC-721. /// Ref: https://github.com/ethereum/EIPs/issues/165 /// Ref: https://github.com/ethereum/EIPs/issues/721 bytes4 constant InterfaceSignature_NFC = bytes4(0x9f40b779); // Reference to contract tracking ...
destroy
function destroy() external onlyOwner whenPaused { address storageOwner = storageContract.owner(); // owner of storageContract must not be the current contract otherwise the storageContract will forever not accessible require(storageOwner != address(this)); // Transfers the current balance to the ow...
// Very dangerous action, only when new contract has been proved working // Requires storageContract already transferOwnership to the new contract // This method is only used to transfer the balance to owner
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 970, 1379 ] }
9,712
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
LogicBase
contract LogicBase is HasNoContracts { /// The ERC-165 interface signature for ERC-721. /// Ref: https://github.com/ethereum/EIPs/issues/165 /// Ref: https://github.com/ethereum/EIPs/issues/721 bytes4 constant InterfaceSignature_NFC = bytes4(0x9f40b779); // Reference to contract tracking ...
destroyAndSendToStorageOwner
function destroyAndSendToStorageOwner() external onlyOwner whenPaused { address storageOwner = storageContract.owner(); // owner of storageContract must not be the current contract otherwise the storageContract will forever not accessible require(storageOwner != address(this)); // Transfers the curr...
// Very dangerous action, only when new contract has been proved working // Requires storageContract already transferOwnership to the new contract // This method is only used to transfer the balance to the new contract
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 1616, 2081 ] }
9,713
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
LogicBase
contract LogicBase is HasNoContracts { /// The ERC-165 interface signature for ERC-721. /// Ref: https://github.com/ethereum/EIPs/issues/165 /// Ref: https://github.com/ethereum/EIPs/issues/721 bytes4 constant InterfaceSignature_NFC = bytes4(0x9f40b779); // Reference to contract tracking ...
unpause
function unpause() public onlyOwner whenPaused { // can not unpause when the logic contract is not initialzed require(nonFungibleContract != address(0)); require(storageContract != address(0)); // can not unpause when ownership of storage contract is not the current contract require(storageCont...
// override to make sure everything is initialized before the unpause
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 2159, 2570 ] }
9,714
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
LogicBase
contract LogicBase is HasNoContracts { /// The ERC-165 interface signature for ERC-721. /// Ref: https://github.com/ethereum/EIPs/issues/165 /// Ref: https://github.com/ethereum/EIPs/issues/721 bytes4 constant InterfaceSignature_NFC = bytes4(0x9f40b779); // Reference to contract tracking ...
withdrawBalance
function withdrawBalance() external returns (bool) { address nftAddress = address(nonFungibleContract); // either Owner or Core Contract can trigger the withdraw require(msg.sender == owner || msg.sender == nftAddress); // The owner has a method to withdraw balance from multiple contracts together, ...
// Withdraw balance to the Core Contract
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 2927, 3455 ] }
9,715
SiringClockAuction
SiringClockAuction.sol
0x23bbc7247b4dbdb4487c9b92d998e106883a9efa
Solidity
ClockAuction
contract ClockAuction is LogicBase { // Reference to contract tracking auction state variables ClockAuctionStorage public clockAuctionStorage; // Cut owner takes on each auction, measured in basis points (1/100 of a percent). // Values 0-10,000 map to 0%-100% uint256 public ownerCut; ...
isValidPrice
function isValidPrice(uint256 _startingPrice, uint256 _endingPrice) public view returns (bool) { return (_startingPrice < _endingPrice ? _startingPrice : _endingPrice) >= getMinPrice(); }
// Only auction from none system user need to verify the price // System auction can set any price
LineComment
v0.4.21+commit.dfe3193c
bzzr://c27a01dea21db6b14606d18a45e0a27f662e6885c07b57ba2974db53595f2c8b
{ "func_code_index": [ 1620, 1826 ] }
9,716
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 89, 266 ] }
9,717
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 350, 630 ] }
9,718
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 744, 860 ] }
9,719
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, tr...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 924, 1054 ] }
9,720
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 199, 287 ] }
9,721
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 445, 777 ] }
9,722
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 983, 1087 ] }
9,723
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_v...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 401, 891 ] }
9,724
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 1523, 1718 ] }
9,725
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 2042, 2207 ] }
9,726
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 2673, 2980 ] }
9,727
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 3451, 3894 ] }
9,728
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @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(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 710, 891 ] }
9,729
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @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 OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 983, 1100 ] }
9,730
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.sender == owner); _;...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/openzeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint( address _to, uint256 _amount ) hasMintPermission canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 567, 896 ] }
9,731
FBC
FBC.sol
0xa285b6b0ddc40c20d5441e484403fd41fe46d34e
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.sender == owner); _;...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/openzeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://4bee1794fec4a5b1d09cf3ed4edd8fc6730cc44d67c749b579f03c59d7c886bf
{ "func_code_index": [ 1013, 1160 ] }
9,732
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sen...
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 275, 332 ] }
9,733
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sen...
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 679, 863 ] }
9,734
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SaferMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint25...
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value)...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 281, 642 ] }
9,735
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SaferMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint25...
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 862, 982 ] }
9,736
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 414, 989 ] }
9,737
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitiga...
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 1645, 1843 ] }
9,738
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. ...
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 2183, 2332 ] }
9,739
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to...
increaseApproval
function increaseApproval (address _spender, uint _addedValue) returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 2593, 2867 ] }
9,740
DexAlpha
DexAlpha.sol
0xf001f36acb8a11158eae0983b6bc24ae0c7239dd
Solidity
DexAlpha
contract DexAlpha is StandardToken, Ownable { string public constant name = "DexAlpha Tokens"; string public constant symbol = "DXAT"; uint8 public constant decimals = 8; uint256 public constant SUPPLY_CAP = 1000000000 * (10 ** uint256(decimals)); address NULL_ADDRESS = address(0); ...
DexAlpha
function DexAlpha() { totalSupply = SUPPLY_CAP; balances[msg.sender] = SUPPLY_CAP; }
/** * @dev Constructor that gives msg.sender all of existing tokens.. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ce835913c5408a0b6e92cc529b5a1d9c1d1c05eb3d98c64c65045661d92081a2
{ "func_code_index": [ 1254, 1360 ] }
9,741
YFLUSDYFLPool
contracts/IRewardDistributionRecipient.sol
0x5f35334ef7e38ebe1f94d31e6fc3d78b477f4f91
Solidity
YFLUSDYFLPool
contract YFLUSDYFLPool is YFLWrapper, IRewardDistributionRecipient { IERC20 public yflUsd; uint256 public DURATION = 5 days; address public governance; uint256 public starttime; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public...
stake
function stake(uint256 amount) public override updateReward(msg.sender) checkStart { require(amount > 0, 'YFLUSDYFLPool: Cannot stake 0'); uint256 newDeposit = deposits[msg.sender].add(amount); deposits[msg.sender] = newDeposit; super.stake(amount); emit Staked(msg.sender, amount); ...
// stake visibility is public as overriding LPTokenWrapper's stake() function
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 2436, 2805 ] }
9,742
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
ERC20Interface
contract ERC20Interface { // Get the total token supply function totalSupply() public constant returns (uint256 _totalSupply); // Get the account balance of another account with address _owner function balanceOf(address _owner) public constant returns (uint256 balance); // Send _value amo...
// ---------------------------------------------------------------------------------------------- // Gifto Token by Gifto Limited. // An ERC20 standard // // author: Gifto Team // Contact: datwhnguyen@gmail.com
LineComment
totalSupply
function totalSupply() public constant returns (uint256 _totalSupply);
// Get the total token supply
LineComment
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 62, 137 ] }
9,743
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
ERC20Interface
contract ERC20Interface { // Get the total token supply function totalSupply() public constant returns (uint256 _totalSupply); // Get the account balance of another account with address _owner function balanceOf(address _owner) public constant returns (uint256 balance); // Send _value amo...
// ---------------------------------------------------------------------------------------------- // Gifto Token by Gifto Limited. // An ERC20 standard // // author: Gifto Team // Contact: datwhnguyen@gmail.com
LineComment
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance);
// Get the account balance of another account with address _owner
LineComment
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 212, 294 ] }
9,744
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
ERC20Interface
contract ERC20Interface { // Get the total token supply function totalSupply() public constant returns (uint256 _totalSupply); // Get the account balance of another account with address _owner function balanceOf(address _owner) public constant returns (uint256 balance); // Send _value amo...
// ---------------------------------------------------------------------------------------------- // Gifto Token by Gifto Limited. // An ERC20 standard // // author: Gifto Team // Contact: datwhnguyen@gmail.com
LineComment
transfer
function transfer(address _to, uint256 _value) public returns (bool success);
// Send _value amount of tokens to address _to
LineComment
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 350, 432 ] }
9,745
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
function() public payable validValue { // check the first buy => push to Array if (deposit[msg.sender] == 0 && msg.value != 0){ // add new buyer to List buyers.push(msg.sender); } // increase amount deposit of buyer deposit[msg.sender] += msg.value; }
/// @dev Fallback function allows to buy ether.
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 2636, 2995 ] }
9,746
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
Gifto
function Gifto() public { owner = msg.sender; balances[owner] = _totalSupply; Transfer(0x0, owner, _totalSupply); }
/// @dev Constructor
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 3024, 3186 ] }
9,747
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
totalSupply
function totalSupply() public constant returns (uint256) { return _totalSupply; }
/// @dev Gets totalSupply /// @return Total supply
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 3254, 3383 ] }
9,748
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
setIcoPercent
function setIcoPercent(uint256 newIcoPercent) public onlyOwner returns (bool){ _icoPercent = newIcoPercent; _icoSupply = _totalSupply * _icoPercent / 100; }
/// @dev set new icoPercent /// @param newIcoPercent new value of icoPercent
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 3477, 3689 ] }
9,749
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
setMinimumBuy
function setMinimumBuy(uint256 newMinimumBuy) public onlyOwner returns (bool){ _minimumBuy = newMinimumBuy; }
/// @dev set new _minimumBuy /// @param newMinimumBuy new value of _minimumBuy
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 3785, 3941 ] }
9,750
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
setMaximumBuy
function setMaximumBuy(uint256 newMaximumBuy) public onlyOwner returns (bool){ _maximumBuy = newMaximumBuy; }
/// @dev set new _maximumBuy /// @param newMaximumBuy new value of _maximumBuy
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 4037, 4193 ] }
9,751
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
balanceOf
function balanceOf(address _addr) public constant returns (uint256) { return balances[_addr]; }
/// @dev Gets account's balance /// @param _addr Address of the account /// @return Account balance
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 4312, 4455 ] }
9,752
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
isApprovedInvestor
function isApprovedInvestor(address _addr) public constant returns (bool) { return approvedInvestorList[_addr]; }
/// @dev check address is approved investor /// @param _addr address
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 4541, 4700 ] }
9,753
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
filterBuyers
function filterBuyers(bool isInvestor) private constant returns(address[] filterList){ address[] memory filterTmp = new address[](buyers.length); uint count = 0; for (uint i = 0; i < buyers.length; i++){ if(approvedInvestorList[buyers[i]] == isInvestor){ filterTmp[cou...
/// @dev filter buyers in list buyers /// @param isInvestor type buyers, is investor or not
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 4809, 5444 ] }
9,754
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
getInvestorBuyers
function getInvestorBuyers() public constant returns(address[]){ return filterBuyers(true); }
/// @dev filter buyers are investor in list deposited
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 5510, 5649 ] }
9,755
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
getNormalBuyers
function getNormalBuyers() public constant returns(address[]){ return filterBuyers(false); }
/// @dev filter normal Buyers in list buyer deposited
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 5715, 5853 ] }
9,756
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
getDeposit
function getDeposit(address _addr) public constant returns(uint256){ return deposit[_addr]; }
/// @dev get ETH deposit /// @param _addr address get deposit /// @return amount deposit of an buyer
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 5976, 6115 ] }
9,757
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
getTotalDeposit
function getTotalDeposit() public constant returns(uint256 totalDeposit){ totalDeposit = 0; for (uint i = 0; i < buyers.length; i++){ totalDeposit += deposit[buyers[i]]; } }
/// @dev get total deposit of buyers /// @return amount ETH deposit
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 6200, 6450 ] }
9,758
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
deliveryToken
function deliveryToken(bool isInvestor) public onlyOwner validOriginalBuyPrice { //sumary deposit of investors uint256 sum = 0; for (uint i = 0; i < buyers.length; i++){ if(approvedInvestorList[buyers[i]] == isInvestor) { // compute amount ...
/// @dev delivery token for buyer /// @param isInvestor transfer token for investor or not /// true: investors /// false: not investors
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 6629, 7947 ] }
9,759
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
returnETHforNormalBuyers
function returnETHforNormalBuyers() public onlyOwner{ for(uint i = 0; i < buyers.length; i++){ // buyer not approve investor if (!approvedInvestorList[buyers[i]]) { // get deposit of buyer uint256 buyerDeposit = deposit[buyers[i]]; // reset deposit...
/// @dev return ETH for normal buyers
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 7997, 8540 ] }
9,760
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
transfer
function transfer(address _to, uint256 _amount) public returns (bool) { // if sender's balance has enough unit and amount >= 0, // and the sum is not overflow, // then do transfer if ( (balances[msg.sender] >= _amount) && (_amount >= 0) && (balances[_to] + _amo...
/// @dev Transfers the balance from Multisig wallet to an account /// @param _to Recipient address /// @param _amount Transfered amount in unit /// @return Transfer status
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 8736, 9356 ] }
9,761
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
turnOnSale
function turnOnSale() onlyOwner public { _selling = true; }
/// @dev Enables sale
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 9387, 9475 ] }
9,762
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
turnOffSale
function turnOffSale() onlyOwner public { _selling = false; }
/// @dev Disables sale
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 9506, 9596 ] }
9,763
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
isSellingNow
function isSellingNow() public constant returns (bool) { return _selling; }
/// @dev Gets selling status
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 9633, 9756 ] }
9,764
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
setBuyPrice
function setBuyPrice(uint newBuyPrice) onlyOwner public { _originalBuyPrice = newBuyPrice; }
/// @dev Updates buy price (owner ONLY) /// @param newBuyPrice New buy price (in unit)
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 9856, 9987 ] }
9,765
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
addInvestorList
function addInvestorList(address[] newInvestorList) onlyOwner public { for (uint i = 0; i < newInvestorList.length; i++){ approvedInvestorList[newInvestorList[i]] = true; } }
/// @dev Adds list of new investors to the investors list and approve all /// @param newInvestorList Array of new investors addresses to be added
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 10146, 10379 ] }
9,766
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
removeInvestorList
function removeInvestorList(address[] investorList) onlyOwner public { for (uint i = 0; i < investorList.length; i++){ approvedInvestorList[investorList[i]] = false; } }
/// @dev Removes list of investors from list /// @param investorList Array of addresses of investors to be removed
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 10507, 10735 ] }
9,767
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
buy
function buy() payable onlyNotOwner validOriginalBuyPrice validInvestor onSale public returns (uint256 amount) { // convert buy amount in wei to number of unit want to buy uint requestedUnits = msg.value / _originalBuyPrice ; //check requestedUnits <= _icoSupply ...
/// @dev Buys Gifto /// @return Amount of requested units
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 10807, 11629 ] }
9,768
Gifto
Gifto.sol
0x5438b0938fb88a979032f45b87d2d1aeffe5cc28
Solidity
Gifto
contract Gifto is ERC20Interface { uint public constant decimals = 5; string public constant symbol = "Gifto"; string public constant name = "Gifto"; bool public _selling = false;//initial not selling uint public _totalSupply = 10 ** 14; // total supply is 10^14 unit, equivalent to 10^9 Gif...
withdraw
function withdraw() onlyOwner public returns (bool) { return owner.send(this.balance); }
/// @dev Withdraws Ether in contract (Owner only) /// @return Status of withdrawal
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://85b4add34c1c736fc55c8889a7b809f3632522776d785648bf03f8ad284359dd
{ "func_code_index": [ 11729, 11856 ] }
9,769
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
buy
function buy(address referralAddress) public mustReferralAddress(referralAddress) limitInvestmentCondition(msg.value) payable { require(!teamRewardInstance.getWhitelistTime()); uint256 ethAmount = msg.value; address userAddress = msg.sender; User storage _user = userInfo[userAddress]; _u...
// -------------------- user api ----------------//
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 6383, 9544 ] }
9,770
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
calculateBuy
function calculateBuy( User storage user, uint256 ethAmount, address straightAddress, address whiteAddress, address adminAddress, address users ) internal { require(ethAmount > 0); user.ethAmount = teamRewardInstance.isWhitelistAddress(user.userAddress) ? (ethAmount.mul(110).d...
// contains some methods for buy or reinvest
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 9597, 12357 ] }
9,771
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
reinvest
function reinvest(uint256 amount, uint8 value) public payable { address reinvestAddress = msg.sender; address straightAddress; address whiteAddress; address adminAddress; (straightAddress, whiteAddress, adminAddress,) = teamRewardInstance.getUserSystemInfo(msg.sender); require(value...
// contains five kinds of reinvest, 1 means reinvest static rewards, 2 means recommend rewards // 3 means team rewards, 4 means terminators rewards, 5 means node rewards
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 12574, 15301 ] }
9,772
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
withdraw
function withdraw(uint256 amount, uint8 value) public { address withdrawAddress = msg.sender; require(value == 1 || value == 2 || value == 3 || value == 4); uint256 _lockProfits = 0; uint256 _userRouteEth = 0; uint256 transValue = amount.mul(80).div(100); if (value == 1) { _...
// contains five kinds of withdraw, 1 means withdraw static rewards, 2 means recommend rewards // 3 means team rewards, 4 means terminators rewards, 5 means node rewards
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 15518, 16786 ] }
9,773
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
supportSubordinateAddress
function supportSubordinateAddress(uint256 index, address subordinate) public payable { User storage _user = userInfo[msg.sender]; require(_user.ethAmount.sub(_user.tokenProfit.mul(100).div(120)) >= _user.refeTopAmount.mul(60).div(100)); uint256 straightTime; address refeAddress; uint256...
// referral address support subordinate, 10%
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 16839, 18275 ] }
9,774
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
teamReferralReward
function teamReferralReward(uint256 ethAmount, address referralStraightAddress) internal { if (teamRewardInstance.isWhitelistAddress(msg.sender)) { uint256 _systemRetain = ethAmount.mul(rewardRatio[3]).div(100); uint256 _nodeReward = _systemRetain.mul(activateSystem).div(100); systemRe...
// -------------------- internal function ----------------// // calculate team reward and issue reward //teamRatio = [6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1];
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 18445, 20695 ] }
9,775
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
calculateProfit
function calculateProfit(User storage user, uint256 ethAmount, address users) internal { if (teamRewardInstance.isWhitelistAddress(user.userAddress)) { ethAmount = ethAmount.mul(110).div(100); } uint256 userBonus = ethToBonus(ethAmount); require(userBonus >= 0 && SafeMath.add(userBonus,...
// calculate bonus profit
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 22379, 22987 ] }
9,776
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
getPerBonusDivide
function getPerBonusDivide(uint256 tokenDivided, uint256 userBonus, address users) public { uint256 fee = tokenDivided * magnitude; perBonusDivide += SafeMath.div(SafeMath.mul(tokenDivided, magnitude), totalSupply); //calculate every bonus earnings eth fee = fee - (fee - (userBonus * (tokenDivided...
// get user bonus information for calculate static rewards
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 23054, 23571 ] }
9,777
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
calculateToken
function calculateToken(User storage user, uint256 ethAmount) internal { kocInstance.transfer(user.userAddress, ethAmount.mul(ratio)); user.tokenAmount += ethAmount.mul(ratio); }
// calculate and transfer KOC token
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 23615, 23831 ] }
9,778
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
straightReferralReward
function straightReferralReward(User memory user, uint256 ethAmount) internal { address _referralAddresses = user.straightAddress; userInfo[_referralAddresses].refeTopAmount = (userInfo[_referralAddresses].refeTopAmount > user.ethAmount) ? userInfo[_referralAddresses].refeTopAmount : user.ethAmount; us...
// calculate straight reward and record referral address recommendRecord
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 23912, 25130 ] }
9,779
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
straightSortAddress
function straightSortAddress(address referralAddress) internal { for (uint8 i = 0; i < 10; i++) { if (straightInviteAddress[straightSort[i]].length.sub(lastStraightLength[straightSort[i]]) < straightInviteAddress[referralAddress].length.sub(lastStraightLength[referralAddress])) { address [...
// sort straight address, 10
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 25167, 25846 ] }
9,780
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
quickSort
function quickSort(address [10] storage arr, int left, int right) internal { int i = left; int j = right; if (i == j) return; uint pivot = straightInviteAddress[arr[uint(left + (right - left) / 2)]].length.sub(lastStraightLength[arr[uint(left + (right - left) / 2)]]); while (i <= j) { ...
//sort straight address, 10
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 25882, 26754 ] }
9,781
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
settleStraightRewards
function settleStraightRewards() internal { uint256 addressAmount; for (uint8 i = 0; i < 10; i++) { addressAmount += straightInviteAddress[straightSort[i]].length - lastStraightLength[straightSort[i]]; } uint256 _straightSortRewards = SafeMath.div(straightSortRewards, 2); uint256 p...
// settle straight rewards
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 26789, 27815 ] }
9,782
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
ethToBonus
function ethToBonus(uint256 ethereum) internal view returns (uint256) { uint256 _price = bonusPrice * 1e18; // calculate by wei uint256 _tokensReceived = ( ( SafeMath.sub( (sqrt ( (_price ** 2) + (2 * (priceIncremental * 1e18) * (ethereum * 1e18...
// calculate bonus
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 27842, 28529 ] }
9,783
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
sqrt
function sqrt(uint x) internal pure returns (uint y) { uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } }
// utils for calculate bonus
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 28566, 28769 ] }
9,784
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
myBonusProfits
function myBonusProfits(address user) view public returns (uint256) { return (uint256) ((int256)(perBonusDivide.mul(userInfo[user].profitAmount)) - payoutsTo[user]).div(magnitude); }
// get user bonus profits
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 28803, 29024 ] }
9,785
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
setStraightSortRewards
function setStraightSortRewards() public onlyAdmin() returns (bool) { require(currentBlockNumber + blockNumber < block.number); settleStraightRewards(); return true; }
// -------------------- set api ---------------- //
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 30142, 30366 ] }
9,786
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
getStraightSortList
function getStraightSortList() public view returns (address[10] memory) { return straightSort; }
// -------------------- get api ---------------- // // get straight sort list, 10 addresses
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 30471, 30606 ] }
9,787
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
getStraightInviteAddress
function getStraightInviteAddress() public view returns (address[] memory) { return straightInviteAddress[msg.sender]; }
// get effective straight addresses current step
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 30663, 30822 ] }
9,788
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
getcurrentBlockNumber
function getcurrentBlockNumber() public view returns (uint256){ return currentBlockNumber; }
// get currentBlockNumber
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 30856, 30982 ] }
9,789
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
contractStatistics
function contractStatistics() public view returns ( uint256 recommendRankPool, uint256 terminatorPool ) { recommendRankPool = straightSortRewards; terminatorPool = getCurrentTerminatorAmountPool(); }
// returns contract statistics
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 34698, 34968 ] }
9,790
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
getCurrentEffectiveUser
function getCurrentEffectiveUser() public view returns (uint256) { return initAddressAmount; }
// return current effective user for initAddressAmount
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 35753, 35886 ] }
9,791
Resonance
Resonance.sol
0xd87c7ef38c3eaa2a196db19a5f1338eec123bec9
Solidity
Resonance
contract Resonance is ResonanceF { using SafeMath for uint256; uint256 public totalSupply = 0; uint256 constant internal bonusPrice = 0.0000001 ether; // init price uint256 constant internal priceIncremental = 0.00000001 ether; // increase price uint256 constant internal magni...
getCurrentTerminatorAmountPool
function getCurrentTerminatorAmountPool() view public returns(uint256 amount) { return terminatorPoolAmount-terminatorInstance.checkBlockWithdrawAmount(block.number); }
//return Current Terminator reward pool amount
LineComment
v0.5.1+commit.c8a2cb62
MIT
bzzr://a1533a2259fca30289db2437294a7f22dad9225667799e7f0acc8ada85f96280
{ "func_code_index": [ 36865, 37067 ] }
9,792
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_add
function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; retur...
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 908, 1327 ] }
9,793
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_remove
function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element f...
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 1498, 3047 ] }
9,794
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_contains
function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; }
/** * @dev Returns true if the value is in the set. O(1). */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 3128, 3262 ] }
9,795
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_length
function _length(Set storage set) private view returns (uint256) { return set._values.length; }
/** * @dev Returns the number of values on the set. O(1). */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 3343, 3457 ] }
9,796
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
_at
function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; }
/** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 3796, 4005 ] }
9,797
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
add
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); }
/** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 4254, 4384 ] }
9,798
xBRKB
xBRKB.sol
0x8fbedafcc0a4eda503ceed3ff64e668ab27b4d65
Solidity
EnumerableSet
library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are...
/** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are ma...
NatSpecMultiLine
remove
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); }
/** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
MIT
ipfs://31dd83e84e4a3f9dc5c7bbf56634dd7f042a64777e869deb4e852821435be985
{ "func_code_index": [ 4555, 4691 ] }
9,799