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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getDecimals | function getDecimals(DataTypes.ReserveConfigurationMap storage self) internal view returns (uint256) {
return (self.data & ~DECIMALS_MASK) >> RESERVE_DECIMALS_START_BIT_POSITION;
}
| /**
* @dev Gets the decimals of the underlying asset of the reserve
* @param self The reserve configuration
* @return The decimals of the asset
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5017,
5205
]
} | 22,700 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | setActive | function setActive(DataTypes.ReserveConfigurationMap memory self, bool active) internal pure {
self.data =
(self.data & ACTIVE_MASK) |
(uint256(active ? 1 : 0) << IS_ACTIVE_START_BIT_POSITION);
}
| /**
* @dev Sets the active state of the reserve
* @param self The reserve configuration
* @param active The active state
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5346,
5561
]
} | 22,701 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getActive | function getActive(DataTypes.ReserveConfigurationMap storage self) internal view returns (bool) {
return (self.data & ~ACTIVE_MASK) != 0;
}
| /**
* @dev Gets the active state of the reserve
* @param self The reserve configuration
* @return The active state
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5696,
5843
]
} | 22,702 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | setFrozen | function setFrozen(DataTypes.ReserveConfigurationMap memory self, bool frozen) internal pure {
self.data =
(self.data & FROZEN_MASK) |
(uint256(frozen ? 1 : 0) << IS_FROZEN_START_BIT_POSITION);
}
| /**
* @dev Sets the frozen state of the reserve
* @param self The reserve configuration
* @param frozen The frozen state
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5984,
6199
]
} | 22,703 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getFrozen | function getFrozen(DataTypes.ReserveConfigurationMap storage self) internal view returns (bool) {
return (self.data & ~FROZEN_MASK) != 0;
}
| /**
* @dev Gets the frozen state of the reserve
* @param self The reserve configuration
* @return The frozen state
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6334,
6481
]
} | 22,704 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | setBorrowingEnabled | function setBorrowingEnabled(DataTypes.ReserveConfigurationMap memory self, bool enabled) internal pure {
self.data =
(self.data & BORROWING_MASK) |
(uint256(enabled ? 1 : 0) << BORROWING_ENABLED_START_BIT_POSITION);
}
| /**
* @dev Enables or disables borrowing on the reserve
* @param self The reserve configuration
* @param enabled True if the borrowing needs to be enabled, false otherwise
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6673,
6911
]
} | 22,705 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getBorrowingEnabled | function getBorrowingEnabled(DataTypes.ReserveConfigurationMap storage self) internal view returns (bool) {
return (self.data & ~BORROWING_MASK) != 0;
}
| /**
* @dev Gets the borrowing state of the reserve
* @param self The reserve configuration
* @return The borrowing state
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
7052,
7212
]
} | 22,706 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | setStableRateBorrowingEnabled | function setStableRateBorrowingEnabled(DataTypes.ReserveConfigurationMap memory self, bool enabled)
internal
pure
{
self.data =
(self.data & STABLE_BORROWING_MASK) |
(uint256(enabled ? 1 : 0) << STABLE_BORROWING_ENABLED_START_BIT_POSITION);
}
| /**
* @dev Enables or disables stable rate borrowing on the reserve
* @param self The reserve configuration
* @param enabled True if the stable rate borrowing needs to be enabled, false otherwise
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
7428,
7700
]
} | 22,707 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getStableRateBorrowingEnabled | function getStableRateBorrowingEnabled(DataTypes.ReserveConfigurationMap storage self)
internal
view
returns (bool)
{
return (self.data & ~STABLE_BORROWING_MASK) != 0;
}
| /**
* @dev Gets the stable rate borrowing state of the reserve
* @param self The reserve configuration
* @return The stable rate borrowing state
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
7865,
8056
]
} | 22,708 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | setReserveFactor | function setReserveFactor(DataTypes.ReserveConfigurationMap memory self, uint256 reserveFactor)
internal
pure
{
require(reserveFactor <= MAX_VALID_RESERVE_FACTOR, Errors.RC_INVALID_RESERVE_FACTOR);
self.data =
(self.data & RESERVE_FACTOR_MASK) |
(reserveFactor << RESERVE_FACTOR_START_BIT_POSITION);
}
| /**
* @dev Sets the reserve factor of the reserve
* @param self The reserve configuration
* @param reserveFactor The reserve factor
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
8208,
8544
]
} | 22,709 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getReserveFactor | function getReserveFactor(DataTypes.ReserveConfigurationMap storage self) internal view returns (uint256) {
return (self.data & ~RESERVE_FACTOR_MASK) >> RESERVE_FACTOR_START_BIT_POSITION;
}
| /**
* @dev Gets the reserve factor of the reserve
* @param self The reserve configuration
* @return The reserve factor
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
8683,
8880
]
} | 22,710 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getFlags | function getFlags(DataTypes.ReserveConfigurationMap storage self)
internal
view
returns (
bool,
bool,
bool,
bool
)
{
uint256 dataLocal = self.data;
return (
(dataLocal & ~ACTIVE_MASK) != 0,
(dataLocal & ~FROZEN_MASK) != 0,
(dataLocal & ~BORROWING_MASK) != 0,
(dataLocal & ~ST... | /**
* @dev Gets the configuration flags of the reserve
* @param self The reserve configuration
* @return The state flags representing active, frozen, borrowing enabled, stableRateBorrowing enabled
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
9097,
9485
]
} | 22,711 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getParams | function getParams(DataTypes.ReserveConfigurationMap storage self)
internal
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256
)
{
uint256 dataLocal = self.data;
return (
dataLocal & ~LTV_MASK,
(dataLocal & ~LIQUIDATION_THRESHOLD_MASK) >> LIQUIDATION_THRESHOLD_START_BIT_... | /**
* @dev Gets the configuration paramters of the reserve
* @param self The reserve configuration
* @return The state params representing ltv, liquidation threshold, liquidation bonus, the reserve decimals
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
9712,
10320
]
} | 22,712 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getParamsMemory | function getParamsMemory(DataTypes.ReserveConfigurationMap memory self)
internal
pure
returns (
uint256,
uint256,
uint256,
uint256,
uint256
)
{
return (
self.data & ~LTV_MASK,
(self.data & ~LIQUIDATION_THRESHOLD_MASK) >> LIQUIDATION_THRESHOLD_START_BIT_POSITION,
(self.data & ~L... | /**
* @dev Gets the configuration paramters of the reserve from a memory object
* @param self The reserve configuration
* @return The state params representing ltv, liquidation threshold, liquidation bonus, the reserve decimals
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
10568,
11145
]
} | 22,713 | ||
LendingPool | contracts/protocol/libraries/configuration/ReserveConfiguration.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | ReserveConfiguration | library ReserveConfiguration {
uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore
uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore
uint256 constant ... | /**
* @title ReserveConfiguration library
* @author Aave
* @notice Implements the bitmap logic to handle the reserve configuration
*/ | NatSpecMultiLine | getFlagsMemory | function getFlagsMemory(DataTypes.ReserveConfigurationMap memory self)
internal
pure
returns (
bool,
bool,
bool,
bool
)
{
return (
(self.data & ~ACTIVE_MASK) != 0,
(self.data & ~FROZEN_MASK) != 0,
(self.data & ~BORROWING_MASK) != 0,
(self.data & ~STABLE_BORROWING_MASK) != 0
)... | /**
* @dev Gets the configuration flags of the reserve from a memory object
* @param self The reserve configuration
* @return The state flags representing active, frozen, borrowing enabled, stableRateBorrowing enabled
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
11383,
11740
]
} | 22,714 | ||
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _t... | // ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
/... | LineComment | totalSupply | function totalSupply() constant returns (uint256);
| // Get the total token supply | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
62,
117
]
} | 22,715 | |
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _t... | // ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
/... | LineComment | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance);
| // Get the account balance of another account with address _owner | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
192,
267
]
} | 22,716 | |
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _t... | // ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
/... | LineComment | transfer | function transfer(address _to, uint256 _value) returns (bool success);
| // Send _value amount of tokens to address _to | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
323,
398
]
} | 22,717 | |
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _t... | // ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
/... | LineComment | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
| // Send _value amount of tokens from address _from to address _to | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
473,
567
]
} | 22,718 | |
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _t... | // ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
/... | LineComment | approve | function approve(address _spender, uint256 _value) returns (bool success);
| // Allow _spender to withdraw from your account, multiple times, up to the _value amount.
// If this function is called again it overwrites the current allowance with _value.
// this function is required for some DEX functionality | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
817,
896
]
} | 22,719 | |
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of tokens to address _t... | // ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
/... | LineComment | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining);
| // Returns the amount which _spender is still allowed to withdraw from _owner | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
983,
1078
]
} | 22,720 | |
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | MudshotsToken | contract MudshotsToken is ERC20Interface {
string public constant symbol = "MST";
string public constant name = "MudshotsToken";
uint8 public constant decimals = 0;
uint256 _totalSupply = 1000000;
// Owner of this contract
address public owner;
// Balances for each account
... | MudshotsToken | function MudshotsToken() {
owner = msg.sender;
balances[owner] = _totalSupply;
}
| // Constructor | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
741,
849
]
} | 22,721 | |||
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | MudshotsToken | contract MudshotsToken is ERC20Interface {
string public constant symbol = "MST";
string public constant name = "MudshotsToken";
uint8 public constant decimals = 0;
uint256 _totalSupply = 1000000;
// Owner of this contract
address public owner;
// Balances for each account
... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
| // What is the balance of a particular account? | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
1003,
1120
]
} | 22,722 | |||
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | MudshotsToken | contract MudshotsToken is ERC20Interface {
string public constant symbol = "MST";
string public constant name = "MudshotsToken";
uint8 public constant decimals = 0;
uint256 _totalSupply = 1000000;
// Owner of this contract
address public owner;
// Balances for each account
... | transfer | function transfer(address _to, uint256 _amount) returns (bool success) {
if (balances[msg.sender] >= _amount
&& _amount > 0
&& balances[_to] + _amount > balances[_to]) {
balances[msg.sender] -= _amount;
balances[_to] += _amount;
Transfer(msg.sender, _to, _amount);
... | // Transfer the balance from owner's account to another account | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
1193,
1626
]
} | 22,723 | |||
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | MudshotsToken | contract MudshotsToken is ERC20Interface {
string public constant symbol = "MST";
string public constant name = "MudshotsToken";
uint8 public constant decimals = 0;
uint256 _totalSupply = 1000000;
// Owner of this contract
address public owner;
// Balances for each account
... | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _amount
) returns (bool success) {
if (balances[_from] >= _amount
&& allowed[_from][msg.sender] >= _amount
&& _amount > 0
&& balances[_to] + _amount > balances[_to]) {
balances[_from] -= _amount;
... | // Send _value amount of tokens from address _from to address _to
// The transferFrom method is used for a withdraw workflow, allowing contracts to send
// tokens on your behalf, for example to "deposit" to a contract address and/or to charge
// fees in sub-currencies; the command should fail unless the _from account h... | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
2108,
2684
]
} | 22,724 | |||
MudshotsToken | MudshotsToken.sol | 0xd44e3663aa2faa993b5aed88c43b2943a36cb452 | Solidity | MudshotsToken | contract MudshotsToken is ERC20Interface {
string public constant symbol = "MST";
string public constant name = "MudshotsToken";
uint8 public constant decimals = 0;
uint256 _totalSupply = 1000000;
// Owner of this contract
address public owner;
// Balances for each account
... | approve | function approve(address _spender, uint256 _amount) returns (bool success) {
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
| // Allow _spender to withdraw from your account, multiple times, up to the _value amount.
// If this function is called again it overwrites the current allowance with _value. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://3dd9c06a7fbd0366158c950e1dfc7f062bb455753ce16c4228088efde5507ed1 | {
"func_code_index": [
2873,
3083
]
} | 22,725 | |||
Booster | contracts/uniswapv2/libraries/SafeMath.sol | 0xa643e6aae94482a9ac5b513d2d3e238fc9fb93f0 | Solidity | SafeMath | library SafeMath {
/*function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
require((z = x + y) >= x, 'ds-math-add-overflow');
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
require((z = x - y) <= x, 'ds-math-sub-underflow');
}
fun... | // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) | LineComment | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /*function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
require((z = x + y) >= x, 'ds-math-add-overflow');
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
require((z = x - y) <= x, 'ds-math-sub-underflow');
}
function mul(uint256 x, uint256 y) internal pure re... | Comment | v0.6.12+commit.27d51765 | None | ipfs://dc55912045609e3a02b8d952c81dfe21d67bf89c48f776cdcb29dcdc6af44283 | {
"func_code_index": [
474,
658
]
} | 22,726 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
251,
437
]
} | 22,727 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
707,
848
]
} | 22,728 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
1180,
1377
]
} | 22,729 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
1623,
2099
]
} | 22,730 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
2562,
2699
]
} | 22,731 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
3224,
3574
]
} | 22,732 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
4026,
4161
]
} | 22,733 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
4675,
4846
]
} | 22,734 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
94,
154
]
} | 22,735 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
237,
310
]
} | 22,736 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
534,
616
]
} | 22,737 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
895,
983
]
} | 22,738 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
1647,
1726
]
} | 22,739 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
2039,
2141
]
} | 22,740 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
550,
638
]
} | 22,741 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
752,
844
]
} | 22,742 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @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.
*
*... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
1402,
1490
]
} | 22,743 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to a... | /**
* @dev Collection of functions related to the address type,
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function retur... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
455,
882
]
} | 22,744 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, addr... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | callOptionalReturn | function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checke... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
2127,
3246
]
} | 22,745 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = msg.sender;
... | /**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
484,
568
]
} | 22,746 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = msg.sender;
... | /**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | isOwner | function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
| /**
* @dev Returns true if the caller is the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
850,
947
]
} | 22,747 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = msg.sender;
... | /**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
1097,
1211
]
} | 22,748 |
YugiFarming | YugiFarming.sol | 0xb21188c0d4eea42ab6fb93df0ba7d4cbfc20b4ed | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = msg.sender;
... | /**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | None | bzzr://0986992f8abbb14e47795296e32ad22c61854f460ead2a2683f8e566a5120861 | {
"func_code_index": [
1312,
1546
]
} | 22,749 |
Presale | contracts/Presale.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | Presale | contract Presale is Ownable, Pausable {
IERC20 public STABLEC; // STABLEC contract address
TempleERC20Token public TEMPLE; // TEMPLE ERC20 contract
TempleTreasury public TREASURY;
TempleStaking public STAKING; // Staking contract
LockedOGTemple public STAKING_LOCK; // contract where OG Temple is loc... | /**
* Presale campaign, which lets users to mint and stake based on current IV and a whitelist
*/ | NatSpecMultiLine | mintAndStake | function mintAndStake(uint256 _amountPaidStablec) external whenNotPaused {
(uint256 totalAllocation, uint256 allocationEpoch) = PRESALE_ALLOCATION.allocationOf(msg.sender);
require(_amountPaidStablec + allocationUsed[msg.sender] <= totalAllocation, "Amount requested exceed address allocation");
require(allocatio... | /** mint temple and immediately stake, with a bonus + lockin period */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1578,
2905
]
} | 22,750 | ||
Presale | contracts/Presale.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | Presale | contract Presale is Ownable, Pausable {
IERC20 public STABLEC; // STABLEC contract address
TempleERC20Token public TEMPLE; // TEMPLE ERC20 contract
TempleTreasury public TREASURY;
TempleStaking public STAKING; // Staking contract
LockedOGTemple public STAKING_LOCK; // contract where OG Temple is loc... | /**
* Presale campaign, which lets users to mint and stake based on current IV and a whitelist
*/ | NatSpecMultiLine | pause | function pause() external onlyOwner {
_pause();
}
| /**
* Pause contract. Either emergency or at the end of presale
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2988,
3053
]
} | 22,751 | ||
Presale | contracts/Presale.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | Presale | contract Presale is Ownable, Pausable {
IERC20 public STABLEC; // STABLEC contract address
TempleERC20Token public TEMPLE; // TEMPLE ERC20 contract
TempleTreasury public TREASURY;
TempleStaking public STAKING; // Staking contract
LockedOGTemple public STAKING_LOCK; // contract where OG Temple is loc... | /**
* Presale campaign, which lets users to mint and stake based on current IV and a whitelist
*/ | NatSpecMultiLine | unpause | function unpause() external onlyOwner {
_unpause();
}
| /**
* Revert pause
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3091,
3160
]
} | 22,752 | ||
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) ret... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) returns (bool) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
268,
507
]
} | 22,753 |
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) ret... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
714,
823
]
} | 22,754 |
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balances[_from] = balances[_from].sub(... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
392,
895
]
} | 22,755 |
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
1131,
1314
]
} | 22,756 |
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
1638,
1776
]
} | 22,757 |
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | Comment | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
2025,
2297
]
} | 22,758 |
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | ERC677Token | contract ERC677Token is ERC677 {
/**
* @dev transfer token to a contract address with additional data if the recipient is a contact.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
* @param _data The extra data to be passed to the receiving contract.
*/
func... | transferAndCall | function transferAndCall(address _to, uint _value, bytes _data)
public
returns (bool success)
{
super.transfer(_to, _value);
Transfer(msg.sender, _to, _value, _data);
if (isContract(_to)) {
contractFallback(_to, _value, _data);
}
return true;
}
| /**
* @dev transfer token to a contract address with additional data if the recipient is a contact.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
* @param _data The extra data to be passed to the receiving contract.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
314,
609
]
} | 22,759 | ||
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | ERC677Token | contract ERC677Token is ERC677 {
/**
* @dev transfer token to a contract address with additional data if the recipient is a contact.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
* @param _data The extra data to be passed to the receiving contract.
*/
func... | contractFallback | function contractFallback(address _to, uint _value, bytes _data)
private
{
ERC677Receiver receiver = ERC677Receiver(_to);
receiver.onTokenTransfer(msg.sender, _value, _data);
}
| // PRIVATE | LineComment | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
630,
830
]
} | 22,760 | ||
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | CEXToken | contract CEXToken is StandardToken, ERC677Token {
uint public constant totalSupply = 10**27;
string public constant name = 'Ctopex';
uint8 public constant decimals = 18;
string public constant symbol = 'CEX';
function CEXToken()
public
{
balances[msg.sender] = totalSupply;
}
/**
... | transferAndCall | function transferAndCall(address _to, uint _value, bytes _data)
public
validRecipient(_to)
returns (bool success)
{
return super.transferAndCall(_to, _value, _data);
}
| /**
* @dev transfer token to a specified address with additional data if the recipient is a contract.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
* @param _data The extra data to be passed to the receiving contract.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
594,
790
]
} | 22,761 | ||
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | CEXToken | contract CEXToken is StandardToken, ERC677Token {
uint public constant totalSupply = 10**27;
string public constant name = 'Ctopex';
uint8 public constant decimals = 18;
string public constant symbol = 'CEX';
function CEXToken()
public
{
balances[msg.sender] = totalSupply;
}
/**
... | transfer | function transfer(address _to, uint _value)
public
validRecipient(_to)
returns (bool success)
{
return super.transfer(_to, _value);
}
| /**
* @dev transfer token to a specified address.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
948,
1110
]
} | 22,762 | ||
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | CEXToken | contract CEXToken is StandardToken, ERC677Token {
uint public constant totalSupply = 10**27;
string public constant name = 'Ctopex';
uint8 public constant decimals = 18;
string public constant symbol = 'CEX';
function CEXToken()
public
{
balances[msg.sender] = totalSupply;
}
/**
... | approve | function approve(address _spender, uint256 _value)
public
validRecipient(_spender)
returns (bool)
{
return super.approve(_spender, _value);
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
1346,
1517
]
} | 22,763 | ||
CEXToken | CEXToken.sol | 0x50e5fbf6f1d3151d3402b537a99f6a1a267c4a6d | Solidity | CEXToken | contract CEXToken is StandardToken, ERC677Token {
uint public constant totalSupply = 10**27;
string public constant name = 'Ctopex';
uint8 public constant decimals = 18;
string public constant symbol = 'CEX';
function CEXToken()
public
{
balances[msg.sender] = totalSupply;
}
/**
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value)
public
validRecipient(_to)
returns (bool)
{
return super.transferFrom(_from, _to, _value);
}
| /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | MIT | bzzr://9081c62384fa9d6472e22e2691802e8e3ca6ababa8acc296e7369c08d0c186f9 | {
"func_code_index": [
1797,
1984
]
} | 22,764 | ||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'Defi Eco' contract
//
// Symbol : DEC
// Name : Defi Eco
// Total supply : 10^5
// Decimals : 18
//
// Enjoy.
// -------------------------------------... | LineComment | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
241,
421
]
} | 22,765 | ||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'Defi Eco' contract
//
// Symbol : DEC
// Name : Defi Eco
// Total supply : 10^5
// Decimals : 18
//
// Enjoy.
// -------------------------------------... | LineComment | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
681,
864
]
} | 22,766 | ||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'Defi Eco' contract
//
// Symbol : DEC
// Name : Defi Eco
// Total supply : 10^5
// Decimals : 18
//
// Enjoy.
// -------------------------------------... | LineComment | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1100,
1562
]
} | 22,767 | ||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'Defi Eco' contract
//
// Symbol : DEC
// Name : Defi Eco
// Total supply : 10^5
// Decimals : 18
//
// Enjoy.
// -------------------------------------... | LineComment | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (co... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2013,
2343
]
} | 22,768 | ||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'Defi Eco' contract
//
// Symbol : DEC
// Name : Defi Eco
// Total supply : 10^5
// Decimals : 18
//
// Enjoy.
// -------------------------------------... | LineComment | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2783,
2936
]
} | 22,769 | ||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
90,
149
]
} | 22,770 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
228,
300
]
} | 22,771 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
516,
597
]
} | 22,772 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
868,
955
]
} | 22,773 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1595,
1673
]
} | 22,774 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1976,
2077
]
} | 22,775 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
906,
991
]
} | 22,776 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1100,
1189
]
} | 22,777 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @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.
*
* > Note ... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1740,
1825
]
} | 22,778 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1880,
1973
]
} | 22,779 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2027,
2139
]
} | 22,780 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, 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.5.17+commit.d19bba13 | {
"func_code_index": [
2338,
2495
]
} | 22,781 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2549,
2685
]
} | 22,782 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2819,
2968
]
} | 22,783 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
| /**
* @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 `value`.
* -... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
3421,
3677
]
} | 22,784 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(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` cannot be t... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
4068,
4275
]
} | 22,785 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @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` cannot be t... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
4758,
4975
]
} | 22,786 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _ba... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is 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.
* - `recipie... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
5445,
5871
]
} | 22,787 | ||||
DefiEco | DefiEco.sol | 0x3046ce56fda2c019b766444f1ee2455731faf01e | Solidity | DefiEco | contract DefiEco is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 ... | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is 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 address.
... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
6291,
6624
]
} | 22,788 | ||||
StickDix | contracts/StickDix.sol | 0xfcd433977292f107aac6e30e7712d0e38eeb4a7c | Solidity | StickDix | contract StickDix is ERC721, Ownable {
using Strings for uint256;
uint256 public constant MAX_TOKENS = 6969;
// 20 for the team, 76 for those that minted early.
uint256 private constant TOKENS_RESERVED = 96;
uint256 public constant TOKEN_COST = 0.06969 ether;
uint256 public constant MAX_MINT_PE... | mintDix | function mintDix(uint256 _numTokens) external payable {
require(isSaleActive, "Sale is not active.");
require(_numTokens <= MAX_MINT_PER_TX, "May only mint 4 StickDix per TX.");
require(mintedPerWallet[msg.sender] + _numTokens <= 12, "May only mint 12 per wallet.");
uint256 curTotalSupply = totalSupply;... | // PUBLIC FUNCTIONS | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
828,
1544
]
} | 22,789 | ||||
StickDix | contracts/StickDix.sol | 0xfcd433977292f107aac6e30e7712d0e38eeb4a7c | Solidity | StickDix | contract StickDix is ERC721, Ownable {
using Strings for uint256;
uint256 public constant MAX_TOKENS = 6969;
// 20 for the team, 76 for those that minted early.
uint256 private constant TOKENS_RESERVED = 96;
uint256 public constant TOKEN_COST = 0.06969 ether;
uint256 public constant MAX_MINT_PE... | flipSaleState | function flipSaleState() external onlyOwner {
isSaleActive = !isSaleActive;
}
| // OWNER ONLY FUNCTIONS | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1574,
1667
]
} | 22,790 | ||||
StickDix | contracts/StickDix.sol | 0xfcd433977292f107aac6e30e7712d0e38eeb4a7c | Solidity | StickDix | contract StickDix is ERC721, Ownable {
using Strings for uint256;
uint256 public constant MAX_TOKENS = 6969;
// 20 for the team, 76 for those that minted early.
uint256 private constant TOKENS_RESERVED = 96;
uint256 public constant TOKEN_COST = 0.06969 ether;
uint256 public constant MAX_MINT_PE... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseUri;
}
| // INTERNAL FUNCTIONS | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2691,
2801
]
} | 22,791 | ||||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | burn | function burn(
address user,
address receiverOfUnderlying,
uint256 amount,
uint256 index
) external override onlyLendingPool {
uint256 amountScaled = amount.rayDiv(index);
require(amountScaled != 0, Errors.CT_INVALID_BURN_AMOUNT);
_burn(user, amountScaled);
IERC20(UNDERLYING_ASSET_ADDRESS).safeTransfer... | /**
* @dev Burns aTokens from `user` and sends the equivalent amount of underlying to `receiverOfUnderlying`
* - Only callable by the LendingPool, as extra state updates there need to be managed
* @param user The owner of the aTokens, getting them burned
* @param receiverOfUnderlying The address that will receive t... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
2537,
3016
]
} | 22,792 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | mint | function mint(
address user,
uint256 amount,
uint256 index
) external override onlyLendingPool returns (bool) {
uint256 previousBalance = super.balanceOf(user);
uint256 amountScaled = amount.rayDiv(index);
require(amountScaled != 0, Errors.CT_INVALID_MINT_AMOUNT);
_mint(user, amountScaled);
emit Trans... | /**
* @dev Mints `amount` aTokens to `user`
* - Only callable by the LendingPool, as extra state updates there need to be managed
* @param user The address receiving the minted tokens
* @param amount The amount of tokens getting minted
* @param index The new liquidity index of the reserve
* @return `true` if the ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3397,
3841
]
} | 22,793 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | mintToTreasury | function mintToTreasury(uint256 amount, uint256 index) external override onlyLendingPool {
if (amount == 0) {
return;
}
// Compared to the normal mint, we don't check for rounding errors.
// The amount to mint can easily be very small since it is a fraction of the interest ccrued.
// In that case, the tr... | /**
* @dev Mints aTokens to the reserve treasury
* - Only callable by the LendingPool
* @param amount The amount of tokens getting minted
* @param index The new liquidity index of the reserve
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4055,
4682
]
} | 22,794 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | transferOnLiquidation | function transferOnLiquidation(
address from,
address to,
uint256 value
) external override onlyLendingPool {
// Being a normal transfer, the Transfer() and BalanceTransfer() are emitted
// so no need to emit a specific event here
_transfer(from, to, value, false);
emit Transfer(from, to, value);
}
| /**
* @dev Transfers aTokens in the event of a borrow being liquidated, in case the liquidators reclaims the aToken
* - Only callable by the LendingPool
* @param from The address getting liquidated, current owner of the aTokens
* @param to The recipient
* @param value The amount of tokens getting transferred
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5018,
5352
]
} | 22,795 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address user)
public
view
override(IncentivizedERC20, IERC20)
returns (uint256)
{
return super.balanceOf(user).rayMul(POOL.getReserveNormalizedIncome(UNDERLYING_ASSET_ADDRESS));
}
| /**
* @dev Calculates the balance of the user: principal balance + interest generated by the principal
* @param user The user whose balance is calculated
* @return The balance of the user
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5560,
5784
]
} | 22,796 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | scaledBalanceOf | function scaledBalanceOf(address user) external view override returns (uint256) {
return super.balanceOf(user);
}
| /**
* @dev Returns the scaled balance of the user. The scaled balance is the sum of all the
* updated stored balance divided by the reserve's liquidity index at the moment of the update
* @param user The user whose balance is calculated
* @return The scaled balance of the user
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6085,
6206
]
} | 22,797 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | getScaledUserBalanceAndSupply | function getScaledUserBalanceAndSupply(address user)
external
view
override
returns (uint256, uint256)
{
return (super.balanceOf(user), super.totalSupply());
}
| /**
* @dev Returns the scaled balance of the user and the scaled total supply.
* @param user The address of the user
* @return The scaled balance of the user
* @return The scaled balance and the scaled total supply
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6444,
6629
]
} | 22,798 | ||
LendingPool | contracts/protocol/tokenization/AToken.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | AToken | contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using WadRayMath for uint256;
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyin... | /**
* @title Aave ERC20 AToken
* @dev Implementation of the interest bearing token for the Aave protocol
* @author Aave
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view override(IncentivizedERC20, IERC20) returns (uint256) {
uint256 currentSupplyScaled = super.totalSupply();
if (currentSupplyScaled == 0) {
return 0;
}
return currentSupplyScaled.rayMul(POOL.getReserveNormalizedIncome(UNDERLYING_ASSET_ADDRESS));
}
| /**
* @dev calculates the total supply of the specific aToken
* since the balance of every single user increases over time, the total supply
* does that too.
* @return the current total supply
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6845,
7154
]
} | 22,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.