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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BondTellerErc20 | contracts/BondTellerBase.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerBase | abstract contract BondTellerBase is IBondTeller, ReentrancyGuard, GovernableInitializable, ERC721EnhancedInitializable {
using SafeERC20 for IERC20;
/***************************************
GLOBAL VARIABLES
***************************************/
// prices
uint256 public capacity; ... | /**
* @title BondTellerBase
* @author solace.fi
* @notice A base type for bond tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool a... | NatSpecMultiLine | setTerms | function setTerms(Terms calldata terms) external onlyGovernance {
require(terms.startPrice > 0, "invalid price");
nextPrice = terms.startPrice;
minimumPrice = terms.minimumPrice;
maxPayout = terms.maxPayout;
require(terms.priceAdjDenom != 0, "1/0");
priceAdjNum = terms.priceAdjNum;
priceAdjD... | /**
* @notice Sets the bond terms.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param terms The terms of the bond.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
10979,
11814
]
} | 22,400 | ||
BondTellerErc20 | contracts/BondTellerBase.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerBase | abstract contract BondTellerBase is IBondTeller, ReentrancyGuard, GovernableInitializable, ERC721EnhancedInitializable {
using SafeERC20 for IERC20;
/***************************************
GLOBAL VARIABLES
***************************************/
// prices
uint256 public capacity; ... | /**
* @title BondTellerBase
* @author solace.fi
* @notice A base type for bond tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool a... | NatSpecMultiLine | setFees | function setFees(uint256 bondFee, uint256 daoFee) external onlyGovernance {
require(bondFee <= MAX_BPS, "invalid bond fee");
require(daoFee <= MAX_BPS, "invalid dao fee");
bondFeeBps = bondFee;
daoFeeBps = daoFee;
emit FeesSet();
}
| /**
* @notice Sets the bond fees.
* @param bondFee The fraction of **SOLACE** that will be sent to stakers measured in BPS.
* @param daoFee The fraction of `principal` that will be sent to the dao measured in BPS.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
12057,
12336
]
} | 22,401 | ||
BondTellerErc20 | contracts/BondTellerBase.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerBase | abstract contract BondTellerBase is IBondTeller, ReentrancyGuard, GovernableInitializable, ERC721EnhancedInitializable {
using SafeERC20 for IERC20;
/***************************************
GLOBAL VARIABLES
***************************************/
// prices
uint256 public capacity; ... | /**
* @title BondTellerBase
* @author solace.fi
* @notice A base type for bond tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool a... | NatSpecMultiLine | setAddresses | function setAddresses(
address solace_,
address xsolace_,
address pool_,
address dao_,
address principal_,
address bondDepo_
) external override onlyGovernance {
_setAddresses(solace_, xsolace_, pool_, dao_, principal_, bondDepo_);
}
| /**
* @notice Sets the addresses to call out.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param solace_ The SOLACE token.
* @param xsolace_ The xSOLACE token.
* @param pool_ The underwriting pool.
* @param dao_ The DAO.
* @param principal_ address The ERC20 token that users ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
12752,
13053
]
} | 22,402 | ||
BondTellerErc20 | contracts/BondTellerBase.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerBase | abstract contract BondTellerBase is IBondTeller, ReentrancyGuard, GovernableInitializable, ERC721EnhancedInitializable {
using SafeERC20 for IERC20;
/***************************************
GLOBAL VARIABLES
***************************************/
// prices
uint256 public capacity; ... | /**
* @title BondTellerBase
* @author solace.fi
* @notice A base type for bond tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool a... | NatSpecMultiLine | _setAddresses | function _setAddresses(
address solace_,
address xsolace_,
address pool_,
address dao_,
address principal_,
address bondDepo_
) internal {
require(solace_ != address(0x0), "zero address solace");
require(xsolace_ != address(0x0), "zero address xsolace");
require(pool_ != address(0x0)... | /**
* @notice Sets the addresses to call out.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param solace_ The SOLACE token.
* @param xsolace_ The xSOLACE token.
* @param pool_ The underwriting pool.
* @param dao_ The DAO.
* @param principal_ address The ERC20 token that users ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
13469,
14358
]
} | 22,403 | ||
UsernameRegistry | UsernameRegistry.sol | 0x0ab38601a798c4ee31401371ff817b78bb19b7b6 | Solidity | UsernameRegistry | contract UsernameRegistry {
event Register(address indexed _owner, bytes32 _name, bytes32 _userId);
ERC20Interface public manaToken;
uint256 public price = 100000000000000000000;
mapping (bytes32 => address) nameToAddress;
mapping (bytes32 => address) userIdToAddress;
mapping (address => bytes32) public name;... | setPrice | function setPrice(uint256 _price) onlyOwner public {
price = _price;
}
| // Lack of security (set only owner) | LineComment | v0.5.8+commit.23d335f2 | bzzr://0270878109c69d12847b741ee55c008d614dd697c62125578615a9590a127ad7 | {
"func_code_index": [
1361,
1438
]
} | 22,404 | |||
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Soarcoin | contract Soarcoin {
mapping (address => uint256) balances; // each address in this contract may have tokens.
address internal owner = 0x4Bce8E9850254A86a1988E2dA79e41Bc6793640d; // the owner is the creator of the smart contract
string public name = "Soarcoin"; ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance)
{
return balances[_owner];
}
| // query balance | LineComment | v0.4.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
942,
1064
]
} | 22,405 | |||
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Soarcoin | contract Soarcoin {
mapping (address => uint256) balances; // each address in this contract may have tokens.
address internal owner = 0x4Bce8E9850254A86a1988E2dA79e41Bc6793640d; // the owner is the creator of the smart contract
string public name = "Soarcoin"; ... | transfer | function transfer(address _to, uint256 _value) returns (bool success)
{
if(_value <= 0) throw; // Check send token value > 0;
if (balances[msg.sender] < _value) throw; // Check if the sender has enough
if (balances[_to] + _value < balances[_to]) thr... | // transfer tokens from one address to another | LineComment | v0.4.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
1119,
1977
]
} | 22,406 | |||
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Token | contract Token is Soarcoin {
/// @return total amount of tokens
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice send `_value` token to `_to` from `msg.... | /**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @return total amount of tokens
/// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
185,
262
]
} | 22,407 | |
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Token | contract Token is Soarcoin {
/// @return total amount of tokens
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice send `_value` token to `_to` from `msg.... | /**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | 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.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
499,
576
]
} | 22,408 | |
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Token | contract Token is Soarcoin {
/// @return total amount of tokens
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice send `_value` token to `_to` from `msg.... | /**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | 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.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
899,
995
]
} | 22,409 | |
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Token | contract Token is Soarcoin {
/// @return total amount of tokens
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice send `_value` token to `_to` from `msg.... | /**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | 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.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
1279,
1360
]
} | 22,410 | |
Soarcoin | Soarcoin.sol | 0x70a8629c1b9a50133c5325502232bd54447beee7 | Solidity | Token | contract Token is Soarcoin {
/// @return total amount of tokens
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice send `_value` token to `_to` from `msg.... | /**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | 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.8+commit.60cc1668 | bzzr://210855dee104fba016e253a890c9ffd0288a9619becc2a9356019948ee79716c | {
"func_code_index": [
1568,
1665
]
} | 22,411 | |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | 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) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @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.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
606,
1033
]
} | 22,412 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive () payable external {
_fallback();
}
/... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | /**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
114,
170
]
} | 22,413 | ||
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive () payable external {
_fallback();
}
/... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | /**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
259,
314
]
} | 22,414 | ||
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive () payable external {
_fallback();
}
/... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal virtual view returns (address);
| /**
* @return The Address of the implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
380,
450
]
} | 22,415 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive () payable external {
_fallback();
}
/... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _delegate | function _delegate(address implementation) internal {
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 at memory position 0.
calldatacopy(0, 0, calldatasize())
... | /**
* @dev Delegates execution to an implementation contract.
* This is a low level function that doesn't return to its internal call site.
* It will return to the external caller whatever the implementation returns.
* @param implementation Address to delegate.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
741,
1506
]
} | 22,416 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive () payable external {
_fallback();
}
/... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _willFallback | function _willFallback() internal virtual {
}
| /**
* @dev Function that is run as the first thing in the fallback function.
* Can be redefined in derived contracts to add functionality.
* Redefinitions must call super._willFallback().
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
1719,
1770
]
} | 22,417 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | Proxy | abstract contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
fallback () payable external {
_fallback();
}
/**
* @dev Receive function.
* Implemented entirely in `_fallback`.
*/
receive () payable external {
_fallback();
}
/... | /**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/ | NatSpecMultiLine | _fallback | function _fallback() internal {
_willFallback();
_delegate(_implementation());
}
| /**
* @dev fallback implementation.
* Extracted to enable manual triggering.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
1868,
1964
]
} | 22,418 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Contract constructor.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be ... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _implementation | function _implementation() internal override view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
| /**
* @dev Returns the current implementation.
* @return impl Address of the current implementation
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
1534,
1707
]
} | 22,419 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Contract constructor.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be ... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _upgradeTo | function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
| /**
* @dev Upgrades the proxy to a new implementation.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
1845,
1993
]
} | 22,420 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev Contract constructor.
* @param _logic Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be ... | /**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/ | NatSpecMultiLine | _setImplementation | function _setImplementation(address newImplementation) internal {
require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
| /**
* @dev Sets the implementation address of the proxy.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
2133,
2429
]
} | 22,421 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | admin | function admin() external ifAdmin returns (address) {
return _admin();
}
| /**
* @return The address of the proxy admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
1795,
1878
]
} | 22,422 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | implementation | function implementation() external ifAdmin returns (address) {
return _implementation();
}
| /**
* @return The address of the implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
1944,
2045
]
} | 22,423 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | changeAdmin | function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
}
| /**
* @dev Changes the admin of the proxy.
* Only the current admin can call this function.
* @param newAdmin Address to transfer proxy administration to.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
2225,
2456
]
} | 22,424 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | upgradeTo | function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
| /**
* @dev Upgrade the backing implementation of the proxy.
* Only the admin can call this function.
* @param newImplementation Address of the new implementation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
2644,
2752
]
} | 22,425 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | upgradeToAndCall | function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin {
_upgradeTo(newImplementation);
(bool success,) = newImplementation.delegatecall(data);
require(success);
}
| /**
* @dev Upgrade the backing implementation of the proxy and call a function
* on the new implementation.
* This is useful to initialize the proxied contract.
* @param newImplementation Address of the new implementation.
* @param data Data to send as msg.data in the low level call.
* It should include the... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
3277,
3505
]
} | 22,426 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | _admin | function _admin() internal view returns (address adm) {
bytes32 slot = ADMIN_SLOT;
assembly {
adm := sload(slot)
}
}
| /**
* @return adm The admin slot.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
3556,
3700
]
} | 22,427 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | _setAdmin | function _setAdmin(address newAdmin) internal {
bytes32 slot = ADMIN_SLOT;
assembly {
sstore(slot, newAdmin)
}
}
| /**
* @dev Sets the address of the proxy admin.
* @param newAdmin Address of the new proxy admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
3819,
3961
]
} | 22,428 |
AdminUpgradeabilityProxy | AdminUpgradeabilityProxy.sol | 0xd4dea11288de10e73d3b3d93d88e73ef7cdea3fe | Solidity | AdminUpgradeabilityProxy | contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* Contract constructor.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It ... | /**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that wou... | NatSpecMultiLine | _willFallback | function _willFallback() internal override virtual {
require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
super._willFallback();
}
| /**
* @dev Only fall back when the sender is not the admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://0fffe80378c3d304940f79bed3c19404453e2d10ad2df2997073e0bcefb5455d | {
"func_code_index": [
4038,
4218
]
} | 22,429 |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | Restriction | contract Restriction {
address internal owner = msg.sender;
mapping(address => bool) internal granted;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
/**
* @notice Change the owner of the contract
* @param _owner New owner
*/
function changeOwner(address _owner) external onlyOwner {
... | /**
* @title Implementation of token that conforms the ERC-20 Token Standard
*/ | NatSpecMultiLine | changeOwner | function changeOwner(address _owner) external onlyOwner {
require(_owner != address(0) && _owner != owner);
owner = _owner;
ChangeOwner(owner);
}
| /**
* @notice Change the owner of the contract
* @param _owner New owner
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
260,
418
]
} | 22,430 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | BasicToken | function BasicToken(string _name, string _symbol, uint8 _decimals, uint256 _supply) public {
name = _name;
symbol = _symbol;
decimals = _decimals;
_mintTokens(_supply);
}
| /**
* @dev Construct a token.
* @param _name The name of the token.
* @param _symbol The symbol of the token.
* @param _decimals The decimals of the token.
* @param _supply The initial supply of the token.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
503,
689
]
} | 22,431 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _holder) external view returns (uint256) {
return balances[_holder];
}
| /**
* @dev Get the balance of the given holder.
* @param _holder The address of the token holder to query the the balance of.
* @return The token amount owned by the holder.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
877,
981
]
} | 22,432 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _amount) external returns (bool) {
return _transfer(msg.sender, _to, _amount, "");
}
| /**
* @dev Transfer tokens to a specified holder.
* @param _to The address to transfer to.
* @param _amount The amount to be transferred.
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
1189,
1319
]
} | 22,433 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _amount, bytes _data) external returns (bool) {
return _transfer(msg.sender, _to, _amount, _data);
}
| /**
* @dev Transfer tokens to a specified holder.
* @param _to The address to transfer to.
* @param _amount The amount to be transferred.
* @param _data The data that is attached to this transaction.
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
1591,
1737
]
} | 22,434 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | _transfer | function _transfer(address _from, address _to, uint256 _amount, bytes _data) internal returns (bool) {
require(_to != address(0)
&& _to != address(this)
&& _from != address(0)
&& _from != _to
&& _amount > 0
&& balances[_from] >= _amount
&& balances[_to] + _amount > balances[_to]
);
balances[_fro... | /**
* @dev Transfer tokens from one address to another
* @param _from The address from which you want to transfer tokens
* @param _to The address to which you want to transfer tokens
* @param _amount The amount of tokens to be transferred
* @param _data The data that is attached to this transaction.
*... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
2112,
2690
]
} | 22,435 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | _mintTokens | function _mintTokens(uint256 _amount) internal onlyOwner returns (bool success){
require(totalSupply + _amount > totalSupply);
totalSupply += _amount;
balances[msg.sender] += _amount;
Transfer(address(0), msg.sender, _amount);
return true;
}
| /**
* @dev Mint tokens.
* @param _amount The amount of tokens to mint.
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
2829,
3089
]
} | 22,436 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | BasicToken | contract BasicToken is Restriction {
string public name;
string public symbol;
uint8 public decimals = 0;
uint256 public totalSupply = 0;
mapping(address => uint256) private balances;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
/**
* @dev Construct a token.
* @pa... | /**
* @dev Basic token
*/ | NatSpecMultiLine | _burnTokens | function _burnTokens(uint256 _amount) internal returns (bool success){
require(balances[msg.sender] > _amount);
totalSupply -= _amount;
balances[owner] -= _amount;
Transfer(msg.sender, address(0), _amount);
return true;
}
| /**
* @dev Burn tokens.
* @param _amount The amount of tokens to burn.
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
3228,
3468
]
} | 22,437 | |
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | ERC20Compatible | contract ERC20Compatible {
mapping(address => mapping(address => uint256)) private allowed;
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function _transfer(address _from, address _to, uint256 _amount, bytes _data) internal returns (bool success);
/**
* @dev Get the am... | allowance | function allowance(address _owner, address _spender) external constant returns (uint256 amount) {
return allowed[_owner][_spender];
}
| /**
* @dev Get the amount of tokens that a holder allowed other holder to spend.
* @param _owner The address of the owner.
* @param _spender The address of the spender.
* @return amount The amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
551,
691
]
} | 22,438 | |||
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | ERC20Compatible | contract ERC20Compatible {
mapping(address => mapping(address => uint256)) private allowed;
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function _transfer(address _from, address _to, uint256 _amount, bytes _data) internal returns (bool success);
/**
* @dev Get the am... | approve | function approve(address _spender, uint256 _amount) external returns (bool success) {
require( _spender != address(0)
&& _spender != msg.sender
&& (_amount == 0 || allowed[msg.sender][_spender] == 0)
);
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address of the holder who will spend the tokens of the msg.sender.
* @param _amount The amount of tokens allow to be spent.
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
1010,
1338
]
} | 22,439 | |||
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | ERC20Compatible | contract ERC20Compatible {
mapping(address => mapping(address => uint256)) private allowed;
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function _transfer(address _from, address _to, uint256 _amount, bytes _data) internal returns (bool success);
/**
* @dev Get the am... | transferFrom | function transferFrom(address _from, address _to, uint256 _amount) external returns (bool success) {
require(allowed[_from][msg.sender] >= _amount);
allowed[_from][msg.sender] -= _amount;
return _transfer(_from, _to, _amount, "");
}
| /**
* @dev Transfer tokens from one holder to the other holder.
* @param _from The address from which the tokens will be transfered.
* @param _to The address to which the tokens will be transfered.
* @param _amount The amount of tokens to be transferred.
* @return returns true on success or throw on fail... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
1665,
1910
]
} | 22,440 | |||
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | Regulatable | contract Regulatable is Restriction {
function _mintTokens(uint256 _amount) internal onlyOwner returns (bool success);
function _burnTokens(uint256 _amount) internal returns (bool success);
/**
* @notice Mint more tokens
* @param _amount The amount of token to be minted
* @return returns true on success or ... | mintTokens | function mintTokens(uint256 _amount) external onlyOwner returns (bool){
return _mintTokens(_amount);
}
| /**
* @notice Mint more tokens
* @param _amount The amount of token to be minted
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
343,
452
]
} | 22,441 | |||
Token | Token.sol | 0x38c2abd3d7ff6b3d45e01da3be6282bdb98fefd2 | Solidity | Regulatable | contract Regulatable is Restriction {
function _mintTokens(uint256 _amount) internal onlyOwner returns (bool success);
function _burnTokens(uint256 _amount) internal returns (bool success);
/**
* @notice Mint more tokens
* @param _amount The amount of token to be minted
* @return returns true on success or ... | burnTokens | function burnTokens(uint256 _amount) external returns (bool){
return _burnTokens(_amount);
}
| /**
* @notice Burn some tokens
* @param _amount The amount of token to be burnt
* @return returns true on success or throw on failure
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://761c2053ee045b3862d75c530886eb0db31ca9052232c3af9cd9c52e3b2574fb | {
"func_code_index": [
600,
699
]
} | 22,442 | |||
EOCHToken | EOCHToken.sol | 0x6468890abb29d2dcf9c81e5d3377a61ff5de63e0 | Solidity | EOCHToken | contract EOCHToken {
string public name = "Everything On Chain for Health"; // token name
string public symbol = "EOCH"; // token symbol
uint256 public decimals = 6; // token digit
uint256 constant valueFounder = 16000000000000000;
mapping (address => uint256) p... | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance){
return balanceMap[_owner] + frozenOf[_owner];
}
| // ## | LineComment | v0.4.24+commit.e67f0147 | bzzr://841b89be83c11e7aa0577815b2d91e799aa461b9a418c0138140068701f1f401 | {
"func_code_index": [
4610,
4754
]
} | 22,443 | |||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
94,
154
]
} | 22,444 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
237,
310
]
} | 22,445 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
534,
616
]
} | 22,446 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
895,
983
]
} | 22,447 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
1647,
1726
]
} | 22,448 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
2039,
2141
]
} | 22,449 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
259,
445
]
} | 22,450 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
723,
864
]
} | 22,451 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
1162,
1359
]
} | 22,452 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
1613,
2089
]
} | 22,453 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
2560,
2697
]
} | 22,454 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
3188,
3471
]
} | 22,455 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
3931,
4066
]
} | 22,456 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
4546,
4717
]
} | 22,457 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
606,
1230
]
} | 22,458 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
2160,
2562
]
} | 22,459 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
3318,
3496
]
} | 22,460 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
3721,
3922
]
} | 22,461 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
4292,
4523
]
} | 22,462 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | 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 ... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
4774,
5095
]
} | 22,463 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
497,
581
]
} | 22,464 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
1139,
1292
]
} | 22,465 | ||
SPHINX | SPHINX.sol | 0xd67fc37df5a6f170f04488a9652106a633f86b73 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | 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.6.12+commit.27d51765 | None | ipfs://6871c54b59ecfde30463d8ef6985fcba60cca4d4a9f84182e4336ae1bba27f07 | {
"func_code_index": [
1442,
1691
]
} | 22,466 | ||
UPStable | /C/Crypto/Projects/zstable/contracts/ZST.sol | 0x4ef66e564e89a60041eebce4716e142626c2f2f4 | Solidity | UPStable | contract UPStable is Setters, Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
modifier taxlessTx {
_taxLess = true;
_;
_taxLess = false;
}
constructor () public {
// uniswapRouterV2 = IUniswapV2Router02(Constants.getRoute... | buyPresale | function buyPresale() external payable {
require(!isPresaleDone(), "Presale is already completed");
require(_presaleTime <= now, "Presale hasn't started yet");
require(_presaleParticipation[_msgSender()].add(msg.value) <= Constants.getPresaleIndividualCap(), "Crossed individual cap");
require(_presa... | // Presale function | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
6730,
8039
]
} | 22,467 | ||||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | function()
isActivated()
isHuman()
isWithinLimits(msg.value)
public
payable
{
// set up our tx event data and determine if player is new or not
F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);
// fetch player id
uint256 _pID = pIDxAddr_[msg.sender]... | /**
* @dev emergency buy uses last stored affiliate ID and team snek
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
6265,
6719
]
} | 22,468 | ||||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | buyXid | function buyXid(uint256 _affCode, uint256 _team)
isActivated()
isHuman()
isWithinLimits(msg.value)
public
payable
{
// set up our tx event data and determine if player is new or not
F3Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_);
// fetch player id
... | /**
* @dev converts all incoming ethereum to keys.
* -functionhash- 0x8f38f309 (using ID for affiliate)
* -functionhash- 0x98a0871d (using address for affiliate)
* -functionhash- 0xa65b37a1 (using name for affiliate)
* @param _affCode the ID/address/name of the player who gets the affiliate fee
* @param _te... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
7120,
8187
]
} | 22,469 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | reLoadXid | function reLoadXid(uint256 _affCode, uint256 _team, uint256 _eth)
isActivated()
isHuman()
isWithinLimits(_eth)
public
{
// set up our tx event data
F3Ddatasets.EventReturns memory _eventData_;
// fetch player ID
uint256 _pID = pIDxAddr_[msg.sender];
// manage affiliate ... | /**
* @dev essentially the same as buy, but instead of you sending ether
* from your wallet, it uses your unwithdrawn earnings.
* -functionhash- 0x349cdcac (using ID for affiliate)
* -functionhash- 0x82bfc739 (using address for affiliate)
* -functionhash- 0x079ce327 (using name for affiliate)
* @param _affC... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
11287,
12295
]
} | 22,470 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | withdraw | function withdraw()
isActivated()
isHuman()
public
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// fetch player ID
uint256 _pID = pIDxAddr_[msg.sender];
// setup temp var for player eth
uint256 _eth;
// check to see if ro... | /**
* @dev withdraws all of your earnings.
* -functionhash- 0x3ccfd60b
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
14813,
16891
]
} | 22,471 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | registerNameXID | function registerNameXID(string _nameString, uint256 _affCode, bool _all)
isHuman()
public
payable
{
bytes32 _name = _nameString.nameFilter();
address _addr = msg.sender;
uint256 _paid = msg.value;
(bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXIDFromDapp.value(_paid)(... | /**
* @dev use these to register names. they are just wrappers that will send the
* registration requests to the PlayerBook contract. So registering here is the
* same as registering there. UI will always display the last name you registered.
* but you will still own all previously registered names to use as... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
18105,
18697
]
} | 22,472 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | getBuyPrice | function getBuyPrice()
public
view
returns(uint256)
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// are we in a round?
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0... | /**
* @dev return the price buyer will pay for next 1 individual key.
* -functionhash- 0x018a25e8
* @return price for next key bought (in wei format)
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
20359,
20936
]
} | 22,473 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | getTimeLeft | function getTimeLeft()
public
view
returns(uint256)
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
if (_now < round_[_rID].end)
if (_now > round_[_rID].strt + rndGap_)
return( (round_[_rID].end).sub(_now) );
else
... | /**
* @dev returns time left. dont spam this, you'll ddos yourself from your node
* provider
* -functionhash- 0xc7e284b8
* @return time left in seconds
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
21130,
21612
]
} | 22,474 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | getPlayerVaults | function getPlayerVaults(uint256 _pID)
public
view
returns(uint256 ,uint256, uint256)
{
// setup local rID
uint256 _rID = rID_;
// if round has ended. but round end has not been run (so contract has not distributed winnings)
if (now > round_[_rID].end && round_[_rID].ended == fals... | /**
* @dev returns player earnings per vaults
* -functionhash- 0x63066434
* @return winnings vault
* @return general vault
* @return affiliate vault
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
21808,
23259
]
} | 22,475 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | getPlayerVaultsHelper | function getPlayerVaultsHelper(uint256 _pID, uint256 _rID)
private
view
returns(uint256)
{
return( ((((round_[_rID].mask).add(((((round_[_rID].pot).mul(potSplit_[round_[_rID].team].gen)) / 100).mul(1000000000000000000)) / (round_[_rID].keys))).mul(plyrRnds_[_pID][_rID].keys)) / 1000000000000000000... | /**
* solidity hates stack limits. this lets us avoid that hate
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
23347,
23704
]
} | 22,476 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | getCurrentRoundInfo | function getCurrentRoundInfo()
public
view
returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, address, bytes32, uint256, uint256, uint256, uint256, uint256)
{
// setup local rID
uint256 _rID = rID_;
return
(
round_[_rID].ico, //0
... | /**
* @dev returns all current round info needed for front end
* -functionhash- 0x747dff42
* @return eth invested during ICO phase
* @return round id
* @return total keys for round
* @return time round ends
* @return time round started
* @return current pot
* @return current team ID & player ID in lea... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
24377,
25428
]
} | 22,477 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | getPlayerInfoByAddress | function getPlayerInfoByAddress(address _addr)
public
view
returns(uint256, bytes32, uint256, uint256, uint256, uint256, uint256)
{
// setup local rID
uint256 _rID = rID_;
if (_addr == address(0))
{
_addr == msg.sender;
}
uint256 _pID = pIDxAddr_[_addr];
r... | /**
* @dev returns player info based on address. if no address is given, it will
* use msg.sender
* -functionhash- 0xee0b5d8b
* @param _addr address of the player you want to lookup
* @return player ID
* @return player name
* @return keys owned (current round)
* @return winnings vault
* @return gener... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
25872,
26690
]
} | 22,478 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | buyCore | function buyCore(uint256 _pID, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// if round is active
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end ... | /**
* @dev logic runs whenever a buy order is executed. determines how to handle
* incoming eth depending on if we are in an active round or not
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
27151,
28998
]
} | 22,479 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | reLoadCore | function reLoadCore(uint256 _pID, uint256 _affID, uint256 _team, uint256 _eth, F3Ddatasets.EventReturns memory _eventData_)
private
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// if round is active
if (_now > round_[_rID].strt + rndGap_ && (_now <= ... | /**
* @dev logic runs whenever a reload order is executed. determines how to handle
* incoming eth depending on if we are in an active round or not
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
29176,
31042
]
} | 22,480 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | core | function core(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
{
//take off 30%
uint256 _coin_fee = ((_eth).mul(30)) / 100;
coin_base.transfer(_coin_fee);
_eth = _eth-_coin_fee;
// if player is new to round
... | /**
* @dev this is the core logic for any buy/reload that happens while a round
* is live.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
31162,
35960
]
} | 22,481 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | calcUnMaskedEarnings | function calcUnMaskedEarnings(uint256 _pID, uint256 _rIDlast)
private
view
returns(uint256)
{
return( (((round_[_rIDlast].mask).mul(plyrRnds_[_pID][_rIDlast].keys)) / (1000000000000000000)).sub(plyrRnds_[_pID][_rIDlast].mask) );
}
| /**
* @dev calculates unmasked earnings (just calculates, does not update mask)
* @return earnings in wei format
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
36336,
36619
]
} | 22,482 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | calcKeysReceived | function calcKeysReceived(uint256 _rID, uint256 _eth)
public
view
returns(uint256)
{
// grab time
uint256 _now = now;
// are we in a round?
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
return (... | /**
* @dev returns the amount of keys you would get given an amount of eth.
* -functionhash- 0xce89c80c
* @param _rID round ID you want price for
* @param _eth amount of eth sent in
* @return keys received
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
36872,
37370
]
} | 22,483 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | iWantXKeys | function iWantXKeys(uint256 _keys)
public
view
returns(uint256)
{
// setup local rID
uint256 _rID = rID_;
// grab time
uint256 _now = now;
// are we in a round?
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rI... | /**
* @dev returns current eth price for X keys.
* -functionhash- 0xcf808000
* @param _keys number of keys desired (in 18 decimal format)
* @return amount of eth needed to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
37588,
38140
]
} | 22,484 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | receivePlayerInfo | function receivePlayerInfo(uint256 _pID, address _addr, bytes32 _name, uint256 _laff)
external
{
require (msg.sender == address(PlayerBook), "your not playerNames contract... hmmm..");
if (pIDxAddr_[_addr] != _pID)
pIDxAddr_[_addr] = _pID;
if (pIDxName_[_name] != _pID)
pIDxName_[_... | /**
* @dev receives name/player info from names contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
38425,
39127
]
} | 22,485 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | receivePlayerNameList | function receivePlayerNameList(uint256 _pID, bytes32 _name)
external
{
require (msg.sender == address(PlayerBook), "your not playerNames contract... hmmm..");
if(plyrNames_[_pID][_name] == false)
plyrNames_[_pID][_name] = true;
}
| /**
* @dev receives entire player name list
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
39194,
39478
]
} | 22,486 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | determinePID | function determinePID(F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
uint256 _pID = pIDxAddr_[msg.sender];
// if player is new to this version of fomo3d
if (_pID == 0)
{
// grab their player ID, name and last aff ID, from player names co... | /**
* @dev gets existing or registers new pID. use this when a player may be new
* @return pID
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
39603,
40731
]
} | 22,487 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | verifyTeam | function verifyTeam(uint256 _team)
private
pure
returns (uint256)
{
if (_team < 0 || _team > 3)
return(2);
else
return(_team);
}
| /**
* @dev checks to make sure user picked a valid team. if not sets team
* to default (sneks)
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
40856,
41070
]
} | 22,488 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | managePlayer | function managePlayer(uint256 _pID, F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
// if player has played a previous round, move their unmasked earnings
// from that round to gen vault.
if (plyr_[_pID].lrnd != 0)
updateGenVault(_pID, plyr_[_... | /**
* @dev decides if round end needs to be run & new round started. and if
* player unmasked earnings from previously played rounds need to be moved.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
41251,
41855
]
} | 22,489 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | endRound | function endRound(F3Ddatasets.EventReturns memory _eventData_)
private
returns (F3Ddatasets.EventReturns)
{
// setup local rID
uint256 _rID = rID_;
// grab our winning player and team id's
uint256 _winPID = round_[_rID].plyr;
uint256 _winTID = round_[_rID].team;
// grab our ... | /**
* @dev ends the round. manages paying out winner/splitting up pot
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
41948,
44224
]
} | 22,490 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | updateGenVault | function updateGenVault(uint256 _pID, uint256 _rIDlast)
private
{
uint256 _earnings = calcUnMaskedEarnings(_pID, _rIDlast);
if (_earnings > 0)
{
// put in gen vault
plyr_[_pID].gen = _earnings.add(plyr_[_pID].gen);
// zero out their earnings by updating mask
plyr... | /**
* @dev moves any unmasked earnings to gen vault. updates earnings mask
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
44323,
44777
]
} | 22,491 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | updateTimer | function updateTimer(uint256 _keys, uint256 _rID)
private
{
// grab time
uint256 _now = now;
// calculate time based on number of keys bought
uint256 _newTime;
if (_now > round_[_rID].end && round_[_rID].plyr == 0)
_newTime = (((_keys) / (1000000000000000000)).mul(rndInc_)).add... | /**
* @dev updates round timer based on number of whole keys bought.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
44869,
45552
]
} | 22,492 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | airdrop | function airdrop()
private
view
returns(bool)
{
uint256 seed = uint256(keccak256(abi.encodePacked(
(block.timestamp).add
(block.difficulty).add
((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add
(block.gaslimit).add
((uint256(keccak25... | /**
* @dev generates a random number between 0-99 and checks to see if thats
* resulted in an airdrop win
* @return do we have a winner?
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
45724,
46318
]
} | 22,493 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | distributeExternal | function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
// pay 3% out to community rewards
uint256 _p1 = _eth / 100;
uint256 _com = _eth / 50;
_com = _com.... | /**
* @dev distributes eth based on fees to com, aff, and p3d
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
46403,
48371
]
} | 22,494 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | distributeInternal | function distributeInternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _team, uint256 _keys, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
// calculate gen share
uint256 _gen = (_eth.mul(fees_[_team].gen)) / 100;
// toss 1% into airdrop pot
... | /**
* @dev distributes eth based on fees to gen and pot
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
48709,
49923
]
} | 22,495 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | updateMasks | function updateMasks(uint256 _rID, uint256 _pID, uint256 _gen, uint256 _keys)
private
returns(uint256)
{
/* MASKING NOTES
earnings masks are a tricky thing for people to wrap their minds around.
the basic thing to understand here. is were going to have a global
tracker based ... | /**
* @dev updates masks for round and player when keys are bought
* @return dust left over
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
50044,
51440
]
} | 22,496 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | withdrawEarnings | function withdrawEarnings(uint256 _pID)
private
returns(uint256)
{
// update gen vault
updateGenVault(_pID, plyr_[_pID].lrnd);
// from vaults
uint256 _earnings = (plyr_[_pID].win).add(plyr_[_pID].gen).add(plyr_[_pID].aff);
if (_earnings > 0)
{
plyr_[_pID].win = 0;
... | /**
* @dev adds up unmasked earnings, & vault earnings, sets them all to 0
* @return earnings in wei format
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
51577,
52054
]
} | 22,497 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DGame | contract F3DGame is modularShort {
using SafeMath for *;
using NameFilter for string;
using F3DKeysCalcShort for uint256;
PlayerBookInterface constant private PlayerBook = PlayerBookInterface(0xC0E7e9b6a8Ccc06270069f1370c1F01163B094b9);
//========================================================... | endTx | function endTx(uint256 _pID, uint256 _team, uint256 _eth, uint256 _keys, F3Ddatasets.EventReturns memory _eventData_)
private
{
_eventData_.compressedData = _eventData_.compressedData + (now * 1000000000000000000) + (_team * 100000000000000000000000000000);
_eventData_.compressedIDs = _eventData_.compre... | /**
* @dev prepares compression data and fires event for buy or reload tx's
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
52153,
53090
]
} | 22,498 | |||
F3DGame | F3DGame.sol | 0x09f3b2e744b62eff955a0e4cedadcff2fb923d55 | Solidity | F3DKeysCalcShort | library F3DKeysCalcShort {
using SafeMath for *;
/**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/
function keysRec(uint256 _curEth, uint256 _n... | //==============================================================================
// | _ _ _ | _ .
// |<(/_\/ (_(_||(_ .
//=======/====================================================================== | LineComment | keysRec | function keysRec(uint256 _curEth, uint256 _newEth)
internal
pure
returns (uint256)
{
return(keys((_curEth).add(_newEth)).sub(keys(_curEth)));
}
| /**
* @dev calculates number of keys received given X eth
* @param _curEth current amount of eth in contract
* @param _newEth eth being spent
* @return amount of ticket purchased
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://27c439e84703dc0eadb1021ad12a52a6c3bed6f56d5456de4491420ec392438d | {
"func_code_index": [
272,
466
]
} | 22,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.