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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AccessControlledAggregator | FluxAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | FluxAggregator | contract FluxAggregator is AggregatorV2V3Interface, Owned {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeMath64 for uint64;
using SafeMath32 for uint32;
struct Round {
int256 answer;
uint64 startedAt;
uint64 updatedAt;
uint32 answeredInRound;
}
struct RoundDetails... | /**
* @title The Prepaid Aggregator contract
* @notice Handles aggregating data pushed in from off-chain, and unlocks
* payment for oracles as they report. Oracles' submissions are gathered in
* rounds, with each round aggregating the submissions for each oracle into a
* single answer. The latest aggregated answer... | NatSpecMultiLine | requestNewRound | function requestNewRound()
external
returns (uint80)
{
require(requesters[msg.sender].authorized, "not authorized requester");
uint32 current = reportingRoundId;
require(rounds[current].updatedAt > 0 || timedOut(current), "prev round must be supersedable");
uint32 newRoundId = current.add(1);
requesterI... | /**
* @notice allows non-oracles to request a new round
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
18643,
19038
]
} | 7,400 | |
AccessControlledAggregator | FluxAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | FluxAggregator | contract FluxAggregator is AggregatorV2V3Interface, Owned {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeMath64 for uint64;
using SafeMath32 for uint32;
struct Round {
int256 answer;
uint64 startedAt;
uint64 updatedAt;
uint32 answeredInRound;
}
struct RoundDetails... | /**
* @title The Prepaid Aggregator contract
* @notice Handles aggregating data pushed in from off-chain, and unlocks
* payment for oracles as they report. Oracles' submissions are gathered in
* rounds, with each round aggregating the submissions for each oracle into a
* single answer. The latest aggregated answer... | NatSpecMultiLine | setRequesterPermissions | function setRequesterPermissions(address _requester, bool _authorized, uint32 _delay)
external
onlyOwner()
{
if (requesters[_requester].authorized == _authorized) return;
if (_authorized) {
requesters[_requester].authorized = _authorized;
requesters[_requester].delay = _delay;
} else {
delete req... | /**
* @notice allows the owner to specify new non-oracles to start new rounds
* @param _requester is the address to set permissions for
* @param _authorized is a boolean specifying whether they can start new rounds or not
* @param _delay is the number of rounds the requester must wait before starting another round
... | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
19376,
19814
]
} | 7,401 | |
AccessControlledAggregator | FluxAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | FluxAggregator | contract FluxAggregator is AggregatorV2V3Interface, Owned {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeMath64 for uint64;
using SafeMath32 for uint32;
struct Round {
int256 answer;
uint64 startedAt;
uint64 updatedAt;
uint32 answeredInRound;
}
struct RoundDetails... | /**
* @title The Prepaid Aggregator contract
* @notice Handles aggregating data pushed in from off-chain, and unlocks
* payment for oracles as they report. Oracles' submissions are gathered in
* rounds, with each round aggregating the submissions for each oracle into a
* single answer. The latest aggregated answer... | NatSpecMultiLine | onTokenTransfer | function onTokenTransfer(address, uint256, bytes calldata _data)
external
{
require(_data.length == 0, "transfer doesn't accept calldata");
updateAvailableFunds();
}
| /**
* @notice called through LINK's transferAndCall to update available funds
* in the same transaction as the funds were transferred to the aggregator
* @param _data is mostly ignored. It is checked for length, to be sure
* nothing strange is passed in.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
20091,
20274
]
} | 7,402 | |
AccessControlledAggregator | FluxAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | FluxAggregator | contract FluxAggregator is AggregatorV2V3Interface, Owned {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeMath64 for uint64;
using SafeMath32 for uint32;
struct Round {
int256 answer;
uint64 startedAt;
uint64 updatedAt;
uint32 answeredInRound;
}
struct RoundDetails... | /**
* @title The Prepaid Aggregator contract
* @notice Handles aggregating data pushed in from off-chain, and unlocks
* payment for oracles as they report. Oracles' submissions are gathered in
* rounds, with each round aggregating the submissions for each oracle into a
* single answer. The latest aggregated answer... | NatSpecMultiLine | oracleRoundState | function oracleRoundState(address _oracle, uint32 _queriedRoundId)
external
view
returns (
bool _eligibleToSubmit,
uint32 _roundId,
int256 _latestSubmission,
uint64 _startedAt,
uint64 _timeout,
uint128 _availableFunds,
uint8 _oracleCount,
uint128 _paymentAmount
)
{
require(msg.... | /**
* @notice a method to provide all current info oracles need. Intended only
* only to be callable by oracles. Not for use by contracts to read state.
* @param _oracle the address to look up information for.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
20503,
21451
]
} | 7,403 | |
AccessControlledAggregator | FluxAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | FluxAggregator | contract FluxAggregator is AggregatorV2V3Interface, Owned {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeMath64 for uint64;
using SafeMath32 for uint32;
struct Round {
int256 answer;
uint64 startedAt;
uint64 updatedAt;
uint32 answeredInRound;
}
struct RoundDetails... | /**
* @title The Prepaid Aggregator contract
* @notice Handles aggregating data pushed in from off-chain, and unlocks
* payment for oracles as they report. Oracles' submissions are gathered in
* rounds, with each round aggregating the submissions for each oracle into a
* single answer. The latest aggregated answer... | NatSpecMultiLine | setValidator | function setValidator(address _newValidator)
public
onlyOwner()
{
address previous = address(validator);
if (previous != _newValidator) {
validator = AggregatorValidatorInterface(_newValidator);
emit ValidatorUpdated(previous, _newValidator);
}
}
| /**
* @notice method to update the address which does external data validation.
* @param _newValidator designates the address of the new validation contract.
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
21625,
21911
]
} | 7,404 | |
AccessControlledAggregator | FluxAggregator.sol | 0xb8169f6d97c66c50ef27b7b1b3fb2875d2b036a4 | Solidity | FluxAggregator | contract FluxAggregator is AggregatorV2V3Interface, Owned {
using SafeMath for uint256;
using SafeMath128 for uint128;
using SafeMath64 for uint64;
using SafeMath32 for uint32;
struct Round {
int256 answer;
uint64 startedAt;
uint64 updatedAt;
uint32 answeredInRound;
}
struct RoundDetails... | /**
* @title The Prepaid Aggregator contract
* @notice Handles aggregating data pushed in from off-chain, and unlocks
* payment for oracles as they report. Oracles' submissions are gathered in
* rounds, with each round aggregating the submissions for each oracle into a
* single answer. The latest aggregated answer... | NatSpecMultiLine | initializeNewRound | function initializeNewRound(uint32 _roundId)
private
{
updateTimedOutRoundInfo(_roundId.sub(1));
reportingRoundId = _roundId;
RoundDetails memory nextDetails = RoundDetails(
new int256[](0),
maxSubmissionCount,
minSubmissionCount,
timeout,
paymentAmount
);
details[_roundId] = nextDetail... | /**
* Private
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
21940,
22420
]
} | 7,405 | |
SignatureVerifier | contracts/components/Halt.sol | 0x9276ee38a5250e2f7fbe00a12ec17d09b5d28f3d | Solidity | Halt | contract Halt is Owned {
bool public halted = false;
modifier notHalted() {
require(!halted, "Smart contract is halted");
_;
}
modifier isHalted() {
require(halted, "Smart contract is not halted");
_;
}
/// @notice function Emergency situation th... | setHalt | function setHalt(bool halt)
public
onlyOwner
{
halted = halt;
}
| /// @notice function Emergency situation that requires
/// @notice contribution period to stop or not. | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://03fc2b9396bc022b54ffadd1c82ab3c4f783fcfb3b4145c66e6f16719a2bd289 | {
"func_code_index": [
386,
491
]
} | 7,406 | ||
SNN | contracts/SNN.sol | 0x09f5fe01e781536773456aafb9fee20e2fc6220e | Solidity | SNN | contract SNN is Ownable, ERC721B {
IStrongService strongService = IStrongService(0xFbdDaDD80fe7bda00B901FbAf73803F2238Ae655);
IERC20 strongToken = IERC20(0x990f341946A3fdB507aE7e52d17851B87168017c);
using Strings for uint256;
string private _tokenBaseURI;
uint256 public MAX_SNN_SUPPLY;
bool pu... | /**
* @title SNN contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | exists | function exists(uint256 _tokenId) public view returns (bool) {
return _exists(_tokenId);
}
| /**
* Check if certain token id is exists.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
561,
667
]
} | 7,407 | ||
SNN | contracts/SNN.sol | 0x09f5fe01e781536773456aafb9fee20e2fc6220e | Solidity | SNN | contract SNN is Ownable, ERC721B {
IStrongService strongService = IStrongService(0xFbdDaDD80fe7bda00B901FbAf73803F2238Ae655);
IERC20 strongToken = IERC20(0x990f341946A3fdB507aE7e52d17851B87168017c);
using Strings for uint256;
string private _tokenBaseURI;
uint256 public MAX_SNN_SUPPLY;
bool pu... | /**
* @title SNN contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | tokensOfOwner | function tokensOfOwner(address owner) external view returns(uint256[] memory) {
uint256 tokenCount = balanceOf(owner);
if (tokenCount == 0) {
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](tokenCount);
uint256 id = 0;
for (uint256 index = 0; index <... | /**
* Get the array of token for owner.
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
991,
1509
]
} | 7,408 | ||
SNN | contracts/SNN.sol | 0x09f5fe01e781536773456aafb9fee20e2fc6220e | Solidity | SNN | contract SNN is Ownable, ERC721B {
IStrongService strongService = IStrongService(0xFbdDaDD80fe7bda00B901FbAf73803F2238Ae655);
IERC20 strongToken = IERC20(0x990f341946A3fdB507aE7e52d17851B87168017c);
using Strings for uint256;
string private _tokenBaseURI;
uint256 public MAX_SNN_SUPPLY;
bool pu... | /**
* @title SNN contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | setBaseURI | function setBaseURI(string memory baseURI) external onlyOwner {
_tokenBaseURI = baseURI;
}
| /*
* Set base URI
*/ | Comment | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2246,
2352
]
} | 7,409 | ||
SNN | contracts/SNN.sol | 0x09f5fe01e781536773456aafb9fee20e2fc6220e | Solidity | SNN | contract SNN is Ownable, ERC721B {
IStrongService strongService = IStrongService(0xFbdDaDD80fe7bda00B901FbAf73803F2238Ae655);
IERC20 strongToken = IERC20(0x990f341946A3fdB507aE7e52d17851B87168017c);
using Strings for uint256;
string private _tokenBaseURI;
uint256 public MAX_SNN_SUPPLY;
bool pu... | /**
* @title SNN contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | setSaleStatus | function setSaleStatus(bool _isSale) external onlyOwner {
isSale = _isSale;
}
| /*
* Set sale status
*/ | Comment | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2390,
2483
]
} | 7,410 | ||
SNN | contracts/SNN.sol | 0x09f5fe01e781536773456aafb9fee20e2fc6220e | Solidity | SNN | contract SNN is Ownable, ERC721B {
IStrongService strongService = IStrongService(0xFbdDaDD80fe7bda00B901FbAf73803F2238Ae655);
IERC20 strongToken = IERC20(0x990f341946A3fdB507aE7e52d17851B87168017c);
using Strings for uint256;
string private _tokenBaseURI;
uint256 public MAX_SNN_SUPPLY;
bool pu... | /**
* @title SNN contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | mint | function mint()
external
payable
{
require(isSale, "Sale must be active to mint");
uint256 supply = _owners.length;
uint256 naasRequestingFeeInWei = strongService.naasRequestingFeeInWei();
uint256 naasStrongFeeInWei = strongService.naasStrongFeeInWei();
require(msg.value == naasReq... | /**
* Create Strong Node & Mint SNN
*/ | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2537,
3219
]
} | 7,411 | ||
SignatureVerifier | contracts/schnorr/SignatureVerifier.sol | 0x9276ee38a5250e2f7fbe00a12ec17d09b5d28f3d | Solidity | SignatureVerifier | contract SignatureVerifier is Halt {
/// @dev a map from a uint256 curveId to it's verifier contract address.
mapping(uint256 => address) public verifierMap;
/// @dev verify is used for check signature.
function verify(
uint256 curveId,
bytes32 signature,
bytes32 group... | verify | function verify(
uint256 curveId,
bytes32 signature,
bytes32 groupKeyX,
bytes32 groupKeyY,
bytes32 randomPointX,
bytes32 randomPointY,
bytes32 message
) external returns (bool) {
require(verifierMap[curveId] != address(0), "curveId not correct");
IBaseSignVerifier verifier ... | /// @dev verify is used for check signature. | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://03fc2b9396bc022b54ffadd1c82ab3c4f783fcfb3b4145c66e6f16719a2bd289 | {
"func_code_index": [
223,
740
]
} | 7,412 | ||
TokenERC20 | TokenERC20.sol | 0xd70e66775a74a9aedeac6e28313e1033cd726552 | Solidity | TokenERC20 | contract TokenERC20 {
/* Begin Owned Contract Members */
// An array of owners
mapping (address => bool) public owners;
// Has the next action been authorised by another owner
bool public nextActionIsAuthorised = false;
address public actionAuthorisedBy;
// Does an owner-only action have to be ... | setIcoParametersSet | function setIcoParametersSet(bool set) onlyWhenIcoParametersAreNotSet onlyOwners public {
icoParametersSet = set;
}
| /*** Begin ICO Setters ***/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://8626e638e1b9f4aafcab7372e5ea55969e0b4cce15dfd389fd021a12efa1b2ad | {
"func_code_index": [
3586,
3712
]
} | 7,413 | |||
TokenERC20 | TokenERC20.sol | 0xd70e66775a74a9aedeac6e28313e1033cd726552 | Solidity | TokenERC20 | contract TokenERC20 {
/* Begin Owned Contract Members */
// An array of owners
mapping (address => bool) public owners;
// Has the next action been authorised by another owner
bool public nextActionIsAuthorised = false;
address public actionAuthorisedBy;
// Does an owner-only action have to be ... | getWeekBonus | function getWeekBonus(uint256 amountPurchased) onlyWhenIcoParametersAreSet internal view returns (uint256) {
uint256 weekBonus = uint256(weekBonuses[getWeeksPassedSinceStartOfIco()]);
if (weekBonus != 0)
return (amountPurchased * weekBonus) / 100;
return amountPurchased;
}
| // In the first week of the ICO, there will be a bonus, say 20%, then the second week 10%,
// of tokens. This retrieves that bonus. 20% is stored as 120, 10% as 110, etc. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://8626e638e1b9f4aafcab7372e5ea55969e0b4cce15dfd389fd021a12efa1b2ad | {
"func_code_index": [
6892,
7193
]
} | 7,414 | |||
TokenERC20 | TokenERC20.sol | 0xd70e66775a74a9aedeac6e28313e1033cd726552 | Solidity | TokenERC20 | contract TokenERC20 {
/* Begin Owned Contract Members */
// An array of owners
mapping (address => bool) public owners;
// Has the next action been authorised by another owner
bool public nextActionIsAuthorised = false;
address public actionAuthorisedBy;
// Does an owner-only action have to be ... | updateOwnersWithdrawAllowance | function updateOwnersWithdrawAllowance() onlyWhenIcoParametersAreSet internal {
if (isAfterIco()) {
uint256 totalFunds = this.balance;
maxFundsThatCanBeWithdrawnByOwners = 0;
uint256 immediateAllowance = (totalFunds * immediateAllowancePercentage) / 100;
bool secondYear = now - icoEndDate >= year... | // Update how much the owners can withdraw based on how much time has passed
// since the end of the ICO | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://8626e638e1b9f4aafcab7372e5ea55969e0b4cce15dfd389fd021a12efa1b2ad | {
"func_code_index": [
7826,
9290
]
} | 7,415 | |||
TokenERC20 | TokenERC20.sol | 0xd70e66775a74a9aedeac6e28313e1033cd726552 | Solidity | TokenERC20 | contract TokenERC20 {
/* Begin Owned Contract Members */
// An array of owners
mapping (address => bool) public owners;
// Has the next action been authorised by another owner
bool public nextActionIsAuthorised = false;
address public actionAuthorisedBy;
// Does an owner-only action have to be ... | amountIsWithinOwnersAllowance | function amountIsWithinOwnersAllowance(uint256 amountToWithdraw) internal view returns (bool) {
if (now - icoEndDate >= yearLength * 2)
return true;
uint256 totalFundsWithdrawnAfterThisTransaction = fundsWithdrawnByOwners + amountToWithdraw;
bool withinAllowance = totalFundsWithdrawnAfterThisTransaction <... | // Check if the amount the owners are attempting to withdraw is within their current allowance | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://8626e638e1b9f4aafcab7372e5ea55969e0b4cce15dfd389fd021a12efa1b2ad | {
"func_code_index": [
9673,
10075
]
} | 7,416 | |||
SNXRewardUniLPStrategy | contracts/hardworkInterface/IVault.sol | 0x987a168e19f6f64d6ab08ae0e0fe77ea3d79baac | Solidity | IVault | interface IVault {
// the IERC20 part is the share
function underlyingBalanceInVault() external view returns (uint256);
function underlyingBalanceWithInvestment() external view returns (uint256);
function governance() external view returns (address);
function controller() external view retu... | underlyingBalanceInVault | function underlyingBalanceInVault() external view returns (uint256);
| // the IERC20 part is the share | LineComment | v0.5.16+commit.9c3226ce | MIT | bzzr://b9974e4880b432f849903fea2a6432e29f2677ef70cc6b4e3aa5460dff20cbbf | {
"func_code_index": [
59,
132
]
} | 7,417 | ||
SNXRewardUniLPStrategy | contracts/hardworkInterface/IVault.sol | 0x987a168e19f6f64d6ab08ae0e0fe77ea3d79baac | Solidity | IVault | interface IVault {
// the IERC20 part is the share
function underlyingBalanceInVault() external view returns (uint256);
function underlyingBalanceWithInvestment() external view returns (uint256);
function governance() external view returns (address);
function controller() external view retu... | doHardWork | function doHardWork() external;
| // hard work should be callable only by the controller (by the hard worker) or by governance | LineComment | v0.5.16+commit.9c3226ce | MIT | bzzr://b9974e4880b432f849903fea2a6432e29f2677ef70cc6b4e3aa5460dff20cbbf | {
"func_code_index": [
1096,
1132
]
} | 7,418 | ||
TimeLock | @c-layer/governance/contracts/lock/TimeLock.sol | 0x99332f76fa35524ae3ce6657a86f588e8819c3d1 | Solidity | TimeLock | contract TimeLock is Ownable {
address payable public target;
uint64 public lockedUntil;
modifier whenUnlocked() {
require(lockedUntil < currentTime(), "TL01");
_;
}
constructor(address payable _target, uint64 _lockedUntil) public {
require(_target != address(0), "TL02");
requir... | /**
* @title TimeLock
* @dev Time locked contract
*
* Error messages
* TL01: Contract is locked
* TL02: Target must be defined
* TL03: Cannot be locked in the past
* TL04: Execution must be successfull
*/ | NatSpecMultiLine | currentTime | function currentTime() internal view returns (uint256) {
// solhint-disable-next-line not-rely-on-time
return now;
}
| /**
* @dev current time
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://f38c1955786aaa4dc0abe92ae7623ffaba309330bba42781d973986b5f9fb98c | {
"func_code_index": [
866,
998
]
} | 7,419 |
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
60,
124
]
} | 7,420 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
232,
309
]
} | 7,421 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
546,
623
]
} | 7,422 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
946,
1042
]
} | 7,423 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
1326,
1407
]
} | 7,424 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
1615,
1712
]
} | 7,425 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | FindTheCureCoin | contract FindTheCureCoin is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core... | FindTheCureCoin | function FindTheCureCoin() {
balances[msg.sender] = 5000000000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000. (CHANGE THIS)
totalSupply = 5000000000000; ... | // Where should the raised ETH go?
// This is a constructor function
// which means the following function name has to match the contract name declared above | LineComment | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
1203,
2207
]
} | 7,426 | |||
FindTheCureCoin | FindTheCureCoin.sol | 0xea5b80723a90539e32e38011af39b0821822dc2f | Solidity | FindTheCureCoin | contract FindTheCureCoin is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.24+commit.e67f0147 | bzzr://0615cb161426828d1ff3596b40750e8da8f6698f6bf853a7fcd5c9b85928b2e5 | {
"func_code_index": [
2803,
3608
]
} | 7,427 | |||
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | lockEtherPay | contract lockEtherPay {
using SafeMath
for uint256;
event NewRound(
uint _timestamp,
uint _round,
uint _initialPot
);
event Bid(
uint _timestamp,
address _address,
uint _amount,
uint _newPot
);
event NewLeader(
... | bid | function bid() public payable blabla {
uint _minLeaderAmount = pot.mul(MIN_LEADER_FRAC_TOP).div(MIN_LEADER_FRAC_BOT);
uint _bidAmountToCommunity = msg.value.mul(FRAC_TOP).div(FRAC_BOT);
uint _bidAmountToDividendFund = msg.value.mul(DIVIDEND_FUND_FRAC_TOP).div(DIVIDEND_FUND_FRAC_BOT);
uint _bidAmount... | // Buy keys | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
3805,
4890
]
} | 7,428 | |||
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | lockEtherPay | contract lockEtherPay {
using SafeMath
for uint256;
event NewRound(
uint _timestamp,
uint _round,
uint _initialPot
);
event Bid(
uint _timestamp,
address _address,
uint _amount,
uint _newPot
);
event NewLeader(
... | withdrawEarnings | function withdrawEarnings() public blabla { require(earnings[msg.sender] > 0);
assert(earnings[msg.sender] <= this.balance);
uint _amount = earnings[msg.sender];
earnings[msg.sender] = 0;
msg.sender.transfer(_amount);
EarningsWithdrawal(now, msg.sender, _amount);
}
| // Withdraw winned pot | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
4925,
5245
]
} | 7,429 | |||
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | lockEtherPay | contract lockEtherPay {
using SafeMath
for uint256;
event NewRound(
uint _timestamp,
uint _round,
uint _initialPot
);
event Bid(
uint _timestamp,
address _address,
uint _amount,
uint _newPot
);
event NewLeader(
... | withdrawDividends | function withdrawDividends() public { require(dividendShares[msg.sender] > 0);
uint _dividendShares = dividendShares[msg.sender];
assert(_dividendShares <= totalDividendShares);
uint _amount = dividendFund.mul(_dividendShares).div(totalDividendShares);
assert(_amount <= this.balance);
dividendS... | // Sell keys | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
5271,
5916
]
} | 7,430 | |||
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | lockEtherPay | contract lockEtherPay {
using SafeMath
for uint256;
event NewRound(
uint _timestamp,
uint _round,
uint _initialPot
);
event Bid(
uint _timestamp,
address _address,
uint _amount,
uint _newPot
);
event NewLeader(
... | start | function start() public onlyOwner { hasntStarted = 0;
}
| // Start
// Not needed in the first round | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
5971,
6036
]
} | 7,431 | |||
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns(uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns(uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
95,
307
]
} | 7,432 | |
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns(uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns(uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
399,
691
]
} | 7,433 | |
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns(uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns(uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
814,
941
]
} | 7,434 | |
lockEtherPay | lockEtherPay.sol | 0x9ae840651db575b2d7c09a8851a53c22403fae86 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns(uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns(uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://0c424931ec30eaf12b6b842d051df2f458a08b933cf8269a16a5eeaa3ef7d4d9 | {
"func_code_index": [
1013,
1164
]
} | 7,435 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | setStartTime | function setStartTime(uint256 _startTime) public {
require(msg.sender==apex && !isStarted() && now < _startTime);
startTime = _startTime;
}
| // @dev Function setting the start time of the system | LineComment | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
4769,
4932
]
} | 7,436 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | buy | function buy(address _referredBy) antiEarlyWhale notGasbag isControlled public payable returns (uint256) {
purchaseTokens(msg.value, _referredBy , msg.sender);
}
| /// @dev Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
5049,
5230
]
} | 7,437 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | buyFor | function buyFor(address _referredBy, address _customerAddress) antiEarlyWhale notGasbag isControlled public payable returns (uint256) {
purchaseTokens(msg.value, _referredBy , _customerAddress);
}
| /// @dev Converts to tokens on behalf of the customer - this allows gifting and integration with other systems | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
5349,
5564
]
} | 7,438 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | function() antiEarlyWhale notGasbag isControlled payable public {
purchaseTokens(msg.value, 0x0 , msg.sender);
}
| /**
* @dev Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
5740,
5871
]
} | 7,439 | ||
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | reinvest | function reinvest() onlyStronghands public {
// fetch dividends
uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code
// pay out the dividends virtually
address _customerAddress = msg.sender;
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
... | /// @dev Converts all of caller's dividends to tokens. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
5934,
6673
]
} | 7,440 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | exit | function exit() public {
// get token count for caller & sell them all
address _customerAddress = msg.sender;
uint256 _tokens = tokenBalanceLedger_[_customerAddress];
if (_tokens > 0) sell(_tokens);
// capitulation
withdraw();
}
| /// @dev Alias of sell() and withdraw(). | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
6722,
7016
]
} | 7,441 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | withdraw | function withdraw() onlyStronghands public {
// setup data
address _customerAddress = msg.sender;
uint256 _dividends = myDividends(false); // get ref. bonus later in the code
// update dividend tracker
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
// add ref. bonus... | /// @dev Withdraws all of the callers earnings. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
7072,
7702
]
} | 7,442 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | sell | function sell(uint256 _amountOfTokens) onlyBagholders public {
// setup data
address _customerAddress = msg.sender;
// russian hackers BTFO
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 _tokens = _amountOfTokens;
uint256 _ethereum = tokensToEthereum_(_tokens);
... | /// @dev Liquifies tokens to ethereum. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
7749,
9028
]
} | 7,443 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | transfer | function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders public returns (bool) {
// setup
address _customerAddress = msg.sender;
// make sure we have the requested tokens
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
// withdraw all outstanding divi... | /**
* @dev Transfer tokens from the caller to a new holder.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
9113,
10151
]
} | 7,444 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | totalEthereumBalance | function totalEthereumBalance() public view returns (uint256) {
return address(this).balance;
}
| /**
* @dev Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
10424,
10538
]
} | 7,445 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return tokenSupply_;
}
| /// @dev Retrieve the total token supply. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
10588,
10684
]
} | 7,446 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | myTokens | function myTokens() public view returns (uint256) {
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
| /// @dev Retrieve the tokens owned by the caller. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
10742,
10898
]
} | 7,447 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | myDividends | function myDividends(bool _includeReferralBonus) public view returns (uint256) {
address _customerAddress = msg.sender;
return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ;
}
| /**
* @dev Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them sepa... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
11257,
11538
]
} | 7,448 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | balanceOf | function balanceOf(address _customerAddress) public view returns (uint256) {
return tokenBalanceLedger_[_customerAddress];
}
| /// @dev Retrieve the token balance of any single address. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
11605,
11748
]
} | 7,449 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | dividendsOf | function dividendsOf(address _customerAddress) public view returns (uint256) {
return (uint256) ((int256) (profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude;
}
| /// @dev Retrieve the dividend balance of any single address. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
11818,
12047
]
} | 7,450 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | sellPrice | function sellPrice() public view returns (uint256) {
// our calculation relies on the token supply, so we need supply. Doh.
if (tokenSupply_ == 0) {
return tokenPriceInitial_ - tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = Sa... | /// @dev Return the sell price of 1 individual token. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
12109,
12641
]
} | 7,451 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | buyPrice | function buyPrice() public view returns (uint256) {
// our calculation relies on the token supply, so we need supply. Doh.
if (tokenSupply_ == 0) {
return tokenPriceInitial_ + tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = Saf... | /// @dev Return the buy price of 1 individual token. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
12702,
13233
]
} | 7,452 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | calculateTokensReceived | function calculateTokensReceived(uint256 _ethereumToSpend) public view returns (uint256) {
uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereumToSpend, entryFee_), 100);
uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends);
uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);
... | /// @dev Function for the frontend to dynamically retrieve the price scaling of buy orders. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
13333,
13708
]
} | 7,453 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | calculateEthereumReceived | function calculateEthereumReceived(uint256 _tokensToSell) public view returns (uint256) {
require(_tokensToSell <= tokenSupply_);
uint256 _ethereum = tokensToEthereum_(_tokensToSell);
uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee()), 100);
uint256 _taxedEthereum = SafeMath.sub(_e... | /// @dev Function for the frontend to dynamically retrieve the price scaling of sell orders. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
13809,
14210
]
} | 7,454 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | calculateUntaxedEthereumReceived | function calculateUntaxedEthereumReceived(uint256 _tokensToSell) public view returns (uint256) {
require(_tokensToSell <= tokenSupply_);
uint256 _ethereum = tokensToEthereum_(_tokensToSell);
//uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee()), 100);
//uint256 _taxedEthereum = Safe... | /// @dev Function for the frontend to get untaxed receivable ethereum. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
14289,
14696
]
} | 7,455 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | exitFee | function exitFee() public view returns (uint8) {
if (startTime==0){
return startExitFee_;
}
if ( now < startTime) {
return 0;
}
uint256 secondsPassed = now - startTime;
if (secondsPassed >= exitFeeFallDuration_) {
return finalExitFee_;
}
uint8 totalChange ... | /// @dev Function for getting the current exitFee | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
14756,
15340
]
} | 7,456 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | isPremine | function isPremine() public view returns (bool) {
return depositCount_<=7;
}
| // @dev Function for find if premine | LineComment | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
15385,
15478
]
} | 7,457 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | isStarted | function isStarted() public view returns (bool) {
return startTime!=0 && now > startTime;
}
| // @dev Function for find if premine | LineComment | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
15523,
15631
]
} | 7,458 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | purchaseTokens | function purchaseTokens(uint256 _incomingEthereum, address _referredBy , address _customerAddress) internal returns (uint256) {
// data setup
uint256 _undividedDividends = SafeMath.div(SafeMath.mul(_incomingEthereum, entryFee_), 100);
uint256 _referralBonus = SafeMath.div(SafeMath.mul(_undividedDividends... | /// @dev Internal function to actually purchase the tokens. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
15851,
19232
]
} | 7,459 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | ethereumToTokens_ | function ethereumToTokens_(uint256 _ethereum) internal view returns (uint256) {
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived =
(
(
// underflow attempts BTFO
SafeMath.sub(
(sqrt
(
... | /**
* @dev Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
19530,
20483
]
} | 7,460 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | tokensToEthereum_ | function tokensToEthereum_(uint256 _tokens) internal view returns (uint256) {
uint256 tokens_ = (_tokens + 1e18);
uint256 _tokenSupply = (tokenSupply_ + 1e18);
uint256 _etherReceived =
(
// underflow attempts BTFO
SafeMath.sub(
(
(
... | /**
* @dev Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
20747,
21462
]
} | 7,461 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | HyperEX | contract HyperEX {
/*=================================
= MODIFIERS =
=================================*/
/// @dev Only people with tokens
modifier onlyBagholders {
require(myTokens() > 0);
_;
}
/// @dev Only people with profits
modifi... | /***
* https://hypereth.net
*
* No administrators or developers, this contract is fully autonomous
*
* 10 % entry fee which is allocated to
* 3 % of entry fee to masternode referrals
* 0 % transfer fee
* Exit fee starts at 50% from contract start
* Exit fee decreases over 30 days until 15%
* Stays... | NatSpecMultiLine | sqrt | function sqrt(uint256 x) internal pure returns (uint256 y) {
uint256 z = (x + 1) / 2;
y = x;
while (z < y) {
y = z;
z = (x / z + z) / 2;
}
}
| /// @dev This is where all your gas goes. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
21512,
21726
]
} | 7,462 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
95,
308
]
} | 7,463 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
398,
691
]
} | 7,464 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
812,
940
]
} | 7,465 | |
HyperEX | HyperEX.sol | 0xe4166b945b79675e41f21668db2875b5e0128435 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://09f278c178195a28bb7b0091ba5eb98cebaa8bc500848c548c189b6179ca3645 | {
"func_code_index": [
1010,
1162
]
} | 7,466 | |
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | function () payable{
if(msg.value == 0) throw;
if (crowdsaleHasSucessfulyEnded || block.number > endBlock) throw; // Throw if the Crowdsale has ended
if (!crowdsaleHasStarted){ // Check if this is the first Crowdsale transaction
if (block.n... | // | LineComment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
1527,
4642
]
} | 7,467 | ||||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | claimEthIfFailed | function claimEthIfFailed(){
if (block.number <= endBlock || totalEthRaised >= minEthToRaise) throw; // Check if Crowdsale has failed
if (participantContribution[msg.sender] == 0) throw; // Check if user has participated
if (hasClaimedEthWhenFail[msg.sender]) throw; ... | /* Users can claim ETH by themselves if they want to in case of ETH failure */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
4736,
5515
]
} | 7,468 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | batchReturnEthIfFailed | function batchReturnEthIfFailed(uint256 _numberOfReturns) onlyOwner{
if (block.number < endBlock || totalEthRaised >= minEthToRaise) throw; // Check if Crowdsale failed
address currentParticipantAddress;
uint256 contribution;
for (uint cnt = 0; cnt < _numberOfReturns; cnt++){
current... | /* Owner can return eth for multiple users in one call */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
5583,
6877
]
} | 7,469 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | changeMultisigAddress | function changeMultisigAddress(address _newAddress) onlyOwner {
multisigAddress = _newAddress;
}
| /* Owner sets new address of escrow */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
6930,
7049
]
} | 7,470 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | participantCount | function participantCount() constant returns(uint){
return nextFreeParticipantIndex;
}
| /* Show how many participants was */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
7098,
7201
]
} | 7,471 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | claimTeamTokens | function claimTeamTokens(address _to) onlyOwner{
if (!crowdsaleHasSucessfulyEnded) throw;
if (ownerHasClaimedTokens) throw;
valusTokenContract.mintTokens(_to, valusTokenContract.totalSupply() * 49/51); /* 51% Crowdsale - 49% VALUS */
ownerHasClaimedTokens = true;
}
| /* Owner can claim reserved tokens on the end of crowsale */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
7272,
7592
]
} | 7,472 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | setTokenContract | function setTokenContract(address _valusTokenContractAddress) onlyOwner {
valusTokenContract = IValusToken(_valusTokenContractAddress);
}
| /* Set token contract where mints will be done (tokens will be issued) */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
7682,
7847
]
} | 7,473 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | withdrawEther | function withdrawEther() onlyOwner{
if (this.balance == 0) throw; // Check if there is balance on the contract
if (totalEthRaised < minEthToRaise) throw; // Check if minEthToRaise treshold is exceeded
if(multisi... | /* Withdraw funds from contract */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
8603,
9063
]
} | 7,474 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | getVlsTokenAddress | function getVlsTokenAddress() constant returns(address _tokenAddress){
return address(valusTokenContract);
}
| /* Getters */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
9519,
9654
]
} | 7,475 | |||
ValusCrowdsale | ValusCrowdsale.sol | 0x8f8e5e6515c3e6088c327257bdcf2c973b1530ad | Solidity | ValusCrowdsale | contract ValusCrowdsale is owned {
uint256 public startBlock;
uint256 public endBlock;
uint256 public minEthToRaise;
uint256 public maxEthToRaise;
uint256 public totalEthRaised;
address public multisigAddress;
IValusToken valusTokenContract;
uint256 nextFreeParticipantIn... | withdrawRemainingBalanceForManualRecovery | function withdrawRemainingBalanceForManualRecovery() onlyOwner{
if (this.balance == 0) throw; // Check if there is balance on the contract
if (block.number < endBlock) throw; // Check if Crowdsale failed
if (participantIndex... | /* Withdraw remaining balance to manually return where contract send has failed */ | Comment | v0.4.17+commit.bdeb9e52 | bzzr://5fbc9caad1e9202c37f16ea630d23fd7f93f6e7fc617a760cd008730541cad14 | {
"func_code_index": [
10086,
10668
]
} | 7,476 | |||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | initialize | function initialize(address _token0, address _token1) external {
require(msg.sender == factory, 'ImpulsevenSwapV2: FORBIDDEN'); // sufficient check
token0 = _token0;
token1 = _token1;
}
| // called once by the factory at time of deployment | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
2112,
2334
]
} | 7,477 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | _update | function _update(uint balance0, uint balance1, uint112 _reserve0, uint112 _reserve1) private {
require(balance0 <= uint112(-1) && balance1 <= uint112(-1), 'ImpulsevenSwapV2: OVERFLOW');
uint32 blockTimestamp = uint32(block.timestamp % 2**32);
uint32 timeElapsed = blockTimestamp - blockTimestampLast; // o... | // update reserves and, on the first call per block, price accumulators | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
2414,
3286
]
} | 7,478 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | _mintFee | function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) {
address feeTo = IImpulsevenSwapV2Factory(factory).feeTo();
feeOn = feeTo != address(0);
uint _kLast = kLast; // gas savings
if (feeOn) {
if (_kLast != 0) {
uint rootK = Math.sqrt(uint(_reserv... | // if fee is on, mint liquidity equivalent to 1/6th of the growth in sqrt(k) | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
3371,
4221
]
} | 7,479 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | mint | function mint(address to) external lock returns (uint liquidity) {
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
uint balance0 = IERC20(token0).balanceOf(address(this));
uint balance1 = IERC20(token1).balanceOf(address(this));
uint amount0 = balance0.sub(_reserve0);
ui... | // this low-level function should be called from a contract which performs important safety checks | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
4328,
5580
]
} | 7,480 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | burn | function burn(address to) external lock returns (uint amount0, uint amount1) {
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
uint ... | // this low-level function should be called from a contract which performs important safety checks | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
5687,
7165
]
} | 7,481 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | swap | function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
require(amount0Out > 0 || amount1Out > 0, 'ImpulsevenSwapV2: INSUFFICIENT_OUTPUT_AMOUNT');
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
require(amount0Out < _reserve0 && amount1Out ... | // this low-level function should be called from a contract which performs important safety checks | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
7272,
9215
]
} | 7,482 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | skim | function skim(address to) external lock {
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
_safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0));
_safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1));
}
| // force balances to match reserves | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
9259,
9598
]
} | 7,483 | ||
ImpulsevenSwapV2Factory | core/ImpulsevenSwapV2Pair.sol | 0x4f6703952d3139353a7a8212414a104912c79974 | Solidity | ImpulsevenSwapV2Pair | contract ImpulsevenSwapV2Pair is IImpulsevenSwapV2Pair, ImpulsevenSwapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public fac... | sync | function sync() external lock {
_update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1);
}
| // force reserves to match balances | LineComment | v0.5.16+commit.9c3226ce | None | bzzr://01b3a29875675e373f6a18d5a80c386b8ea850f96117d278cddd4bc206973931 | {
"func_code_index": [
9642,
9805
]
} | 7,484 | ||
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Ownable | abstract 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 () public {
address msgSender = _... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
504,
596
]
} | 7,485 |
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Ownable | abstract 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 () public {
address msgSender = _... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
1155,
1308
]
} | 7,486 |
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Ownable | abstract 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 () public {
address msgSender = _... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
1458,
1707
]
} | 7,487 |
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Multiownable | contract Multiownable {
// VARIABLES
uint256 public ownersGeneration;
uint256 public howManyOwnersDecide;
address[] public owners;
bytes32[] public allOperations;
address internal insideCallSender;
uint256 internal insideCallCount;
// Reverse lookup tables for owners and al... | isOwner | function isOwner(address wallet) public view returns(bool) {
return ownersIndices[wallet] > 0;
}
| // ACCESSORS | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
1292,
1407
]
} | 7,488 | ||
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Multiownable | contract Multiownable {
// VARIABLES
uint256 public ownersGeneration;
uint256 public howManyOwnersDecide;
address[] public owners;
bytes32[] public allOperations;
address internal insideCallSender;
uint256 internal insideCallCount;
// Reverse lookup tables for owners and al... | checkHowManyOwners | function checkHowManyOwners(uint howMany) internal returns(bool) {
if (insideCallSender == msg.sender) {
require(howMany <= insideCallCount, "checkHowManyOwners: nested owners modifier check require more owners");
return true;
}
uint ownerIndex = ownersIndices[msg.sender] - 1;
re... | /**
* @dev onlyManyOwners modifier helper
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
4258,
5784
]
} | 7,489 | ||
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Multiownable | contract Multiownable {
// VARIABLES
uint256 public ownersGeneration;
uint256 public howManyOwnersDecide;
address[] public owners;
bytes32[] public allOperations;
address internal insideCallSender;
uint256 internal insideCallCount;
// Reverse lookup tables for owners and al... | deleteOperation | function deleteOperation(bytes32 operation) internal {
uint index = allOperationsIndicies[operation];
if (index < allOperations.length - 1) { // Not last
allOperations[index] = allOperations[allOperations.length - 1];
allOperationsIndicies[allOperations[index]] = index;
}
//allOper... | /**
* @dev Used to delete cancelled or performed operation
* @param operation defines which operation to delete
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
5922,
6512
]
} | 7,490 | ||
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Multiownable | contract Multiownable {
// VARIABLES
uint256 public ownersGeneration;
uint256 public howManyOwnersDecide;
address[] public owners;
bytes32[] public allOperations;
address internal insideCallSender;
uint256 internal insideCallCount;
// Reverse lookup tables for owners and al... | cancelPending | function cancelPending(bytes32 operation) public onlyAnyOwner {
uint ownerIndex = ownersIndices[msg.sender] - 1;
require((votesMaskByOperation[operation] & (2 ** ownerIndex)) != 0, "cancelPending: operation not found for this user");
votesMaskByOperation[operation] &= ~(2 ** ownerIndex);
uint operat... | /**
* @dev Allows owners to change their mind by cacnelling votesMaskByOperation operations
* @param operation defines which operation to delete
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
6708,
7421
]
} | 7,491 | ||
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Multiownable | contract Multiownable {
// VARIABLES
uint256 public ownersGeneration;
uint256 public howManyOwnersDecide;
address[] public owners;
bytes32[] public allOperations;
address internal insideCallSender;
uint256 internal insideCallCount;
// Reverse lookup tables for owners and al... | transferOwnership | function transferOwnership(address[] memory newOwners) public {
transferOwnershipWithHowMany(newOwners, newOwners.length);
}
| /**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
7552,
7695
]
} | 7,492 | ||
ethBridge | contracts\erc20.sol | 0xd37c120b2e3c42e130a916e9da24d46b9e9e2a52 | Solidity | Multiownable | contract Multiownable {
// VARIABLES
uint256 public ownersGeneration;
uint256 public howManyOwnersDecide;
address[] public owners;
bytes32[] public allOperations;
address internal insideCallSender;
uint256 internal insideCallCount;
// Reverse lookup tables for owners and al... | transferOwnershipWithHowMany | function transferOwnershipWithHowMany(address[] memory newOwners, uint256 newHowManyOwnersDecide) public onlyManyOwners {
require(newOwners.length > 0, "transferOwnershipWithHowMany: owners array is empty");
require(newOwners.length <= 256, "transferOwnershipWithHowMany: owners count is greater then 256");
... | /**
* @dev Allows owners to change ownership
* @param newOwners defines array of addresses of new owners
* @param newHowManyOwnersDecide defines how many owners can decide
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://5105c1bc45f254d03c98c2d596b706b8874325e32b2c3301801eb3b14ebe9f44 | {
"func_code_index": [
7898,
9308
]
} | 7,493 | ||
OpenVibes | OpenVibes.sol | 0xf3fcd0f025c21f087dbeb754516d2ad8279140fc | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://553cd8e6a1f89ccf53271ac99799e3d21130ba1d83156e08546f59670d720b69 | {
"func_code_index": [
374,
455
]
} | 7,494 |
OpenVibes | OpenVibes.sol | 0xf3fcd0f025c21f087dbeb754516d2ad8279140fc | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://553cd8e6a1f89ccf53271ac99799e3d21130ba1d83156e08546f59670d720b69 | {
"func_code_index": [
719,
798
]
} | 7,495 |
OpenVibes | OpenVibes.sol | 0xf3fcd0f025c21f087dbeb754516d2ad8279140fc | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://553cd8e6a1f89ccf53271ac99799e3d21130ba1d83156e08546f59670d720b69 | {
"func_code_index": [
944,
1021
]
} | 7,496 |
OpenVibes | OpenVibes.sol | 0xf3fcd0f025c21f087dbeb754516d2ad8279140fc | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://553cd8e6a1f89ccf53271ac99799e3d21130ba1d83156e08546f59670d720b69 | {
"func_code_index": [
1733,
1850
]
} | 7,497 |
OpenVibes | OpenVibes.sol | 0xf3fcd0f025c21f087dbeb754516d2ad8279140fc | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If th... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://553cd8e6a1f89ccf53271ac99799e3d21130ba1d83156e08546f59670d720b69 | {
"func_code_index": [
2376,
2489
]
} | 7,498 |
OpenVibes | OpenVibes.sol | 0xf3fcd0f025c21f087dbeb754516d2ad8279140fc | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://553cd8e6a1f89ccf53271ac99799e3d21130ba1d83156e08546f59670d720b69 | {
"func_code_index": [
2962,
3022
]
} | 7,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.