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
ICO
ICO.sol
0x72cc9d8e0a8034fecd2159fb2a951efe8b49f5ae
Solidity
ICO
contract ICO { using SafeMath for uint256; //This ico have 5 states enum State { stage1, stage2, stage3, stage4, Successful } DateTimeAPI dateTimeContract = DateTimeAPI(0x1a6184CD4C5Bea62B0116de7962EE7315B7bcBce);//Main //DateTimeAPI dateTimeC...
ICO
function ICO (token _addressOfTokenUsedAsReward) public { startTime = dateTimeContract.toTimestamp(2018,3,2,12); //From March 2 12:00 UTC ICOdeadline = dateTimeContract.toTimestamp(2018,3,30,12); //Till March 30 12:00 UTC; rate = 80000; //Tokens per ether unit creator = msg.sender; ...
/** * @notice ICO constructor * @param _addressOfTokenUsedAsReward is the token totalDistributed */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ece2f4bd86ae366120bdf54d4b2a32b7e2d16fd87a6efbcea35fecb1b2b9193b
{ "func_code_index": [ 1598, 2141 ] }
7
ICO
ICO.sol
0x72cc9d8e0a8034fecd2159fb2a951efe8b49f5ae
Solidity
ICO
contract ICO { using SafeMath for uint256; //This ico have 5 states enum State { stage1, stage2, stage3, stage4, Successful } DateTimeAPI dateTimeContract = DateTimeAPI(0x1a6184CD4C5Bea62B0116de7962EE7315B7bcBce);//Main //DateTimeAPI dateTimeC...
contribute
function contribute() public notFinished payable { require(now >= startTime); require(msg.value > 50 finney); uint256 tokenBought = 0; totalRaised = totalRaised.add(msg.value); tokenBought = msg.value.mul(rate); //Rate of exchange depends on stage if (state == State.stage1){ ...
/** * @notice contribution handler */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ece2f4bd86ae366120bdf54d4b2a32b7e2d16fd87a6efbcea35fecb1b2b9193b
{ "func_code_index": [ 2197, 3412 ] }
8
ICO
ICO.sol
0x72cc9d8e0a8034fecd2159fb2a951efe8b49f5ae
Solidity
ICO
contract ICO { using SafeMath for uint256; //This ico have 5 states enum State { stage1, stage2, stage3, stage4, Successful } DateTimeAPI dateTimeContract = DateTimeAPI(0x1a6184CD4C5Bea62B0116de7962EE7315B7bcBce);//Main //DateTimeAPI dateTimeC...
computeAirdrop
function computeAirdrop(address _participant) public constant returns (uint airdrop) { require(state == State.Successful); // return 0 is the airdrop was already claimed if( airdropClaimed[_participant] ) return 0; // return 0 if the account does not hold any crowdsale tokens if( icoTokens...
/* will be newBalance = tokens * TOKEN_SUPPLY_ICO / totalDistributed */
Comment
v0.4.20+commit.3155dd80
bzzr://ece2f4bd86ae366120bdf54d4b2a32b7e2d16fd87a6efbcea35fecb1b2b9193b
{ "func_code_index": [ 4206, 4798 ] }
9
ICO
ICO.sol
0x72cc9d8e0a8034fecd2159fb2a951efe8b49f5ae
Solidity
ICO
contract ICO { using SafeMath for uint256; //This ico have 5 states enum State { stage1, stage2, stage3, stage4, Successful } DateTimeAPI dateTimeContract = DateTimeAPI(0x1a6184CD4C5Bea62B0116de7962EE7315B7bcBce);//Main //DateTimeAPI dateTimeC...
checkIfFundingCompleteOrExpired
function checkIfFundingCompleteOrExpired() public { if(state == State.stage1 && now > dateTimeContract.toTimestamp(2018,3,9,12)) { //Till March 9 12:00 UTC state = State.stage2; } else if(state == State.stage2 && now > dateTimeContract.toTimestamp(2018,3,16,12)) { //Till March 16 12:00 UTC ...
/** * @notice check status */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ece2f4bd86ae366120bdf54d4b2a32b7e2d16fd87a6efbcea35fecb1b2b9193b
{ "func_code_index": [ 4846, 5752 ] }
10
ICO
ICO.sol
0x72cc9d8e0a8034fecd2159fb2a951efe8b49f5ae
Solidity
ICO
contract ICO { using SafeMath for uint256; //This ico have 5 states enum State { stage1, stage2, stage3, stage4, Successful } DateTimeAPI dateTimeContract = DateTimeAPI(0x1a6184CD4C5Bea62B0116de7962EE7315B7bcBce);//Main //DateTimeAPI dateTimeC...
finished
function finished() public { //When finished eth are transfered to beneficiary require(state == State.Successful); require(beneficiary.send(this.balance)); LogBeneficiaryPaid(beneficiary); }
/** * @notice closure handler */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://ece2f4bd86ae366120bdf54d4b2a32b7e2d16fd87a6efbcea35fecb1b2b9193b
{ "func_code_index": [ 5803, 6034 ] }
11
ICO
ICO.sol
0x72cc9d8e0a8034fecd2159fb2a951efe8b49f5ae
Solidity
ICO
contract ICO { using SafeMath for uint256; //This ico have 5 states enum State { stage1, stage2, stage3, stage4, Successful } DateTimeAPI dateTimeContract = DateTimeAPI(0x1a6184CD4C5Bea62B0116de7962EE7315B7bcBce);//Main //DateTimeAPI dateTimeC...
function () public payable { contribute(); }
/* * @dev direct payments */
Comment
v0.4.20+commit.3155dd80
bzzr://ece2f4bd86ae366120bdf54d4b2a32b7e2d16fd87a6efbcea35fecb1b2b9193b
{ "func_code_index": [ 6081, 6156 ] }
12
Application
contracts/Application.sol
0x26400bde3ecf7f6ce42815ee435b857b363f514d
Solidity
Application
contract Application is ERC721Tradable { uint256 public hardcap; address payable wallet; bool public locked; string constant public ipfshash = 'QmVX2DQxWNMUiTA5MXTCHUFS6mm55VqiJC1sUvaACs5HLW'; constructor(address payable _wallet, address _proxyRegistryAddress) public ERC721T...
/** * @title Application * Application - a contract for non-fungible Applications. */
NatSpecMultiLine
buy
function buy(address _to) external payable { uint256 payed = msg.value; uint256 price = currentPrice(); require(!locked, 'Buying is not unlocked yet.'); require(balanceOf(_to) == 0, 'Only one application per address.'); require(totalSupply() < hardcap, 'Sold out!'); require(price...
/** * Buy a token and mint it in the process. (Only 1 - 69). * @param _to address of the future owner of the token */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unlicense
bzzr://1ed0d0f4f96a74a23aaa98522e1d224b71eeefce9561a9ab97b7190ac4b2439b
{ "func_code_index": [ 614, 1104 ] }
13
Application
contracts/Application.sol
0x26400bde3ecf7f6ce42815ee435b857b363f514d
Solidity
Application
contract Application is ERC721Tradable { uint256 public hardcap; address payable wallet; bool public locked; string constant public ipfshash = 'QmVX2DQxWNMUiTA5MXTCHUFS6mm55VqiJC1sUvaACs5HLW'; constructor(address payable _wallet, address _proxyRegistryAddress) public ERC721T...
/** * @title Application * Application - a contract for non-fungible Applications. */
NatSpecMultiLine
currentPrice
function currentPrice() public view returns (uint256 price) { return (0.01 ether) + (totalSupply() * (0.00131 ether)); }
/** * First one costs 0.01 ETH, last one costs ~0.1 ETH. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unlicense
bzzr://1ed0d0f4f96a74a23aaa98522e1d224b71eeefce9561a9ab97b7190ac4b2439b
{ "func_code_index": [ 1184, 1324 ] }
14
Application
contracts/Application.sol
0x26400bde3ecf7f6ce42815ee435b857b363f514d
Solidity
Application
contract Application is ERC721Tradable { uint256 public hardcap; address payable wallet; bool public locked; string constant public ipfshash = 'QmVX2DQxWNMUiTA5MXTCHUFS6mm55VqiJC1sUvaACs5HLW'; constructor(address payable _wallet, address _proxyRegistryAddress) public ERC721T...
/** * @title Application * Application - a contract for non-fungible Applications. */
NatSpecMultiLine
unlock
function unlock() public onlyOwner { locked = false; }
/** * Irreversably unlock buying. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
Unlicense
bzzr://1ed0d0f4f96a74a23aaa98522e1d224b71eeefce9561a9ab97b7190ac4b2439b
{ "func_code_index": [ 1494, 1567 ] }
15
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Return invested balance of account */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 81, 151 ] }
16
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
getUIData
function getUIData(address account) external view returns (uint256[5] memory);
/** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 259, 339 ] }
17
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
addAssets
function addAssets(address account, uint256 amount) external;
/** * @dev Increase amount of non-rewarded asset */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 401, 464 ] }
18
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
removeAssets
function removeAssets(address account, uint256 amount) external;
/** * @dev Remove amount of previous added assets */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 527, 593 ] }
19
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
addShares
function addShares(address account, uint256 amount) external;
/** * @dev Increase amount of shares and earn rewards */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 660, 723 ] }
20
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
removeShares
function removeShares(address account, uint256 amount) external;
/** * @dev Remove amount of previous added shares, rewards will not be claimed */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 815, 881 ] }
21
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
getReward
function getReward(address account, address rewardRecipient) external;
/** * @dev Claim rewards harvested during reward time */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 948, 1020 ] }
22
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarm
interface ICFolioFarm { /** * @dev Return invested balance of account */ function balanceOf(address account) external view returns (uint256); /** * @dev Return total, balances[account], rewardDuration, rewardForDuration, earned[account] */ function getUIData(address account) external view returns (...
/** * @title ICFolioFarm * * @dev ICFolioFarm is the business logic interface to c-folio farms. */
NatSpecMultiLine
exit
function exit(address account, address rewardRecipient) external;
/** * @dev Remove all shares and call getRewards() in a single step */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 1101, 1168 ] }
23
CFolioFarm
contracts/src/investment/interfaces/ICFolioFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ICFolioFarmOwnable
interface ICFolioFarmOwnable is ICFolioFarm { /** * @dev Transfer ownership */ function transferOwnership(address newOwner) external; }
/** * @title ICFolioFarmOwnable */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) external;
/** * @dev Transfer ownership */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 87, 143 ] }
24
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
controller
function controller() external view returns (IController);
/** * @dev Return the farm's controller */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 69, 129 ] }
25
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
farmName
function farmName() external view returns (string memory);
/** * @dev Return a unique, case-sensitive farm name */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 195, 255 ] }
26
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
periodFinish
function periodFinish() external view returns (uint256);
/** * @dev Return when reward period is finished (UTC timestamp) */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 333, 391 ] }
27
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
setController
function setController(address newController) external;
/** * @dev Sets a new controller, can only called by current controller */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 476, 533 ] }
28
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
notifyRewardAmount
function notifyRewardAmount(uint256 reward) external;
/** * @dev This function must be called initially and close at the time the * reward period ends */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 646, 701 ] }
29
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
setRewardsDuration
function setRewardsDuration(uint256 _rewardsDuration) external;
/** * @dev Set the duration of farm rewards, to continue rewards, * notifyRewardAmount() has to called for the next period */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 840, 905 ] }
30
CFolioFarm
contracts/src/investment/interfaces/IFarm.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
IFarm
interface IFarm { /** * @dev Return the farm's controller */ function controller() external view returns (IController); /** * @dev Return a unique, case-sensitive farm name */ function farmName() external view returns (string memory); /** * @dev Return when reward period is finished (UTC time...
rebalance
function rebalance() external;
/** * @dev Rebalance strategies (if implemented) */
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 967, 999 ] }
31
CFolioFarm
contracts/src/utils/ERC20Recovery.sol
0xb18104e050f1e8e828dd2b0260f7feb1c2178752
Solidity
ERC20Recovery
contract ERC20Recovery { using SafeERC20 for IERC20; ////////////////////////////////////////////////////////////////////////////// // Events ////////////////////////////////////////////////////////////////////////////// /** * @dev Fired when a recipient receives recovered ERC-20 tokens * * @param ...
_recoverERC20
function _recoverERC20( address recipient, address tokenAddress, uint256 tokenAmount ) internal { // Validate parameters require(recipient != address(0), "Can't recover to address 0"); // Update state IERC20(tokenAddress).safeTransfer(recipient, tokenAmount); // Dispatch event emit Recovered(recipie...
/** * @dev Recover ERC20 token from contract which have been transfered * either by accident or via airdrop * * Proper access must be verified. All tokens used by the system must * be blocked from recovery. * * @param recipient The target recipient of the recovered coins * @param tokenAddress The address of the...
NatSpecMultiLine
v0.7.4+commit.3f05b770
Apache-2.0
{ "func_code_index": [ 1225, 1602 ] }
32
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 60, 124 ] }
33
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 232, 309 ] }
34
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 546, 623 ] }
35
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 946, 1042 ] }
36
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 1326, 1407 ] }
37
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 1615, 1712 ] }
38
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
AirdropToken
contract AirdropToken is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to cu...
//name this contract whatever you'd like
LineComment
AirdropToken
function AirdropToken( ) { balances[msg.sender] = 200000000000000000; // Give the creator all initial tokens (100000 for example) totalSupply = 200000000000000000; // Update total supply (100000 for example) name = "Airdrop"; // ...
//human 0.1 standard. Just an arbitrary versioning scheme. // // CHANGE THESE VALUES FOR YOUR TOKEN //
LineComment
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 970, 1538 ] }
39
AirdropToken
AirdropToken.sol
0x430d220d752beb34be73ccb303b5ae36686b8598
Solidity
AirdropToken
contract AirdropToken is StandardToken { function () { //if ether is sent to this address, send it back. throw; } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to cu...
//name this contract whatever you'd like
LineComment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.19+commit.c4cbbb05
bzzr://b1bbd0e8d0a3f6cb435676681484295193e4cce9033d21450dd369900db24357
{ "func_code_index": [ 1599, 2404 ] }
40
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 980, 1101 ] }
41
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 1321, 1450 ] }
42
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 1794, 2076 ] }
43
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 2584, 2797 ] }
44
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 3328, 3691 ] }
45
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 3974, 4130 ] }
46
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 4485, 4807 ] }
47
MickeyMouse
MickeyMouse.sol
0x1ab67610d1ab6a117354f95a1d1a6fad8a88ff32
Solidity
MickeyMouse
contract MickeyMouse is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // --------------------------------------------...
/** ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers */
NatSpecMultiLine
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://1e6e5453b6f801005c960c5ddb70637d23b52aa2df6366649ac546f7a502f11e
{ "func_code_index": [ 4999, 5058 ] }
48
SpringField
SpringField.sol
0x3e02f959870d89614e3b6ae3d32f2a053a695f65
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external ret...
/** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.7.4+commit.3f05b770
MIT
ipfs://1bacce9b2230f656cfc4dcd492d61a64a5cc463c8ec70fcfb8e8e4a9eda01786
{ "func_code_index": [ 94, 154 ] }
49
SpringField
SpringField.sol
0x3e02f959870d89614e3b6ae3d32f2a053a695f65
Solidity
Context
contract Context { constructor() {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; return msg.data; } }
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.7.4+commit.3f05b770
MIT
ipfs://1bacce9b2230f656cfc4dcd492d61a64a5cc463c8ec70fcfb8e8e4a9eda01786
{ "func_code_index": [ 100, 203 ] }
50
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 1004, 1396 ] }
51
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); }
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 2326, 2648 ] }
52
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 3405, 3585 ] }
53
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 3810, 4044 ] }
54
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 4414, 4679 ] }
55
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract");...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 4930, 5445 ] }
56
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 5625, 5829 ] }
57
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallRe...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 6016, 6416 ] }
58
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 6598, 6803 ] }
59
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallR...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 6992, 7393 ] }
60
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
verifyCallResult
function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { ...
/** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 7616, 8333 ] }
61
ExotixToken
ExotixToken.sol
0x230bf0637628ef356b63d389e2ec6c77c8853a11
Solidity
ExotixToken
contract ExotixToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; ...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount) private { if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amo...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.10+commit.fc410830
None
ipfs://b9d8fdd192b07941f2085ab962cbdd7afd15aa23986d46d76189388486b9633d
{ "func_code_index": [ 13914, 14617 ] }
62
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
createTokenIDs
function createTokenIDs(uint256 cID, uint256 collectibleCount, uint256 editions) private { Storage storage ds = packStorage(); for (uint256 i = 0; i < editions; i++) { uint64 tokenID = uint64((cID + 1) * 100000000) + uint64((collectibleCount + 1) * 100000) + uint64(i + 1); ds.collection[cID].shuffleIDs.pus...
/** * Map token order w/ URI upon mints * Sample token ID (edition #77) with collection of 12 different assets: 1200077 */
NatSpecMultiLine
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 3840, 4191 ] }
63
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
addCollectible
function addCollectible(uint256 cID, string[] memory _coreData, string[] memory _assets, string[][] memory _metadataValues, string[][] memory _secondaryMetadata, Fee[] memory _fees) external onlyDAO { Storage storage ds = packStorage(); Collection storage collection = ds.collection[cID]; uint256 collectibleCount...
// Add single collectible asset with main info and metadata properties
LineComment
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 6112, 9156 ] }
64
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
updateMetadata
function updateMetadata(uint256 cID, uint256 collectibleId, uint256 propertyIndex, string memory value) external onlyDAO { Storage storage ds = packStorage(); require(ds.collection[cID].metadata[collectibleId - 1].modifiable[propertyIndex], 'Field not editable'); ds.collection[cID].metadata[collectibleId - 1].val...
// Modify property field only if marked as updateable
LineComment
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 12772, 13200 ] }
65
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
addVersion
function addVersion(uint256 cID, uint256 collectibleId, string memory asset) public onlyDAO { Storage storage ds = packStorage(); ds.collection[cID].collectibles[collectibleId - 1].assets[ds.collection[cID].collectibles[collectibleId - 1].totalVersionCount - 1] = asset; ds.collection[cID].collectibles[collectible...
// Add new asset, does not automatically increase current version
LineComment
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 13270, 13681 ] }
66
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
addNewLicense
function addNewLicense(uint256 cID, string memory _license) public onlyDAO { Storage storage ds = packStorage(); require(cID < ds.collectionCount, 'Collectible ID does not exist'); ds.collection[cID].licenseURI[ds.collection[cID].licenseVersion] = _license; ds.collection[cID].licenseVersion++; emit LogAddNewL...
// Set version number, index starts at version 1, collectible 1 (so shifts 1 for 0th index) // function updateVersion(uint256 cID, uint256 collectibleId, uint256 versionNumber) public onlyDAO { // Storage storage ds = packStorage(); // require(versionNumber > 0, "Versions start at 1"); // require(versionNumber <=...
LineComment
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 14404, 14762 ] }
67
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
tokenURI
function tokenURI(uint256 tokenId) public view returns (string memory) { Storage storage ds = packStorage(); uint256 edition = safeParseInt(substring(toString(tokenId), bytes(toString(tokenId)).length - 5, bytes(toString(tokenId)).length)) - 1; uint256 collectibleId = safeParseInt(substring(toString(tokenId), by...
// Dynamic base64 encoded metadata generation using on-chain metadata and edition numbers
LineComment
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 15264, 18057 ] }
68
Packs
contracts/LibPackStorage.sol
0x1495ecbac40a69028b5d516597137de5e929b01b
Solidity
LibPackStorage
library LibPackStorage { using SafeMath for uint256; bytes32 constant STORAGE_POSITION = keccak256("com.universe.packs.storage"); struct Fee { address payable recipient; uint256 value; } struct SingleCollectible { string title; // Collectible name string description; // Collectible descript...
getFeeRecipients
function getFeeRecipients(uint256 tokenId) public view returns (address payable[] memory) { Storage storage ds = packStorage(); uint256 edition = safeParseInt(substring(toString(tokenId), bytes(toString(tokenId)).length - 5, bytes(toString(tokenId)).length)) - 1; uint256 collectibleId = safeParseInt(substring(to...
// Secondary sale fees apply to each individual collectible ID (will apply to a range of tokenIDs);
LineComment
v0.7.3+commit.9bfce1f6
{ "func_code_index": [ 18161, 18943 ] }
69
VaultSwapper
VaultSwapper.sol
0xf12eeab1c759dd7d8c012cca6d8715eed80e51b6
Solidity
VaultSwapper
contract VaultSwapper { Registry constant registry = Registry(0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5); uint256 constant MIN_AMOUNT_OUT = 1; struct Swap { bool deposit; address pool; uint128 n; } /* @notice Swap with apoval using eip-2612 @param from_vaul...
metapool_swap_with_signature
function metapool_swap_with_signature( address from_vault, address to_vault, uint256 amount, uint256 min_amount_out, uint256 expiry, bytes calldata signature ) public { assert(Vault(from_vault).permit(msg.sender, address(this), amount, expiry, signature)); metapool_swap(from_vault, to_v...
/* @notice Swap with apoval using eip-2612 @param from_vault The vault tokens should be taken from @param to_vault The vault tokens should be deposited to @param amount The amount of tokens you whish to use from the from_vault @param min_amount_out The minimal amount of tokens you would expect from the to_vault @...
Comment
v0.8.6+commit.11564f7e
MIT
{ "func_code_index": [ 680, 1076 ] }
70
VaultSwapper
VaultSwapper.sol
0xf12eeab1c759dd7d8c012cca6d8715eed80e51b6
Solidity
VaultSwapper
contract VaultSwapper { Registry constant registry = Registry(0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5); uint256 constant MIN_AMOUNT_OUT = 1; struct Swap { bool deposit; address pool; uint128 n; } /* @notice Swap with apoval using eip-2612 @param from_vaul...
metapool_swap
function metapool_swap( address from_vault, address to_vault, uint256 amount, uint256 min_amount_out ) public { address underlying = Vault(from_vault).token(); address target = Vault(to_vault).token(); address underlying_pool = registry.get_pool_from_lp_token(underlying); address target...
/** @notice swap tokens from one meta pool vault to an other @dev Remove funds from a vault, move one side of the asset from one curve pool to an other and deposit into the new vault. @param from_vault The vault tokens should be taken from @param to_vault The vault tokens should be deposited to @param amount The...
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
{ "func_code_index": [ 1609, 2919 ] }
71
VaultSwapper
VaultSwapper.sol
0xf12eeab1c759dd7d8c012cca6d8715eed80e51b6
Solidity
VaultSwapper
contract VaultSwapper { Registry constant registry = Registry(0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5); uint256 constant MIN_AMOUNT_OUT = 1; struct Swap { bool deposit; address pool; uint128 n; } /* @notice Swap with apoval using eip-2612 @param from_vaul...
metapool_estimate_out
function metapool_estimate_out( address from_vault, address to_vault, uint256 amount ) public view returns (uint256) { address underlying = Vault(from_vault).token(); address target = Vault(to_vault).token(); address underlying_pool = registry.get_pool_from_lp_token(underlying); address tar...
/** @notice estimate the amount of tokens out @param from_vault The vault tokens should be taken from @param to_vault The vault tokens should be deposited to @param amount The amount of tokens you whish to use from the from_vault @return the amount of token shared expected in the to_vault */
NatSpecMultiLine
v0.8.6+commit.11564f7e
MIT
{ "func_code_index": [ 3263, 4262 ] }
72
TIMETokenFundraiser
contracts/trait/HasOwner.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
HasOwner
contract HasOwner { // The current owner. address public owner; // Conditionally the new owner. address public newOwner; /** * @dev The constructor. * * @param _owner The address of the owner. */ constructor(address _owner) public { owner = _owner; ...
/** * @title HasOwner * * @dev Allows for exclusive access to certain functionality. */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; }
/** * @dev Transfering the ownership is a two-step process, as we prepare * for the transfer by setting `newOwner` and requiring `newOwner` to accept * the transfer. This prevents accidental lock-out if something goes wrong * when passing the `newOwner` address. * * @param _newOwner The address of the propo...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1229, 1336 ] }
73
TIMETokenFundraiser
contracts/trait/HasOwner.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
HasOwner
contract HasOwner { // The current owner. address public owner; // Conditionally the new owner. address public newOwner; /** * @dev The constructor. * * @param _owner The address of the owner. */ constructor(address _owner) public { owner = _owner; ...
/** * @title HasOwner * * @dev Allows for exclusive access to certain functionality. */
NatSpecMultiLine
acceptOwnership
function acceptOwnership() public { require(msg.sender == newOwner, "Only the newOwner can accept ownership"); emit OwnershipTransfer(owner, newOwner); owner = newOwner; }
/** * @dev The `newOwner` finishes the ownership transfer process by accepting the * ownership. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1462, 1674 ] }
74
TIMETokenFundraiser
contracts/token/MintableToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
MintableToken
contract MintableToken is StandardToken { /// @dev The only address allowed to mint coins address public minter; /// @dev Indicates whether the token is still mintable. bool public mintingDisabled = false; /** * @dev Event fired when minting is no longer allowed. */ event M...
/** * @title Mintable Token * * @dev Allows the creation of new tokens. */
NatSpecMultiLine
mint
function mint(address _to, uint256 _value) public onlyMinter canMint { totalSupply = totalSupply.plus(_value); balances[_to] = balances[_to].plus(_value); emit Transfer(0x0, _to, _value); }
/** * @dev Creates new `_value` number of tokens and sends them to the `_to` address. * * @param _to The address which will receive the freshly minted tokens. * @param _value The number of tokens that will be created. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1195, 1423 ] }
75
TIMETokenFundraiser
contracts/token/MintableToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
MintableToken
contract MintableToken is StandardToken { /// @dev The only address allowed to mint coins address public minter; /// @dev Indicates whether the token is still mintable. bool public mintingDisabled = false; /** * @dev Event fired when minting is no longer allowed. */ event M...
/** * @title Mintable Token * * @dev Allows the creation of new tokens. */
NatSpecMultiLine
disableMinting
function disableMinting() public onlyMinter canMint { mintingDisabled = true; emit MintingDisabled(); }
/** * @dev Disable the minting of new tokens. Cannot be reversed. * * @return Whether or not the process was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1575, 1715 ] }
76
TIMETokenFundraiser
contracts/component/TokenSafe.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
TokenSafe
contract TokenSafe { using SafeMath for uint; // The ERC20 token contract. ERC20Token token; struct Group { // The release date for the locked tokens // Note: Unix timestamp fits in uint32, however block.timestamp is uint256 uint256 releaseTimestamp; // The to...
/** * @title TokenSafe * * @dev Abstract contract that serves as a base for the token safes. It is a multi-group token safe, where each group * has it's own release time and multiple accounts with locked tokens. */
NatSpecMultiLine
init
function init(uint8 _id, uint _releaseTimestamp) internal { require(_releaseTimestamp > 0, "TokenSafe group release timestamp is not set"); Group storage group = groups[_id]; group.releaseTimestamp = _releaseTimestamp; }
/** * @dev The function initializes a group with a release date. * * @param _id Group identifying number. * @param _releaseTimestamp Unix timestamp of the time after which the tokens can be released */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1043, 1310 ] }
77
TIMETokenFundraiser
contracts/component/TokenSafe.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
TokenSafe
contract TokenSafe { using SafeMath for uint; // The ERC20 token contract. ERC20Token token; struct Group { // The release date for the locked tokens // Note: Unix timestamp fits in uint32, however block.timestamp is uint256 uint256 releaseTimestamp; // The to...
/** * @title TokenSafe * * @dev Abstract contract that serves as a base for the token safes. It is a multi-group token safe, where each group * has it's own release time and multiple accounts with locked tokens. */
NatSpecMultiLine
add
function add(uint8 _id, address _account, uint _balance) internal { Group storage group = groups[_id]; group.balances[_account] = group.balances[_account].plus(_balance); group.remaining = group.remaining.plus(_balance); }
/** * @dev Add new account with locked token balance to the specified group id. * * @param _id Group identifying number. * @param _account The address of the account to be added. * @param _balance The number of tokens to be locked. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1589, 1848 ] }
78
TIMETokenFundraiser
contracts/component/TokenSafe.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
TokenSafe
contract TokenSafe { using SafeMath for uint; // The ERC20 token contract. ERC20Token token; struct Group { // The release date for the locked tokens // Note: Unix timestamp fits in uint32, however block.timestamp is uint256 uint256 releaseTimestamp; // The to...
/** * @title TokenSafe * * @dev Abstract contract that serves as a base for the token safes. It is a multi-group token safe, where each group * has it's own release time and multiple accounts with locked tokens. */
NatSpecMultiLine
release
function release(uint8 _id, address _account) public { Group storage group = groups[_id]; require(now >= group.releaseTimestamp, "Group funds are not released yet"); uint tokens = group.balances[_account]; require(tokens > 0, "The account is empty or non-existent"); group.ba...
/** * @dev Allows an account to be released if it meets the time constraints of the group. * * @param _id Group identifying number. * @param _account The address of the account to be released. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 2082, 2630 ] }
79
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
reserveBananax
function reserveBananax() public onlyOwner { uint supply = totalSupply(); uint i; for (i = 0; i < 48; i++) { _safeMint(msg.sender, supply + i); } }
/** * Set some Bananax aside */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 878, 1092 ] }
80
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setRevealTimestamp
function setRevealTimestamp(uint256 revealTimeStamp) public onlyOwner { REVEAL_TIMESTAMP = revealTimeStamp; }
/** * Set the Reveal Timestamp once its decided. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 1164, 1293 ] }
81
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setProvenanceHash
function setProvenanceHash(string memory provenanceHash) public onlyOwner { JBX_PROVENANCE = provenanceHash; }
/* * Set provenance once it's calculated */
Comment
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 1360, 1489 ] }
82
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
flipSaleState
function flipSaleState() public onlyOwner { saleIsActive = !saleIsActive; }
/* * Pause sale if active, make active if paused */
Comment
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 1666, 1760 ] }
83
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
mintBananax
function mintBananax(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint Bananax"); require(numberOfTokens <= maxJbxPurchase, "Can only mint 20 tokens at a time"); require(totalSupply().add(numberOfTokens) <= MAX_BANANAX, "Purchase would exceed max supply of Bananax")...
/** * Mints Just Bananax */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 1806, 2850 ] }
84
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory base = baseURI(); // New line tokenId = (tokenId + startingIndex) % MAX_BANANAX; // If there is a baseUR...
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 2920, 3398 ] }
85
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
setStartingIndex
function setStartingIndex() public { require(startingIndex == 0, "Starting index is already set"); require(startingIndexBlock != 0, "Starting index block must be set"); startingIndex = uint(blockhash(startingIndexBlock)) % MAX_BANANAX; // Just a sanity case in the worst case if this functi...
/** * Set the starting index for the collection */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 3469, 4156 ] }
86
JustBananax
contracts/BoredApeYachtClub.sol
0x6856333d5e769775a8de373ffb5cf48f69540edc
Solidity
JustBananax
contract JustBananax is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; string public JBX_PROVENANCE = ""; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public constant jbxPrice = 60000000000000000; //0.06 ETH uint public c...
/** * @title JustBananax contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */
NatSpecMultiLine
emergencySetStartingIndexBlock
function emergencySetStartingIndexBlock() public onlyOwner { require(startingIndex == 0, "Starting index is already set"); startingIndexBlock = block.number; }
/** * Set the starting index block for the collection, essentially unblocking * setting starting index */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://38fa7ce91b2cb1e237edd0934ab60265aed69579bb397e258cb7e6830c6c7b3a
{ "func_code_index": [ 4288, 4485 ] }
87
TIMETokenFundraiser
contracts/fundraiser/PresaleFundraiser.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
PresaleFundraiser
contract PresaleFundraiser is MintableTokenFundraiser { /// @dev The token hard cap for the pre-sale uint256 public presaleSupply; /// @dev The token hard cap for the pre-sale uint256 public presaleMaxSupply; /// @dev The start time of the pre-sale (Unix timestamp). uint256 public pres...
/** * @title PresaleFundraiser * * @dev This is the standard fundraiser contract which allows * you to raise ETH in exchange for your tokens. */
NatSpecMultiLine
initializePresaleFundraiser
function initializePresaleFundraiser( uint256 _presaleMaxSupply, uint256 _startTime, uint256 _endTime, uint256 _conversionRate ) internal { require(_endTime >= _startTime, "Pre-sale's end is before its start"); require(_conversionRate > 0, "Conversion rate is not set"); presa...
/** * @dev The initialization method. * * @param _startTime The timestamp of the moment when the pre-sale starts * @param _endTime The timestamp of the moment when the pre-sale ends * @param _conversionRate The conversion rate during the pre-sale */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 823, 1353 ] }
88
TIMETokenFundraiser
contracts/fundraiser/PresaleFundraiser.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
PresaleFundraiser
contract PresaleFundraiser is MintableTokenFundraiser { /// @dev The token hard cap for the pre-sale uint256 public presaleSupply; /// @dev The token hard cap for the pre-sale uint256 public presaleMaxSupply; /// @dev The start time of the pre-sale (Unix timestamp). uint256 public pres...
/** * @title PresaleFundraiser * * @dev This is the standard fundraiser contract which allows * you to raise ETH in exchange for your tokens. */
NatSpecMultiLine
isPresaleActive
function isPresaleActive() internal view returns (bool) { return now < presaleEndTime && now >= presaleStartTime; }
/** * @dev Internal funciton that helps to check if the pre-sale is active */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1457, 1591 ] }
89
TIMETokenFundraiser
contracts/fundraiser/PresaleFundraiser.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
PresaleFundraiser
contract PresaleFundraiser is MintableTokenFundraiser { /// @dev The token hard cap for the pre-sale uint256 public presaleSupply; /// @dev The token hard cap for the pre-sale uint256 public presaleMaxSupply; /// @dev The start time of the pre-sale (Unix timestamp). uint256 public pres...
/** * @title PresaleFundraiser * * @dev This is the standard fundraiser contract which allows * you to raise ETH in exchange for your tokens. */
NatSpecMultiLine
getConversionRate
function getConversionRate() public view returns (uint256) { if (isPresaleActive()) { return presaleConversionRate; } return super.getConversionRate(); }
/** * @dev this function different conversion rate while in presale */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1680, 1883 ] }
90
TIMETokenFundraiser
contracts/fundraiser/PresaleFundraiser.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
PresaleFundraiser
contract PresaleFundraiser is MintableTokenFundraiser { /// @dev The token hard cap for the pre-sale uint256 public presaleSupply; /// @dev The token hard cap for the pre-sale uint256 public presaleMaxSupply; /// @dev The start time of the pre-sale (Unix timestamp). uint256 public pres...
/** * @title PresaleFundraiser * * @dev This is the standard fundraiser contract which allows * you to raise ETH in exchange for your tokens. */
NatSpecMultiLine
validateTransaction
function validateTransaction() internal view { require(msg.value != 0, "Transaction value is zero"); require( now >= startTime && now < endTime || isPresaleActive(), "Neither the pre-sale nor the fundraiser are currently active" ); }
/** * @dev It throws an exception if the transaction does not meet the preconditions. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1992, 2288 ] }
91
LittleAlienInu
LittleAlienInu.sol
0x6f3bdd622a03247990a4e3049186b83f01023d6d
Solidity
LittleAlienInu
contract LittleAlienInu is Context, ERC20, ERC20Metadata, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromMaxTx; IpancakeRouter02 pub...
// Bep20 standards for token creation by bloctechsolutions.com
LineComment
setMaxTxPercent
function setMaxTxPercent(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = _totalSupply.mul(maxTxAmount).div(100); }
// for 1% input 1
LineComment
v0.8.10+commit.fc410830
None
ipfs://d88593e01163ef9a7074ac063f7f7301d5a3cd42811537076f26a44350345ff8
{ "func_code_index": [ 3626, 3766 ] }
92
Locker
Locker.sol
0x1cc29ee9dd8d9ed4148f6600ba5ec84d7ee85d12
Solidity
Locker
contract Locker is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "LOCKER";// string private constant _symbol = "LOCKER";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) privat...
setMinSwapTokensThreshold
function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; }
//Set minimum tokens required to swap.
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://248817f5041836f17ffc6afeb4474f3d1f03282f17e368841bcf54613bb7fbbd
{ "func_code_index": [ 13969, 14113 ] }
93
Locker
Locker.sol
0x1cc29ee9dd8d9ed4148f6600ba5ec84d7ee85d12
Solidity
Locker
contract Locker is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "LOCKER";// string private constant _symbol = "LOCKER";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) privat...
toggleSwap
function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; }
//Set minimum tokens required to swap.
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://248817f5041836f17ffc6afeb4474f3d1f03282f17e368841bcf54613bb7fbbd
{ "func_code_index": [ 14161, 14267 ] }
94
Locker
Locker.sol
0x1cc29ee9dd8d9ed4148f6600ba5ec84d7ee85d12
Solidity
Locker
contract Locker is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "LOCKER";// string private constant _symbol = "LOCKER";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) privat...
setMaxTxnAmount
function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; }
//Set maximum transaction
LineComment
v0.8.7+commit.e28d00a7
Unlicense
ipfs://248817f5041836f17ffc6afeb4474f3d1f03282f17e368841bcf54613bb7fbbd
{ "func_code_index": [ 14305, 14418 ] }
95
TIMETokenFundraiser
contracts/token/StandardToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
StandardToken
contract StandardToken is ERC20Token { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev The constructor assigns...
/** * @title Standard Token * * @dev The standard abstract implementation of the ERC20 interface. */
NatSpecMultiLine
balanceOf
function balanceOf(address _address) public view returns (uint256 balance) { return balances[_address]; }
/** * @dev Get the balance of an address. * * @param _address The address which's balance will be checked. * * @return The current balance of the address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 733, 857 ] }
96
TIMETokenFundraiser
contracts/token/StandardToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
StandardToken
contract StandardToken is ERC20Token { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev The constructor assigns...
/** * @title Standard Token * * @dev The standard abstract implementation of the ERC20 interface. */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Checks the amount of tokens that an owner allowed to a spender. * * @param _owner The address which owns the funds allowed for spending by a third-party. * @param _spender The third-party address that is allowed to spend the tokens. * * @return The number of tokens available to `_spender` to be s...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1224, 1373 ] }
97
TIMETokenFundraiser
contracts/token/StandardToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
StandardToken
contract StandardToken is ERC20Token { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev The constructor assigns...
/** * @title Standard Token * * @dev The standard abstract implementation of the ERC20 interface. */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Give permission to `_spender` to spend `_value` number of tokens on your behalf. * E.g. You place a buy or sell order on an exchange and in that example, the * `_spender` address is the address of the contract the exchange created to add your token to their * website and you are `msg.sender`. * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 1925, 2140 ] }
98
TIMETokenFundraiser
contracts/token/StandardToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
StandardToken
contract StandardToken is ERC20Token { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev The constructor assigns...
/** * @title Standard Token * * @dev The standard abstract implementation of the ERC20 interface. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { executeTransfer(msg.sender, _to, _value); return true; }
/** * @dev Transfers `_value` number of tokens to the `_to` address. * * @param _to The address of the recipient. * @param _value The number of tokens to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 2351, 2508 ] }
99
TIMETokenFundraiser
contracts/token/StandardToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
StandardToken
contract StandardToken is ERC20Token { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev The constructor assigns...
/** * @title Standard Token * * @dev The standard abstract implementation of the ERC20 interface. */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_value <= allowed[_from][msg.sender], "Insufficient allowance"); allowed[_from][msg.sender] = allowed[_from][msg.sender].minus(_value); executeTransfer(_from, _to, _value); return true; }
/** * @dev Allows another contract to spend tokens on behalf of the `_from` address and send them to the `_to` address. * * @param _from The address which approved you to spend tokens on their behalf. * @param _to The address where you want to send tokens. * @param _value The number of tokens to be sent. * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 2929, 3264 ] }
100
TIMETokenFundraiser
contracts/token/StandardToken.sol
0xed6849727f7b158a14a492bd0a3bf4d7126f7f71
Solidity
StandardToken
contract StandardToken is ERC20Token { using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev The constructor assigns...
/** * @title Standard Token * * @dev The standard abstract implementation of the ERC20 interface. */
NatSpecMultiLine
executeTransfer
function executeTransfer(address _from, address _to, uint256 _value) internal { require(_to != address(0), "Invalid transfer to address zero"); require(_value <= balances[_from], "Insufficient account balance"); balances[_from] = balances[_from].minus(_value); balances[_to] = balances[_to].plus(_v...
/** * @dev Internal function that this reused by the transfer functions */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://ce167343b1dcaa8725159d95e78bc955e63e34546b19b99b083b3441ce0618e7
{ "func_code_index": [ 3359, 3759 ] }
101
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 165, 238 ] }
102
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 462, 544 ] }
103
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 823, 911 ] }
104
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1575, 1654 ] }
105
BananaKong
BananaKong.sol
0xc2b5fac2dd7ae08d04cc398f7cd2de6ad126bc4d
Solidity
IERC20
interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipi...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
Unlicense
ipfs://1f61365e99a29e2491db28fa8c1331548a9efdd3b4a7995173281253c7f748fe
{ "func_code_index": [ 1967, 2069 ] }
106