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
TickerRegistry
TickerRegistry.sol
0xc31714e6759a1ee26db1d06af1ed276340cd4233
Solidity
TickerRegistry
contract TickerRegistry is ITickerRegistry, Util, Pausable, RegistryUpdater, ReclaimTokens { using SafeMath for uint256; // constant variable to check the validity to use the symbol // For now it's value is 15 days; uint256 public expiryLimit = 15 * 1 days; // Details of the symbol that get...
/** * @title Registry contract for issuers to reserve their security token symbols * @notice Allows issuers to reserve their token symbols ahead of actually generating their security token. * @dev SecurityTokenRegistry would reference this contract and ensure that a token symbol exists here and only its owner can...
NatSpecMultiLine
isReserved
function isReserved(string _symbol, address _owner, string _tokenName, bytes32 _swarmHash) public returns(bool) { string memory symbol = upper(_symbol); require(msg.sender == securityTokenRegistry, "msg.sender should be SecurityTokenRegistry contract"); if (registeredSymbols[symbol].owner == _owner && !expi...
/** * @notice Check the symbol is reserved or not * @param _symbol Symbol of the token * @param _owner Owner of the token * @param _tokenName Name of the token * @param _swarmHash off-chain hash * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://1c3fd67e0e5dae16f4d5818e4def156aa71b9a6925640af36a76c616a54e724c
{ "func_code_index": [ 4314, 5115 ] }
5,800
TickerRegistry
TickerRegistry.sol
0xc31714e6759a1ee26db1d06af1ed276340cd4233
Solidity
TickerRegistry
contract TickerRegistry is ITickerRegistry, Util, Pausable, RegistryUpdater, ReclaimTokens { using SafeMath for uint256; // constant variable to check the validity to use the symbol // For now it's value is 15 days; uint256 public expiryLimit = 15 * 1 days; // Details of the symbol that get...
/** * @title Registry contract for issuers to reserve their security token symbols * @notice Allows issuers to reserve their token symbols ahead of actually generating their security token. * @dev SecurityTokenRegistry would reference this contract and ensure that a token symbol exists here and only its owner can...
NatSpecMultiLine
getDetails
function getDetails(string _symbol) public view returns (address, uint256, string, bytes32, bool) { string memory symbol = upper(_symbol); if (registeredSymbols[symbol].status == true||registeredSymbols[symbol].timestamp.add(expiryLimit) > now) { return ( registeredSymbols[symbo...
/** * @notice Returns the owner and timestamp for a given symbol * @param _symbol symbol * @return address * @return uint256 * @return string * @return bytes32 * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://1c3fd67e0e5dae16f4d5818e4def156aa71b9a6925640af36a76c616a54e724c
{ "func_code_index": [ 5349, 6022 ] }
5,801
TickerRegistry
TickerRegistry.sol
0xc31714e6759a1ee26db1d06af1ed276340cd4233
Solidity
TickerRegistry
contract TickerRegistry is ITickerRegistry, Util, Pausable, RegistryUpdater, ReclaimTokens { using SafeMath for uint256; // constant variable to check the validity to use the symbol // For now it's value is 15 days; uint256 public expiryLimit = 15 * 1 days; // Details of the symbol that get...
/** * @title Registry contract for issuers to reserve their security token symbols * @notice Allows issuers to reserve their token symbols ahead of actually generating their security token. * @dev SecurityTokenRegistry would reference this contract and ensure that a token symbol exists here and only its owner can...
NatSpecMultiLine
expiryCheck
function expiryCheck(string _symbol) internal returns(bool) { if (registeredSymbols[_symbol].owner != address(0)) { if (now > registeredSymbols[_symbol].timestamp.add(expiryLimit) && registeredSymbols[_symbol].status != true) { registeredSymbols[_symbol] = SymbolDetails(address(0), uint256(0)...
/** * @notice To re-initialize the token symbol details if symbol validity expires * @param _symbol token symbol * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://1c3fd67e0e5dae16f4d5818e4def156aa71b9a6925640af36a76c616a54e724c
{ "func_code_index": [ 6185, 6667 ] }
5,802
TickerRegistry
TickerRegistry.sol
0xc31714e6759a1ee26db1d06af1ed276340cd4233
Solidity
TickerRegistry
contract TickerRegistry is ITickerRegistry, Util, Pausable, RegistryUpdater, ReclaimTokens { using SafeMath for uint256; // constant variable to check the validity to use the symbol // For now it's value is 15 days; uint256 public expiryLimit = 15 * 1 days; // Details of the symbol that get...
/** * @title Registry contract for issuers to reserve their security token symbols * @notice Allows issuers to reserve their token symbols ahead of actually generating their security token. * @dev SecurityTokenRegistry would reference this contract and ensure that a token symbol exists here and only its owner can...
NatSpecMultiLine
changePolyRegisterationFee
function changePolyRegisterationFee(uint256 _registrationFee) public onlyOwner { require(registrationFee != _registrationFee); emit LogChangePolyRegisterationFee(registrationFee, _registrationFee); registrationFee = _registrationFee; }
/** * @notice set the ticker registration fee in POLY tokens * @param _registrationFee registration fee in POLY tokens (base 18 decimals) */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://1c3fd67e0e5dae16f4d5818e4def156aa71b9a6925640af36a76c616a54e724c
{ "func_code_index": [ 6834, 7106 ] }
5,803
TickerRegistry
TickerRegistry.sol
0xc31714e6759a1ee26db1d06af1ed276340cd4233
Solidity
TickerRegistry
contract TickerRegistry is ITickerRegistry, Util, Pausable, RegistryUpdater, ReclaimTokens { using SafeMath for uint256; // constant variable to check the validity to use the symbol // For now it's value is 15 days; uint256 public expiryLimit = 15 * 1 days; // Details of the symbol that get...
/** * @title Registry contract for issuers to reserve their security token symbols * @notice Allows issuers to reserve their token symbols ahead of actually generating their security token. * @dev SecurityTokenRegistry would reference this contract and ensure that a token symbol exists here and only its owner can...
NatSpecMultiLine
unpause
function unpause() public onlyOwner { _unpause(); }
/** * @notice pause registration function */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://1c3fd67e0e5dae16f4d5818e4def156aa71b9a6925640af36a76c616a54e724c
{ "func_code_index": [ 7172, 7243 ] }
5,804
TickerRegistry
TickerRegistry.sol
0xc31714e6759a1ee26db1d06af1ed276340cd4233
Solidity
TickerRegistry
contract TickerRegistry is ITickerRegistry, Util, Pausable, RegistryUpdater, ReclaimTokens { using SafeMath for uint256; // constant variable to check the validity to use the symbol // For now it's value is 15 days; uint256 public expiryLimit = 15 * 1 days; // Details of the symbol that get...
/** * @title Registry contract for issuers to reserve their security token symbols * @notice Allows issuers to reserve their token symbols ahead of actually generating their security token. * @dev SecurityTokenRegistry would reference this contract and ensure that a token symbol exists here and only its owner can...
NatSpecMultiLine
pause
function pause() public onlyOwner { _pause(); }
/** * @notice unpause registration function */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://1c3fd67e0e5dae16f4d5818e4def156aa71b9a6925640af36a76c616a54e724c
{ "func_code_index": [ 7310, 7376 ] }
5,805
HollyDAO
src/contracts-nft/holly-dao.sol
0x0db2a844efe31819cfb8184dca7244b5c29d914a
Solidity
HollyDAO
contract HollyDAO is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; Counters.Counter private _ownerCounter; bool public saleIsActive; string public baseURI; uint256 public immutable maxSupply; uint256 public immutable reserve...
currentSupply
function currentSupply() public view returns (uint256) { return _tokenIdCounter.current(); }
// Returns the current amount of NFTs minted.
LineComment
v0.8.10+commit.fc410830
MIT
{ "func_code_index": [ 2379, 2487 ] }
5,806
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
function () public payable { require(msg.value > 0); _systemReserves[0x0] = add(_systemReserves[0x0], msg.value); }
// Function 01 - Fallback Function To Receive Donation In Eth
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 2721, 2871 ] }
5,807
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
HodlTokens
function HodlTokens(address tokenAddress, uint256 amount) public contractActive { require(tokenAddress != 0x0); require(amount > 0); (contractaddress[tokenAddress] = false) { revert(); } ERC20Interface token = ERC20Interface(tokenAddress); require(token.transferFrom(msg.sender, addr...
// Function 02 - Contribute (Hodl Platform)
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 2920, 4738 ] }
5,808
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
ClaimTokens
function ClaimTokens(address tokenAddress, uint256 id) public { require(tokenAddress != 0x0); require(id != 0); Safe storage s = _safes[id]; require(s.user == msg.sender); (s.amountbalance == 0) { revert(); } RetireHodl(tokenAddress, id); }
// Function 03 - Claim (Hodl Platform)
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 4786, 5113 ] }
5,809
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
GetUserSafesLength
function GetUserSafesLength(address hodler) public view returns (uint256 length) { return _userSafes[hodler].length; }
// Function 04 - Get How Many Contribute ?
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 8224, 8361 ] }
5,810
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
GetSafe
function GetSafe(uint256 _id) public view returns (uint256 id, address user, address tokenAddress, uint256 amount, uint256 endtime, string tokenSymbol, uint256 amountbalance, uint256 lasttime, uint256 percentage, uint256 percentagereceive, uint256 tokenreceive, address referrer) { Safe storage s = _...
// Function 05 - Get Data Values
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 8402, 8920 ] }
5,811
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
GetTokenFees
function GetTokenFees(address tokenAddress) public view returns (uint256 amount) { return _systemReserves[tokenAddress]; }
// Function 06 - Get Tokens Reserved For The Owner As Commission
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 8991, 9136 ] }
5,812
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
GetContractBalance
function GetContractBalance() public view returns(uint256) { return address(this).balance; }
// Function 07 - Get Contract's Balance
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 9186, 9304 ] }
5,813
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
CashbackCode
function CashbackCode(address _cashbackcode) public { (cashbackcode[msg.sender] == 0) { ashbackcode[msg.sender] = _cashbackcode; mit onCashbackCode(msg.sender, _cashbackcode); }
//Function 08 - Cashback Code
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 9341, 9570 ] }
5,814
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
StoreComission
function StoreComission(address tokenAddress, uint256 amount) private { _systemReserves[tokenAddress] = add(_systemReserves[tokenAddress], amount); bool isNew = true; for(uint256 i = 0; i < _listedReserves.length; i++) { if(_listedReserves[i] == tokenAddress) { ...
// Useless Function ( Public ) //??? Function 01 - Store Comission From Unfinished Hodl
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 9671, 10159 ] }
5,815
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
DeleteSafe
function DeleteSafe(Safe s) private { _totalSaved[s.tokenAddress] = sub(_totalSaved[s.tokenAddress], s.amount); delete _safes[s.id]; uint256[] storage vector = _userSafes[msg.sender]; uint256 size = vector.length; for(uint256 i = 0; i < size; i++) { if(vector[i] ==...
//??? Function 02 - Delete Safe Values In Storage
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 10217, 10711 ] }
5,816
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
storeProfileHashed
function storeProfileHashed(string _profileHashed) public { profileHashed[msg.sender] = _profileHashed; emit onStoreProfileHash(msg.sender, _profileHashed); }
//??? Function 03 - Store The Profile's Hash In The Blockchain
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 10782, 10979 ] }
5,817
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
GetHodlTokensBalance
function GetHodlTokensBalance(address tokenAddress) public view returns (uint256 balance) { require(tokenAddress != 0x0); for(uint256 i = 1; i < _currentIndex; i++) { Safe storage s = _safes[i]; if(s.user == msg.sender && s.tokenAddress == tokenAddress) bal...
//??? Function 04 - Get User's Any Token Balance
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 11032, 11437 ] }
5,818
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
AddContractAddress
function AddContractAddress(address tokenAddress, bool contractstatus) public onlyOwner { contractaddress[tokenAddress] = contractstatus; }
// 00 Insert Token Contract Address
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 11731, 11889 ] }
5,819
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
OwnerRetireHodl
function OwnerRetireHodl(address tokenAddress, uint256 id) public onlyOwner { require(tokenAddress != 0x0); require(id != 0); RetireHodl(tokenAddress, id); }
// 01 Claim ( By Owner )
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 11920, 12120 ] }
5,820
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
ChangeHodlingTime
function ChangeHodlingTime(uint256 newHodlingDays) onlyOwner public { require(newHodlingDays >= 60); hodlingTime = newHodlingDays * 1 days; }
// 02 Change Hodling Time
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 12157, 12335 ] }
5,821
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
ChangeAllTimeHighPrice
function ChangeAllTimeHighPrice(uint256 newAllTimeHighPrice) onlyOwner public { require(newAllTimeHighPrice > allTimeHighPrice); allTimeHighPrice = newAllTimeHighPrice; }
// 03 Change All Time High Price
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 12379, 12598 ] }
5,822
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
ChangeComission
function ChangeComission(uint256 newComission) onlyOwner public { require(newComission <= 30); comission = newComission; }
// 04 Change Comission Value
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 12634, 12791 ] }
5,823
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
WithdrawEth
function WithdrawEth(uint256 amount) onlyOwner public { require(amount > 0); require(address(this).balance >= amount); msg.sender.transfer(amount); }
// 05 - Withdraw Ether Received Through Fallback Function
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 12858, 13056 ] }
5,824
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
WithdrawTokenFees
function WithdrawTokenFees(address tokenAddress) onlyOwner public { require(_systemReserves[tokenAddress] > 0); uint256 amount = _systemReserves[tokenAddress]; _systemReserves[tokenAddress] = 0; ERC20Interface token = ERC20Interface(tokenAddress); require(token.bal...
// 06 Withdraw Token Fees By Token Address
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 13110, 13540 ] }
5,825
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
WithdrawAllFees
function WithdrawAllFees() onlyOwner public { // Ether uint256 x = _systemReserves[0x0]; if(x > 0 && x <= address(this).balance) { _systemReserves[0x0] = 0; msg.sender.transfer(_systemReserves[0x0]); } // Tokens address ta; ERC20Interface token; ...
// 07 Withdraw All Eth And All Tokens Fees
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 13590, 14373 ] }
5,826
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
GetTokensAddressesWithFees
function GetTokensAddressesWithFees() onlyOwner public view returns (address[], string[], uint256[]) { uint256 length = _listedReserves.length; address[] memory tokenAddress = new address[](length); string[] memory tokenSymbol = new string[](length); uint256[] memory tokenFees...
// 08 - Returns All Tokens Addresses With Fees
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 14439, 15218 ] }
5,827
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
ReturnAllTokens
function ReturnAllTokens(bool onlyAXPR) onlyOwner public { uint256 returned; for(uint256 i = 1; i < _currentIndex; i++) { Safe storage s = _safes[i]; if (s.id != 0) { if ( (onlyAXPR && s.tokenAddress == AXPRtoken) || !onlyAXPR ...
// 09 - Return All Tokens To Their Respective Addresses
LineComment
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 15285, 15937 ] }
5,828
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; }
/** * SAFE MATH FUNCTIONS * * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 16109, 16316 ] }
5,829
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 16410, 16710 ] }
5,830
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 16834, 16962 ] }
5,831
ldoh
ldoh.sol
0x56aeb2a3ca5f7c5a04b7e7c4f8115dc8f0df9f8a
Solidity
ldoh
contract ldoh is BlockableContract { event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime)...
// Contract 03
LineComment
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://02e0fb3aa588a80e54cc382100aefc3ea27765f0766984c5ab32b36bc16f2818
{ "func_code_index": [ 17036, 17182 ] }
5,832
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
initMISOTokenFactory
function initMISOTokenFactory(address _accessControls) external { require(!initialised); initialised = true; locked = true; accessControls = MISOAccessControls(_accessControls); emit MisoInitTokenFactory(msg.sender); }
/// @dev GP: Migrate to the BentoBox.
NatSpecSingleLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2661, 2928 ] }
5,833
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
setMinimumFee
function setMinimumFee(uint256 _amount) external { require( accessControls.hasAdminRole(msg.sender), "MISOTokenFactory: Sender must be operator" ); minimumFee = _amount; }
/** * @notice Sets the minimum fee. * @param _amount Fee amount. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3017, 3244 ] }
5,834
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
setIntegratorFeePct
function setIntegratorFeePct(uint256 _amount) external { require( accessControls.hasAdminRole(msg.sender), "MISOTokenFactory: Sender must be operator" ); /// @dev this is out of 1000, ie 25% = 250 require( _amount <= INTEGRATOR_FEE_PRECISION, "MISOTokenFactory: Range is ...
/** * @notice Sets integrator fee percentage. * @param _amount Percentage amount. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3350, 3774 ] }
5,835
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
setDividends
function setDividends(address payable _divaddr) external { require( accessControls.hasAdminRole(msg.sender), "MISOTokenFactory: Sender must be operator" ); require(_divaddr != address(0)); misoDiv = _divaddr; }
/** * @notice Sets dividend address. * @param _divaddr Dividend address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3871, 4150 ] }
5,836
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
setLocked
function setLocked(bool _locked) external { require( accessControls.hasAdminRole(msg.sender), "MISOTokenFactory: Sender must be admin" ); locked = _locked; }
/** * @notice Sets the factory to be locked or unlocked. * @param _locked bool. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4258, 4471 ] }
5,837
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
setCurrentTemplateId
function setCurrentTemplateId(uint256 _templateType, uint256 _templateId) external { require( accessControls.hasAdminRole(msg.sender) || accessControls.hasOperatorRole(msg.sender), "MISOTokenFactory: Sender must be admin" ); require(tokenTemplates[_templateId] != address(0), "MISOTok...
/** * @notice Sets the current template ID for any type. * @param _templateType Type of template. * @param _templateId The ID of the current template for that type */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4665, 5246 ] }
5,838
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
hasTokenMinterRole
function hasTokenMinterRole(address _address) public view returns (bool) { return accessControls.hasRole(TOKEN_MINTER_ROLE, _address); }
/** * @notice Used to check whether an address has the minter role * @param _address EOA or contract being checked * @return bool True if the account has the role or false if it does not */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 5462, 5614 ] }
5,839
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
deployToken
function deployToken( uint256 _templateId, address payable _integratorFeeAccount ) public payable returns (address token) { /// @dev If the contract is locked, only admin and minters can deploy. if (locked) { require(accessControls.hasAdminRole(msg.sender) || accessControls...
/** * @notice Creates a token corresponding to template id and transfers fees. * @dev Initializes token with parameters passed * @param _templateId Template id of token to create. * @param _integratorFeeAccount Address to pay the fee to. * @return token Token address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 5924, 7428 ] }
5,840
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
createToken
function createToken( uint256 _templateId, address payable _integratorFeeAccount, bytes calldata _data ) external payable returns (address token) { token = deployToken(_templateId, _integratorFeeAccount); emit TokenInitialized(address(token), _templateId, _data); IMisoToken(token).initToken(...
/** * @notice Creates a token corresponding to template id. * @dev Initializes token with parameters passed. * @param _templateId Template id of token to create. * @param _integratorFeeAccount Address to pay the fee to. * @param _data Data to be passed to the token contract for init. * @return token Token address...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 7788, 8338 ] }
5,841
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
addTokenTemplate
function addTokenTemplate(address _template) external { require( accessControls.hasAdminRole(msg.sender) || accessControls.hasOperatorRole(msg.sender), "MISOTokenFactory: Sender must be operator" ); uint256 templateType = IMisoToken(_template).tokenTemplate(); require(templateTyp...
/** * @notice Function to add a token template to create through factory. * @dev Should have operator access. * @param _template Token template to create a token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 8530, 9287 ] }
5,842
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
removeTokenTemplate
function removeTokenTemplate(uint256 _templateId) external { require( accessControls.hasAdminRole(msg.sender) || accessControls.hasOperatorRole(msg.sender), "MISOTokenFactory: Sender must be operator" ); require(tokenTemplates[_templateId] != address(0)); address template = token...
/** * @notice Function to remove a token template. * @dev Should have operator access. * @param _templateId Refers to template that is to be deleted. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 9465, 10210 ] }
5,843
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
numberOfTokens
function numberOfTokens() external view returns (uint256) { return tokens.length; }
/** * @notice Get the total number of tokens in the factory. * @return Token count. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 10318, 10417 ] }
5,844
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
getTokenTemplate
function getTokenTemplate(uint256 _templateId) external view returns (address ) { return tokenTemplates[_templateId]; }
/** * @notice Get the address based on template ID. * @param _templateId Token template ID. * @return Address of the required template ID. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 10683, 10818 ] }
5,845
MISOTokenFactory
contracts/MISOTokenFactory.sol
0xdd8cbc86625f28cc58fe1ee13a9ee3bb5d9e1f2a
Solidity
MISOTokenFactory
contract MISOTokenFactory is CloneFactory, SafeTransfer{ /// @notice Responsible for access rights to the contract MISOAccessControls public accessControls; bytes32 public constant TOKEN_MINTER_ROLE = keccak256("TOKEN_MINTER_ROLE"); /// @notice Constant to indicate precision uint256 private co...
getTemplateId
function getTemplateId(address _tokenTemplate) external view returns (uint256) { return tokenTemplateToId[_tokenTemplate]; }
/** * @notice Get the ID based on template address. * @param _tokenTemplate Token template address. * @return ID of the required template address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 10994, 11134 ] }
5,846
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 243, 429 ] }
5,847
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 675, 906 ] }
5,848
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 1170, 1312 ] }
5,849
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 1596, 1827 ] }
5,850
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 2065, 2541 ] }
5,851
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/...
/** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 2779, 3294 ] }
5,852
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 3757, 3894 ] }
5,853
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold ...
/** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 4377, 4761 ] }
5,854
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 5213, 5348 ] }
5,855
Timelock
Timelock.sol
0xf6f9375060fd7472ff7233e9909ab045feefc699
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { ...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unknown
bzzr://1f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f20
{ "func_code_index": [ 5820, 6025 ] }
5,856
HistoryMkrSingleWhitelist
contracts/HistoryMkr_single_whitelist.sol
0x1b6d4c04d23e119d7046e50c9fa294945d811fb2
Solidity
FeelGood
interface FeelGood { // mind the `view` modifier function balanceOf(address _owner) external view returns (uint256); }
balanceOf
function balanceOf(address _owner) external view returns (uint256);
// mind the `view` modifier
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 53, 124 ] }
5,857
HistoryMkrSingleWhitelist
contracts/HistoryMkr_single_whitelist.sol
0x1b6d4c04d23e119d7046e50c9fa294945d811fb2
Solidity
HistoryMkrSingleWhitelist
contract HistoryMkrSingleWhitelist is HistoryMkr, ERC721Pausable, ERC721Burnable { using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; mapping(address => uint8) preMintBalanceLedger; //map to track preMintBalances (otherwise they can move away and buy again) bool private preM...
endContract
function endContract() public onlyOwner() { pause(); preMintEnabled = false; running = false; }
//very dangerosus. Stops the entire contract
LineComment
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 3727, 3854 ] }
5,858
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(ERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(ERC20 token, addre...
safeApprove
function safeApprove(ERC20 token, address spender, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); }
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 637, 826 ] }
5,859
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
AdminAuth
contract AdminAuth { using SafeERC20 for ERC20; address public owner; address public admin; modifier onlyOwner() { require(owner == msg.sender); _; } constructor() public { owner = msg.sender; } /// @notice Admin is set by owner first time, af...
setAdminByOwner
function setAdminByOwner(address _admin) public { require(msg.sender == owner); require(admin == address(0)); admin = _admin; }
/// @notice Admin is set by owner first time, after that admin is super role and has permission to change owner /// @param _admin Address of multisig that becomes admin
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 447, 613 ] }
5,860
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
AdminAuth
contract AdminAuth { using SafeERC20 for ERC20; address public owner; address public admin; modifier onlyOwner() { require(owner == msg.sender); _; } constructor() public { owner = msg.sender; } /// @notice Admin is set by owner first time, af...
setAdminByAdmin
function setAdminByAdmin(address _admin) public { require(msg.sender == admin); admin = _admin; }
/// @notice Admin is able to set new admin /// @param _admin Address of multisig that becomes new admin
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 730, 857 ] }
5,861
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
AdminAuth
contract AdminAuth { using SafeERC20 for ERC20; address public owner; address public admin; modifier onlyOwner() { require(owner == msg.sender); _; } constructor() public { owner = msg.sender; } /// @notice Admin is set by owner first time, af...
setOwnerByAdmin
function setOwnerByAdmin(address _owner) public { require(msg.sender == admin); owner = _owner; }
/// @notice Admin is able to change owner /// @param _owner Address of new owner
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 951, 1078 ] }
5,862
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
AdminAuth
contract AdminAuth { using SafeERC20 for ERC20; address public owner; address public admin; modifier onlyOwner() { require(owner == msg.sender); _; } constructor() public { owner = msg.sender; } /// @notice Admin is set by owner first time, af...
kill
function kill() public onlyOwner { selfdestruct(payable(owner)); }
/// @notice Destroy the contract
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 1119, 1204 ] }
5,863
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
AdminAuth
contract AdminAuth { using SafeERC20 for ERC20; address public owner; address public admin; modifier onlyOwner() { require(owner == msg.sender); _; } constructor() public { owner = msg.sender; } /// @notice Admin is set by owner first time, af...
withdrawStuckFunds
function withdrawStuckFunds(address _token, uint _amount) public onlyOwner { if (_token == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) { payable(owner).transfer(_amount); } else { ERC20(_token).safeTransfer(owner, _amount); } }
/// @notice withdraw stuck funds
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 1246, 1536 ] }
5,864
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
subscribe
function subscribe(uint128 _minRatio, uint128 _maxRatio, uint128 _optimalBoost, uint128 _optimalRepay, bool _boostEnabled) external { // if boost is not enabled, set max ratio to max uint uint128 localMaxRatio = _boostEnabled ? _maxRatio : uint128(-1); require(checkParams(_minRatio, localMaxRatio), "Mu...
/// @dev Called by the DSProxy contract which owns the Compound position /// @notice Adds the users Compound poistion in the list of subscriptions so it can be monitored /// @param _minRatio Minimum ratio below which repay is triggered /// @param _maxRatio Maximum ratio after which boost is triggered /// @param _optima...
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 1237, 2507 ] }
5,865
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
unsubscribe
function unsubscribe() external { _unsubscribe(msg.sender); }
/// @notice Called by the users DSProxy /// @dev Owner who subscribed cancels his subscription
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 2615, 2695 ] }
5,866
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
checkParams
function checkParams(uint128 _minRatio, uint128 _maxRatio) internal pure returns (bool) { if (_minRatio > _maxRatio) { return false; } return true; }
/// @dev Checks limit if minRatio is bigger than max /// @param _minRatio Minimum ratio, bellow which repay can be triggered /// @param _maxRatio Maximum ratio, over which boost can be triggered /// @return Returns bool if the params are correct
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 2964, 3167 ] }
5,867
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
_unsubscribe
function _unsubscribe(address _user) internal { require(subscribers.length > 0, "Must have subscribers in the list"); SubPosition storage subInfo = subscribersPos[_user]; require(subInfo.subscribed, "Must first be subscribed"); address lastOwner = subscribers[subscribers.length - 1].user; ...
/// @dev Internal method to remove a subscriber from the list /// @param _user The actual address that owns the Compound position
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 3310, 4050 ] }
5,868
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
isSubscribed
function isSubscribed(address _user) public view returns (bool) { SubPosition storage subInfo = subscribersPos[_user]; return subInfo.subscribed; }
/// @dev Checks if the user is subscribed /// @param _user The actual address that owns the Compound position /// @return If the user is subscribed
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 4216, 4393 ] }
5,869
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
getHolder
function getHolder(address _user) public view returns (CompoundHolder memory) { SubPosition storage subInfo = subscribersPos[_user]; return subscribers[subInfo.arrPos]; }
/// @dev Returns subscribtion information about a user /// @param _user The actual address that owns the Compound position /// @return Subscription information about the user if exists
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 4596, 4796 ] }
5,870
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
getSubscribers
function getSubscribers() public view returns (CompoundHolder[] memory) { return subscribers; }
/// @notice Helper method to return all the subscribed CDPs /// @return List of all subscribers
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 4905, 5019 ] }
5,871
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
getSubscribersByPage
function getSubscribersByPage(uint _page, uint _perPage) public view returns (CompoundHolder[] memory) { CompoundHolder[] memory holders = new CompoundHolder[](_perPage); uint start = _page * _perPage; uint end = start + _perPage; end = (end > holders.length) ? holders.length : end; uint ...
/// @notice Helper method for the frontend, returns all the subscribed CDPs paginated /// @param _page What page of subscribers you want /// @param _perPage Number of entries per page /// @return List of all subscribers for that page
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 5276, 5790 ] }
5,872
CompoundSubscriptions
CompoundSubscriptions.sol
0x52015effd577e08f498a0ccc11905925d58d6207
Solidity
CompoundSubscriptions
contract CompoundSubscriptions is AdminAuth { struct CompoundHolder { address user; uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; bool boostEnabled; } struct SubPosition { uint arrPos; ...
/// @title Stores subscription information for Compound automatization
NatSpecSingleLine
unsubscribeByAdmin
function unsubscribeByAdmin(address _user) public onlyOwner { SubPosition storage subInfo = subscribersPos[_user]; if (subInfo.subscribed) { _unsubscribe(_user); } }
////////////// ADMIN METHODS /////////////////// /// @notice Admin function to unsubscribe a CDP /// @param _user The actual address that owns the Compound position
NatSpecSingleLine
v0.6.6+commit.6c089d02
MIT
ipfs://cc3a54bef48e7c0949180eded7674ff5bd977a5f62bcb41a4f71e8a203e1c0ad
{ "func_code_index": [ 5975, 6192 ] }
5,873
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { callOptionalReturn( token, abi.encodeWithSelector(token.transfer.selector, to, value)...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
callOptionalReturn
function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checke...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 2698, 3879 ] }
5,874
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
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 { addr...
/** * @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
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 521, 605 ] }
5,875
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
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 { addr...
/** * @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 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
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 1163, 1308 ] }
5,876
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
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 { addr...
/** * @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 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
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 1458, 1736 ] }
5,877
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
token
function token() public view returns (IERC20) { return _token; }
/** * @return the token being sold. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 2116, 2199 ] }
5,878
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
wallet
function wallet() public view returns (address payable) { return _wallet; }
/** * @return the address where funds are collected. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 2275, 2369 ] }
5,879
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
rate
function rate() public view returns (uint256) { return _rate; }
/** * @return the number of token units a buyer gets per wei. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 2454, 2536 ] }
5,880
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
weiRaised
function weiRaised() public view returns (uint256) { return _weiRaised; }
/** * @return the amount of wei raised. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 2599, 2691 ] }
5,881
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
buyTokens
function buyTokens() public payable { uint256 weiAmount = msg.value; _preValidatePurchase(_msgSender(), weiAmount); // calculate token amount to be created uint256 tokens = _getTokenAmount(weiAmount); // update state require(_weiRaised <= _maxCapETH); _weiRaised = _weiRaised.add(w...
/** * @dev low level token purchase ***DO NOT OVERRIDE*** * This function has a non-reentrancy guard, so it shouldn't be called by * another `nonReentrant` function. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 3022, 3686 ] }
5,882
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
_preValidatePurchase
function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal virtual { require( beneficiary != address(0), "Crowdsale: beneficiary is the zero address" ); require(weiAmount != 0, "Crowdsale: weiAmount is 0"); require( weiAmount >= _individualMi...
/** * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. * Use `super` in contracts that inherit from Crowdsale to extend their validations. * Example from CappedCrowdsale.sol's _preValidatePurchase method: * super._preValidatePurchase(beneficiary, w...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 4234, 4925 ] }
5,883
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
_deliverTokens
function _deliverTokens(address beneficiary, uint256 tokenAmount) internal { _token.safeTransfer(beneficiary, tokenAmount); }
/** * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends * its tokens. * @param beneficiary Address performing the token purchase * @param tokenAmount Number of tokens to be emitted */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 5208, 5352 ] }
5,884
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
_getTokenAmount
function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) { return weiAmount.mul(_rate); }
/** * @dev Override to extend the way in which ether is converted to tokens. * @param weiAmount Value in wei to be converted into tokens * @return Number of tokens that can be purchased with the specified _weiAmount */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 5603, 5762 ] }
5,885
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
Crowdsale
contract Crowdsale is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 public _token; mapping(address => uint256) public _balances; mapping(address => uint256) public _balancesPurchased; // Address where funds are collected ...
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The ex...
NatSpecMultiLine
_forwardFunds
function _forwardFunds() internal { uint256 weiAmount = msg.value; _wallet.transfer(weiAmount); }
/** * @dev Determines how ETH is stored/forwarded on purchases. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 5849, 5974 ] }
5,886
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
TimedCrowdsale
abstract contract TimedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 private _openingTime; uint256 private _closingTime; uint256 public _finalizedTime; bool public _isStopped = false; bool public isDepositedTokenSale = false; function start() public onlyOwner { ...
/** * @title TimedCrowdsale * @dev Crowdsale accepting contributions only within a time frame. */
NatSpecMultiLine
openingTime
function openingTime() public view returns (uint256) { return _openingTime; }
/** * @return the crowdsale opening time. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 1062, 1158 ] }
5,887
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
TimedCrowdsale
abstract contract TimedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 private _openingTime; uint256 private _closingTime; uint256 public _finalizedTime; bool public _isStopped = false; bool public isDepositedTokenSale = false; function start() public onlyOwner { ...
/** * @title TimedCrowdsale * @dev Crowdsale accepting contributions only within a time frame. */
NatSpecMultiLine
isOpen
function isOpen() public view returns (bool) { return _openingTime > 0 && block.timestamp >= _openingTime; }
/** * @return true if the crowdsale is open, false otherwise. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 1243, 1370 ] }
5,888
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
TimedCrowdsale
abstract contract TimedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 private _openingTime; uint256 private _closingTime; uint256 public _finalizedTime; bool public _isStopped = false; bool public isDepositedTokenSale = false; function start() public onlyOwner { ...
/** * @title TimedCrowdsale * @dev Crowdsale accepting contributions only within a time frame. */
NatSpecMultiLine
hasClosed
function hasClosed() public view returns (bool) { return _openingTime > 0 && _isStopped; }
/** * @dev Checks whether the period in which the crowdsale is open has already elapsed. * @return Whether crowdsale period has elapsed */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 1535, 1644 ] }
5,889
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
PostDeliveryCrowdsale
abstract contract PostDeliveryCrowdsale is TimedCrowdsale { using SafeMath for uint256; IERC20 private _tokenSale; mapping(address => bool) public withdrawableTokens; constructor(IERC20 _token) public { _tokenSale = _token; } /** * @dev Withdraw tokens only after crowd...
/** * @title PostDeliveryCrowdsale * @dev Crowdsale that locks tokens from withdrawal until it ends. */
NatSpecMultiLine
withdrawTokens
function withdrawTokens() public withdrawable { require(!withdrawableTokens[_msgSender()]); uint256 amount = _balances[_msgSender()]; require( amount > 0, "PostDeliveryCrowdsale: beneficiary is not due any tokens" ); _deliverTokens(_msgSender(), amount); withdrawableTok...
/** * @dev Withdraw tokens only after crowdsale ends. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 341, 730 ] }
5,890
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
PostDeliveryCrowdsale
abstract contract PostDeliveryCrowdsale is TimedCrowdsale { using SafeMath for uint256; IERC20 private _tokenSale; mapping(address => bool) public withdrawableTokens; constructor(IERC20 _token) public { _tokenSale = _token; } /** * @dev Withdraw tokens only after crowd...
/** * @title PostDeliveryCrowdsale * @dev Crowdsale that locks tokens from withdrawal until it ends. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @return the balance of an account. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 971, 1086 ] }
5,891
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
FinalizableCrowdsale
abstract contract FinalizableCrowdsale is PostDeliveryCrowdsale { using SafeMath for uint256; bool private _finalized; event CrowdsaleFinalized(); constructor() internal { _finalized = false; } /** * @return true if the crowdsale is finalized, false otherwise. ...
/** * @title FinalizableCrowdsale * @dev Extension of TimedCrowdsale with a one-off finalization action, where one * can do extra work after finishing. */
NatSpecMultiLine
finalized
function finalized() public view returns (bool) { return _finalized; }
/** * @return true if the crowdsale is finalized, false otherwise. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 324, 413 ] }
5,892
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
FinalizableCrowdsale
abstract contract FinalizableCrowdsale is PostDeliveryCrowdsale { using SafeMath for uint256; bool private _finalized; event CrowdsaleFinalized(); constructor() internal { _finalized = false; } /** * @return true if the crowdsale is finalized, false otherwise. ...
/** * @title FinalizableCrowdsale * @dev Extension of TimedCrowdsale with a one-off finalization action, where one * can do extra work after finishing. */
NatSpecMultiLine
finalize
function finalize() public { require(!_finalized, "FinalizableCrowdsale: already finalized"); require(hasClosed(), "FinalizableCrowdsale: not closed"); _finalized = true; _finalization(); emit CrowdsaleFinalized(); }
/** * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 572, 847 ] }
5,893
IBaseTokenPresale
@openzeppelin/contracts/token/ERC20/SafeERC20.sol
0x74af7b62aca57ef5d049bff138cc66c58699e67d
Solidity
FinalizableCrowdsale
abstract contract FinalizableCrowdsale is PostDeliveryCrowdsale { using SafeMath for uint256; bool private _finalized; event CrowdsaleFinalized(); constructor() internal { _finalized = false; } /** * @return true if the crowdsale is finalized, false otherwise. ...
/** * @title FinalizableCrowdsale * @dev Extension of TimedCrowdsale with a one-off finalization action, where one * can do extra work after finishing. */
NatSpecMultiLine
_finalization
function _finalization() internal { _finalizedTime = block.timestamp; if (_currentSaleToken < _capTokenSale) { _token.transfer(address(0), _capTokenSale.sub(_currentSaleToken)); } }
/** * @dev Can be overridden to add finalization logic. The overriding function * should call super._finalization() to ensure the chain of finalization is * executed entirely. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://c2b7db62fd51af0b4f7376a6510d4ef5d8ba3234336ff55455cb13ac6c300e2f
{ "func_code_index": [ 1058, 1289 ] }
5,894
EXODUS2
Arrays.sol
0x76e422de0ce8842ebe837bc7ab6984b4fff88055
Solidity
Arrays
library Arrays { /** * @dev Upper bound search function which is kind of binary search algoritm. It searches sorted * array to find index of the element value. If element is found then returns it's index otherwise * it returns index of first element which is grater than searched value. If searched el...
/** * @title Arrays * @dev Utility library of inline array functions */
NatSpecMultiLine
findUpperBound
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { if (array.length == 0) { return 0; } uint256 low = 0; uint256 high = array.length; while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always b...
/** * @dev Upper bound search function which is kind of binary search algoritm. It searches sorted * array to find index of the element value. If element is found then returns it's index otherwise * it returns index of first element which is grater than searched value. If searched element is * bigger than any array...
NatSpecMultiLine
v0.5.0+commit.1d4f565a
MIT
bzzr://4dc56cdfb144f689c22393e93357ad564cda72fe3ce195f496cd46ea489767e6
{ "func_code_index": [ 700, 1596 ] }
5,895
EXODUS2
ERC165.sol
0x76e422de0ce8842ebe837bc7ab6984b4fff88055
Solidity
ERC165
contract ERC165 is IERC165 { bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private _support...
/** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; }
/** * @dev implement supportsInterface(bytes4) using a lookup table */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
MIT
bzzr://4dc56cdfb144f689c22393e93357ad564cda72fe3ce195f496cd46ea489767e6
{ "func_code_index": [ 618, 755 ] }
5,896
EXODUS2
ERC165.sol
0x76e422de0ce8842ebe837bc7ab6984b4fff88055
Solidity
ERC165
contract ERC165 is IERC165 { bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private _support...
/** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */
NatSpecMultiLine
_registerInterface
function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff); _supportedInterfaces[interfaceId] = true; }
/** * @dev internal method for registering an interface */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
MIT
bzzr://4dc56cdfb144f689c22393e93357ad564cda72fe3ce195f496cd46ea489767e6
{ "func_code_index": [ 830, 992 ] }
5,897
Fridgits
contracts/Fridgits.sol
0x2112cc1f375f698ff0203243fe3eee7d5af969ae
Solidity
Fridgits
contract Fridgits is ERC721A, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.05 ether; uint256 public maxSupply = 10000; uint256 public maxMintAmount = 100; uint256 public ...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://4ce3c80292b1d2c0f518b760e06a8e46e92f8c5eb4d9450f122a9749f7204d1f
{ "func_code_index": [ 867, 986 ] }
5,898
Fridgits
contracts/Fridgits.sol
0x2112cc1f375f698ff0203243fe3eee7d5af969ae
Solidity
Fridgits
contract Fridgits is ERC721A, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.05 ether; uint256 public maxSupply = 10000; uint256 public maxMintAmount = 100; uint256 public ...
mint
function mint(uint256 _mintAmount) public payable { require(!paused, "the contract is paused"); uint256 supply = totalSupply(); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded"); require(supply + _mintAmount ...
// public
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://4ce3c80292b1d2c0f518b760e06a8e46e92f8c5eb4d9450f122a9749f7204d1f
{ "func_code_index": [ 1004, 1911 ] }
5,899