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
SGAToken
SGAToken.sol
0x3b98efa8b46b862099cd298b39fc1c7f4e2fb2fa
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused); _; } /** * @dev modifier to allow actions only when ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://b275c97b09c54d82fe690f727409fe1926a0326e6acb030e76d6c0c4e16e1379
{ "func_code_index": [ 665, 751 ] }
20,700
TutellusCrowdsale
contracts/TutellusCrowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
TutellusCrowdsale
contract TutellusCrowdsale is CappedCrowdsale, FinalizableCrowdsale, Pausable { event ConditionsAdded(address indexed beneficiary, uint256 rate); mapping(address => uint256) public conditions; uint256 salePercent = 60; // Percent of TUTs for sale uint256 poolPercent = 30; // Percent of T...
/** * @title TutellusCrowdsale * * @dev Crowdsale for the Tutellus.io ICO. * * Upon finalization the pool and the team's wallet are mined. It must be * finalized once all the backers (including the vesting ones) have made * their contributions. */
NatSpecMultiLine
getRateByTime
function getRateByTime() public constant returns (uint256) { uint256 timeNow = now; if (timeNow > (startTime + 94 * unitTimeSecs)) { return 1500; } else if (timeNow > (startTime + 87 * unitTimeSecs)) { return 1575; // + 5% } else if (timeNow > (startTime + 80 * unitTimeSecs)) { ...
// Returns TUTs rate per 1 ETH depending on current time
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 2112, 2963 ] }
20,701
TutellusCrowdsale
contracts/TutellusCrowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
TutellusCrowdsale
contract TutellusCrowdsale is CappedCrowdsale, FinalizableCrowdsale, Pausable { event ConditionsAdded(address indexed beneficiary, uint256 rate); mapping(address => uint256) public conditions; uint256 salePercent = 60; // Percent of TUTs for sale uint256 poolPercent = 30; // Percent of T...
/** * @title TutellusCrowdsale * * @dev Crowdsale for the Tutellus.io ICO. * * Upon finalization the pool and the team's wallet are mined. It must be * finalized once all the backers (including the vesting ones) have made * their contributions. */
NatSpecMultiLine
poolTokensByPercent
function poolTokensByPercent(uint256 _percent) internal returns(uint256) { return token.totalSupply().mul(_percent).div(salePercent); }
// Calculate the Tokens in percent over de tokens generated
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 4013, 4167 ] }
20,702
TutellusCrowdsale
contracts/TutellusCrowdsale.sol
0x0f3d5562ca6084f7d59ce10dc5ab672257573de6
Solidity
TutellusCrowdsale
contract TutellusCrowdsale is CappedCrowdsale, FinalizableCrowdsale, Pausable { event ConditionsAdded(address indexed beneficiary, uint256 rate); mapping(address => uint256) public conditions; uint256 salePercent = 60; // Percent of TUTs for sale uint256 poolPercent = 30; // Percent of T...
/** * @title TutellusCrowdsale * * @dev Crowdsale for the Tutellus.io ICO. * * Upon finalization the pool and the team's wallet are mined. It must be * finalized once all the backers (including the vesting ones) have made * their contributions. */
NatSpecMultiLine
finalization
function finalization() internal { uint256 tokensPool = poolTokensByPercent(poolPercent); uint256 tokensTeam = poolTokensByPercent(teamPercent); vault.mint(wallet, tokensPool); vault.mint(teamTimelock, tokensTeam); }
// Method to mint the team and pool tokens
LineComment
v0.4.15+commit.bbb8e64f
bzzr://0796f11c3c3be135f77c77dde3ddc59c6e78098daf13afefce6ca3b0210a92d2
{ "func_code_index": [ 4218, 4482 ] }
20,703
TokenSwap
TokenSwap.sol
0xea1aa8035b766562e2bea7e63a4a1949f2bea31b
Solidity
TokenSwap
contract TokenSwap is HasAdmin { IERC20 public oldToken; IERC20 public newToken; MainchainGateway public mainchainGateway; constructor( IERC20 _oldToken, IERC20 _newToken ) public { oldToken = _oldToken; newToken = _newToken; } function setGateway(MainchainGateway _m...
/** * Smart contract wallet to support swapping between old ERC-20 token to a new contract. * It also supports swap and deposit into mainchainGateway in a single transaction. * Pre-requisites: New token needs to be transferred to this contract. * Dev should check that the decimals and supply of old token and ne...
NatSpecMultiLine
withdrawToken
function withdrawToken() external onlyAdmin { newToken.transfer(msg.sender, newToken.balanceOf(address(this))); }
// Used when some old token lost forever
LineComment
v0.5.17+commit.d19bba13
None
bzzr://046c95de273744f0ea3e057c4db8b3ad3047c8c01616078bca5204fa7005fc0b
{ "func_code_index": [ 1714, 1838 ] }
20,704
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 921, 1040 ] }
20,705
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 1260, 1385 ] }
20,706
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { require(to != address(0)); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 1729, 2039 ] }
20,707
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval do...
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 2548, 2761 ] }
20,708
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { require(to!=address(0)); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(...
// ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer...
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 3299, 3691 ] }
20,709
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 3974, 4126 ] }
20,710
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------...
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 4489, 4827 ] }
20,711
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
function () external payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 5019, 5080 ] }
20,712
SDGToken
SDGToken.sol
0xe7148babb49894891e5b8040c2f5e8ffe35397b8
Solidity
SDGToken
contract SDGToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.5.8+commit.23d335f2
None
bzzr://30fc861ef72b098db571151223c7d24174a3eb30a793603704a0856b0eb2929e
{ "func_code_index": [ 5311, 5500 ] }
20,713
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.4+commit.4633f3de
{ "func_code_index": [ 60, 124 ] }
20,714
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.4+commit.4633f3de
{ "func_code_index": [ 232, 309 ] }
20,715
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.4+commit.4633f3de
{ "func_code_index": [ 546, 623 ] }
20,716
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.4+commit.4633f3de
{ "func_code_index": [ 946, 1042 ] }
20,717
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.4+commit.4633f3de
{ "func_code_index": [ 1326, 1407 ] }
20,718
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.4+commit.4633f3de
{ "func_code_index": [ 1615, 1712 ] }
20,719
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
FlatEarthProof
contract FlatEarthProof is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to ...
//name this contract whatever you'd like
LineComment
FlatEarthProof
function FlatEarthProof( ) { balances[msg.sender] = 999999; // Give the creator all initial tokens (100000 for example) totalSupply = 999999; // Update total supply (100000 for example) name = "Flat Earth Proof"; // Set the name ...
//human 0.1 standard. Just an arbitrary versioning scheme. // // CHANGE THESE VALUES FOR YOUR TOKEN // //make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token
LineComment
v0.4.4+commit.4633f3de
{ "func_code_index": [ 1163, 1720 ] }
20,720
FlatEarthProof
FlatEarthProof.sol
0x1aa699889c0d9bade50391d314cce3ea4a5285ce
Solidity
FlatEarthProof
contract FlatEarthProof is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to ...
//name this contract whatever you'd like
LineComment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.4+commit.4633f3de
{ "func_code_index": [ 1781, 2586 ] }
20,721
CyberTrustMoney
CyberTrustMoney.sol
0x636ee05cdc28a7d6af8d04ac2c45a3d3095263cb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://009e1a6b20648c93fcdbb6c928936c0f34352b29c554a87074b53fb3d2827612
{ "func_code_index": [ 89, 272 ] }
20,722
CyberTrustMoney
CyberTrustMoney.sol
0x636ee05cdc28a7d6af8d04ac2c45a3d3095263cb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://009e1a6b20648c93fcdbb6c928936c0f34352b29c554a87074b53fb3d2827612
{ "func_code_index": [ 356, 629 ] }
20,723
CyberTrustMoney
CyberTrustMoney.sol
0x636ee05cdc28a7d6af8d04ac2c45a3d3095263cb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://009e1a6b20648c93fcdbb6c928936c0f34352b29c554a87074b53fb3d2827612
{ "func_code_index": [ 744, 860 ] }
20,724
CyberTrustMoney
CyberTrustMoney.sol
0x636ee05cdc28a7d6af8d04ac2c45a3d3095263cb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
None
bzzr://009e1a6b20648c93fcdbb6c928936c0f34352b29c554a87074b53fb3d2827612
{ "func_code_index": [ 924, 1061 ] }
20,725
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 605, 834 ] }
20,726
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 913, 1174 ] }
20,727
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 1245, 1363 ] }
20,728
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 1435, 1673 ] }
20,729
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnume...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 2281, 2875 ] }
20,730
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 3171, 3397 ] }
20,731
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 3593, 3762 ] }
20,732
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 4384, 5377 ] }
20,733
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 5667, 6751 ] }
20,734
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
StickFighterNFT
contract StickFighterNFT is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters uint256 public totalMints; uint256 public totalCount = 2500; //token Index tracker uint256 public maxBatch ...
_baseURI
function _baseURI() internal view virtual override returns (string memory){ return baseURI; }
//basic functions.
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 659, 771 ] }
20,735
StickFighterNFT
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0xb35c3239c12a04c4591c082b0fc86a421c3248aa
Solidity
StickFighterNFT
contract StickFighterNFT is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters uint256 public totalMints; uint256 public totalCount = 2500; //token Index tracker uint256 public maxBatch ...
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token."); string memory baseURI2 = _baseURI(); return bytes(baseURI2).length > 0 ? string(abi.encodePacked(baseURI2, tokenId.toString()...
//erc721
LineComment
v0.8.0+commit.c7dfd78e
MIT
ipfs://554e048893ce009e3d0c02329eb272681c940abd00055acbd34eb354a7d9b442
{ "func_code_index": [ 890, 1260 ] }
20,736
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
transfer
function transfer(address _to, uint256 _value) public returns (bool){ return transferFrom(msg.sender, _to, _value); }
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#methods // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#transfer
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 5128, 5264 ] }
20,737
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool){ // transfers are possible only after sale is finished // except for manager and preferred accounts bool saleFinished = saleIsFinished(); require(saleFinished || msg.sender == owner || isPreferredTokensAccoun...
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#transferfrom
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 5363, 6942 ] }
20,738
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
approve
function approve(address _spender, uint256 _value) public returns (bool success){ require(_value >= 0); allowance[msg.sender][_spender] = _value; // event emit Approval(msg.sender, _spender, _value); return true; }
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#approve // there is and attack, see: // https://github.com/CORIONplatform/solidity/issues/6, // https://drive.google.com/file/d/0ByMtMw2hul0EN3NCaVFHSFdxRzA/view // but this function is required by ERC-20
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 7253, 7530 ] }
20,739
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { approve(_spender, _value); // 'spender' is another contract that implements code as prescribed in 'allowanceRecipient' above allowanceRecipient spender = allowanceRecipient(_spender); ...
/* User can allow another smart contract to spend some shares in his behalf * (this function should be called by user itself) * @param _spender another contract's address * @param _value number of tokens * @param _extraData Data that can be sent from user to another contract to be processed * bytes - dyn...
Comment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 8202, 8997 ] }
20,740
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
transferAndCall
function transferAndCall(address _to, uint256 _value, bytes memory _extraData) public returns (bool success){ transferFrom(msg.sender, _to, _value); tokenRecipient receiver = tokenRecipient(_to); if (receiver.tokenFallback(msg.sender, _value, _extraData)) { emit DataSentToAnotherContract(m...
/* https://github.com/ethereum/EIPs/issues/677 * transfer tokens with additional info to another smart contract, and calls its correspondent function * @param address _to - another smart contract address * @param uint256 _value - number of tokens * @param bytes _extraData - data to send to another contract * ...
Comment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 9600, 10041 ] }
20,741
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
transferAllAndCall
function transferAllAndCall(address _to, bytes memory _extraData) public returns (bool success){ return transferAndCall(_to, balanceOf[msg.sender], _extraData); }
// for example for conveting ALL tokens of user account to another tokens
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 10123, 10304 ] }
20,742
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
changeOwner
function changeOwner(address _newOwner) public onlyBy(owner) returns (bool success){ // require(_newOwner != address(0)); address oldOwner = owner; owner = _newOwner; emit OwnerChanged(oldOwner, _newOwner); return true; }
/* --- Administrative functions */
Comment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 10349, 10640 ] }
20,743
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
startSale
function startSale(uint256 _startUnixTime, uint256 _endUnixTime) public onlyBy(owner) returns (bool success){ require(balanceOf[address(this)] > 0); require(salesCounter < maxSalesAllowed); // time for sale can be set only if: // this is first sale (saleStartUnixTime == 0 && saleEndUnixTime == 0...
/* set time for start and time for end pre-ICO * time is integer representing block timestamp * in UNIX Time, * see: https://www.epochconverter.com * @param uint256 startTime - time to start * @param uint256 endTime - time to end * should be taken into account that * "block.timestamp" can be influenced by...
Comment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 11365, 12327 ] }
20,744
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
function() external payable { buyTokens(); }
// allows sending ether and receiving tokens just using contract address // warning: // 'If the fallback function requires more than 2300 gas, the contract cannot receive Ether' // see: // https://ethereum.stackexchange.com/questions/21643/fallback-function-best-practices-when-registering-information
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 14414, 14477 ] }
20,745
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
buyTokens
function buyTokens() public payable returns (bool success){ if (saleIsRunning() && tokenPriceInWei > 0) { uint256 numberOfTokens = msg.value / tokenPriceInWei; if (numberOfTokens <= balanceOf[address(this)]) { balanceOf[msg.sender] = balanceOf[msg.sender] + numberOfTokens; ...
//
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 14488, 15230 ] }
20,746
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
withdrawAllToOwner
function withdrawAllToOwner() public onlyBy(owner) returns (bool) { // only after sale is finished: require(saleIsFinished()); uint256 sumInWei = address(this).balance; if ( // makes withdrawal and returns true or false !msg.sender.send(address(this).balance) ) { retu...
/* After sale contract owner * (can be another contract or account) * can withdraw all collected Ether */
Comment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 15362, 15873 ] }
20,747
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
DEEX
contract DEEX { // ver. 2.0 /* ---------- Variables */ /* --- ERC-20 variables */ // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md#name // function name() constant returns (string name) string public name = "deex"; // https://github.com/ethereum/...
setReferralBonuses
function setReferralBonuses(uint256 _referralBonus, uint256 _referrerBonus) public onlyBy(owner) returns (bool success){ require(_referralBonus > 0 && _referrerBonus > 0); referralBonus = _referralBonus; referrerBonus = _referrerBonus; return true; }
// bonuses are set in as integers (20%, 30%), initial 0%
LineComment
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 16733, 17029 ] }
20,748
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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 Unsigned 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 unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 106, 544 ] }
20,749
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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 Unsigned math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 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 unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 674, 982 ] }
20,750
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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 Unsigned 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 unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 1115, 1270 ] }
20,751
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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 Unsigned 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 unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 1353, 1508 ] }
20,752
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, 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 Unsigned 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 unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 1664, 1793 ] }
20,753
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
setRateToken
function setRateToken(uint256 _rate, uint256 _rateModifier) public onlyOwner returns(uint256){ rate = _rate; rateModifier = _rateModifier; }
/** * @dev Setter token rate. * @param _rate this value for change percent relation rate to count of tokens. * @param _rateModifier this value for change math operation under tokens. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 2191, 2359 ] }
20,754
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
_setRoundTime
function _setRoundTime(uint _currentDeadlineInHours, uint _lastDeadlineInHours) internal { defaultCurrentDeadlineInHours = _currentDeadlineInHours; defaultLastDeadlineInHours = _lastDeadlineInHours; currentDeadline = block.timestamp + 60 * 60 * _currentDeadlineInHours; lastDeadline = block.timestamp...
/** * @dev Setter round time. * @param _currentDeadlineInHours this value current deadline in hours. * @param _lastDeadlineInHours this value last deadline in hours. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 2556, 2938 ] }
20,755
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
setRoundTime
function setRoundTime(uint _currentDeadlineInHours, uint _lastDeadlineInHours) public onlyOwner { _setRoundTime(_currentDeadlineInHours, _lastDeadlineInHours); }
/** * @dev Setter round time. * @param _currentDeadlineInHours this value current deadline in hours. * @param _lastDeadlineInHours this value last deadline in hours. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 3135, 3315 ] }
20,756
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
setDEEXAddress
function setDEEXAddress(address payable _DEEXAddress) public { require(address(DEEXContract) == address(0x0)); DEEXContract = DEEX(_DEEXAddress); }
/** * @dev Setter the DEEX contract address. Address can be set at once. * @param _DEEXAddress Address of the DEEX contract */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 3467, 3642 ] }
20,757
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
setDragonsAddress
function setDragonsAddress(address payable _DragonsAddress) external { require(address(DragonsContract) == address(0x0)); DragonsContract = Dragons(_DragonsAddress); }
/** * @dev Setter the Dragons contract address. Address can be set at once. * @param _DragonsAddress Address of the Dragons contract */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 3801, 3996 ] }
20,758
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
setHamstersAddress
function setHamstersAddress(address payable _HamstersAddress) external { require(address(HamstersContract) == address(0x0)); HamstersContract = Hamsters(_HamstersAddress); }
/** * @dev Setter the Hamsters contract address. Address can be set at once. * @param _HamstersAddress Address of the Hamsters contract */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 4158, 4359 ] }
20,759
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
getNow
function getNow() view public returns(uint){ return block.timestamp; }
/** * @dev Getting time from blockchain for timer */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 4430, 4519 ] }
20,760
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
getState
function getState() view public returns(bool) { if (block.timestamp > currentDeadline) { return false; } return true; }
/** * @dev Getting state of game. True - game continue, False - game stopped */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 4617, 4786 ] }
20,761
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
setInfo
function setInfo(address _lastHero, uint256 _deposit) public { require(address(DragonsContract) == msg.sender || address(HamstersContract) == msg.sender); if (address(DragonsContract) == msg.sender) { require(depositHamsters[currentRound][_lastHero] == 0, "You are already in Hamsters team"); ...
/** * @dev Setting info about participant from Dragons or Hamsters contract * @param _lastHero Address of participant * @param _deposit Amount of deposit */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 4971, 6432 ] }
20,762
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
calculateProbability
function calculateProbability() public { require(winner == 0 && getState()); totalDeexSupplyOfHamsters = DEEXContract.balanceOf(address(HamstersContract)); totalDeexSupplyOfDragons = DEEXContract.balanceOf(address(DragonsContract)); uint256 percent = (totalSupplyOfHamsters.add(totalSupplyOfDragons...
/** * @dev Calculation probability for team's win */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 6747, 8606 ] }
20,763
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
getWinners
function getWinners() public { require(winner == 0 && !getState()); uint256 seed1 = address(this).balance; uint256 seed2 = totalSupplyOfHamsters; uint256 seed3 = totalSupplyOfDragons; uint256 seed4 = totalDeexSupplyOfHamsters; uint256 seed5 = totalDeexSupplyOfHamsters; uint256 seed6 =...
/** * @dev Getting winner team */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 8658, 11824 ] }
20,764
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
function () external payable { if (msg.value == 0){ require(depositDragons[currentRound - 1][msg.sender] > 0 || depositHamsters[currentRound - 1][msg.sender] > 0); uint payout = 0; uint payoutDeex = 0; if (lastWinner == 1 && depositDragons[currentRound - 1][msg.sender] > 0) ...
/** * @dev Payable function for take prize */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 11888, 13421 ] }
20,765
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
calculateETHPrize
function calculateETHPrize(address participant) public view returns(uint) { uint payout = 0; uint256 totalSupply = (totalSupplyOfDragons.add(totalSupplyOfHamsters)); if (depositDragons[currentRound][participant] > 0) { payout = totalSupply.mul(depositDragons[currentRound][participant]).div(t...
/** * @dev Getting ETH prize of participant * @param participant Address of participant */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 13535, 14127 ] }
20,766
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
calculateDeexPrize
function calculateDeexPrize(address participant) public view returns(uint) { uint payout = 0; uint totalSupply = (totalDeexSupplyOfDragons.add(totalDeexSupplyOfHamsters)).mul(80).div(100); if (depositDragons[currentRound][participant] > 0) { payout = totalSupply.mul(depositDragons[currentRou...
/** * @dev Getting Deex Token prize of participant * @param participant Address of participant */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 14248, 14863 ] }
20,767
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
calculateLastETHPrize
function calculateLastETHPrize(address _lastParticipant) public view returns(uint) { uint payout = 0; uint256 totalSupply = (lastTotalSupplyOfDragons.add(lastTotalSupplyOfHamsters)); if (depositDragons[currentRound - 1][_lastParticipant] > 0) { payout = totalSupply.mul(depositDragons[current...
/** * @dev Getting ETH prize of _lastParticipant * @param _lastParticipant Address of _lastParticipant */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 14992, 15645 ] }
20,768
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
Bank
contract Bank is Ownable { using SafeMath for uint256; mapping (uint256 => mapping (address => uint256)) public depositDragons; mapping (uint256 => mapping (address => uint256)) public depositHamsters; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; uint256 pub...
/* * @title Bank * @dev Bank contract which contained all ETH from Dragons and Hamsters teams. * When time in blockchain will be grater then current deadline or last deadline need call getWinner function * then participants able get prizes. * * Last participant(last hero) win 10% from all bank * * - To ...
Comment
calculateLastDeexPrize
function calculateLastDeexPrize(address _lastParticipant) public view returns(uint) { uint payout = 0; uint totalSupply = (lastTotalDeexSupplyOfDragons.add(lastTotalDeexSupplyOfHamsters)).mul(80).div(100); if (depositDragons[currentRound - 1][_lastParticipant] > 0) { payout = totalSupply.mul...
/** * @dev Getting Deex Token prize of _lastParticipant * @param _lastParticipant Address of _lastParticipant */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 15781, 16457 ] }
20,769
Bank
Bank.sol
0x5d4456d1f4203645fd9c194e654594a72d5e6c76
Solidity
CryptoTeam
contract CryptoTeam { using SafeMath for uint256; Bank public BankContract; DEEX public DEEXContract; address payable public team = 0x7De1eFb9E5035784FB931433c8a884588929338E; /** * @dev Payable function. 10% will send to Developers fund and 90% will send to JackPot contract. * Al...
/** * @dev Base contract for teams */
NatSpecMultiLine
function () external payable { require(BankContract.getState() && msg.value >= 0.05 ether); BankContract.setInfo(msg.sender, msg.value.mul(90).div(100)); team.transfer(msg.value.mul(10).div(100)); address(BankContract).transfer(msg.value.mul(90).div(100)); }
/** * @dev Payable function. 10% will send to Developers fund and 90% will send to JackPot contract. * Also setting info about player. */
NatSpecMultiLine
v0.5.6+commit.b259423e
bzzr://120cb13c13253e6b43ed7b782bc7d7946bf1a80ce6ecab1335e399786f6807c9
{ "func_code_index": [ 359, 669 ] }
20,770
StakeGatlingProxy
/Users/dingyp/vsCode/splitharvest/audit/contracts/utils/Proxy.sol
0xfaf781bac9336b951dcbc7cb0fc9d5796c353270
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Ad...
NatSpecMultiLine
_delegate
function _delegate(address implementation) internal virtual { // solhint-disable-next-line no-inline-assembly assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad...
/** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 222, 1121 ] }
20,771
StakeGatlingProxy
/Users/dingyp/vsCode/splitharvest/audit/contracts/utils/Proxy.sol
0xfaf781bac9336b951dcbc7cb0fc9d5796c353270
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Ad...
NatSpecMultiLine
_implementation
function _implementation() internal view virtual returns (address);
/** * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function * and {_fallback} should delegate. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1300, 1371 ] }
20,772
StakeGatlingProxy
/Users/dingyp/vsCode/splitharvest/audit/contracts/utils/Proxy.sol
0xfaf781bac9336b951dcbc7cb0fc9d5796c353270
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Ad...
NatSpecMultiLine
_fallback
function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); }
/** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internall call site, it will return directly to the external caller. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1596, 1710 ] }
20,773
StakeGatlingProxy
/Users/dingyp/vsCode/splitharvest/audit/contracts/utils/Proxy.sol
0xfaf781bac9336b951dcbc7cb0fc9d5796c353270
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Ad...
NatSpecMultiLine
/** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1903, 1972 ] }
20,774
StakeGatlingProxy
/Users/dingyp/vsCode/splitharvest/audit/contracts/utils/Proxy.sol
0xfaf781bac9336b951dcbc7cb0fc9d5796c353270
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Ad...
NatSpecMultiLine
/** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2128, 2196 ] }
20,775
StakeGatlingProxy
/Users/dingyp/vsCode/splitharvest/audit/contracts/utils/Proxy.sol
0xfaf781bac9336b951dcbc7cb0fc9d5796c353270
Solidity
Proxy
abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-...
/** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Ad...
NatSpecMultiLine
_beforeFallback
function _beforeFallback() internal virtual { }
/** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overriden should call `super._beforeFallback()`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2473, 2528 ] }
20,776
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 165, 238 ] }
20,777
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 462, 544 ] }
20,778
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 823, 911 ] }
20,779
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 1575, 1654 ] }
20,780
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 1967, 2069 ] }
20,781
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 259, 445 ] }
20,782
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 723, 864 ] }
20,783
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 1162, 1359 ] }
20,784
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
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-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 1613, 2089 ] }
20,785
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 2560, 2697 ] }
20,786
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 3188, 3471 ] }
20,787
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 3931, 4066 ] }
20,788
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 4546, 4717 ] }
20,789
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Context
abstract contract Context { //function _msgSender() internal view virtual returns (address payable) { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mut...
_msgSender
function _msgSender() internal view virtual returns (address) { return msg.sender; }
//function _msgSender() internal view virtual returns (address payable) {
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 108, 211 ] }
20,790
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 606, 1230 ] }
20,791
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 2160, 2562 ] }
20,792
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 3318, 3496 ] }
20,793
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 3721, 3922 ] }
20,794
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 4292, 4523 ] }
20,795
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 4774, 5095 ] }
20,796
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 557, 641 ] }
20,797
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 1200, 1353 ] }
20,798
SOM
SOM.sol
0x9fc217e26ad304957e637bf3630a8e0face5bd07
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://719d3f84d9b8bcadf610969e65b7d1173fa42b9ac26b9cac8f7fd89de3f8e13a
{ "func_code_index": [ 1503, 1752 ] }
20,799