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/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 | scaledTotalSupply | function scaledTotalSupply() public view virtual override returns (uint256) {
return super.totalSupply();
}
| /**
* @dev Returns the scaled total supply of the variable debt token. Represents sum(debt/index)
* @return the scaled total supply
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
7303,
7418
]
} | 22,800 | ||
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 | transferUnderlyingTo | function transferUnderlyingTo(address target, uint256 amount)
external
override
onlyLendingPool
returns (uint256)
{
IERC20(UNDERLYING_ASSET_ADDRESS).safeTransfer(target, amount);
return amount;
}
| /**
* @dev Transfers the underlying asset to `target`. Used by the LendingPool to transfer
* assets in borrow(), withdraw() and flashLoan()
* @param target The recipient of the aTokens
* @param amount The amount getting transferred
* @return The amount transferred
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
7709,
7934
]
} | 22,801 | ||
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 | permit | function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external {
require(owner != address(0), 'INVALID_OWNER');
//solium-disable-next-line
require(block.timestamp <= deadline, 'INVALID_EXPIRATION');
uint256 currentValidNonce = _nonces[own... | /**
* @dev implements the permit function as for
* https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md
* @param owner The owner of the funds
* @param spender The spender
* @param value The amount
* @param deadline The deadline timestamp, type(uint256).max for max deadli... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
8369,
9112
]
} | 22,802 | ||
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 | _transfer | function _transfer(
address from,
address to,
uint256 amount,
bool validate
) internal {
uint256 index = POOL.getReserveNormalizedIncome(UNDERLYING_ASSET_ADDRESS);
uint256 fromBalanceBefore = super.balanceOf(from).rayMul(index);
uint256 toBalanceBefore = super.balanceOf(to).rayMul(index);
super._trans... | /**
* @dev Transfers the aTokens between two users. Validates the transfer
* (ie checks for valid HF after the transfer) if required
* @param from The source address
* @param to The destination address
* @param amount The amount getting transferred
* @param validate `true` if the transfer needs to be validated
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
9453,
10077
]
} | 22,803 | ||
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 | _transfer | function _transfer(
address from,
address to,
uint256 amount
) internal override {
_transfer(from, to, amount, true);
}
| /**
* @dev Overrides the parent _transfer to force validated transfer() and transferFrom()
* @param from The source address
* @param to The destination address
* @param amount The amount getting transferred
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
10307,
10448
]
} | 22,804 | ||
LendingPool | contracts/protocol/libraries/logic/GenericLogic.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | GenericLogic | library GenericLogic {
using ReserveLogic for DataTypes.ReserveData;
using SafeMath for uint256;
using WadRayMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
using UserConfiguration for DataTypes.UserConfigurationMap;
uint256 public con... | /**
* @title GenericLogic library
* @author Aave
* @title Implements protocol-level logic to calculate and validate the state of a user
*/ | NatSpecMultiLine | balanceDecreaseAllowed | function balanceDecreaseAllowed(
address asset,
address user,
uint256 amount,
mapping(address => DataTypes.ReserveData) storage reservesData,
DataTypes.UserConfigurationMap calldata userConfig,
mapping(uint256 => address) storage reserves,
uint256 reservesCount,
address oracle
) external view returns (b... | /**
* @dev Checks if a specific balance decrease is allowed
* (i.e. doesn't bring the user borrow position health factor under HEALTH_FACTOR_LIQUIDATION_THRESHOLD)
* @param asset The address of the underlying asset of the reserve
* @param user The address of the user
* @param amount The amount to decrease
* @para... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1386,
3282
]
} | 22,805 | ||
LendingPool | contracts/protocol/libraries/logic/GenericLogic.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | GenericLogic | library GenericLogic {
using ReserveLogic for DataTypes.ReserveData;
using SafeMath for uint256;
using WadRayMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
using UserConfiguration for DataTypes.UserConfigurationMap;
uint256 public con... | /**
* @title GenericLogic library
* @author Aave
* @title Implements protocol-level logic to calculate and validate the state of a user
*/ | NatSpecMultiLine | calculateUserAccountData | function calculateUserAccountData(
address user,
mapping(address => DataTypes.ReserveData) storage reservesData,
DataTypes.UserConfigurationMap memory userConfig,
mapping(uint256 => address) storage reserves,
uint256 reservesCount,
address oracle
)
internal
view
returns (
uint256,
uint256,
... | /**
* @dev Calculates the user data across the reserves.
* this includes the total liquidity/collateral/borrow balances in ETH,
* the average Loan To Value, the average Liquidation Ratio, and the Health factor.
* @param user The address of the user
* @param reservesData Data of all the reserves
* @param userConfi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4453,
7240
]
} | 22,806 | ||
LendingPool | contracts/protocol/libraries/logic/GenericLogic.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | GenericLogic | library GenericLogic {
using ReserveLogic for DataTypes.ReserveData;
using SafeMath for uint256;
using WadRayMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
using UserConfiguration for DataTypes.UserConfigurationMap;
uint256 public con... | /**
* @title GenericLogic library
* @author Aave
* @title Implements protocol-level logic to calculate and validate the state of a user
*/ | NatSpecMultiLine | calculateHealthFactorFromBalances | function calculateHealthFactorFromBalances(
uint256 totalCollateralInETH,
uint256 totalDebtInETH,
uint256 liquidationThreshold
) internal pure returns (uint256) {
if (totalDebtInETH == 0) return uint256(-1);
return (totalCollateralInETH.percentMul(liquidationThreshold)).wadDiv(totalDebtInETH);
}
| /**
* @dev Calculates the health factor from the corresponding balances
* @param totalCollateralInETH The total collateral in ETH
* @param totalDebtInETH The total debt in ETH
* @param liquidationThreshold The avg liquidation threshold
* @return The health factor calculated from the balances provided
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
7568,
7891
]
} | 22,807 | ||
LendingPool | contracts/protocol/libraries/logic/GenericLogic.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | GenericLogic | library GenericLogic {
using ReserveLogic for DataTypes.ReserveData;
using SafeMath for uint256;
using WadRayMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
using UserConfiguration for DataTypes.UserConfigurationMap;
uint256 public con... | /**
* @title GenericLogic library
* @author Aave
* @title Implements protocol-level logic to calculate and validate the state of a user
*/ | NatSpecMultiLine | calculateAvailableBorrowsETH | function calculateAvailableBorrowsETH(
uint256 totalCollateralInETH,
uint256 totalDebtInETH,
uint256 ltv
) internal pure returns (uint256) {
uint256 availableBorrowsETH = totalCollateralInETH.percentMul(ltv);
if (availableBorrowsETH < totalDebtInETH) {
return 0;
}
availableBorrowsETH = availab... | /**
* @dev Calculates the equivalent amount in ETH that an user can borrow, depending on the available collateral and the
* average Loan To Value
* @param totalCollateralInETH The total collateral in ETH
* @param totalDebtInETH The total borrow balance
* @param ltv The average loan to value
* @return the amount a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
8274,
8683
]
} | 22,808 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
165,
238
]
} | 22,809 | ||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
462,
544
]
} | 22,810 | ||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
823,
911
]
} | 22,811 | ||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1575,
1654
]
} | 22,812 | ||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1967,
2069
]
} | 22,813 | ||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
259,
445
]
} | 22,814 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
723,
864
]
} | 22,815 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1162,
1359
]
} | 22,816 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
1613,
2089
]
} | 22,817 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
2560,
2697
]
} | 22,818 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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) {
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.8.9+commit.e5eed63a | {
"func_code_index": [
3188,
3471
]
} | 22,819 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
3931,
4066
]
} | 22,820 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | 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 ... | /**
* @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.8.9+commit.e5eed63a | {
"func_code_index": [
4546,
4717
]
} | 22,821 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Context | abstract contract Context {
//function _msgSender() internal view virtual returns (address payable) {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mut... | _msgSender | function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
| //function _msgSender() internal view virtual returns (address payable) { | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
108,
211
]
} | 22,822 | ||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
606,
1230
]
} | 22,823 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2160,
2562
]
} | 22,824 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
3318,
3496
]
} | 22,825 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
3721,
3922
]
} | 22,826 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4292,
4523
]
} | 22,827 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
4774,
5095
]
} | 22,828 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
557,
641
]
} | 22,829 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1200,
1353
]
} | 22,830 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1503,
1752
]
} | 22,831 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = block.timestamp + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1920,
2151
]
} | 22,832 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(block.timestamp > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2222,
2532
]
} | 22,833 | ||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Kongtama | contract Kongtama is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => ... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
11094,
11128
]
} | 22,834 | ||||||
Kongtama | contracts/KONGTAMA.sol | 0x69e58172575de6ff336adb116a820b2d9a347a32 | Solidity | Kongtama | contract Kongtama is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => ... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!canTrade){
require(sender == owner()); // only owner allowed to trade or add liquidity
}
if(botWallets[sender] || botWallets[recipient]){
require(botscantrade, "bots arent all... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
19309,
20428
]
} | 22,835 | ||||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | initReserve | function initReserve(
address aTokenImpl,
address stableDebtTokenImpl,
address variableDebtTokenImpl,
uint8 underlyingAssetDecimals,
address interestRateStrategyAddress
) public onlyPoolAdmin {
address asset = ITokenConfiguration(aTokenImpl).UNDERLYING_ASSET_ADDRESS();
require(
address(pool) == IToke... | /**
* @dev Initializes a reserve
* @param aTokenImpl The address of the aToken contract implementation
* @param stableDebtTokenImpl The address of the stable debt token contract
* @param variableDebtTokenImpl The address of the variable debt token contract
* @param underlyingAssetDecimals The decimals of the rese... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
6278,
8305
]
} | 22,836 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | updateAToken | function updateAToken(address asset, address implementation) external onlyPoolAdmin {
DataTypes.ReserveData memory reserveData = pool.getReserveData(asset);
_upgradeTokenImplementation(asset, reserveData.aTokenAddress, implementation);
emit ATokenUpgraded(asset, reserveData.aTokenAddress, implementation);
}
| /**
* @dev Updates the aToken implementation for the reserve
* @param asset The address of the underlying asset of the reserve to be updated
* @param implementation The address of the new aToken implementation
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
8535,
8861
]
} | 22,837 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | updateStableDebtToken | function updateStableDebtToken(address asset, address implementation) external onlyPoolAdmin {
DataTypes.ReserveData memory reserveData = pool.getReserveData(asset);
_upgradeTokenImplementation(asset, reserveData.stableDebtTokenAddress, implementation);
emit StableDebtTokenUpgraded(asset, reserveData.stableDebt... | /**
* @dev Updates the stable debt token implementation for the reserve
* @param asset The address of the underlying asset of the reserve to be updated
* @param implementation The address of the new aToken implementation
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
9102,
9464
]
} | 22,838 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | updateVariableDebtToken | function updateVariableDebtToken(address asset, address implementation) external onlyPoolAdmin {
DataTypes.ReserveData memory reserveData = pool.getReserveData(asset);
_upgradeTokenImplementation(asset, reserveData.variableDebtTokenAddress, implementation);
emit VariableDebtTokenUpgraded(asset, reserveData.vari... | /**
* @dev Updates the variable debt token implementation for the asset
* @param asset The address of the underlying asset of the reserve to be updated
* @param implementation The address of the new aToken implementation
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
9705,
10075
]
} | 22,839 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | enableBorrowingOnReserve | function enableBorrowingOnReserve(address asset, bool stableBorrowRateEnabled)
external
onlyPoolAdmin
{
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setBorrowingEnabled(true);
currentConfig.setStableRateBorrowingEnabled(stableBorrowRateEnabled);
pool... | /**
* @dev Enables borrowing on a reserve
* @param asset The address of the underlying asset of the reserve
* @param stableBorrowRateEnabled True if stable borrow rate needs to be enabled by default on this reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
10310,
10764
]
} | 22,840 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | disableBorrowingOnReserve | function disableBorrowingOnReserve(address asset) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setBorrowingEnabled(false);
pool.setConfiguration(asset, currentConfig.data);
emit BorrowingDisabledOnReserve(asset);
}
| /**
* @dev Disables borrowing on a reserve
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
10890,
11207
]
} | 22,841 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | configureReserveAsCollateral | function configureReserveAsCollateral(
address asset,
uint256 ltv,
uint256 liquidationThreshold,
uint256 liquidationBonus
) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
//validation of the parameters: the LTV can
//only be lower or equal ... | /**
* @dev Configures the reserve collateralization parameters
* all the values are expressed in percentages with two decimals of precision. A valid value is 10000, which means 100.00%
* @param asset The address of the underlying asset of the reserve
* @param ltv The loan to value of the asset when used as collater... | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
11864,
13652
]
} | 22,842 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | enableReserveStableRate | function enableReserveStableRate(address asset) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setStableRateBorrowingEnabled(true);
pool.setConfiguration(asset, currentConfig.data);
emit StableRateEnabledOnReserve(asset);
}
| /**
* @dev Enable stable rate borrowing on a reserve
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
13788,
14113
]
} | 22,843 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | disableReserveStableRate | function disableReserveStableRate(address asset) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setStableRateBorrowingEnabled(false);
pool.setConfiguration(asset, currentConfig.data);
emit StableRateDisabledOnReserve(asset);
}
| /**
* @dev Disable stable rate borrowing on a reserve
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
14250,
14578
]
} | 22,844 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | activateReserve | function activateReserve(address asset) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setActive(true);
pool.setConfiguration(asset, currentConfig.data);
emit ReserveActivated(asset);
}
| /**
* @dev Activates a reserve
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
14692,
14979
]
} | 22,845 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | deactivateReserve | function deactivateReserve(address asset) external onlyPoolAdmin {
_checkNoLiquidity(asset);
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setActive(false);
pool.setConfiguration(asset, currentConfig.data);
emit ReserveDeactivated(asset);
}
| /**
* @dev Deactivates a reserve
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
15095,
15418
]
} | 22,846 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | freezeReserve | function freezeReserve(address asset) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setFrozen(true);
pool.setConfiguration(asset, currentConfig.data);
emit ReserveFrozen(asset);
}
| /**
* @dev Freezes a reserve. A frozen reserve doesn't allow any new deposit, borrow or rate swap
* but allows repayments, liquidations, rate rebalances and withdrawals
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
15674,
15956
]
} | 22,847 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | unfreezeReserve | function unfreezeReserve(address asset) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setFrozen(false);
pool.setConfiguration(asset, currentConfig.data);
emit ReserveUnfrozen(asset);
}
| /**
* @dev Unfreezes a reserve
* @param asset The address of the underlying asset of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
16070,
16357
]
} | 22,848 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | setReserveFactor | function setReserveFactor(address asset, uint256 reserveFactor) external onlyPoolAdmin {
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
currentConfig.setReserveFactor(reserveFactor);
pool.setConfiguration(asset, currentConfig.data);
emit ReserveFactorChanged(asset, res... | /**
* @dev Updates the reserve factor of a reserve
* @param asset The address of the underlying asset of the reserve
* @param reserveFactor The new reserve factor of the reserve
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
16555,
16901
]
} | 22,849 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | setReserveInterestRateStrategyAddress | function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress)
external
onlyPoolAdmin
{
pool.setReserveInterestRateStrategyAddress(asset, rateStrategyAddress);
emit ReserveInterestRateStrategyChanged(asset, rateStrategyAddress);
}
| /**
* @dev Sets the interest rate strategy of a reserve
* @param asset The address of the underlying asset of the reserve
* @param rateStrategyAddress The new address of the interest strategy contract
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
17122,
17402
]
} | 22,850 | ||
LendingPool | contracts/protocol/lendingpool/LendingPoolConfigurator.sol | 0xc6845a5c768bf8d7681249f8927877efda425baf | Solidity | LendingPoolConfigurator | contract LendingPoolConfigurator is VersionedInitializable {
using SafeMath for uint256;
using PercentageMath for uint256;
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
/**
* @dev Emitted when a reserve is initialized.
* @param asset The address of the underlying asset of the reserve
... | /**
* @title LendingPoolConfigurator contract
* @author Aave
* @dev Implements the configuration methods for the Aave protocol
**/ | NatSpecMultiLine | setPoolPause | function setPoolPause(bool val) external onlyEmergencyAdmin {
pool.setPause(val);
}
| /**
* @dev pauses or unpauses all the actions of the protocol, including aToken transfers
* @param val true if protocol needs to be paused, false otherwise
**/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
17575,
17666
]
} | 22,851 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | setExitQueue | function setExitQueue(ExitQueue _EXIT_QUEUE) external onlyOwner {
EXIT_QUEUE = _EXIT_QUEUE;
}
| /** Sets epoch percentage yield */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1946,
2055
]
} | 22,852 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | setEpy | function setEpy(uint256 _numerator, uint256 _denominator) external onlyOwner {
_updateAccumulationFactor();
epy = ABDKMath64x64.fromUInt(1).add(ABDKMath64x64.divu(_numerator, _denominator));
}
| /** Sets epoch percentage yield */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2096,
2312
]
} | 22,853 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | getEpy | function getEpy(uint256 _scale) external view returns (uint256) {
return epy.sub(ABDKMath64x64.fromUInt(1)).mul(ABDKMath64x64.fromUInt(_scale)).toUInt();
}
| /** Get EPY as uint, scaled up the given factor (for reporting) */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2385,
2556
]
} | 22,854 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | getAccumulationFactor | function getAccumulationFactor(uint256 _scale) external view returns(uint256) {
return _accumulationFactorAt(currentEpoch()).mul(ABDKMath64x64.fromUInt(_scale)).toUInt();
}
| /** Return current accumulation factor, scaled up to account for fractional component */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
2788,
2976
]
} | 22,855 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | _accumulationFactorAt | function _accumulationFactorAt(uint256 epoch) private view returns(int128) {
uint256 _nUnupdatedEpochs = epoch - lastUpdatedEpoch;
return accumulationFactor.mul(epy.pow(_nUnupdatedEpochs));
}
| /** Calculate the updated accumulation factor, based on the current epoch */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3059,
3274
]
} | 22,856 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | balance | function balance(uint256 amountOgTemple) public view returns(uint256) {
return _overflowSafeMul1e18(
ABDKMath64x64.divu(amountOgTemple, 1e18).mul(_accumulationFactorAt(currentEpoch()))
);
}
| /** Balance in TEMPLE for a given amount of OG_TEMPLE */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3337,
3562
]
} | 22,857 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | _updateAccumulationFactor | function _updateAccumulationFactor() internal {
uint256 _currentEpoch = currentEpoch();
// still in previous epoch, no action.
// NOTE: should be a pre-condition that _currentEpoch >= lastUpdatedEpoch
// It's possible to end up in this state if we shorten epoch size.
// As such, it's n... | /** updates rewards in pool */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
3599,
4348
]
} | 22,858 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | stakeFor | function stakeFor(address _staker, uint256 _amountTemple) public returns(uint256 amountOgTemple) {
require(_amountTemple > 0, "Cannot stake 0 tokens");
_updateAccumulationFactor();
// net past value/genesis value/OG Value for the temple you are putting in.
amountOgTemple = _overflowSafeMul1e18(ABDKMat... | /** Stake on behalf of a given address. Used by other contracts (like Presale) */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
4436,
5064
]
} | 22,859 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | stake | function stake(uint256 _amountTemple) external returns(uint256 amountOgTemple) {
return stakeFor(msg.sender, _amountTemple);
}
| /** Stake temple */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5090,
5232
]
} | 22,860 | ||
Presale | contracts/TempleStaking.sol | 0xdc9d4685847f1c8bdd4ce86be6a83fa09b6a08b1 | Solidity | TempleStaking | contract TempleStaking is Ownable {
using ABDKMath64x64 for int128;
TempleERC20Token immutable public TEMPLE; // The token being staked, for which TEMPLE rewards are generated
OGTemple immutable public OG_TEMPLE; // Token used to redeem staked TEMPLE
ExitQueue public EXIT_QUEUE; // unstake exit ... | /**
* Mechancics of how a user can stake temple.
*/ | NatSpecMultiLine | unstake | function unstake(uint256 _amountOgTemple) external {
require(OG_TEMPLE.allowance(msg.sender, address(this)) >= _amountOgTemple, 'Insufficient OGTemple allowance. Cannot unstake');
_updateAccumulationFactor();
uint256 unstakeBalanceTemple = balance(_amountOgTemple);
OG_TEMPLE.burnFrom(msg.sender,... | /** Unstake temple */ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5260,
5840
]
} | 22,861 | ||
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() internal {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
m... | Ownable | function Ownable() internal {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
170,
232
]
} | 22,862 | |||
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() internal {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
m... | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
557,
689
]
} | 22,863 | |||
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | PinProtocolInvestment | contract PinProtocolInvestment is Ownable {
// Address of the target contract
address public investment_address = 0x77D0f9017304e53181d9519792887E78161ABD25;
// Major partner address
address public major_partner_address = 0x8f0592bDCeE38774d93bC1fd2c97ee6540385356;
// Minor partner address
address p... | // The owner of this contract should be an externally owned account | LineComment | function() payable public {
execute_transfer(msg.value);
}
| // Payments to this contract require a bit of gas. 100k should be enough. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
531,
600
]
} | 22,864 | ||
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | PinProtocolInvestment | contract PinProtocolInvestment is Ownable {
// Address of the target contract
address public investment_address = 0x77D0f9017304e53181d9519792887E78161ABD25;
// Major partner address
address public major_partner_address = 0x8f0592bDCeE38774d93bC1fd2c97ee6540385356;
// Minor partner address
address p... | // The owner of this contract should be an externally owned account | LineComment | execute_transfer | function execute_transfer(uint transfer_amount) internal {
// Major fee is 60% * (1/11) * value = 6 * value / (10 * 11)
uint major_fee = transfer_amount * 6 / (10 * 11);
// Minor fee is 40% * (1/11) * value = 4 * value / (10 * 11)
uint minor_fee = transfer_amount * 4 / (10 * 11);
require(major_partner_... | // Transfer some funds to the target investment address. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
663,
1234
]
} | 22,865 | |
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | PinProtocolInvestment | contract PinProtocolInvestment is Ownable {
// Address of the target contract
address public investment_address = 0x77D0f9017304e53181d9519792887E78161ABD25;
// Major partner address
address public major_partner_address = 0x8f0592bDCeE38774d93bC1fd2c97ee6540385356;
// Minor partner address
address p... | // The owner of this contract should be an externally owned account | LineComment | set_transfer_gas | function set_transfer_gas(uint transfer_gas) public onlyOwner {
gas = transfer_gas;
}
| // Sets the amount of gas allowed to investors | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
1287,
1383
]
} | 22,866 | |
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | PinProtocolInvestment | contract PinProtocolInvestment is Ownable {
// Address of the target contract
address public investment_address = 0x77D0f9017304e53181d9519792887E78161ABD25;
// Major partner address
address public major_partner_address = 0x8f0592bDCeE38774d93bC1fd2c97ee6540385356;
// Minor partner address
address p... | // The owner of this contract should be an externally owned account | LineComment | approve_unwanted_tokens | function approve_unwanted_tokens(EIP20Token token, address dest, uint value) public onlyOwner {
token.approve(dest, value);
}
| // We can use this function to move unwanted tokens in the contract | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
1457,
1593
]
} | 22,867 | |
PinProtocolInvestment | PinProtocolInvestment.sol | 0x17e5629660c3ee2ac68498e24e8607a712ba64ff | Solidity | PinProtocolInvestment | contract PinProtocolInvestment is Ownable {
// Address of the target contract
address public investment_address = 0x77D0f9017304e53181d9519792887E78161ABD25;
// Major partner address
address public major_partner_address = 0x8f0592bDCeE38774d93bC1fd2c97ee6540385356;
// Minor partner address
address p... | // The owner of this contract should be an externally owned account | LineComment | emergency_withdraw | function emergency_withdraw() public onlyOwner {
require(msg.sender.call.gas(gas).value(this.balance)());
}
| // This contract is designed to have no balance.
// However, we include this function to avoid stuck value by some unknown mishap. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://80489594520b19229203fce80793dcbf6ea2116b812fad9a644df25818d3c679 | {
"func_code_index": [
1733,
1851
]
} | 22,868 | |
TokensTypeStorage | TokensTypeStorage.sol | 0x67d635a86d5bff3d3742a93761be0e272bb7541e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://bb17eecc529f536f4eae6d15e63a373ec00d00191b7a1131489c03f2d1813912 | {
"func_code_index": [
815,
932
]
} | 22,869 |
TokensTypeStorage | TokensTypeStorage.sol | 0x67d635a86d5bff3d3742a93761be0e272bb7541e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://bb17eecc529f536f4eae6d15e63a373ec00d00191b7a1131489c03f2d1813912 | {
"func_code_index": [
1097,
1205
]
} | 22,870 |
TokensTypeStorage | TokensTypeStorage.sol | 0x67d635a86d5bff3d3742a93761be0e272bb7541e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://bb17eecc529f536f4eae6d15e63a373ec00d00191b7a1131489c03f2d1813912 | {
"func_code_index": [
1343,
1521
]
} | 22,871 |
TokensTypeStorage | TokensTypeStorage.sol | 0x67d635a86d5bff3d3742a93761be0e272bb7541e | Solidity | TokensTypeStorage | contract TokensTypeStorage is Ownable {
// check if token alredy registred
mapping(address => bool) public isRegistred;
// tokens types
mapping(address => bytes32) public getType;
// addresses which can write to this contract
mapping(address => bool) public isPermittedAddress;
// all available ty... | /**
* Logic: Permitetd addresses can write to this contract types of converted tokens
*
* Motivation:
* Due fact tokens can be different like Uniswap/Bancor pool, Synthetix, Compound ect
* we need a certain method for convert a certain token.
* so we mark type for new token once after success convert
*/ | NatSpecMultiLine | addNewTokenType | function addNewTokenType(address _token, string _type) public onlyPermitted {
// Don't add if alredy registred
if(isRegistred[_token])
return;
// Add
getType[_token] = stringToBytes32(_type);
isRegistred[_token] = true;
allTypes.push(_type);
}
| // allow add new token type from trade portals | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://bb17eecc529f536f4eae6d15e63a373ec00d00191b7a1131489c03f2d1813912 | {
"func_code_index": [
549,
837
]
} | 22,872 |
TokensTypeStorage | TokensTypeStorage.sol | 0x67d635a86d5bff3d3742a93761be0e272bb7541e | Solidity | TokensTypeStorage | contract TokensTypeStorage is Ownable {
// check if token alredy registred
mapping(address => bool) public isRegistred;
// tokens types
mapping(address => bytes32) public getType;
// addresses which can write to this contract
mapping(address => bool) public isPermittedAddress;
// all available ty... | /**
* Logic: Permitetd addresses can write to this contract types of converted tokens
*
* Motivation:
* Due fact tokens can be different like Uniswap/Bancor pool, Synthetix, Compound ect
* we need a certain method for convert a certain token.
* so we mark type for new token once after success convert
*/ | NatSpecMultiLine | setTokenTypeAsOwner | function setTokenTypeAsOwner(address _token, string _type) public onlyOwner{
// get previos type
bytes32 prevType = getType[_token];
// Update type
getType[_token] = stringToBytes32(_type);
isRegistred[_token] = true;
// if new type unique add it to the list
if(stringToBytes32(_type) != prevTyp... | // allow update token type from owner wallet | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://bb17eecc529f536f4eae6d15e63a373ec00d00191b7a1131489c03f2d1813912 | {
"func_code_index": [
890,
1264
]
} | 22,873 |
TokensTypeStorage | TokensTypeStorage.sol | 0x67d635a86d5bff3d3742a93761be0e272bb7541e | Solidity | TokensTypeStorage | contract TokensTypeStorage is Ownable {
// check if token alredy registred
mapping(address => bool) public isRegistred;
// tokens types
mapping(address => bytes32) public getType;
// addresses which can write to this contract
mapping(address => bool) public isPermittedAddress;
// all available ty... | /**
* Logic: Permitetd addresses can write to this contract types of converted tokens
*
* Motivation:
* Due fact tokens can be different like Uniswap/Bancor pool, Synthetix, Compound ect
* we need a certain method for convert a certain token.
* so we mark type for new token once after success convert
*/ | NatSpecMultiLine | stringToBytes32 | function stringToBytes32(string memory source) private pure returns (bytes32 result) {
bytes memory tempEmptyStringTest = bytes(source);
if (tempEmptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
| // helper for convert dynamic string size to fixed bytes32 size | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://bb17eecc529f536f4eae6d15e63a373ec00d00191b7a1131489c03f2d1813912 | {
"func_code_index": [
1585,
1874
]
} | 22,874 |
DEIProxy | contracts/Proxy/DEIProxy.sol | 0xb095aa0a0a206ed943faa7f5bd28a47aaf2fec09 | Solidity | DEIProxy | contract DEIProxy is Ownable {
struct ProxyInput {
uint amountIn;
uint minAmountOut;
uint deusPriceUSD;
uint colPriceUSD;
uint usdcForMintAmount;
uint deusNeededAmount;
uint expireBlock;
bytes[] sigs;
}
/* ========== STATE VARIABLES ========== */
address public uniswapRouter;
address public mint... | setSSP | function setSSP(address _sspAddress) external onlyOwner {
sspAddress = _sspAddress;
IERC20(usdcAddress).approve(sspAddress, type(uint256).max);
}
| /* ========== RESTRICTED FUNCTIONS ========== */ | Comment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
1542,
1693
]
} | 22,875 | ||||
DEIProxy | contracts/Proxy/DEIProxy.sol | 0xb095aa0a0a206ed943faa7f5bd28a47aaf2fec09 | Solidity | DEIProxy | contract DEIProxy is Ownable {
struct ProxyInput {
uint amountIn;
uint minAmountOut;
uint deusPriceUSD;
uint colPriceUSD;
uint usdcForMintAmount;
uint deusNeededAmount;
uint expireBlock;
bytes[] sigs;
}
/* ========== STATE VARIABLES ========== */
address public uniswapRouter;
address public mint... | USDC2DEI | function USDC2DEI(ProxyInput memory proxyInput) external returns (uint deiAmount) {
IERC20(usdcAddress).transferFrom(msg.sender, address(this), proxyInput.amountIn);
uint globalCollateralRatio = IDEIStablecoin(deiAddress).global_collateral_ratio();
require(0 < globalCollateralRatio && globalCollateralRatio < 1e6, "... | /* ========== PUBLIC FUNCTIONS ========== */ | Comment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
2333,
3790
]
} | 22,876 | ||||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice s... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
57,
120
]
} | 22,877 | |||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice s... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
225,
301
]
} | 22,878 | |||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice s... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
533,
609
]
} | 22,879 | |||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice s... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
926,
1021
]
} | 22,880 | |||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice s... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
1300,
1380
]
} | 22,881 | |||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @notice s... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
1584,
1680
]
} | 22,882 | |||
IdiotSandwich | IdiotSandwich.sol | 0x2ff005ce5dccd8caf497e63d2a3062d474d37fd0 | Solidity | IdiotSandwich | contract IdiotSandwich is StandardToken {
function IdiotSandwich() public {
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
}
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so on... | /* Approves and then calls the receiving contract */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://a67aa0b572390881fb697230bef01de0208335667071cefc210aaf19cc2a049e | {
"func_code_index": [
3250,
4045
]
} | 22,883 | |||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | _isContract | function _isContract(address addr) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(addr)
}
return size > 0;
}
| /**
* @notice Checks if address is a contract
* @dev It prevents contract from being targetted
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
762,
951
]
} | 22,884 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | publicMint | function publicMint() external payable notContract {
// Wait until public start
require(
start <= block.timestamp,
'Mint: Public sale not yet started, bud.'
);
// Check ethereum paid
uint256 mintAmount = msg.value / price;
if (freeMinted < totalFree && !claimed[msg.sender]) {
... | /** @notice Public mint day after whitelist */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1004,
1866
]
} | 22,885 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | mint | function mint(address to, uint256 amount) external onlyOwner {
require(
totalSupply() + amount < collectionSize,
'Mint: Bruh you are overminting.'
);
_safeMint(to, amount);
}
| /** @notice Gift mints after all minted */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1915,
2145
]
} | 22,886 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | setStart | function setStart(uint256 time) external onlyOwner {
start = time;
}
| /** @notice Set Base URI */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2179,
2263
]
} | 22,887 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | setBaseTokenURI | function setBaseTokenURI(string memory uri) external onlyOwner {
baseTokenURI = uri;
}
| /** @notice Set Base URI */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2297,
2399
]
} | 22,888 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | setRevealedTokenUri | function setRevealedTokenUri(string memory uri) external onlyOwner {
revealedTokenURI = uri;
}
| /** @notice Set Reveal URI */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2435,
2545
]
} | 22,889 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | setPrice | function setPrice(uint256 newPrice) external onlyOwner {
price = newPrice;
}
| /** @notice Set Reveal URI */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2581,
2673
]
} | 22,890 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | withdraw | function withdraw(address to) external onlyOwner {
uint256 balance = address(this).balance;
safeTransferETH(to, balance);
}
| /** @notice Withdraw Ethereum */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2712,
2860
]
} | 22,891 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | safeTransferETH | function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
}
| /** Utility Function */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2890,
3091
]
} | 22,892 | ||||
Skulls | contracts/Skulls.sol | 0xd03d68cac608d2688d648206dff3e66b9b085152 | Solidity | Skulls | contract Skulls is Ownable, ERC721A {
using Strings for uint256;
uint256 public start; // Start time
uint256 public price; // Price of each tokens
uint256 public freeMinted;
uint256 public totalFree;
string public baseTokenURI; // Placeholder during mint
string public revealedTokenURI; // R... | tokenURI | function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
require(_exists(tokenId), 'URI: Token does not exist');
// Convert string to bytes so we can check if it's empty or not.
return
bytes(revealedTokenURI).length > 0
? string(abi.enco... | /** @notice Image URI */ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3227,
3676
]
} | 22,893 | ||||
MasterChef | contracts/VodkaToken.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | VodkaToken | contract VodkaToken is ERC20("VodkaToken", "VODKA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount)... | // VodkaToken with Governance. | LineComment | mint | function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount);
}
| /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). | NatSpecSingleLine | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
162,
329
]
} | 22,894 |
MasterChef | contracts/VodkaToken.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | VodkaToken | contract VodkaToken is ERC20("VodkaToken", "VODKA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount)... | // VodkaToken with Governance. | LineComment | delegates | function delegates(address delegator)
external
view
returns (address)
{
return _delegates[delegator];
}
| /**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegator The address to get delegatee for
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
2323,
2465
]
} | 22,895 |
MasterChef | contracts/VodkaToken.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | VodkaToken | contract VodkaToken is ERC20("VodkaToken", "VODKA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount)... | // VodkaToken with Governance. | LineComment | delegate | function delegate(address delegatee) external {
return _delegate(msg.sender, delegatee);
}
| /**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
2608,
2717
]
} | 22,896 |
MasterChef | contracts/VodkaToken.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | VodkaToken | contract VodkaToken is ERC20("VodkaToken", "VODKA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount)... | // VodkaToken with Governance. | LineComment | delegateBySig | function delegateBySig(
address delegatee,
uint nonce,
uint expiry,
uint8 v,
bytes32 r,
bytes32 s
)
external
{
bytes32 domainSeparator = keccak256(
abi.encode(
DOMAIN_TYPEHASH,
keccak256(bytes(name())),
getChainId(),
addr... | /**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECD... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
3146,
4328
]
} | 22,897 |
MasterChef | contracts/VodkaToken.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | VodkaToken | contract VodkaToken is ERC20("VodkaToken", "VODKA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount)... | // VodkaToken with Governance. | LineComment | getCurrentVotes | function getCurrentVotes(address account)
external
view
returns (uint256)
{
uint32 nCheckpoints = numCheckpoints[account];
return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
}
| /**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
4524,
4772
]
} | 22,898 |
MasterChef | contracts/VodkaToken.sol | 0xde251512c64b1c2a03c3d433007b24037257add6 | Solidity | VodkaToken | contract VodkaToken is ERC20("VodkaToken", "VODKA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount)... | // VodkaToken with Governance. | LineComment | getPriorVotes | function getPriorVotes(address account, uint blockNumber)
external
view
returns (uint256)
{
require(blockNumber < block.number, "VODKA::getPriorVotes: not yet determined");
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
// First check most r... | /**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fbc6e87bf2c98b913567b066949875293740fdef18eb0973f8e1bb17c1ba7af7 | {
"func_code_index": [
5198,
6445
]
} | 22,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.