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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
*... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
96,
303
]
} | 26,800 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
*... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
394,
685
]
} | 26,801 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
*... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
806,
934
]
} | 26,802 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
*... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
1005,
1156
]
} | 26,803 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 | function () external whenNotPaused payable {
emit buyx(msg.sender, this, _getTokenAmount(msg.value));
buyTokens(msg.sender);
}
| /**
* fallback function ***DO NOT OVERRIDE***
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
1593,
1751
]
} | 26,804 | ||
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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(address _beneficiary) public whenNotPaused payable {
if ((tokensSold > 20884500000000000000000000 ) && (tokensSold <= 30791250000000000000000000)) {
rate = 5967;
}
else if ((tokensSold > 30791250000000000000000000) && (tokensSold <= 39270000000000000000000000)) {
rate = 5865... | /**
* @dev low level token purchase ***DO NOT OVERRIDE***
* @param _beneficiary Address performing the token purchase
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
1900,
3033
]
} | 26,805 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 {
require(_beneficiary != address(0));
require(_weiAmount != 0);
| /**
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
* @param _beneficiary Address performing the token purchase
* @param _weiAmount Value in wei involved in the purchase
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
3490,
3666
]
} | 26,806 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 | _postValidatePurchase | function _postValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
// optional override
| /**
* @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid conditions are not met.
* @param _beneficiary Address performing the token purchase
* @param _weiAmount Value in wei involved in the purchase
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
3961,
4088
]
} | 26,807 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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.transfer(_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.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
4368,
4513
]
} | 26,808 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 | _processPurchase | function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal {
_deliverTokens(_beneficiary, _tokenAmount);
| /**
* @dev Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens.
* @param _beneficiary Address receiving the tokens
* @param _tokenAmount Number of tokens to be purchased
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
4777,
4924
]
} | 26,809 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 | _updatePurchasingState | function _updatePurchasingState(address _beneficiary, uint256 _weiAmount) internal {
// optional override
| /**
* @dev Override for extensions that require an internal state to check for validity (current user contributions, etc.)
* @param _beneficiary Address receiving the tokens
* @param _weiAmount Value in wei involved in the purchase
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
5194,
5322
]
} | 26,810 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 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.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
5577,
5705
]
} | 26,811 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Crowdsale | contract Crowdsale is Whitelist{
using SafeMath for uint256;
// The token being sold
MiniMeToken public token;
// Address where funds are collected
address public wallet;
// How many token units a buyer gets per wei
uint256 public rate = 6120;
// Amount of tokens sold
... | /**
* @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 {
wallet.transfer(msg.value);
| /**
* @dev Determines how ETH is stored/forwarded on purchases.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
5795,
5881
]
} | 26,812 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | Controlled | contract Controlled is Pausable {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { require(msg.sender == controller); _; }
modifier onlyControllerorOwner { require((msg.sender == controller) || (msg.sender == owner)); _; }
... | changeController | function changeController(address _newController) public onlyControllerorOwner {
controller = _newController;
}
| /// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
516,
635
]
} | 26,813 | |||
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | TokenController | contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) public payable returns(bool);
/// @notice ... | /// @dev The token controller contract must implement these functions | NatSpecSingleLine | proxyPayment | function proxyPayment(address _owner) public payable returns(bool);
| /// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
237,
306
]
} | 26,814 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | TokenController | contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) public payable returns(bool);
/// @notice ... | /// @dev The token controller contract must implement these functions | NatSpecSingleLine | onTransfer | function onTransfer(address _from, address _to, uint _amount) public returns(bool);
| /// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
632,
717
]
} | 26,815 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | TokenController | contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) public payable returns(bool);
/// @notice ... | /// @dev The token controller contract must implement these functions | NatSpecSingleLine | onApprove | function onApprove(address _owner, address _spender, uint _amount) public
returns(bool);
| /// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize... | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
1064,
1156
]
} | 26,816 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | transfer | function transfer(address _to, uint256 _amount) public returns (bool success) {
require(transfersEnabled);
doTransfer(msg.sender, _to, _amount);
return true;
}
| ///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
4176,
4392
]
} | 26,817 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | transferFrom | function transferFrom(address _from, address _to, uint256 _amount
) public returns (bool success) {
// The controller of this contract can move tokens around at will,
// this is important to recognize! Confirm that you trust the
// controller of this contract, which in most situations should be
// an... | /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
4773,
5578
]
} | 26,818 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | doTransfer | function doTransfer(address _from, address _to, uint _amount
) internal {
if (_amount == 0) {
emit Transfer(_from, _to, _amount); // Follow the spec to louch the event when transfer 0
return;
}
// Do not allow transfer to 0x0 or the token contract itself
require((_to != 0) && (_to != address(thi... | /// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if... | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
5990,
7236
]
} | 26,819 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balanceOfAt(_owner, block.number);
| /// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
7376,
7525
]
} | 26,820 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | approve | function approve(address _spender, uint256 _amount) public returns (bool success) {
require(transfersEnabled);
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender,0)` if it is not
// already 0 to mitigate the race condition described here:
... | /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer... | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
7943,
8791
]
} | 26,821 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | allowance | function allowance(address _owner, address _spender
) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
9115,
9278
]
} | 26,822 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | approveAndCall | function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) public returns (bool success) {
require(approve(_spender, _amount));
ApproveAndCallFallBack(_spender).receiveApproval(
msg.sender,
_amount,
this,
_extraData
);
return true;
}
| /// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of... | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
9804,
10150
]
} | 26,823 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | totalSupply | function totalSupply() public constant returns (uint) {
return totalSupplyAt(block.number);
}
| /// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
10273,
10386
]
} | 26,824 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | balanceOfAt | function balanceOfAt(address _owner, uint _blockNumber) public constant
returns (uint) {
// These next few lines are used when the balance of the token is
// requested before a check point was ever created for this token, it
// requires that the `parentToken.balanceOfAt` be queried at the
// genesis blo... | ////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber` | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
10759,
11707
]
} | 26,825 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | totalSupplyAt | function totalSupplyAt(uint _blockNumber) public constant returns(uint) {
// These next few lines are used when the totalSupply of the token is
// requested before a check point was ever created for this token, it
// requires that the `parentToken.totalSupplyAt` be queried at the
// genesis block for thi... | /// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber` | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
11933,
12929
]
} | 26,826 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | generateTokens | function generateTokens(address _owner, uint _amount
) public onlyControllerorOwner whenNotPaused returns (bool) {
uint curTotalSupply = totalSupply();
require(curTotalSupply.add(_amount) >= curTotalSupply); // Check for overflow
uint previousBalanceTo = balanceOf(_owner);
require(previousBalanceTo.add(... | ////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
13351,
14066
]
} | 26,827 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | destroyTokens | function destroyTokens(address _owner, uint _amount
) onlyControllerorOwner public returns (bool) {
uint curTotalSupply = totalSupply();
require(curTotalSupply >= _amount);
uint previousBalanceFrom = balanceOf(_owner);
require(previousBalanceFrom >= _amount);
updateValueAtNow(totalSupplyHistory, curTo... | /// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
14330,
14948
]
} | 26,828 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | enableTransfers | function enableTransfers(bool _transfersEnabled) public onlyControllerorOwner {
transfersEnabled = _transfersEnabled;
}
| ////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
15226,
15389
]
} | 26,829 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | getValueAt | function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
if (checkpoints.length == 0) return 0;
// Shortcut for the actual value
if (_block >= checkpoints[checkpoints.length.sub(1)].fromBlock)
return checkpoints[checkpoints.length.sub(1)].value;
if (_block... | ////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
15839,
16796
]
} | 26,830 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | updateValueAtNow | function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
if ((checkpoints.length == 0)
|| (checkpoints[checkpoints.length.sub(1)].fromBlock < block.number)) {
Checkpoint storage newCheckPoint = checkpoints[ checkpoints.length++ ];
newCheckPoint.fromBlock = uint128(block.... | /// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
17057,
17758
]
} | 26,831 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | isContract | function isContract(address _addr) constant internal returns(bool) {
uint size;
if (_addr == 0) return false;
assembly {
size := extcodesize(_addr)
}
return size>0;
| /// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
17963,
18272
]
} | 26,832 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | min | function min(uint a, uint b) pure internal returns (uint) {
return a < b ? a : b;
}
| /// @dev Helper function to return a min betwen the two uints | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
18351,
18484
]
} | 26,833 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | function () public payable {
quire(isContract(controller));
ire(TokenController(controller).proxyPayment.value(msg.value)(msg.sender));*/
rt();
| /// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
18759,
18978
]
} | 26,834 | ||
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeToken | contract MiniMeToken is Controlled
{
using SafeMath for uint256;
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | claimTokens | function claimTokens(address _token) public onlyControllerorOwner {
if (_token == 0x0) {
controller.transfer(address(this).balance);
return;
}
MiniMeToken token = MiniMeToken(_token);
uint balance = token.balanceOf(this);
token.transfer(controller, balance);
emit ClaimedTokens(_token, contro... | //////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether. | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
19326,
19755
]
} | 26,835 | |
EmaToken | EmaToken.sol | 0xc3ee57fa8ed253e3f214048879977265967ae745 | Solidity | MiniMeTokenFactory | contract MiniMeTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token ... | ////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class | NatSpecSingleLine | createCloneToken | function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) public returns (MiniMeToken) {
MiniMeToken newToken = new MiniMeToken(
this,
_parentToken,
_snapshotBlock,
_tokenName,
... | /// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/... | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://9a100197830bdfd7d104c1821c112f11725954c937fc60d361e063c6d1df3f54 | {
"func_code_index": [
736,
1370
]
} | 26,836 | |
Resilience | Resilience.sol | 0xda922e473796bc372d4a2cb95395ed17af8b309b | Solidity | CloseIfBug | contract CloseIfBug {
address public JohanNygren;
bool public bugDiscovered; // closes everything but sell()
function CloseIfBug() {
bugDiscovered = false;
}
modifier onlyJohan {
if (msg.sender != JohanNygren) throw;
_... | CloseIfBug | function CloseIfBug() {
bugDiscovered = false;
}
| // closes everything but sell() | LineComment | v0.4.6+commit.2dabbdf0 | {
"func_code_index": [
132,
215
]
} | 26,837 | ||||
Resilience | Resilience.sol | 0xda922e473796bc372d4a2cb95395ed17af8b309b | Solidity | RES | contract RES is CloseIfBug {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
uint public totalSupply;
/* This creates an array with all balances */
mapping(address => uint256) public balanceOf;
... | RES | function RES() {
name = "RES";
symbol = "RES";
decimals = 18;
}
| /* Initializes contract with name, symbol and decimals */ | Comment | v0.4.6+commit.2dabbdf0 | {
"func_code_index": [
692,
824
]
} | 26,838 | ||||
Resilience | Resilience.sol | 0xda922e473796bc372d4a2cb95395ed17af8b309b | Solidity | SwarmRedistribution | contract SwarmRedistribution is CloseIfBug, RES {
struct dividendPathway {
address from;
uint amount;
uint timeStamp;
}
mapping(address => dividendPathway[]) public dividendPathways;
mapping(address => bool) public isHuman;
... | transfer | function transfer(address _to, uint256 _value) isOpen {
/* reject transaction to self to prevent dividend pathway loops*/
if (_to == msg.sender) throw;
/* if the sender doenst have enough balance then stop */
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + ... | /* Send coins */ | Comment | v0.4.6+commit.2dabbdf0 | {
"func_code_index": [
859,
2263
]
} | 26,839 | ||||
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | CORETAB | function CORETAB() public {
symbol = "CRT";
name = "CORETAB";
decimals = 18;
_totalSupply = 300000000000000000000000000;
balances[0xAc29E228a0D1ba603a3dC0AC9f17ca34D8963e53] = _totalSupply;
Transfer(address(0), 0xAc29E228a0D1ba603a3dC0AC9f17ca34D8963e53, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
454,
789
]
} | 26,840 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
977,
1098
]
} | 26,841 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
1318,
1447
]
} | 26,842 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
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.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
1791,
2068
]
} | 26,843 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
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.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
2575,
2783
]
} | 26,844 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(from, to, tokens);
return... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - Sp... | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
3313,
3671
]
} | 26,845 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
3954,
4110
]
} | 26,846 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
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.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
4465,
4782
]
} | 26,847 |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
4974,
5033
]
} | 26,848 | |
CORETAB | CORETAB.sol | 0x1a16c33e6ac95ba68275a6c3b238f06f1fb7e19b | Solidity | CORETAB | contract CORETAB is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.20+commit.3155dd80 | None | bzzr://b0bf7aa09c3057be81b4525f1d2803dbe8e5aee4cb1956f7b72e6193a76c441f | {
"func_code_index": [
5266,
5455
]
} | 26,849 |
RAIZER | contracts/RAIZER.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | RAIZER | contract RAIZER is ERC20Permit, Ownable {
string constant _name = "RAIZER";
string constant _symbol = "RAIZER";
string constant _version = "1";
uint256 private _cap = 10**27;
constructor()
ERC20Permit(_name, _symbol, _version) {}
function mint(address to, uint256 amount) public onlyOw... | cap | function cap() public view virtual returns (uint256) {
return _cap;
}
| /**
* @dev Returns the cap on the token's total supply.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
497,
577
]
} | 26,850 | ||
RAIZER | contracts/RAIZER.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | RAIZER | contract RAIZER is ERC20Permit, Ownable {
string constant _name = "RAIZER";
string constant _symbol = "RAIZER";
string constant _version = "1";
uint256 private _cap = 10**27;
constructor()
ERC20Permit(_name, _symbol, _version) {}
function mint(address to, uint256 amount) public onlyOw... | burn | function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
| /**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
678,
766
]
} | 26,851 | ||
RAIZER | contracts/RAIZER.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | RAIZER | contract RAIZER is ERC20Permit, Ownable {
string constant _name = "RAIZER";
string constant _symbol = "RAIZER";
string constant _version = "1";
uint256 private _cap = 10**27;
constructor()
ERC20Permit(_name, _symbol, _version) {}
function mint(address to, uint256 amount) public onlyOw... | burnFrom | function burnFrom(address account, uint256 amount) public virtual {
uint256 currentAllowance = allowance(account, _msgSender());
require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
unchecked {
_approve(account, _msgSender(), currentAllowance - amount);
}
_burn(account, amoun... | /**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
1058,
1401
]
} | 26,852 | ||
RAIZER | contracts/extensions/ERC20Permit.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20Permit | abstract contract ERC20Permit is ERC20, IERC20Permit {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
string private _name;
string private _version;
// @notice The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERM... | permit | function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
require(block.timestamp <= deadline, "signature-expired");
require(owner != address(0), "invalid-address-0");
bytes32 structHash = keccak256(abi.en... | /**
* @dev See {IERC20Permit-permit}.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
851,
1514
]
} | 26,853 | ||
RAIZER | contracts/extensions/ERC20Permit.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20Permit | abstract contract ERC20Permit is ERC20, IERC20Permit {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
string private _name;
string private _version;
// @notice The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERM... | nonces | function nonces(address owner) public view virtual override returns (uint256) {
return _nonces[owner].current();
}
| /**
* @dev See {IERC20Permit-nonces}.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
1571,
1696
]
} | 26,854 | ||
RAIZER | contracts/extensions/ERC20Permit.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20Permit | abstract contract ERC20Permit is ERC20, IERC20Permit {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
string private _name;
string private _version;
// @notice The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERM... | DOMAIN_SEPARATOR | function DOMAIN_SEPARATOR() public view override returns (bytes32) {
return keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(_name)), keccak256(bytes(_version)), block.chainid, address(this)));
}
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
1813,
2024
]
} | 26,855 | ||
RAIZER | contracts/extensions/ERC20Permit.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20Permit | abstract contract ERC20Permit is ERC20, IERC20Permit {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
string private _name;
string private _version;
// @notice The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERM... | _useNonce | function _useNonce(address owner) internal virtual returns (uint256 current) {
Counters.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}
| /**
* @dev "Consume a nonce": return the current value and increment.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
2147,
2343
]
} | 26,856 | ||
TestConf | TestConf.sol | 0x46b87b9c794ddb93b2a16bc1719111caec1cbd88 | Solidity | TestConf | contract TestConf { address internal listenerAddr; address public owner; uint256 public initialIssuance; uint public totalSupply; uint256 public currentEthPrice; /* In USD */ uint256 public currentTokenPrice; bytes32 public symbol; bytes32 public name; mapping(address => mapping(address => uint256)) allowed; mapping(ad... | /* Need Price Token */ | Comment | TestConf | function TestConf () { name = "TestConf"; totalSupply = 1000000; initialIssuance = totalSupply; owner = 0x443B9375536521127DBfABff21f770e4e684475d; currentEthPrice = 20000; /* TODO: Oracle */ currentTokenPrice = 100; /* In cents */ symbol = "TEST1"; balances[owner] = 100; } /* Math Helpers */ function safeMul(uint a, u... | /* Address => (productName => amount) */ | Comment | v0.4.14+commit.c2215d46 | bzzr://12badc874edbe5a399c1ebcb6d233fca16766c7a39c2c5c31083e1dc3a58b067 | {
"func_code_index": [
0,
4984
]
} | 26,857 | |
TestConf | TestConf.sol | 0x46b87b9c794ddb93b2a16bc1719111caec1cbd88 | Solidity | TestConf | contract TestConf { address internal listenerAddr; address public owner; uint256 public initialIssuance; uint public totalSupply; uint256 public currentEthPrice; /* In USD */ uint256 public currentTokenPrice; bytes32 public symbol; bytes32 public name; mapping(address => mapping(address => uint256)) allowed; mapping(ad... | /* Need Price Token */ | Comment | safeMul | function TestConf () { name = "TestConf"; totalSupply = 1000000; initialIssuance = totalSupply; owner = 0x443B9375536521127DBfABff21f770e4e684475d; currentEthPrice = 20000; /* TODO: Oracle */ currentTokenPrice = 100; /* In cents */ symbol = "TEST1"; balances[owner] = 100; } /* Math Helpers */ function safeMul(uint a, u... | /* Math Helpers */ | Comment | v0.4.14+commit.c2215d46 | bzzr://12badc874edbe5a399c1ebcb6d233fca16766c7a39c2c5c31083e1dc3a58b067 | {
"func_code_index": [
0,
4984
]
} | 26,858 | |
TestConf | TestConf.sol | 0x46b87b9c794ddb93b2a16bc1719111caec1cbd88 | Solidity | TestConf | contract TestConf { address internal listenerAddr; address public owner; uint256 public initialIssuance; uint public totalSupply; uint256 public currentEthPrice; /* In USD */ uint256 public currentTokenPrice; bytes32 public symbol; bytes32 public name; mapping(address => mapping(address => uint256)) allowed; mapping(ad... | /* Need Price Token */ | Comment | balanceOf | function TestConf () { name = "TestConf"; totalSupply = 1000000; initialIssuance = totalSupply; owner = 0x443B9375536521127DBfABff21f770e4e684475d; currentEthPrice = 20000; /* TODO: Oracle */ currentTokenPrice = 100; /* In cents */ symbol = "TEST1"; balances[owner] = 100; } /* Math Helpers */ function safeMul(uint a, u... | /* Methods */ | Comment | v0.4.14+commit.c2215d46 | bzzr://12badc874edbe5a399c1ebcb6d233fca16766c7a39c2c5c31083e1dc3a58b067 | {
"func_code_index": [
0,
4984
]
} | 26,859 | |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
776,
881
]
} | 26,860 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
995,
1104
]
} | 26,861 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view virtual override returns (uint8) {
return 18;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
1738,
1836
]
} | 26,862 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
1896,
2009
]
} | 26,863 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
2067,
2199
]
} | 26,864 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
2407,
2587
]
} | 26,865 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
2645,
2801
]
} | 26,866 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
2943,
3117
]
} | 26,867 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds all... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
3594,
4091
]
} | 26,868 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
4495,
4715
]
} | 26,869 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, c... | /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
5213,
5631
]
} | 26,870 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
... | /**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
6116,
6854
]
} | 26,871 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
7136,
7540
]
} | 26,872 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds ba... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
7868,
8464
]
} | 26,873 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(own... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
8897,
9282
]
} | 26,874 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - wh... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
9877,
10007
]
} | 26,875 |
RAIZER | @openzeppelin/contracts/token/ERC20/ERC20.sol | 0x99bc8f5e7a1b737fe74b97e950e0513bee8ca5e8 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _afterTokenTransfer | function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
| /**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - ... | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://633d5bb15291c7ad5507d708f5ad024838f98a4194e951d2d2a7b7d50dc9c848 | {
"func_code_index": [
10606,
10735
]
} | 26,876 |
StrategyCurveHUSD | StrategyCurveHUSD.sol | 0x99ce9eef12c68c4b3568ac161024d1ac49d52a11 | Solidity | StrategyCurveHUSD | contract StrategyCurveHUSD {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address constant public want = address(0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858); //husd3crv
address constant public pool = address(0x2db0E83599a91b508Ac268a6197b8B14F5e72840);... | withdraw | function withdraw(IERC20 _asset) external returns (uint balance) {
require(msg.sender == controller, "!controller");
require(want != address(_asset), "want");
require(crv != address(_asset), "crv");
require(dai != address(_asset), "dai");
balance = _asset.balanceOf(address(this));
_asset.safeTra... | // Controller only function for creating additional rewards from dust | LineComment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2854,
3235
]
} | 26,877 | ||||
StrategyCurveHUSD | StrategyCurveHUSD.sol | 0x99ce9eef12c68c4b3568ac161024d1ac49d52a11 | Solidity | StrategyCurveHUSD | contract StrategyCurveHUSD {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address constant public want = address(0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858); //husd3crv
address constant public pool = address(0x2db0E83599a91b508Ac268a6197b8B14F5e72840);... | withdraw | function withdraw(uint _amount) external {
require(msg.sender == controller, "!controller");
uint _balance = IERC20(want).balanceOf(address(this));
if (_balance < _amount) {
_amount = _withdrawSome(_amount.sub(_balance));
_amount = _amount.add(_balance);
}
uint _fee = 0;
... | // Withdraw partial funds, normally used with a vault withdrawal | LineComment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
3310,
4109
]
} | 26,878 | ||||
StrategyCurveHUSD | StrategyCurveHUSD.sol | 0x99ce9eef12c68c4b3568ac161024d1ac49d52a11 | Solidity | StrategyCurveHUSD | contract StrategyCurveHUSD {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address constant public want = address(0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858); //husd3crv
address constant public pool = address(0x2db0E83599a91b508Ac268a6197b8B14F5e72840);... | withdrawAll | function withdrawAll() external returns (uint balance) {
require(msg.sender == controller, "!controller");
_withdrawAll();
balance = IERC20(want).balanceOf(address(this));
address _vault = Controller(controller).vaults(address(want));
require(_vault != address(0), "!vault"... | // Withdraw all funds, normally used when migrating strategies | LineComment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
4182,
4638
]
} | 26,879 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | addAdmin | function addAdmin(address addr) external onlyOwner {
admins[addr] = true;
}
| /**
* enables an address to mint / burn
* @param addr the address to enable
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
448,
527
]
} | 26,880 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | removeAdmin | function removeAdmin(address addr) external onlyOwner {
admins[addr] = false;
}
| /**
* disables an address from minting / burning
* @param addr the address to disbale
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
625,
708
]
} | 26,881 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | mint | function mint(address to, uint256 amount) external override {
require(admins[msg.sender], "Only admins can mint");
_mint(to, amount);
}
| /**
* mints $TOKE to a recipient
* @param to the recipient of the $TOKE
* @param amount the amount of $TOKE to mint
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
838,
979
]
} | 26,882 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | burn | function burn(address from, uint256 amount) external override {
require(admins[msg.sender], "Only admins can burn");
_burn(from, amount);
}
| /**
* burns $TOKE from a holder
* @param from the holder of the $TOKE
* @param amount the amount of $TOKE to burn
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1107,
1252
]
} | 26,883 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override(ERC20, ITOKE) disallowIfStateIsChanging returns (bool) {
require(admins[_msgSender()] || lastWrite[sender] < block.number, "hmmmm what doing?");
// If the entity invoking this transfer is an admin (i.e. the gameContr... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of a... | NatSpecMultiLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1676,
2765
]
} | 26,884 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | allowance | function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return super.allowance(owner, spender);
}
| // Not ensuring state changed in this block as it would needlessly increase gas | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4004,
4160
]
} | 26,885 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
return super.approve(spender, amount);
}
| // Not ensuring state changed in this block as it would needlessly increase gas | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4243,
4378
]
} | 26,886 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue)
public
virtual
override
returns (bool)
{
return super.increaseAllowance(spender, addedValue);
}
| // Not ensuring state changed in this block as it would needlessly increase gas | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4461,
4633
]
} | 26,887 | ||||
TOKE | contracts/TOKE.sol | 0xdc5cc936595d71c3c40001f96868cde92c41b21a | Solidity | TOKE | contract TOKE is ITOKE, ERC20, Ownable {
// Tracks the last block that a caller has written to state.
// Disallow some access to functions if they occur while a change is being written.
mapping(address => uint256) private lastWrite;
// address => allowedToCallFunctions
mapping(address => bool) private admins;
c... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
override
returns (bool)
{
return super.decreaseAllowance(spender, subtractedValue);
}
| // Not ensuring state changed in this block as it would needlessly increase gas | LineComment | v0.8.11+commit.d7f03943 | {
"func_code_index": [
4716,
4898
]
} | 26,888 | ||||
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
399,
491
]
} | 26,889 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
1050,
1149
]
} | 26,890 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
1299,
1496
]
} | 26,891 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other valu... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
528,
698
]
} | 26,892 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC165 | interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This f... | /**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) external view returns (bool);
| /**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
374,
455
]
} | 26,893 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
719,
798
]
} | 26,894 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
944,
1021
]
} | 26,895 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token mus... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
1733,
1850
]
} | 26,896 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 tokenId
) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If th... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
2376,
2489
]
} | 26,897 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
2962,
3022
]
} | 26,898 |
Token | Token.sol | 0x8ab1f4e0f5e7ed415ac9ba22898d7bfb1726e34d | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) external view returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://cd16db3839bcf85336a99be100cdbd196327d72df67a466d5433d90c9da625dd | {
"func_code_index": [
3176,
3260
]
} | 26,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.