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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PartySheepClub | @openzeppelin/contracts/access/Ownable.sol | 0xe9a4f318b12c890ca93b1da0140394030672b0ad | 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() {
_setOwner(_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.8.7+commit.e28d00a7 | MIT | ipfs://f1cb149f7f6599c786e934dd45da6969904fe8383c1f4d2481900bf156945d1e | {
"func_code_index": [
399,
491
]
} | 7,507 |
PartySheepClub | @openzeppelin/contracts/access/Ownable.sol | 0xe9a4f318b12c890ca93b1da0140394030672b0ad | 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() {
_setOwner(_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 {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://f1cb149f7f6599c786e934dd45da6969904fe8383c1f4d2481900bf156945d1e | {
"func_code_index": [
1050,
1149
]
} | 7,508 |
PartySheepClub | @openzeppelin/contracts/access/Ownable.sol | 0xe9a4f318b12c890ca93b1da0140394030672b0ad | 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() {
_setOwner(_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");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://f1cb149f7f6599c786e934dd45da6969904fe8383c1f4d2481900bf156945d1e | {
"func_code_index": [
1299,
1496
]
} | 7,509 |
PartySheepClub | @openzeppelin/contracts/access/Ownable.sol | 0xe9a4f318b12c890ca93b1da0140394030672b0ad | Solidity | PartySheepClub | contract PartySheepClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = false;
bool public revealed = fal... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://f1cb149f7f6599c786e934dd45da6969904fe8383c1f4d2481900bf156945d1e | {
"func_code_index": [
630,
735
]
} | 7,510 | ||
PartySheepClub | @openzeppelin/contracts/access/Ownable.sol | 0xe9a4f318b12c890ca93b1da0140394030672b0ad | Solidity | PartySheepClub | contract PartySheepClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = false;
bool public revealed = fal... | mint | function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);
if (msg.sender != owner()) {
require(msg.value >= cost * _mintAmount);
}
for... | // public | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://f1cb149f7f6599c786e934dd45da6969904fe8383c1f4d2481900bf156945d1e | {
"func_code_index": [
751,
1187
]
} | 7,511 | ||
PartySheepClub | @openzeppelin/contracts/access/Ownable.sol | 0xe9a4f318b12c890ca93b1da0140394030672b0ad | Solidity | PartySheepClub | contract PartySheepClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = false;
bool public revealed = fal... | reveal | function reveal() public onlyOwner() {
revealed = true;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://f1cb149f7f6599c786e934dd45da6969904fe8383c1f4d2481900bf156945d1e | {
"func_code_index": [
2063,
2133
]
} | 7,512 | ||
RollsRoyce | RollsRoyce.sol | 0x6d150887670539be19ec85835db4db89532f1ff9 | Solidity | RollsRoyce | contract RollsRoyce {
/* Public variables of the token */
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
uint256 public totalSupply;
/* This creates an array with all balances */
mapping ... | RollsRoyce | function RollsRoyce() {
initialSupply = 5000000;
name ="RollsRoyce";
decimals = 1;
symbol = "RRC";
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
totalSupply = initialSupply; // Update total supply
... | /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.19+commit.c4cbbb05 | bzzr://d3e36ec256f3c4880e775436be47b3cc3ab34dfc2a78985ee4161d1ec6ee4267 | {
"func_code_index": [
529,
911
]
} | 7,513 | |||
RollsRoyce | RollsRoyce.sol | 0x6d150887670539be19ec85835db4db89532f1ff9 | Solidity | RollsRoyce | contract RollsRoyce {
/* Public variables of the token */
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
uint256 public totalSupply;
/* This creates an array with all balances */
mapping ... | transfer | function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balance... | /* Send coins */ | Comment | v0.4.19+commit.c4cbbb05 | bzzr://d3e36ec256f3c4880e775436be47b3cc3ab34dfc2a78985ee4161d1ec6ee4267 | {
"func_code_index": [
936,
1370
]
} | 7,514 | |||
RollsRoyce | RollsRoyce.sol | 0x6d150887670539be19ec85835db4db89532f1ff9 | Solidity | RollsRoyce | contract RollsRoyce {
/* Public variables of the token */
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
uint256 public totalSupply;
/* This creates an array with all balances */
mapping ... | function () {
throw; // Prevents accidental sending of ether
}
| /* This unnamed function is called whenever someone tries to send ether to it */ | Comment | v0.4.19+commit.c4cbbb05 | bzzr://d3e36ec256f3c4880e775436be47b3cc3ab34dfc2a78985ee4161d1ec6ee4267 | {
"func_code_index": [
1481,
1566
]
} | 7,515 | ||||
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | update | function update(
address[] calldata _saneAssets,
uint256[] calldata _sanePrices,
bool _failIfInvalid
) external {
require(
msg.sender == registry.owner() || msg.sender == updater,
"update: Only registry owner or updater can call"
);
address[] memory registeredAssets = registry.ge... | /// @notice Update prices for registered assets
/// @dev Stores zero as a convention for invalid price
/// @param _saneAssets Asset addresses (must match assets array from getRegisteredAssets)
/// @param _sanePrices Asset price hints (checked against prices from Kyber)
/// @param _failIfInvalid Whether to abort the upd... | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
1704,
3284
]
} | 7,516 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | setMaxPriceDeviation | function setMaxPriceDeviation(uint256 _newMaxPriceDeviation) external onlyRegistryOwner {
maxPriceDeviation = _newMaxPriceDeviation;
emit MaxPriceDeviationSet(_newMaxPriceDeviation);
}
| /// @notice Update maximum price deviation between price hints and Kyber price
/// @notice Price deviation becomes a % when divided by 10^18 (e.g. 10^17 becomes 10%)
/// @param _newMaxPriceDeviation New maximum price deviation | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
3525,
3733
]
} | 7,517 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | setMaxSpread | function setMaxSpread(uint256 _newMaxSpread) external onlyRegistryOwner {
maxSpread = _newMaxSpread;
emit MaxSpreadSet(_newMaxSpread);
}
| /// @notice Update maximum spread for prices derived from Kyber
/// @notice Max spread becomes a % when divided by 10^18 (e.g. 10^17 becomes 10%)
/// @param _newMaxSpread New maximum spread | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
3937,
4097
]
} | 7,518 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | setRegistry | function setRegistry(address _newRegistry) external onlyRegistryOwner {
registry = IRegistry(_newRegistry);
emit RegistrySet(_newRegistry);
}
| /// @notice Update this feed's Registry reference
/// @param _newRegistry New Registry this feed should point to | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
4220,
4385
]
} | 7,519 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | setUpdater | function setUpdater(address _newUpdater) external onlyRegistryOwner {
updater = _newUpdater;
emit UpdaterSet(_newUpdater);
}
| /// @notice Update this feed's designated updater
/// @param _newUpdater New designated updater for this feed | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
4505,
4653
]
} | 7,520 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | getPrices | function getPrices(address[] calldata _assets)
external
view
returns (uint256[] memory prices_, uint256[] memory timestamps_)
{
prices_ = new uint256[](_assets.length);
timestamps_ = new uint256[](_assets.length);
for (uint256 i; i < _assets.length; i++) {
(prices_[i], timestamps_[i]) = ... | /// @notice Return getPrice for each of _assets
/// @param _assets Assets for which prices should be returned
/// @return prices_ Prices for each of the assets_
/// @return timestamps_ Update times for each of the assets_ | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
4925,
5357
]
} | 7,521 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | hasValidPrices | function hasValidPrices(address[] calldata _assets)
external
view
returns (bool allValid_)
{
for (uint256 i; i < _assets.length; i++) {
if (!hasValidPrice(_assets[i])) {
return false;
}
}
return true;
}
| /// @notice Whether each of the _assets is registered and has a fresh price
/// @param _assets Assets for which validity information should be returned
/// @return allValid_ Validity of prices for each of _assets (true/false) | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
5597,
5899
]
} | 7,522 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | getOrderPriceInfo | function getOrderPriceInfo(
address _sellAsset,
uint256 _sellQuantity,
uint256 _buyQuantity
)
external
view
returns (uint256 orderPrice_)
{
orderPrice_ = mul(
_buyQuantity,
10 ** uint256(ERC20WithFields(_sellAsset).decimals())
) / _sellQuantity;
}
| /// @notice Returns price as determined by an order
/// @param _sellAsset Address of the asset to be sold
/// @param _sellQuantity Quantity (in base units) of _sellAsset being sold
/// @param _buyQuantity Quantity (in base units) of _buyAsset being bought
/// @return orderPrice_ Price determined by buy/sell quantities | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
6241,
6592
]
} | 7,523 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | convertQuantity | function convertQuantity(
uint256 _fromAssetQuantity,
address _fromAsset,
address _toAsset
)
external
view
returns (uint256 toAssetQuantity_)
{
uint256 fromAssetPrice;
(fromAssetPrice,) = getReferencePriceInfo(_fromAsset, _toAsset);
uint256 fromAssetDecimals = ERC20WithFields(_fromAs... | /// @notice Get quantity of _toAsset equal in value to some quantity of _fromAsset
/// @param _fromAssetQuantity Amount of _fromAsset
/// @param _fromAsset Address of _fromAsset
/// @param _toAsset Address of _toAsset
/// @return toAssetQuantity_ Amount of _toAsset equal in value to _fromAssetQuantity | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
6917,
7446
]
} | 7,524 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | getPrice | function getPrice(address _asset)
public
view
returns (uint256 price_, uint256 timestamp_)
{
(price_,) = getReferencePriceInfo(_asset, QUOTE_ASSET);
timestamp_ = lastUpdate;
}
| /// @notice Gets price of an asset times 10^assetDecimals
/// @dev Asset must be registered
/// @param _asset Asset for which price should be returned
/// @return price_ Formatting: exchangePrice * 10^decimals (to avoid floating point)
/// @return timestamp_ When the asset's price was last updated | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
7796,
8024
]
} | 7,525 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | hasValidPrice | function hasValidPrice(address _asset)
public
view
returns (bool isValid_)
{
bool isRegistered = registry.assetIsRegistered(_asset);
bool isFresh = block.timestamp < add(lastUpdate, VALIDITY_INTERVAL);
isValid_ = prices[_asset] != 0 && isRegistered && isFresh;
}
| /// @notice Whether an asset is registered and has a fresh price
/// @param _asset Asset to check for a valid price
/// @return isValid_ whether price of _asset is valid | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
8208,
8530
]
} | 7,526 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | getReferencePriceInfo | function getReferencePriceInfo(address _baseAsset, address _quoteAsset)
public
view
returns (uint256 referencePrice_, uint256 decimals_)
{
bool isValid;
(
isValid,
referencePrice_,
decimals_
) = __getRawReferencePriceInfo(_baseAsset, _quoteAsset);
require(isValid, "ge... | /// @notice Get price of an asset in terms of some quote asset, plus the quote asset's decimals
/// @notice This function reverts if either the base or quote have invalid prices
/// @param _baseAsset Address of base asset
/// @param _quoteAsset Address of quote asset
/// @return referencePrice_ Quantity of _quoteAsset ... | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
8950,
9411
]
} | 7,527 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | getKyberPrice | function getKyberPrice(address _baseAsset, address _quoteAsset)
public
view
returns (bool validity_, uint256 kyberPrice_)
{
uint256 bidRate;
uint256 bidRateOfReversePair;
(bidRate,) = IKyberNetworkProxy(KYBER_NETWORK_PROXY).getExpectedRate(
__getKyberMaskAsset(_baseAsset),
__getK... | /// @notice Returns validity and price for some pair of assets from Kyber
/// @param _baseAsset Address of base asset from the pair
/// @param _quoteAsset Address of quote asset from the pair
/// @return validity_ Whether the price for this pair is valid
/// @return kyberPrice_ The price of _baseAsset in terms of _quot... | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
9760,
11725
]
} | 7,528 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | __getKyberMaskAsset | function __getKyberMaskAsset(address _asset) internal view returns (address) {
if (_asset == registry.nativeAsset()) {
return address(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee);
}
return _asset;
}
| /// @dev Return Kyber ETH asset symbol if _asset is WETH | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
11815,
12058
]
} | 7,529 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | __getRawReferencePriceInfo | function __getRawReferencePriceInfo(address _baseAsset, address _quoteAsset)
internal
view
returns (bool isValid_, uint256 referencePrice_, uint256 quoteDecimals_)
{
isValid_ = hasValidPrice(_baseAsset) && hasValidPrice(_quoteAsset);
quoteDecimals_ = ERC20WithFields(_quoteAsset).decimals();
if ... | /// @dev Get quantity of _baseAsset per whole _quoteAsset
/// @dev This function will not revert if there is no price, but return (false,0,0) | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
12210,
12874
]
} | 7,530 |
KyberPriceFeed | ./src/prices/KyberPriceFeed.sol | 0x10a285ea8b9e0ff92a2de4ecf961293a6999f7e6 | Solidity | KyberPriceFeed | contract KyberPriceFeed is DSMath {
event MaxPriceDeviationSet(uint256 maxPriceDeviation);
event MaxSpreadSet(uint256 maxSpread);
event PricesUpdated(address[] assets, uint256[] prices);
event RegistrySet(address newRegistry);
event UpdaterSet(address updater);
uint8 public constant KYBER_PRECI... | /// @title Price Feed Template
/// @author Melonport AG <team@melonport.com>
/// @notice Routes external prices to smart contracts from Kyber | NatSpecSingleLine | __priceIsSane | function __priceIsSane(
uint256 _priceFromKyber,
uint256 _sanePrice
)
internal
view
returns (bool)
{
uint256 deviation;
if (_priceFromKyber >= _sanePrice) {
deviation = sub(_priceFromKyber, _sanePrice);
} else {
deviation = sub(_sanePrice, _priceFromKyber);
}
retu... | /// @dev Whether _priceFromKyber deviates no more than some % from _sanePrice | NatSpecSingleLine | v0.6.1+commit.e6f7d5a4 | GNU GPLv3 | ://bfb6637c40f216637aec4ae865b552cdfb7385f35abfdc8605b64dfc9d3e53a3 | {
"func_code_index": [
12958,
13428
]
} | 7,531 |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply.sub(balances[address(0)]);
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
929,
1048
]
} | 7,532 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
1270,
1395
]
} | 7,533 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
1741,
2013
]
} | 7,534 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
2524,
2737
]
} | 7,535 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(from, to, tokens);
return true;
}
... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer... | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
3275,
3623
]
} | 7,536 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
3906,
4058
]
} | 7,537 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
4421,
4743
]
} | 7,538 | |
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
4935,
4994
]
} | 7,539 | ||
SMT | SMT.sol | 0x15c2f2ef00b2fc24461e56e26f1166d2cead7ac9 | Solidity | SMT | contract SMT is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | bzzr://49aa17702999083866488e0d273fb5c0143ec14c43f2e5447a2044ceca498cec | {
"func_code_index": [
5227,
5416
]
} | 7,540 | |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
815,
932
]
} | 7,541 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
1097,
1205
]
} | 7,542 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
1343,
1521
]
} | 7,543 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | createSmartFund | function createSmartFund(
string _name,
uint256 _successFee,
bool _isStableBasedFund
) public {
// Require that the funds success fee be less than the maximum allowed amount
require(_successFee <= maximumSuccessFee);
address owner = msg.sender;
address smartFund;
if(_isStableBasedFund){
... | /**
* @dev Creates a new SmartFund
*
* @param _name The name of the new fund
* @param _successFee The fund managers success fee
* @param _isStableBasedFund true for USD base fund, false for ETH base
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
3423,
4605
]
} | 7,544 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | setExchangePortalAddress | function setExchangePortalAddress(address _newExchangePortalAddress) public onlyOwner {
// Require that the new exchange portal is permitted by permittedExchanges
require(permittedExchanges.permittedAddresses(_newExchangePortalAddress));
exchangePortalAddress = _newExchangePortalAddress;
}
| /**
* @dev Sets a new default ExchangePortal address
*
* @param _newExchangePortalAddress Address of the new exchange portal to be set
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
5139,
5450
]
} | 7,545 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | setPoolPortalAddress | function setPoolPortalAddress (address _poolPortalAddress) external onlyOwner {
// Require that the new pool portal is permitted by permittedPools
require(permittedPools.permittedAddresses(_poolPortalAddress));
poolPortalAddress = _poolPortalAddress;
}
| /**
* @dev Sets a new default Portal Portal address
*
* @param _poolPortalAddress Address of the new pool portal to be set
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
5597,
5872
]
} | 7,546 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | setMaximumSuccessFee | function setMaximumSuccessFee(uint256 _maximumSuccessFee) external onlyOwner {
maximumSuccessFee = _maximumSuccessFee;
}
| /**
* @dev Sets maximum success fee for all newly created SmartFunds
*
* @param _maximumSuccessFee New maximum success fee
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
6019,
6150
]
} | 7,547 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | setPlatformFee | function setPlatformFee(uint256 _platformFee) external onlyOwner {
platformFee = _platformFee;
}
| /**
* @dev Sets platform fee for all newly created SmartFunds
*
* @param _platformFee New platform fee
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
6277,
6384
]
} | 7,548 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | changeStableCoinAddress | function changeStableCoinAddress(address _stableCoinAddress) external onlyOwner {
require(permittedStabels.permittedAddresses(_stableCoinAddress));
stableCoinAddress = _stableCoinAddress;
}
| /**
* @dev Sets new stableCoinAddress
*
* @param _stableCoinAddress New stable address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
6497,
6702
]
} | 7,549 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | withdrawTokens | function withdrawTokens(address _tokenAddress) external onlyOwner {
ERC20 token = ERC20(_tokenAddress);
token.transfer(owner, token.balanceOf(this));
}
| /**
* @dev Allows platform to withdraw tokens received as part of the platform fee
*
* @param _tokenAddress Address of the token to be withdrawn
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
6871,
7040
]
} | 7,550 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | withdrawEther | function withdrawEther() external onlyOwner {
owner.transfer(address(this).balance);
}
| /**
* @dev Allows platform to withdraw ether received as part of the platform fee
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
7137,
7234
]
} | 7,551 |
SmartFundRegistry | SmartFundRegistry.sol | 0xc8a6346133289ef7a7c104c1dc70e1da43a62cc6 | Solidity | SmartFundRegistry | contract SmartFundRegistry is Ownable {
address[] public smartFunds;
// address of platdorm wallet contract
address public COTDAOWallet;
// The Smart Contract which stores the addresses of all the authorized Exchange Portals
PermittedExchangesInterface public permittedExchanges;
// The Smart Contr... | /*
* The SmartFundRegistry is used to manage the creation and permissions of SmartFund contracts
*/ | Comment | function() public payable {}
| // Fallback payable function in order to receive ether when fund manager withdraws their cut | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://613e35e15ecb998f7c9c1ab6758f77e374d35c73c40bb1dbf0218a31293babda | {
"func_code_index": [
7333,
7364
]
} | 7,552 | |
ParamBook | ParamBook.sol | 0xbc91c117157d7c47135b13c97ec4a46fa1ca1ab1 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://aaec16ae5de700b97a777e545f12053b8958b5e4085955a6272b1ba07b897c5c | {
"func_code_index": [
497,
581
]
} | 7,553 |
ParamBook | ParamBook.sol | 0xbc91c117157d7c47135b13c97ec4a46fa1ca1ab1 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @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 | MIT | ipfs://aaec16ae5de700b97a777e545f12053b8958b5e4085955a6272b1ba07b897c5c | {
"func_code_index": [
1139,
1292
]
} | 7,554 |
ParamBook | ParamBook.sol | 0xbc91c117157d7c47135b13c97ec4a46fa1ca1ab1 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @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 | MIT | ipfs://aaec16ae5de700b97a777e545f12053b8958b5e4085955a6272b1ba07b897c5c | {
"func_code_index": [
1442,
1691
]
} | 7,555 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
985,
1106
]
} | 7,556 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
1326,
1455
]
} | 7,557 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
1799,
2081
]
} | 7,558 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
2589,
2802
]
} | 7,559 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
3333,
3696
]
} | 7,560 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
3979,
4135
]
} | 7,561 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
4490,
4812
]
} | 7,562 |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
5004,
5063
]
} | 7,563 | |
AccessChain | AccessChain.sol | 0xcaf5d1ad6e64e5968d3140551c14dcdff28c3a3b | Solidity | AccessChain | contract AccessChain is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://2b411a5cd96a7f8beb1b67fca4b5d14053725a17a9f4b09d2c85d5d36e836f53 | {
"func_code_index": [
5296,
5485
]
} | 7,564 |
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
975,
1096
]
} | 7,565 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
1316,
1445
]
} | 7,566 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
1789,
2071
]
} | 7,567 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
2163,
2376
]
} | 7,568 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - Sp... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
2906,
3269
]
} | 7,569 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
3552,
3708
]
} | 7,570 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
4063,
4385
]
} | 7,571 | ||
ARKToken | ARKToken.sol | 0x30bca884fb83165ce17bde655552596fe5c59c5d | Solidity | ARKToken | contract ARKToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ----------------------------------------... | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://af6879d1bdf636e3b8b12381aa2866bfe984b0d5a680df0d75d6abeffccdea26 | {
"func_code_index": [
4577,
4636
]
} | 7,572 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | buy | function buy()
public
payable
returns(uint256)
{
purchaseTokens(msg.value);
}
| /**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
10404,
10532
]
} | 7,573 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | function()
payable
public
{
purchaseTokens(msg.value);
}
| /**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
10702,
10800
]
} | 7,574 | ||||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | reinvest | function reinvest()
isActivated()
onlyHuman()
checkRoundStatus()
public
{
address _customerAddress = msg.sender;
uint256 incomeTmp = income_[_customerAddress];
//clear income of this user
income_[_customerAddress] = 0;
uint256 _tokens = purchaseTokens(incomeTmp);
// fi... | /**
* Converts all of caller's dividends to tokens.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
10875,
11327
]
} | 7,575 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | exit | function exit()
isActivated()
onlyHuman()
checkRoundStatus()
public
{
// get token count for caller & sell them all
address _customerAddress = msg.sender;
uint256 _tokens = tokenBalanceLedger_[_customerAddress];
if(_tokens > 0) sell(_tokens);
acquireDividends();
// lam... | /**
* Alias of sell(), acquireDividends() and withdraw().
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
11408,
11824
]
} | 7,576 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | acquireDividends | function acquireDividends()
isActivated()
onlyHuman()
checkRoundStatus()
public
{
// setup data
address _customerAddress = msg.sender;
Round storage round = rounds_[currentRoundID_.sub(1)];
uint256 _dividends = myDividends(round.roundID); // get ref. bonus later in the code
... | /**
* Withdraws all of the caller's dividends in previous round.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
11912,
12683
]
} | 7,577 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | withdraw | function withdraw()
isActivated()
onlyHuman()
checkRoundStatus()
public
{
address _customerAddress = msg.sender;
uint256 myIncome = income_[_customerAddress];
//clear value
income_[_customerAddress]=0;
_customerAddress.transfer(myIncome);
// fire event
emit onWith... | /**
* Withdraws all of the caller's income.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
12750,
13163
]
} | 7,578 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | taxDividends | function taxDividends(uint256 _dividends)
internal
returns (uint256)
{
// Taxed dividends
uint256 _comm = _dividends.div(communityFee_);
uint256 _taxedDividends = _dividends.sub(_comm);
// Community fees
uint256 _comm_1 = _comm.mul(3).div(10);
comm1Balance_ = comm1Balance_.add(_comm_1);
comm... | /**
* Tax dividends to community.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
13219,
13672
]
} | 7,579 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | sell | function sell(uint256 _amountOfTokens)
isActivated()
onlyHuman()
onlyBagholders()
checkRoundStatus()
public
{
require(_amountOfTokens > 0, "Selling 0 token!");
Round storage round = rounds_[currentRoundID_];
// setup data
address _customerAddress = msg.sender;
// rus... | /**
* Liquifies tokens to ethereum.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
13731,
15558
]
} | 7,580 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | transfer | function transfer(address _toAddress, uint256 _amountOfTokens)
isActivated()
onlyHuman()
checkRoundStatus()
onlyBagholders()
public
returns(bool)
{
// setup
address _customerAddress = msg.sender;
// make sure we have the requested tokens
// also disables transfers un... | /**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
15688,
17181
]
} | 7,581 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | disableInitialStage | function disableInitialStage()
onlyAdministrator()
public
{
onlyAmbassadors = false;
}
| /**
* In case the amassador quota is not met, the administrator can manually disable the ambassador phase.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
17373,
17501
]
} | 7,582 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | setAdministrator | function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
administrators[_identifier] = _status;
}
| /**
* In case one of us dies, we need to replace ourselves.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
17584,
17756
]
} | 7,583 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | setName | function setName(string _name)
onlyAdministrator()
public
{
name = _name;
}
| /**
* If we want to rebrand, we can.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
17816,
17933
]
} | 7,584 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | setSymbol | function setSymbol(string _symbol)
onlyAdministrator()
public
{
symbol = _symbol;
}
| /**
* If we want to rebrand, we can.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
17993,
18118
]
} | 7,585 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | activate | function activate()
onlyAdministrator()
public
{
// can only be ran once
require(activated_ == false, "Already activated");
currentRoundID_ = 1;
rounds_[currentRoundID_].roundID = currentRoundID_;
rounds_[currentRoundID_].startTime = now;
rounds_[currentRoundID_].endTime = now + roundDuration... | /**
Start this game.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
18162,
18560
]
} | 7,586 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | totalEthereumBalance | function totalEthereumBalance()
public
view
returns(uint)
{
return address(this).balance;
}
| /**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
18745,
18887
]
} | 7,587 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | totalSupply | function totalSupply()
public
view
returns(uint256)
{
return tokenSupply_;
}
| /**
* Retrieve the total token supply.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
18949,
19076
]
} | 7,588 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | myTokens | function myTokens()
public
view
returns(uint256)
{
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
| /**
* Retrieve the tokens owned by the caller.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
19146,
19333
]
} | 7,589 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | myDividends | function myDividends(uint256 _roundID)
public
view
returns(uint256)
{
return dividendsOf(msg.sender, _roundID);
}
| /**
* 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 separate.
... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
19684,
19848
]
} | 7,590 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | balanceOf | function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
return tokenBalanceLedger_[_customerAddress];
}
| /**
* Retrieve the token balance of any single address.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
19927,
20101
]
} | 7,591 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | dividendsOf | function dividendsOf(address _customerAddress, uint256 _roundID)
view
public
returns(uint256)
{
if(_roundID<1) return 0;
if (_roundID > currentRoundID_) return 0;
Round storage round = rounds_[_roundID];
// Sold >= bought
if(round.userNetBuy[_customerAddress] <= 0)
{
return 0;
... | /**
* Retrieve the dividend balance of any single address.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
20183,
20804
]
} | 7,592 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | estimateDividends | function estimateDividends(address _customerAddress)
view
public
returns(uint256)
{
Round storage round = rounds_[currentRoundID_];
// Sold >= bought
if(round.userNetBuy[_customerAddress] <= 0)
{
return 0;
}
// Nobody sold.
if(round.dividends <= 0)
{
return 0;
}
... | /**
* Estimate user dividends in current round.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
20874,
21403
]
} | 7,593 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | 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 _d... | /**
* Return the buy price of 1 individual token.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
21476,
22021
]
} | 7,594 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | 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);
return _eth... | /**
* Return the sell price of 1 individual token.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
22095,
22484
]
} | 7,595 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | calculateTokensReceived | function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
uint256 _amountOfTokens = ethereumToTokens_(_ethereumToSpend);
return _amountOfTokens;
}
| /**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
22596,
22834
]
} | 7,596 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | calculateEthereumReceived | function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
require(_tokensToSell <= tokenSupply_);
uint256 _ethereum = tokensToEthereum_(_tokensToSell);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(_et... | /**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
22947,
23363
]
} | 7,597 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | purchaseTokens | function purchaseTokens(uint256 _incomingEthereum)
isActivated()
antiEarlyWhale(_incomingEthereum)
onlyHuman()
checkRoundStatus()
internal
returns(uint256)
{
require(_incomingEthereum > 0, "0 eth buying.");
Round storage round = rounds_[currentRoundID_];
// data setup
... | /*==========================================
= INTERNAL FUNCTIONS =
==========================================*/ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
25404,
27501
]
} | 7,598 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | ethereumToTokens_ | function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived =
(
(
// underflow attempts BTFO
SafeMath.sub(
(sqrt
(
... | /**
* 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.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
27792,
28770
]
} | 7,599 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | tokensToEthereum_ | function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
uint256 tokens_ = (_tokens + 1e18);
uint256 _tokenSupply = (tokenSupply_ + 1e18);
uint256 _etherReceived =
(
// underflow attempts BTFO
SafeMath.sub(
(
(
... | /**
* 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.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
29027,
29755
]
} | 7,600 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | withdrawComm1 | function withdrawComm1()
isActivated()
onlyComm1()
onlyHuman()
checkRoundStatus()
public
{
uint256 bal = comm1Balance_;
comm1Balance_ = 0;
msg.sender.transfer(bal);
emit onWithDrawComm(1, bal);
}
| /*==========================================
= COMMUNITY FUNCTIONS =
==========================================*/ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
29908,
30181
]
} | 7,601 | |||
RunAway | RunAway.sol | 0x692b856117039d424cfac420f93ab2451f3c9eb5 | Solidity | RunAway | contract RunAway {
using SafeMath for uint256;
using SafeMathInt for int256;
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;... | sqrt | function sqrt(uint x) internal pure returns (uint y) {
uint z = (x + 1) / 2;
y = x;
while (z < y) {
y = z;
z = (x / z + z) / 2;
}
}
| //This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://2db0ef42fe14458f087a43ebbcd18ee837535c8916ef75dd7f0fe57160a786c5 | {
"func_code_index": [
31254,
31457
]
} | 7,602 | |||
UniV3PairManagerFactory | solidity/contracts/UniV3PairManager.sol | 0x005634cfef45e5a19c84aede6f0af17833471852 | Solidity | UniV3PairManager | contract UniV3PairManager is IUniV3PairManager, Governable {
/// @inheritdoc IERC20Metadata
string public override name;
/// @inheritdoc IERC20Metadata
string public override symbol;
/// @inheritdoc IERC20
uint256 public override totalSupply = 0;
/// @inheritdoc IPairManager
address public immutable ... | mint | function mint(
uint256 amount0Desired,
uint256 amount1Desired,
uint256 amount0Min,
uint256 amount1Min,
address to
) external override returns (uint128 liquidity) {
(liquidity, , ) = _addLiquidity(amount0Desired, amount1Desired, amount0Min, amount1Min);
_mint(to, liquidity);
}
| /// @inheritdoc IUniV3PairManager | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2261,
2571
]
} | 7,603 | ||||
UniV3PairManagerFactory | solidity/contracts/UniV3PairManager.sol | 0x005634cfef45e5a19c84aede6f0af17833471852 | Solidity | UniV3PairManager | contract UniV3PairManager is IUniV3PairManager, Governable {
/// @inheritdoc IERC20Metadata
string public override name;
/// @inheritdoc IERC20Metadata
string public override symbol;
/// @inheritdoc IERC20
uint256 public override totalSupply = 0;
/// @inheritdoc IPairManager
address public immutable ... | uniswapV3MintCallback | function uniswapV3MintCallback(
uint256 amount0Owed,
uint256 amount1Owed,
bytes calldata data
) external override {
MintCallbackData memory decoded = abi.decode(data, (MintCallbackData));
if (msg.sender != pool) revert OnlyPool();
if (amount0Owed > 0) _pay(decoded._poolKey.token0, decoded.payer, pool, amoun... | /// @inheritdoc IUniV3PairManager | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2609,
3047
]
} | 7,604 | ||||
UniV3PairManagerFactory | solidity/contracts/UniV3PairManager.sol | 0x005634cfef45e5a19c84aede6f0af17833471852 | Solidity | UniV3PairManager | contract UniV3PairManager is IUniV3PairManager, Governable {
/// @inheritdoc IERC20Metadata
string public override name;
/// @inheritdoc IERC20Metadata
string public override symbol;
/// @inheritdoc IERC20
uint256 public override totalSupply = 0;
/// @inheritdoc IPairManager
address public immutable ... | burn | function burn(
uint128 liquidity,
uint256 amount0Min,
uint256 amount1Min,
address to
) external override returns (uint256 amount0, uint256 amount1) {
(amount0, amount1) = IUniswapV3Pool(pool).burn(_TICK_LOWER, _TICK_UPPER, liquidity);
if (amount0 < amount0Min || amount1 < amount1Min) revert ExcessiveSlippa... | /// @inheritdoc IUniV3PairManager | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3085,
3565
]
} | 7,605 | ||||
UniV3PairManagerFactory | solidity/contracts/UniV3PairManager.sol | 0x005634cfef45e5a19c84aede6f0af17833471852 | Solidity | UniV3PairManager | contract UniV3PairManager is IUniV3PairManager, Governable {
/// @inheritdoc IERC20Metadata
string public override name;
/// @inheritdoc IERC20Metadata
string public override symbol;
/// @inheritdoc IERC20
uint256 public override totalSupply = 0;
/// @inheritdoc IPairManager
address public immutable ... | collect | function collect() external override onlyGovernance returns (uint256 amount0, uint256 amount1) {
(, , , uint128 tokensOwed0, uint128 tokensOwed1) = IUniswapV3Pool(pool).positions(
keccak256(abi.encodePacked(address(this), _TICK_LOWER, _TICK_UPPER))
);
(amount0, amount1) = IUniswapV3Pool(pool).collect(governan... | /// @inheritdoc IUniV3PairManager | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3603,
3993
]
} | 7,606 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.